[D&D3.5 + Pathfinder] MT1.3b63 Campaign Macros r05

Discussion concerning lmarkus' campaign framework for D&D3.x and Pathfinder.

Moderators: dorpond, trevor, Azhrei, giliath, Gamerdude, jay, Mr.Ice, lmarkus001

Forum rules
Discussion regarding lmarkus001's framework only. Other posts deleted without notice! :)
Locked
User avatar
lmarkus001
Great Wyrm
Posts: 1867
Joined: Sat Mar 29, 2008 12:30 am
Location: Layfayette Hill, PA

[D&D3.5 + Pathfinder] MT1.3b63 Campaign Macros r05

Post by lmarkus001 »

D&D3.5 & Pathfinder Campaign Framework

Basic Implementation in a New Campaign File:
  • Use a 2MB stack for when you launch MapTools (the default batch file is just 512KB so is insufficient).
  • Designate one map to hold your library tokens and image: tokens. That map must be visible to players.
  • Select the Hidden layer of that map.
  • Drag the library tokens onto the Hidden layer (the actual file names will have version numbers in them): Lib-GlobalsSRDPF.rptok; Lib-libDnD35Pathfinder.rptok; Lib-PathfinderSpells.rptok; Lib-UDFunctionsLGM.rptok.
  • Select the Token layer of that map.
  • Drag the utility tokens on to the Token layer of that map (this provides a nice place for everyone to find their utility tokens): EBT.rptok; TeleportPad.rptok; Timer.rptok.
  • Resize Black Tentacles (EBT) to Colossal. Rezise TeleportPad to Huge.
  • Right click in the Campaign window and Import Macro Set. Import the macroset file MT1.3.xx_DnD35PathfinderMacros0x.mtmacset.
  • Select the menu choice: Edit -> Campaign Properties
  • Press the Import button on the Campaign Properties dialog. Open the MT1.3.xx_DnD35PathfinderProperties0x.mtprops file.
  • Press the OK button on the Campaign Properties dialog.
  • Select the menu choice: File -> Save Campaign As... and save your campaign.
  • Select the menu choice: File -> Open Campaign... and open the campaign file you just saved. You are now up and running with the framework.
  • As a GM, select your choices in the Edit Global Settings dialog.
  • For each token that will want to use the Polymorph macro, you need to create a second token that is just an image (it does not need any property data). But that token must be named image:originalTokenName. Those tokens can be placed on the Hidden layer, and I recommend placing them on the same map you use for your library tokens.
Upgrade steps for existing campaigns using an older version:
  • Open MT1.3.5x_DnD35Pathfinder0x.campaign in MapTools
  • Right click in Campaign Macro window and Export Macro Set
  • Menu: Edit -> Campaign Properties : press Export
  • Select the three library tokens (Lib:libDnD35Pathfinder, Lib:PathfinderSpells, Lib:UDFunctionsLGM) and copy (ctrl-c). If you do not have it yet, also select and copy Lib:GlobalsSRDPF.
  • Open your campaign file
  • Navigate to the map the library token currently resides on
  • Select and delete the relevant library tokens
  • Paste (ctrl-v) the library tokens onto the Hidden layer. There is no need to paste the Lib:GlobalsSRDPF token once you already have it as all this token does is store global variables, in fact you will overwrite your stored Map locations if you replace it. NOTE: If you are upgrading to B56 r05, then you will need to replace your Globals token, so copy the Maps property from your existing token before you replace it so you do not lose your Move-To locations.
  • Clear macros that might get duplicated out of the Campaign Macro window. If you have no custom ones that you generated, then you can just Clear Panel, otherwise just delete the ones that come from my campaign set.
  • Right click in Campaign Macro window and Import Macro Set
  • Menu: Edit -> Campaign Properties : press Import
  • File: Save -> Campaign As... (don't overwrite your existing campaign, make a new copy with save as)
  • Re-Open the campaign file (this is required to load the functions)
Other Useful Things:
Pre-built monster tokens courtesy of IMarvin:
http://www.imarvintpa.com/dndlive/index.php

Pathfinder Stat Block Importer (Cosworth):
http://forums.rptools.net/viewtopic.php?f=8&t=12668

Pathfinder Summoned Creature Tokens (Imper1um):
http://forums.rptools.net/viewtopic.php ... start=1331

Spell Reference (alliasmask):
http://forums.rptools.net/viewtopic.php?f=46&t=12370

D&D3.5 Spell Macros courtesy of Azhrei:
http://forums.rptools.net/viewtopic.php ... 92&start=3

Plothos' 3.5 Spell Manager
http://forums.rptools.net/viewtopic.php?f=8&t=10487
Compatibility Caution: http://forums.rptools.net/viewtopic.php ... &start=402

Wrathgon's rewrite of Plothos' Spell Manager
http://forums.rptools.net/viewtopic.php?f=8&t=11509


The original Generic Attack Macro
The Skills Structure
The Global Handout Mechanism
Evard's Black Tentacles Token


Sample Campaign Files: (Link shows release notes as well.)

For MT1.3.b63 r05

For MT1.3.b63 r04
For MT1.3.b63 r03
For MT1.3.b63 r02
For MT1.3.b63 r01
For MT1.3.b61 r03
For MT1.3.b61 r02
For MT1.3.b61 r01
For MT1.3.b59 r02
For MT1.3.b59 r01
For MT1.3.b56 r09
For MT1.3.b56 r08
For MT1.3.b56 r07
For MT1.3.b56 r06
For MT1.3.b56 r05
For MT1.3.b56 r03
For MT1.3.b56 r02
For MT1.3.b56 r01

For MT1.3.b55 r03
For MT1.3.b55 r01

For MT1.3.b54 r02
For MT1.3.b54 r01

For MT1.3.b53 r04
For MT1.3.b53 r03
For MT1.3.b53 r02
For MT1.3.b53 r01

For MT1.3.b50 r04
For MT1.3.b50 r03
For MT1.3.b50 r02
For MT1.3.b50 r01

For MT1.3.b49 r03
For MT1.3.b49 r02

For MT1.3.b48 r01b

For MT1.3.b47 r02

For MT1.3.b45 r02

1.3.b61.01
UPDATE! This new campaign file is for Maptools 1.3.B61
http://www.4shared.com/file/146566549/c5990b17/MT1361_DnD35PathfinderCore01.html

Updates:
  • The download now has all the relevant framework parts as separate files as well as including the old Core.cmpgn so you can play with the stuff and see how it should work. Parts list (bold indicates has changed since previous release):
    [list][*]Lib-GlobalsSRDPF b59 01.rptok, [*]Lib-libDnD35Pathfinder b61 01.rptok, [*]Lib-PathfinderSpells b59 02.rptok, [*]Lib-UDFunctionsLGM b61 01.rptok, [*]MT1.3.61_DnD35PathfinderMacros01.mtmacset, [*]MT1.3.61_DnD35PathfinderProperties01.mtprops, [*]EBT b59 02.rptok, [*]TeleportPad b59 02.rptok, [*]Timer b56 02.rptok, [*]SRDVariantTokenMacros.rptok, [*]MT1.3.61_DnD35PathfinderCore01.cmpgn


[*] Pathfinder CMD corrected.
[*] Dedicated Skill Check now works for subcategories like Knowledge (arcana).
[*] Polymorph D&D -- Added skill alternate stat support.
[*] Global Setting: Change token image when unconcious -- The functioning of this has changed. As before, any token with a Handout image will have that image become the token image when that token goes below 0 hitpoints. But now, the orignial "alive" image assest ID is stored in the Private property on the token and is referenced to restore the token image when it gets to 0 or more hitpoints. Every token that can take damage and has a Handout image should have a copy of that token made and renamed to "image:tokenName" (the tokenName must exactly match the original token name). This image:tokenName can live on any map and can be stored on the Hidden layer, so you can dedicate a map to resources.
[*] NEW Global Property: StartMap -- used by onCampaignLoad to load the desired map on startup.
[*] NEW Macro: setStartMap -- Identify a map name and x,y coordinate that will be loaded when the campaign is loaded (or players connect).
[*] TeleportPad -- Removes from initiative before moving to avoid issues. Shifts the player's map and view point to the destination location. Token initiative is preserved and moved from one map panel to another.
[*] NEW Macro: Init SortTop -- replaces Init Addparticipant and Init NewEncounter. Sets round to 1 or increments round, sorts init list, sets top of the order as active.
[*] MoveTokensToMap -- Lots of changes. Secretly moves NPCs. Provides a link in chat for the GM to be taken to the map and location of the destination. For PCs, sends a link to the owners of the tokens. They click the link and their token will be moved to the destination map AND their view will center on their token at the new location. This approach removes the issue of multiple people modifying a token at the same time (GM and Player) and it makes the move less confusing and easier for the player (their view gets automatically changed). Token initiative is preserved and moved from one map panel to another. The old method of the GM forcing the PC tokens is still an option for those special cases when that is preffered.[/list]

Short Term ToDo List
  • Polymorph for Pathfinder
  • Quickie Condition Set
1.3b59r02
UPDATE! This new campaign file is for Maptools 1.3.B59
http://www.4shared.com/file/142487744/80338d76/MT1359_DnD35PathfinderCore02.html

Updates:
  • The download now has all the relevant framework parts as separate files as well as including the old Core.cmpgn so you can play with the stuff and see how it should work. Parts list (bold indicates has changed since previous release):
    [list][*]Lib-GlobalsSRDPF b59 01.rptok, [*]Lib-libDnD35Pathfinder b59 02.rptok, [*]Lib-PathfinderSpells b59 02.rptok, [*]Lib-UDFunctionsLGM b59 02.rptok, [*]MT1.3.59_DnD35PathfinderMacros02.mtmacset, [*]MT1.3.59_DnD35PathfinderProperties02.mtprops, [*]EBT b59 02.rptok, [*]TeleportPad.rptok, [*]Timer b56 02.rptok, [*]SRDVariantTokenMacros.rptok, [*]MT1.3.59_DnD35PathfinderCore02.cmpgn


[*] SkillCheck remembers last skill used (again).
[*] NEW Dedicated Skill Check -- a macro you can hard code to perform a specific skill check. Useful to copy on tokens.
[*] MoveTokensToMap -- new option: scatter. When selected the tokens will be spread to fill the 3x3 area surrounding the target x,y coordinate.
[*] PolymorphD&D - major enhancements... support for Alter Self, Baneful Poly, Shapechange, Wild Shape, Alter Self. Allows for armor/shield to stay active after change. Adds racial skills. Filters by creature type.
[*] Rage -- Now stores the selected Rage parameters, and cycles between Normal -> Raged -> Fatigued. It understands the difference between the short term Rage induced fatigue and the fatiged state (so you can now Rage when fatigued or exhausted).
[*] TeleportPad -- New token/macro (THANKS DrVesuvius! http://forums.rptools.net/viewtopic.php ... 97&start=5 ). Place this token, then run the SummonPlayers macro on the token, select the desired players. The selected players will recieve a macrolink in chat. If they select their token then click the macrolink, their token will be moved to a spot near the TeleportPad (it selects a random spot in a 3x3 grid using the TeleportPad as the upper left corner).
[*] Whisper -- Now clears the text box after sending.
[*] PathfinderSpells Library -- made MageArmor, CatGrace, SoF all use the subRecalcAC macro so AC now gets updated correctly.
[*] FullHP -- GM macro that sets the selected tokens to maximum hitpoints.
[*] HealAnother -- Macro that prompts for fixed or rolled hitpoints, then sends a link in chat to the designated player, who in turn selects their token and clicks the link to apply the healing.
[*] Updated Character Sheet -- Added a "short form" of the skills table to the Main tab. This gives you access to most of the data needed during play. For detailed breakdown you can still go to the Skills tab. Additionally, cleaned up a couple of tool-tips here and there.
Image
[*] Updated Black Tentacles -- Now uses the release Pathfinder mechanisms vs. the Beta PF. Also, the generated name now uses a random 4 digit extension instead of the mega-long tokenID.
[*] Modified some text info in dialogs to clarify.[/list]

Short Term ToDo List
  • Polymorph for Pathfinder
  • Quickie Condition Set
1.3b59r01
This new campaign file is for Maptools 1.3.B59
http://www.4shared.com/file/136621263/f63373c0/MT1359_DnD35PathfinderCore01.html

Upgrade Warning!
If you have set up Move-To points or Global Handouts in your campaign, those are stored on the Lib:GlobalsSRDPF token in the Maps and Handouts properties. If you replace your Globals token, you need to copy the values in the Maps and Handouts properties before you delete that token.

Updates:
  • The download now has all the relevant framework parts as separate files as well as including the old Core.cmpgn so you can play with the stuff and see how it should work. Parts list (bold indicates has changed since previous release):
    [list][*]EBT.rptok, [*]Lib-GlobalsSRDPF b59 01.rptok, [*]Lib-libDnD35Pathfinder b59 01.rptok, [*]Lib-PathfinderSpells b56-08.rptok, [*]Lib-UDFunctionsLGM b56 10.rptok, [*]MT1.3.59_DnD35PathfinderMacros01.mtmacset, [*]MT1.3.59_DnD35PathfinderProperties01.mtprops, [*]Timer b56 02.rptok, [*]SRDVariantTokenMacros.rptok, [*]MT1.3.59_DnD35PathfinderCore01.cmpgn


[*] New feature: Damage Reduction / Energy Resistance.
[*] New Property DRER -- This is a JSON object listing the various Damage Reduction / Energy Resistances.
[*] Updated ChangeHP -- Now prompts for damage/energy reduction. Keeps NPC reductions private.
[*] Updated editCore and setupBlank -- new tab for entering DR/ER information.

[*] Updated TurnUndeadPF -- Now prompts for Living, Undead, Turn, Command and gives different text output. The feat Improved Turning was renamed to Improved Channeling in PF so this required a data change (players that were using IT must reselect IC in the Feats tab of the character sheet).
[*] Updated Pathfinder Special attack text to release version (based on http://sites.google.com/site/pathfinderogc )
[*] Updated "Special Attack" campaign macro -- now fetches the reference from the appropriate table. This change required a small change to all of the various special attack macros on the library.
[*] Pathfinder CMD support -- Updated tblCSac, editArmor, subRecalcAC, setupBlank, and the various special attack macros (just changed the DC text 15+CMB to CMD).
[*] Fix REST -- corrected "act" error
[*] Fix: edit Core, setupBlank -- Correctly randomizes max hitpoints again (should you enter things like 2d8 for the hitpoints).
[*] Fix: onCampaignLoad, editGlobals -- removed the abort(0), abort(isGM()) which was causing other onCampaignLoads to fail to run. Added an IF( isGM() ) to editGlobals to provide the same restrictive functionality that does not cause other onCampaignLoad macros to fail to run.
[*] Updated Lib:GlobalsSRDPF for Pathfinder -- SkillsSys: Ride skill now suffers from an armor check penalty. You can edit this in your own Lib:GlobalsSRDPF token if you do not wish to replace an existing one, just use the "edit Globals" macro.[/list]
List of Reserved Variables aka Properties

Code: Select all

Private              AC
PrivateJSON          AllSaves
Race                 AllStats
SizeM                ArmorCheckPenalty
Level                ArmorClass
Levels               BAB
HP                   BonusTypedItems
HPmax                ChaB
HPtemp               ChaMod
HPNonLethalDMG       ChannelEnergy
BAB                  Charisma
Reach                ConB
MiscATK              ConMod
MiscDMG              Constitution
ChannelEnergy        DR
HealingSurges        DRER
Daily                Daily
InitMod              DexB
Movement             DexMod
Speed                Dexterity
SpeedMod             Elevation
Elevation            Feats
AC                   Fort
ArmorClass           FortBonus
SpecialATK           HP
SpecialQual          HPNonLethalDMG
DR                   HPmax
DRER                 HPtemp
BonusTypedItems      HealingSurges
ItemSlots            HelpWeaponProperty
Strength             InitMod
StrMod               IntB
Dexterity            IntMod
DexMod               Intelligence
Constitution         ItemSlots
ConMod               Level
Intelligence         Levels
IntMod               MiscATK
Wisdom               MiscDMG
WisMod               Movement
Charisma             Private
ChaMod               PrivateJSON
StatCheckMod         Race
AllStats             Reach
Fort                 Reflex
FortBonus            ReflexBonus
Reflex               SizeM
ReflexBonus          SkillMisc
Will                 SkillStat
WillBonus            Skills
AllSaves             SkillsJ
SkillsJ              SpecialATK
Skills               SpecialQual
SkillStat            Speed
ArmorCheckPenalty    SpeedMod
SkillMisc            StatCheckMod
Feats                Str2hB
Weapon0              StrB
Weapon1              StrMod
Weapon2              StrSecB
Weapon3              Strength
Weapon4              Weapon0
Weapon5              Weapon1
Weapon6              Weapon2
Weapon7              Weapon3
Weapon8              Weapon4
Weapon9              Weapon5
HelpWeaponProperty   Weapon6
StrB                 Weapon7
Str2hB               Weapon8
StrSecB              Weapon9
DexB                 Will
ConB                 WillBonus
IntB                 WisB
WisB                 WisMod
ChaB                 Wisdom
Attachments
SRD_PF_Framework.zip
Not ready for anyone to look at documentation.
(133.84 KiB) Downloaded 1343 times
Last edited by lmarkus001 on Tue Apr 20, 2010 1:52 pm, edited 91 times in total.

Big_Mac
Dragon
Posts: 631
Joined: Thu Aug 17, 2006 10:37 am
Location: Brockton, MA
Contact:

Post by Big_Mac »

Thanks for the work. I definitely will be looking into this macro.
--
Big Mac

User avatar
lmarkus001
Great Wyrm
Posts: 1867
Joined: Sat Mar 29, 2008 12:30 am
Location: Layfayette Hill, PA

Post by lmarkus001 »

I have my first cut at the updated D&D 3.5 campaign file that I will be using to run on Friday. It includes:

Properties
States
Combat Macros
Skill Check Macro
Stat Check Macro
Health Macros
AFK Macro
etc.

Image

D&D3.5 MT1.3b43 Generic Attack Macro

Sample Campaign File for MapTool 1.3.b43

As a GM, MapTool can greatly speed up the mechanics of battle. But to do that, a reasonably sophisticated algorithm is needed for the attack macro. Many things need to be taken into account. Knizia.fan has enabled a nice way to extend properties that makes a generic attack macro much cleaner.

The generic attack macro I created reasonably handles the following:
  • * Up to 9 distinct attacks (worst case I could identify was 7 - Marilith Demon with 6 different weapons and a tail)
    * Primary vs. Secondary vs. 2 Handed vs. Two-Weapon attacks (both attack mods and STR mods)
    * Weapon Finesse
    * STR bows
    * Multiple tentacles
    * Decaying attacks for BAB > 5 (multiple attacks per round)
    * Special damage like flaming sword
    * Criticals (and crit multipliers 2,3,4)
    * Special damage criticals (Burst weapons)
    * Melee vs. Ranged attacks
    * Verbosely show all attack information and damage modifiers
This macro will not handle:
  • * Cascading damage weapons like the Arqebus
    * Display of damage rolls
    * Multiple attacks of off-hand weapon for improved/greater two-weapon fighting
    * No Strength penalty on bows that are composite (PHB pg. 134)
Here is a sample verbose output:
Image
This creature has a bite and claw/claw secondary attacks, and is weilding a Longsword +1 Flaming Burst as a primary weapon and gains attacks with it like a player character.

Note: Currently there is a limit on how much output a macro can generate, that is why you only see verbose information for 2 of the 3 attacks, if I included the 3rd the macro would blow up.


To use this macro, the following properties must exist:

Code: Select all

Private:" ; "
SizeM:0
BAB:0
MultAtkMP:0
MultAtkM:-5
WeaponFinesse:0
MiscATK:0
MiscDMG:0
[---Stats/Saves---]
Strength:10
Dexterity:10
Constitution:10
Intelligence:10
Wisdom:10
*Charisma:10
Fort:0
Reflex:0
Will:0
[---Weapons---]
Weapon1:Name=NA ; Primary=1 ; Quantity=1 ; Manufactured=0 ; AtkBonus=0 ; CritMult=2 ; CritRange=20 ; Damage=1d4 ; DmgMax=4 ; DmgExtra=0d6 ; DmgExtraCrit=0d10 ; DmgExtraName= ; DmgBonusCap=50 ; TwoHanded=0 ; Finesse=0 ; OHLight=0 ; Ranged=0 ;
Weapon2:Name=NA ; Primary=0 ; Quantity=1 ; Manufactured=0 ; AtkBonus=0 ; CritMult=2 ; CritRange=20 ; Damage=1d4 ; DmgMax=4 ; DmgExtra=0d6 ; DmgExtraCrit=0d10 ; DmgExtraName= ; DmgBonusCap=50 ; TwoHanded=0 ; Finesse=0 ; OHLight=0 ; Ranged=0 ;
Weapon3:Name=NA ; Primary=0 ; Quantity=1 ; Manufactured=0 ; AtkBonus=0 ; CritMult=2 ; CritRange=20 ; Damage=1d4 ; DmgMax=4 ; DmgExtra=0d6 ; DmgExtraCrit=0d10 ; DmgExtraName= ; DmgBonusCap=50 ; TwoHanded=0 ; Finesse=0 ; OHLight=0 ; Ranged=0 ;
Weapon4:Name=NA ; Primary=0 ; Quantity=1 ; Manufactured=0 ; AtkBonus=0 ; CritMult=2 ; CritRange=20 ; Damage=1d4 ; DmgMax=4 ; DmgExtra=0d6 ; DmgExtraCrit=0d10 ; DmgExtraName= ; DmgBonusCap=50 ; TwoHanded=0 ; Finesse=0 ; OHLight=0 ; Ranged=0 ;
Weapon5:Name=NA ; Primary=0 ; Quantity=1 ; Manufactured=0 ; AtkBonus=0 ; CritMult=2 ; CritRange=20 ; Damage=1d4 ; DmgMax=4 ; DmgExtra=0d6 ; DmgExtraCrit=0d10 ; DmgExtraName= ; DmgBonusCap=50 ; TwoHanded=0 ; Finesse=0 ; OHLight=0 ; Ranged=0 ;
Weapon6:Name=NA ; Primary=0 ; Quantity=1 ; Manufactured=0 ; AtkBonus=0 ; CritMult=2 ; CritRange=20 ; Damage=1d4 ; DmgMax=4 ; DmgExtra=0d6 ; DmgExtraCrit=0d10 ; DmgExtraName= ; DmgBonusCap=50 ; TwoHanded=0 ; Finesse=0 ; OHLight=0 ; Ranged=0 ;
Weapon7:Name=NA ; Primary=0 ; Quantity=1 ; Manufactured=0 ; AtkBonus=0 ; CritMult=2 ; CritRange=20 ; Damage=1d4 ; DmgMax=4 ; DmgExtra=0d6 ; DmgExtraCrit=0d10 ; DmgExtraName= ; DmgBonusCap=50 ; TwoHanded=0 ; Finesse=0 ; OHLight=0 ; Ranged=0 ;
Weapon8:Name=NA ; Primary=0 ; Quantity=1 ; Manufactured=0 ; AtkBonus=0 ; CritMult=2 ; CritRange=20 ; Damage=1d4 ; DmgMax=4 ; DmgExtra=0d6 ; DmgExtraCrit=0d10 ; DmgExtraName= ; DmgBonusCap=50 ; TwoHanded=0 ; Finesse=0 ; OHLight=0 ; Ranged=0 ;
Weapon9:Name=NA ; Primary=0 ; Quantity=1 ; Manufactured=0 ; AtkBonus=0 ; CritMult=2 ; CritRange=20 ; Damage=1d4 ; DmgMax=4 ; DmgExtra=0d6 ; DmgExtraCrit=0d10 ; DmgExtraName= ; DmgBonusCap=50 ; TwoHanded=0 ; Finesse=0 ; OHLight=0 ; Ranged=0 ;
HelpWeaponProperty:Primary=0-NotInUse 1-Primary 2-Secondary ; Quantity= # natural attacks ; Manufactured= 0-Natural 1-Manufactured (for multi attack if BAB>5) ; AtkBonus= Magic/Masterwork/Feat ; CritRange= Lower end 19-20 is 19 ; DmgExtra= 1d6 (EX from flaming) set to 0d6 for none ; DmgExtraCrit= 1d10 (EX burst) set to 0d10 for none; DmgExtraName= Fire / Cold / Acid / etc. ; TwoHanded=0-One Handed, 1-Two Handed ; Finesse=0-Not Finessable, 1-Finessable ; DmgBonusCap=0-No STR Bonus, >0 - Cap to STR bonus (STR Bow) ; OHLight=0-Offhand heavy, 1-Offhand Light, 2-Not Multi-attack
[---Calculated---]
StrB:{floor((Strength-10)/2))}
Str2hB:{floor(floor((Strength-10)/2)+(max(0,floor((Strength-10)/4))))}
StrSecB:{floor((Strength-10)/4))}
DexB:{floor((Dexterity-10)/2))} 
Before the macro can process, the base character information needs to be setup, and the various attack forms need to be identified. The attack forms (weapons) are edited with this dialog:

Image

Which is generated by this macro:

Code: Select all

============
Weapons Edit
============

<!-- Build the list of weapon names. -->
[h: WpnList = ""]
[h, c(9,""): WpnList = WpnList + getStrProp(eval("Weapon" + roll.count), "Name") + ","]

<!-- Ask the user to select one of the weapons. -->
[h: fail = input("WpnNum | " + WpnList + " | Select weapon to edit | LIST")]
[h: abort(fail)]
 
<!-- Obtain the property string for the selected weapon. -->
[h: WpnNum = WpnNum + 1]
[h: WpnName = "Weapon" + WpnNum]
[h: WpnProps = eval(WpnName)]
 
<!-- Error checking -- make sure the property string has been set up already. -->
[h: NumProps = countStrProp(eval(WpnName))]
[h: abort(NumProps)]
 
<!-- Put up a dialog with all the properties in the property string.
  -- Note that the new property string is automatically assigned back to the
  -- token property that holds the weapon's property string. -->
[h: NumHelpProps = countStrProp(HelpWeaponProperty)]
[h: HelpLabel = ""]
[h, c(NumHelpProps,""): eval("HelpLabel" + roll.count + " =  'junk" + roll.count + " | " + indexValueStrProp(HelpWeaponProperty,roll.count - 1) + " | " +  indexKeyStrProp(HelpWeaponProperty,roll.count - 1) + " | LABEL")]
[h: fail = input("blah | " + WpnNum + " | Weapon number | LABEL", WpnName + " | " + WpnProps + " | Weapon properties | PROPS | setvars=true", HelpLabel1, HelpLabel2, HelpLabel3, HelpLabel4, HelpLabel5, HelpLabel6, HelpLabel7, HelpLabel8, HelpLabel9, HelpLabel10, HelpLabel11, HelpLabel12)]
[h: abort(fail)]
This is basically a copy of kniaia.fan's code with the exceptions of adding help information.

The core code of the attack macro is:

Code: Select all

[H: FAN = floor(BAB/6) + 1]
[H: varsFromStrProp(Weapon1)]
[H: temp1 = ""]
[H: temp2 = ""]
[H: temp3 = ""]
[H: temp4 = ""]
[H: atkDecay = if((Primary == 1) && (Manufactured == 1), 1, 0)]
[H: numAtk = if(atkDecay==1, FAN, Quantity)]
[H: atkMult = If(OHLight==2, 0,If(Primary==1, min(0, max(MultAtkMP, MultAtkMP+(OHLight*2))), min(0, max(MultAtkM, MultAtkM+(OHLight*2)))))]
[H: atkStatB = if(Ranged==1, DexB, if(WeaponFinesse==1 && Finesse==1, max(StrB, DexB), StrB))]
[H: dmgStatB = min(DmgBonusCap, if(TwoHanded==1, Str2hB, if(Primary==2,StrSecB,StrB)))]
[H, C(numAtk, ""): eval("result1" + roll.count + "= 1d20")]
[H, C(numAtk, ""): eval("result1c" + roll.count + "= 1d20")]

[H, C(numAtk, ""): temp1 = temp1 + eval("eval('result1' + roll.count) + BAB -(atkDecay*5*(roll.count - 1)) + atkMult + SizeM + atkStatB + AtkBonus + MiscATK") + if(numAtk != roll.count, ", ", "")]
[H, C(numAtk, ""): temp2 = temp2 + if(eval("result1" + roll.count) >= CritRange, "  <i>. . .  CRIT! (roll " + roll.count + ") -> </i>" + eval("eval('result1c' + roll.count)+BAB-(atkDecay*5*(roll.count - 1))+atkMult+SizeM+atkStatB+AtkBonus+MiscATK"), ""))]
 
[H, C(numAtk, ""): temp3 = temp3
 + eval("eval(Damage) + dmgStatB + MiscDMG")
 + if(DmgExtra != "0d6", " + " + eval(DmgExtra) + " " + DmgExtraName, "")
 + if(numAtk != roll.count, ", "
, "")]
[H, C(numAtk, ""): temp4 = temp4 
+ if(eval("result1" + roll.count) >= CritRange, "  <i>. . .  CRIT! (roll " + roll.count + ") -> </i>" 
  + eval("eval(Damage) + dmgStatB + MiscDMG") 
  + if(CritMult > 2,  " + " + eval("eval(Damage) + dmgStatB + MiscDMG"),"")  
  + if(CritMult > 3,  " + " + eval("eval(Damage) + dmgStatB + MiscDMG"),"")  
  + if(DmgExtraCrit != "0d10", " + " + eval("eval(DmgExtraCrit) * (CritMult - 1)") + " " + DmgExtraName, "")
, "")]

[H: AtkString1 = "<b>HIT:</b>  (<i> " + Name + " </i>) " + temp1 + temp2 + "<br/><b>DMG:</b>  (<i> " + Name + " </i>) " + temp3 + temp4 + "<br />"]

[H: atkList = ""]
[H,C(numAtk, ""): atkList = atkList + if(numAtk != 1, ",", "") + eval("result1" + roll.count)]
[H: atkList = "<font size= -2>Rolls:" + atkList + " BAB:" + BAB + " MultiAtk:" + atkMult + " Size:" + SizeM + " StatBonus:" + atkStatB + " AtkBonus:" + AtkBonus + " CritThreat:" + CritRange + " Misc:" + MiscATK + "</font><br />"]
[H: dmgList = "<font size= -2>DamageDice:" + Damage + " StatBonus:" + dmgStatB + " MiscDMG:" + MiscDMG + " ExtraDMG:" + DmgExtra + " ExtraDMGType:" + DmgExtraName + " CritDMG:" + DmgExtraCrit + " CritMultiplier:" + CritMult + "</font><br />"]

[P: If(Primary != 0, AtkString1, "")]
[P: If(Primary != 0, atkList, "")]
[P: If(Primary != 0, dmgList, "")] 
To deal with multiple different attacks, you just repeat this code N times (I do 9 to cover all 9 potential weapon property entries) and renumber the Weapon in this line (oh and there is no need to repeat [H: FAN = floor(BAB/6) + 1] as that is a global variable):

Code: Select all

[H: varsFromStrProp(Weapon2)] 
For example, this will display 9 different attack forms. (Yeah, a looping structure would rock.)

Code: Select all

[H: FAN = floor(BAB/6) + 1]

[H: varsFromStrProp(Weapon1)]
... core code ...
[H: varsFromStrProp(Weapon2)]
... core code ...
[H: varsFromStrProp(Weapon3)]
... core code ...
[H: varsFromStrProp(Weapon4)]
... core code ...
[H: varsFromStrProp(Weapon5)]
... core code ...
[H: varsFromStrProp(Weapon6)]
... core code ...
[H: varsFromStrProp(Weapon7)]
... core code ...
[H: varsFromStrProp(Weapon8)]
... core code ...
[H: varsFromStrProp(Weapon9)]
... core code ... 

Now I will break down the code for clarification:

First we identify a number of properties about the being:
  • Size Modifier +1 small, 0 medium, -1 large, etc.
    Base Attack Bonus (BAB)
    MultAtkMP:0 For monsters these are default 0/-5 but with feat 0/-2
    MultAtkM:-5 For PCs these are -6/-10 but with feat -4/-4
    WeaponFinesse - Do they have this feat?
    Strength
    Dexterity

Player characters (and monsters that have a manufactured weapon in their first primary attack) get decaying attacks (multiple attacks per round) based on Base Attack Bonus/6 + 1. This first line calculates how many attacks that primary weapon would get.

Code: Select all

[H: FAN = floor(BAB/6) + 1] 
Next we fetch all of the information about the attack form (weapon):

Code: Select all

[H: varsFromStrProp(Weapon1)] 
  • Name=NA ; Text string descriptor
    Primary=1 ; 0=NotInUse, 1=Primary, 2=Secondary
    Quantity=1 ; # of Natural weapon attacks
    Manufactured=0 ; 0=Natural, 1=Manufactured - only ONE weapon may be Primary+Manufactured, the code does not check.
    AtkBonus=0 ; Magic/Masterwork/Feat bonuses go here
    CritMult=2 ; 2/3/4 (4 is the max the code handles)
    CritRange=20 ; Enter the lower end, so if range is 18-20, enter 18
    Damage=1d4 ; Include magic and feat bonus damage here
    DmgMax=4 ; For future use
    DmgExtra=0d6 ; 0d6=null, must be a die roll entry as burps on fixed number
    DmgExtraCrit=0d10 ; 0d10=null, must be a die roll entry as burps on fixed number
    DmgExtraName= ; Text string descriptor like Fire
    DmgBonusCap=50 ; Maximum bonus from strength (useful for things like +2 STR bow)
    TwoHanded=0 ; 0=one handed, 1=two handed
    Finesse=0 ; 0=not finesse able, 1=weapon finesse able
    OHLight=0 ; 0=off hand heavy, 1= off hand light, 2=NOT a multi-attack weapon
    Ranged=0 ; 0=melee, 1= ranged
Calculate if the weapon should get multiple attacks a round if the BAB is high. Note that when entering weapon information, you must only set ONE weapon as both Primary=1 and Manufactured=1. For example, a Marilith Demon gets 6 primary attacks and 1 secondary Tail attack. The Marilith could have 6 weapons in its 6 hands, but ONLY ONE of those gets the multiple attacks per round, while the other 5 count as primary attacks.

This is just a 0/1 multiplier variable that enables/disables the attack decay.

Code: Select all

[H: atkDecay = if((Primary == 1) && (Manufactured == 1), 1, 0)] 
Next we calculate the number of attacks for this weapon. If it gets decay attacks then we use the BAB to calculate the number of attacks. Otherwise we use the weapon property (this is useful for things like 2 claws, or 6 tentacles).

Code: Select all

[H: numAtk = if(atkDecay==1, FAN, Quantity)] 
Next we calculate the attack modifier for secondary and two-weapon attacks. Monsters by default are Primary:0 / Secondary:-5 but with the Multi-Attack feat the Secondary drops to -2. Players are Primary:-6 / Secondary:-10, but with Two-Weapon Fighting feat this drops to -4/-4. Also, if the off-hand weapon is light, that reduces the primary and secondary penalties by 2. If you use a macro that just references specific weapons then you can use OHLight=2 to signify this particular weapon should not get multi-attack penalties.

Code: Select all

[H: atkMult = If(OHLight==2, 0,If(Primary==1, min(0, max(MultAtkMP, MultAtkMP+(OHLight*2))), min(0, max(MultAtkM, MultAtkM+(OHLight*2)))))] 
Now we figure what stat bonus to use for attack. The variables in this are: 1) Is it a ranged weapon (if so use Dex for attack), 2) Is this weapon finesse able and does the character have the Weapon Finesse feat (if so, use the higher of STR or DEX), 3) otherwise, use Strength.

Code: Select all

[H: atkStatB = if(Ranged==1, DexB, if(WeaponFinesse==1 && Finesse==1, max(StrB, DexB), StrB))] 


In the same vein, we calculate what stat bonus to use for attack. This is always Strength but if Secondary then 1/2 STR, if 2-handed weapon or monster with only one (sole) attack then 1.5 * STR. Ranged weapons are controlled by data entry, just set the STR bonus cap for that weapon. That allows coverage for things like slings or +2 strength bows. Note that the variables used here are calculated properties.

Code: Select all

[H: dmgStatB = min(DmgBonusCap, if(TwoHanded==1, Str2hB, if(Primary==2,StrSecB,StrB)))] 
Finally we roll our attack and critical attack dice.

Code: Select all

[H, C(numAtk, ""): eval("result1" + roll.count + "= 1d20")]
[H, C(numAtk, ""): eval("result1c" + roll.count + "= 1d20")] 
Now we assemble our attack rolls, and if the die roll >= critical threat range, we calculate the critical roll too.

Code: Select all

[H, C(numAtk, ""): temp1 = temp1 + eval("eval('result1' + roll.count) + BAB -(atkDecay*5*(roll.count - 1)) + atkMult + SizeM + atkStatB + AtkBonus + MiscATK") + if(numAtk != roll.count, ", ", "")]
[H, C(numAtk, ""): temp2 = temp2 + if(eval("result1" + roll.count) >= CritRange, "  <i>. . .  CRIT! (roll " + roll.count + ") -> </i>" + eval("eval('result1c' + roll.count)+BAB-(atkDecay*5*(roll.count - 1))+atkMult+SizeM+atkStatB+AtkBonus+MiscATK"), ""))]
 
Next we calculate the damage. I have the die rolls occuring directly in these calculations which is why they are not available for verbose output and why cascading damage weapons are not supported. Also, I calculate critical damage through an IF tree so have limited the critical multiplier to 4 (which is the cap in the PHB). Criticals do not add special damage (like from a flaming sword), but will add special critical damage (like from a burst sword). Special critical damage increases if the critical multiplier is > 2 (as per the DMG).

Code: Select all

[H, C(numAtk, ""): temp3 = temp3
 + eval("eval(Damage) + dmgStatB + MiscDMG")
 + if(DmgExtra != "0d6", " + " + eval(DmgExtra) + " " + DmgExtraName, "")
 + if(numAtk != roll.count, ", "
, "")]
[H, C(numAtk, ""): temp4 = temp4 
+ if(eval("result1" + roll.count) >= CritRange, "  <i>. . .  CRIT! (roll " + roll.count + ") -> </i>" 
  + eval("eval(Damage) + dmgStatB + MiscDMG") 
  + if(CritMult > 2,  " + " + eval("eval(Damage) + dmgStatB + MiscDMG"),"")  
  + if(CritMult > 3,  " + " + eval("eval(Damage) + dmgStatB + MiscDMG"),"")  
  + if(DmgExtraCrit != "0d10", " + " + eval("eval(DmgExtraCrit) * (CritMult - 1)") + " " + DmgExtraName, "")
, "")] 
Then I put the attack and damage together in a string.

Code: Select all

[H: AtkString1 = "<b>HIT:</b>  (<i> " + Name + " </i>) " + temp1 + temp2 + "<br/><b>DMG:</b>  (<i> " + Name + " </i>) " + temp3 + temp4 + "<br />"]
 
Then I assemble the various elements and generate the verbose data strings. Note that currently macro output quantity is limited, and this extra data will cause the macro to crash.

Code: Select all

[H: atkList = ""]
[H,C(numAtk, ""): atkList = atkList + if(numAtk != 1, ",", "") + eval("result1" + roll.count)]
[H: atkList = "<font size= -2>Rolls:" + atkList + " BAB:" + BAB + " MultiAtk:" + atkMult + " Size:" + SizeM + " StatBonus:" + atkStatB + " AtkBonus:" + AtkBonus + " CritThreat:" + CritRange + " Misc:" + MiscATK + "</font><br />"]
[H: dmgList = "<font size= -2>DamageDice:" + Damage + " StatBonus:" + dmgStatB + " MiscDMG:" + MiscDMG + " ExtraDMG:" + DmgExtra + " ExtraDMGType:" + DmgExtraName + " CritDMG:" + DmgExtraCrit + " CritMultiplier:" + CritMult + "</font><br />"]
 
And finally we output the results only if the weapon is actually in use (Primary != 0).

Code: Select all

[P: If(Primary != 0, AtkString1, "")]
[P: If(Primary != 0, atkList, "")]
[P: If(Primary != 0, dmgList, "")] 
Last edited by lmarkus001 on Fri Oct 23, 2009 4:33 pm, edited 3 times in total.

Harbinger
Kobold
Posts: 2
Joined: Wed Oct 01, 2008 2:57 pm

Post by Harbinger »

I get a lot of errors when I load your camapign and try to run the macros.

The most common one is;
Could not execute the command: Invalid option: P

User avatar
lmarkus001
Great Wyrm
Posts: 1867
Joined: Sat Mar 29, 2008 12:30 am
Location: Layfayette Hill, PA

Post by lmarkus001 »

Harbinger wrote:I get a lot of errors when I load your camapign and try to run the macros.

The most common one is;
Could not execute the command: Invalid option: P
Are you trying to run it in MapTool 1.3B43? If not it will not work...

I have a significantly updated core D&D3.5 campaign that I continue to work on. I plan to post up that update, but given the light traffic of this thread, I thought I would wait until I patch/enhance it after the next (b46ish) build.


New things I have implemented include:
  • * Tracking and use of Turn Undead
    * Tracking of Spell/Effect durations
    * Confusion Table
    * Dialog for setting Conditions, and a Condition report macro that shows the state icon, condition name, and text summary of the effects of the condition.
    * Skills editing now puts up multiple dialogs with a max of 15 skills per dialog (this is to deal with the dialog blowing out the bottom of the screen, but will be made obsolescent by B46).
    * Rest macro that heals and restores daily abilities like Turn Undead.
    * Added Healing Surge use and tracking (yeah yeah this is 4E but my group got it as a special wish like power).
P.S. - Here is my latest rev (MapTool 1.3b45 compatible) of the campaign file:
NGWParty_1.3.b45h.cmpgn

Harbinger
Kobold
Posts: 2
Joined: Wed Oct 01, 2008 2:57 pm

Post by Harbinger »

now it works, it just asks a ton of questions when you hit one of the attack macros.

User avatar
lmarkus001
Great Wyrm
Posts: 1867
Joined: Sat Mar 29, 2008 12:30 am
Location: Layfayette Hill, PA

Post by lmarkus001 »

Harbinger wrote:now it works, it just asks a ton of questions when you hit one of the attack macros.
Can you give more specifics?

1) Which version of MapTool are you using.
2) What token(s) do you have selected when you use an Attack macro
3) Which Attack macro are you executing?

Note that the writeup above is showing the programming of the mechanisms, not the general use of the full campaign. But even so, all of the PC tokens in that campaign are actual PCs and fully property populated.

The monster token is a generic blank, but even so has the basic claw/claw bite weapons setup for it.

So the ATTACK macro in the Campaign Macros will work just fine for all of the PC/NPC tokens on the map.

The one token it will NOT work for is the TIMER token (looks like an hourglass). That uses a completely different property set and is used to time spell/effect durations.

Vandin
Kobold
Posts: 3
Joined: Fri Oct 03, 2008 11:52 am

Post by Vandin »

I really like what you've done with this, enough that I was motivated to steal it for use in my campaign. That's where I hit a deadend.

If I copy your properties over to my existing file (Too much stuff to consider redrawing, I'm afraid), they work on any token of yours that I copy/paste, but not any existing ones. Not even if I set them to "Creature". Even a horridly simply macro like "[Strength]" just pops up a box asking for Strength when run on the token.

What am I missing?

By-the-by, this is on b45, using the properties found in NGWParty_1.3.b45h.cmpgn

User avatar
lmarkus001
Great Wyrm
Posts: 1867
Joined: Sat Mar 29, 2008 12:30 am
Location: Layfayette Hill, PA

Post by lmarkus001 »

Vandin wrote:I really like what you've done with this, enough that I was motivated to steal it for use in my campaign. That's where I hit a deadend.

If I copy your properties over to my existing file (Too much stuff to consider redrawing, I'm afraid), they work on any token of yours that I copy/paste, but not any existing ones. Not even if I set them to "Creature". Even a horridly simply macro like "[Strength]" just pops up a box asking for Strength when run on the token.

What am I missing?

By-the-by, this is on b45, using the properties found in NGWParty_1.3.b45h.cmpgn
Thanks!

Well, I have not written the Using manual yet as it is still fairly organic and growing... but let me see if I can help you out.

I see you can work with the current Monster(NPC) and Player tokens that are in the campaign file, that is a good start. For new content, I recommend copy/pasting the generic monster token, then changing the image and running the "edit Core" and "edit Weapons" macros to configure that monster. Then you should be good to go. Oh and you are correct, the Monster and PC tokens both use the Creature property set.

I use the Campaign Macros for all Monsters. That way I do not have to maintain code on all of the different tokens.

Now the case you are trying to deal with is, you have a preexisting campaign that has a bunch of tokens on it already. To worth with my macros these tokens need the following:

1) Set the property set to Creature (you already figured that out)
2) Run the "edit Core" macro to set the basics up
3) Run the "edit Weapons" macro to set up your weapons

Now you should be functional.


AH HA! Ok in trying to do this, I uncovered the issue you are having. Here is the quick fix:

Change to the Creature property set:

*#Reach:5
*@Movement (Mov):30
*#SpecialATK:NA
*#SpecialQual:NA

The "edit Core" macro was throwing up multiple dialogs because these had no default property. By changing the property set to give these defaults, that macro should function correctly now.

User avatar
lmarkus001
Great Wyrm
Posts: 1867
Joined: Sat Mar 29, 2008 12:30 am
Location: Layfayette Hill, PA

Post by lmarkus001 »

Follow-up:

I tried dragging a very old saved token with macros in it onto my campaign and get it to work. The primary issue I encountered was preexisting code in calculated fields.

For example:

Old token had a field "StrB" with value of "floor((Strength-10)/2))".

But my current macro set requires "StrB" with "[R: floor((Strength+StrMod-10)/2))]".

So once I changed those I was good to go.

Another issue was fields like Reach that I used to just treat as text so would leave blank unless the critter had a reach different than 5. But that blank causes failures so it has to be set to an integer.

With that in mind, let me make a macro to bring a token up to date... that should help you out.
Last edited by lmarkus001 on Fri Oct 03, 2008 1:32 pm, edited 1 time in total.

Vandin
Kobold
Posts: 3
Joined: Fri Oct 03, 2008 11:52 am

Post by Vandin »

Yep, your steps are exactly what I did - it's not just core, it's any property. Core is much worse, of course; it pops up asking for every single variable :(

What I'm assuming is that there's some "Allow macros to extract properties" option somewhere and I'm just blind..?

It's mindboggling: a test macro of "[Strength]", when run on one of your tokens works fine. If I make a token of any nature, it doesn't matter what I set them to, Creature, Basic, etc, the same macro just gives me a popup box.

It's looking like my only option is to rampantly copy/paste your generic example token and just change the image a lot, but I'd really like to just be able to add tokens like normal.

User avatar
lmarkus001
Great Wyrm
Posts: 1867
Joined: Sat Mar 29, 2008 12:30 am
Location: Layfayette Hill, PA

Post by lmarkus001 »

Ok this should get you up and running....

1) Drag token / image onto the map
2) Change property set to Creature
3) Run "setupBlank" on that selected token

This just makes sure all of the default properties are populated. It will overwrite any already existing Strength, etc. properties in the token... I will work on an update that preserves some of those core elements if they exist.

Ok updated to preserve HP, Strength, Dexterity, Constitution, Intelligence, Wisdom, Charisma. Remember to change to the Creature property set before running this. The primary reason is that the default entries for a token are not actually entered until the token is Edited once.

EDIT:
I have changed this code, now it prompts you for stats and weapons so makes setting up a monster faster. Additionally, on the initial prompt if you enter the HD instead of hp (like 3d8) it will auto calculate the hitpoints. And you can just enter the 3 Saves as they are listed in the monster manual (no need to reduce by the stat modifier as that is calculated now). Additionally added a core set of skills dialog that you can enter the number from the MM as the stat modifier will be adjusted as necessary.

setupBlankMonster

Code: Select all

[H: Private = '" ; "']
[H: SizeM = "0"]
[H: Level = "1"]
[H: HP = if(HP == "", "1", HP)]
[H: HPmax = if(HP == "", "[R: 0 + (ConB * Level)]", HP)]
[H: HPtemp = "0"]
[H: Initiative = "0 + DexB"]
[H: BAB = if(BAB == "", "0", BAB)]
[H: Reach = "5"]
[H: MultAtkMP = if(MultAtkMP == "", "0", MultAtkMP)]
[H: MultAtkM = if(MultAtkM == "", "-5", MultAtkM)]
[H: MiscATK = "0"]
[H: MiscDMG = "0"]
[H: WeaponFinesse = "0"]
[H: HealingSurges = "0"]
[H: TurnUndead = "0"]
[H: Daily = "HealingSurges=0 ; TurnUndead=0 ; NegativeLevels=0 ; "]
[H: Movement = if(Movement == "", "30", Movement)]
[H: AC = if(AC == "", "10/10/10", AC)]
[H: SpecialATK = if(SpecialATK == "", "NA", SpecialATK)]
[H: SpecialQual = if(SpecialQual == "", "NA", SpecialQual)]
[H: Strength = if(Strength == "", "10", Strength)]
[H: StrMod = "0"]
[H: Dexterity = if(Dexterity == "", "10", Dexterity)]
[H: DexMod = "0"]
[H: Constitution = if(Constitution == "", "10", Constitution)]
[H: ConMod = "0"]
[H: Intelligence = if(Intelligence == "", "10", Intelligence)]
[H: IntMod = "0"]
[H: Wisdom = if(Wisdom =="", "10", Wisdom)]
[H: WisMod = "0"]
[H: Charisma = if(Charisma == "", "10", Charisma)]
[H: ChaMod = "0"]
[H: Fort = if(Fort == "", "0", Fort)]
[H: FortBonus = "0"]
[H: Reflex = if(Reflex == "", "0", Reflex)]
[H: ReflexBonus = "0"]
[H: Will = if(Will == "", "0", Will)]
[H: WillBonus = "0"]

[H: ArmorCheckPenalty = "0"]
[H: SkillMisc = "0"]
[H: Weapon0 = "Name=Slam ; Primary=1 ; Quantity=1 ; Manufactured=0 ; AtkBonus=0 ; CritMult=2 ; CritRange=20 ; Damage=1d4 ; DmgMax=4 ; DmgExtra=0d6 ; DmgExtraCrit=0d10 ; DmgExtraName= ; DmgBonusCap=50 ; TwoHanded=0 ; Finesse=0 ; OHLight=0 ; Ranged=0 ;"]
[H: Weapon1 = "Name=Bite ; Primary=0 ; Quantity=1 ; Manufactured=0 ; AtkBonus=0 ; CritMult=2 ; CritRange=20 ; Damage=1d4 ; DmgMax=4 ; DmgExtra=0d6 ; DmgExtraCrit=0d10 ; DmgExtraName= ; DmgBonusCap=50 ; TwoHanded=0 ; Finesse=0 ; OHLight=0 ; Ranged=0 ;"]
[H: Weapon2 = "Name=NA ; Primary=0 ; Quantity=1 ; Manufactured=0 ; AtkBonus=0 ; CritMult=2 ; CritRange=20 ; Damage=1d4 ; DmgMax=4 ; DmgExtra=0d6 ; DmgExtraCrit=0d10 ; DmgExtraName= ; DmgBonusCap=50 ; TwoHanded=0 ; Finesse=0 ; OHLight=0 ; Ranged=0 ;"]
[H: Weapon3 = "Name=NA ; Primary=0 ; Quantity=1 ; Manufactured=0 ; AtkBonus=0 ; CritMult=2 ; CritRange=20 ; Damage=1d4 ; DmgMax=4 ; DmgExtra=0d6 ; DmgExtraCrit=0d10 ; DmgExtraName= ; DmgBonusCap=50 ; TwoHanded=0 ; Finesse=0 ; OHLight=0 ; Ranged=0 ;"]
[H: Weapon4 = "Name=NA ; Primary=0 ; Quantity=1 ; Manufactured=0 ; AtkBonus=0 ; CritMult=2 ; CritRange=20 ; Damage=1d4 ; DmgMax=4 ; DmgExtra=0d6 ; DmgExtraCrit=0d10 ; DmgExtraName= ; DmgBonusCap=50 ; TwoHanded=0 ; Finesse=0 ; OHLight=0 ; Ranged=0 ;"]
[H: Weapon5 = "Name=NA ; Primary=0 ; Quantity=1 ; Manufactured=0 ; AtkBonus=0 ; CritMult=2 ; CritRange=20 ; Damage=1d4 ; DmgMax=4 ; DmgExtra=0d6 ; DmgExtraCrit=0d10 ; DmgExtraName= ; DmgBonusCap=50 ; TwoHanded=0 ; Finesse=0 ; OHLight=0 ; Ranged=0 ;"]
[H: Weapon6 = "Name=NA ; Primary=0 ; Quantity=1 ; Manufactured=0 ; AtkBonus=0 ; CritMult=2 ; CritRange=20 ; Damage=1d4 ; DmgMax=4 ; DmgExtra=0d6 ; DmgExtraCrit=0d10 ; DmgExtraName= ; DmgBonusCap=50 ; TwoHanded=0 ; Finesse=0 ; OHLight=0 ; Ranged=0 ;"]
[H: Weapon7 = "Name=NA ; Primary=0 ; Quantity=1 ; Manufactured=0 ; AtkBonus=0 ; CritMult=2 ; CritRange=20 ; Damage=1d4 ; DmgMax=4 ; DmgExtra=0d6 ; DmgExtraCrit=0d10 ; DmgExtraName= ; DmgBonusCap=50 ; TwoHanded=0 ; Finesse=0 ; OHLight=0 ; Ranged=0 ;"]
[H: Weapon8 = "Name=NA ; Primary=0 ; Quantity=1 ; Manufactured=0 ; AtkBonus=0 ; CritMult=2 ; CritRange=20 ; Damage=1d4 ; DmgMax=4 ; DmgExtra=0d6 ; DmgExtraCrit=0d10 ; DmgExtraName= ; DmgBonusCap=50 ; TwoHanded=0 ; Finesse=0 ; OHLight=0 ; Ranged=0 ;"]
[H: Weapon9 = "Name=NA ; Primary=0 ; Quantity=1 ; Manufactured=0 ; AtkBonus=0 ; CritMult=2 ; CritRange=20 ; Damage=1d4 ; DmgMax=4 ; DmgExtra=0d6 ; DmgExtraCrit=0d10 ; DmgExtraName= ; DmgBonusCap=50 ; TwoHanded=0 ; Finesse=0 ; OHLight=0 ; Ranged=0 ;"]
[H: HelpWeaponProperty = "Primary=0-NotInUse 1-Primary 2-Secondary ; Quantity= # natural attacks ; Manufactured= 0-Natural 1-Manufactured (for multi attack if BAB>5) ; AtkBonus= Magic/Masterwork/Feat ; CritRange= Lower end 19-20 is 19 ; DmgExtra= 1d6 (EX from flaming) set to 0d6 for none ; DmgExtraCrit= 1d10 (EX burst) set to 0d10 for none; DmgExtraName= Fire / Cold / Acid / etc. ; TwoHanded=0-One Handed, 1-Two Handed ; Finesse=0-Not Finessable, 1-Finessable ; DmgBonusCap=0-No STR Bonus, >0 - Cap to STR bonus (STR Bow) ; OHLight=0-Offhand heavy, 1-Offhand Light, 2-Not Multi-attack"]
[H: StrB = "[R: floor((Strength+StrMod-10)/2))]"]
[H: Str2hB = "[R: floor(floor((Strength+StrMod-10)/2)+(max(0,floor((Strength+StrMod-10)/4))))]"]
[H: StrSecB = "[R: floor((Strength+StrMod-10)/4))]"]
[H: DexB = "[R: floor((Dexterity+DexMod-10)/2))]"]
[H: ConB = "[R: floor((Constitution+ConMod-10)/2))]"]
[H: IntB = "[R: floor((Intelligence+IntMod-10)/2))]"]
[H: WisB = "[R: floor((Wisdom+WisMod-10)/2))]"]
[H: ChaB = "[R: floor((Charisma+ChaMod-10)/2))]"]

[H: fail = input(
"Level|" + Level + "||TEXT|WIDTH=2", 
"Strength|" + Strength + "||TEXT|WIDTH=2", 
"Dexterity|" + Dexterity + "||TEXT|WIDTH=2", 
"Constitution|" + Constitution + "||TEXT|WIDTH=2", 
"Intelligence|" + Intelligence + "||TEXT|WIDTH=2", 
"Wisdom|" + Wisdom + "||TEXT|WIDTH=2", 
"Charisma|" + Charisma + "||TEXT|WIDTH=2",
"tempSize|Fine,Diminutive,Tiny,Small,Medium,Large,Huge,Gargantuan,Colossal|Size Modifier|RADIO|ORIENT=H SELECT=" + (4 - SizeM),
"tempHPmax|" + (HPmax - (ConB * Level)) + "|HD (no Con) -- (3d8)|TEXT|WIDTH=3",
"Movement|" + Movement + "||TEXT|",
"AC|" + AC + "|ArmorClass/Touch/Flat-Footed|TEXT|WIDTH=7",
"BAB|" + BAB + "||TEXT|WIDTH=2",
"tempReach|0,5,10,15,20,25,30|Reach|RADIO|ORIENT=H SELECT=" + (Reach/5),
"SpecialATK|" + SpecialATK + "|Special Attacks|TEXT|WIDTH=30",
"SpecialQual|" + SpecialQual + "|Special Qualities|TEXT|WIDTH=30",
"blah2 | Enter saves as they show in the monster manual, after you OK the stat bonus will be automatically removed. | NOTE | LABEL |",
"tFort|" + Fort + "|Loaded Fortitude Save|TEXT|WIDTH=2",
"tReflex|" + Reflex + "|Loaded Reflex Save|TEXT|WIDTH=2",
"tWill|" + Will + "|Loaded Will Save|TEXT|WIDTH=2",
"WeaponFinesse|" + WeaponFinesse + "|Weapon Finesse Feat?|CHECK|",
"tempI| " + listGet(Initiative, 0, "+") + " |Improved Initiative Feat?|CHECK|",
"HealingSurges|" + HealingSurges + "|# Healing Surges/Day (no Con)|TEXT|WIDTH=2",
"MultAtkMP|" + MultAtkMP + "|Multi-Attack Modifier-Primary|TEXT|WIDTH=3", 
"MultAtkM|" + MultAtkM + "|Multi-Attack Modifier-Secondary|TEXT|WIDTH=3",
"blah | Monster 0/-5, 0/-2 if Multi-Attack Feat -- PC -6/-10, -4/-4 if Two-Weapon Fighting Feat | NOTE | LABEL |"
)]
[H: abort(fail)]

[H: HPmax = "[R: " + tempHPmax + " + (ConB * Level)]"]
[H: SizeM = (4 - tempSize)]
[H: Reach = tempReach * 5]
[H: Initiative = (tempI * 4) + " + DexB"]
[H: Fort = tFort - ConB]
[H: Reflex = tReflex - DexB]
[H: Will = tWill - WisB]

<!-- Calculate the hp from the entered HD -->

[H: fail = input(
"tempHPmax|" + (HPmax - (ConB * Level)) + "|Maximum Hitpoints (no Con)|TEXT|WIDTH=3"
)]
[H: abort(fail)]

[H: HPmax = "[R: " + tempHPmax + " + (ConB * Level)]"]
[H: HP = HPmax]

<!-- Edit frequently used skills -->

[H: lstSkills = "Bluff, Climb, Concentration, Disguise, EscapeArtist, Heal, Jump, Listen, MoveSilently, Search, SenseMotive, Spellcraft, Spot, Swim, Tumble"]
[H: lstCnt = listCount( lstSkills )]
[H: lstStr = ""]
[H, C(lstCnt, ""): lstStr = lstStr +  listGet( lstSkills, roll.count ) + "=" + getStrProp(Skills, listGet( lstSKills, roll.count ) ) + if( roll.count == 
lstCnt - 1, "", "; ")]

[H: success = input(
  "tacp | " + ArmorCheckPenalty + "| Armor Check Penalty | TEXT | WIDTH=4",
  "foo | Enter as they are shown in the Monster Manual, the stat bonus will be automatically removed. | Note | LABEL",
  "lstStr | " + lstStr + " | Set skill bonuses | PROPS"
)]
[H: abort(success)]

[H: ArmorCheckPenalty = if(tacp > 0, 0 - tacp, tacp)]

[H, C(lstCnt, ""): Skills = setStrProp(Skills, listGet( lstSkills, roll.count ), max(0, getStrProp(lstStr, listGet( lstSKills, roll.count )) - eval(getStrProp(SkillStat, listGet( lstSKills, roll.count )))) )]

<!-- Edit the first weapon. -->

[h: WpnNum = 0]
[h: WpnName = "Weapon" + WpnNum]
 
<!-- Error checking -- make sure the property string has been set up already. -->
[h: NumProps = countStrProp(eval(WpnName))]
[h: abort(NumProps)]
 
<!-- Put up a dialog with all the properties in the property string.
  -- Note that the new property string is automatically assigned back to the
  -- token property that holds the weapon's property string. -->
[h: NumHelpProps = countStrProp(HelpWeaponProperty)]
[h: HelpLabel = ""]
[h, c(NumHelpProps,""): eval("HelpLabel" + roll.count + " =  'junk" + roll.count + " | " + indexValueStrProp(HelpWeaponProperty,roll.count) + 
" | " +  indexKeyStrProp(HelpWeaponProperty,roll.count) + " | LABEL'")]
[h: fail = input("blah | " + WpnNum + " | Weapon number | LABEL", WpnName + " | " + eval(WpnName) + " | Weapon properties | PROPS | setvars=true", 
HelpLabel0, HelpLabel1, HelpLabel2, HelpLabel3, HelpLabel4, HelpLabel5, HelpLabel6, HelpLabel7, HelpLabel8, HelpLabel9, HelpLabel10, 
HelpLabel11)]
[h: abort(fail)]

<!-- Edit the second weapon. -->

[h: WpnNum = 1]
[h: WpnName = "Weapon" + WpnNum]
 
<!-- Error checking -- make sure the property string has been set up already. -->
[h: NumProps = countStrProp(eval(WpnName))]
[h: abort(NumProps)]
 
<!-- Put up a dialog with all the properties in the property string.
  -- Note that the new property string is automatically assigned back to the
  -- token property that holds the weapon's property string. -->
[h: NumHelpProps = countStrProp(HelpWeaponProperty)]
[h: HelpLabel = ""]
[h, c(NumHelpProps,""): eval("HelpLabel" + roll.count + " =  'junk" + roll.count + " | " + indexValueStrProp(HelpWeaponProperty,roll.count) + 
" | " +  indexKeyStrProp(HelpWeaponProperty,roll.count) + " | LABEL'")]
[h: fail = input("blah | " + WpnNum + " | Weapon number | LABEL", WpnName + " | " + eval(WpnName) + " | Weapon properties | PROPS | setvars=true", 
HelpLabel0, HelpLabel1, HelpLabel2, HelpLabel3, HelpLabel4, HelpLabel5, HelpLabel6, HelpLabel7, HelpLabel8, HelpLabel9, HelpLabel10, 
HelpLabel11)]
[h: abort(fail)]

Core Creature Stats Generated
Last edited by lmarkus001 on Sat Nov 01, 2008 4:34 pm, edited 6 times in total.

Vandin
Kobold
Posts: 3
Joined: Fri Oct 03, 2008 11:52 am

Post by Vandin »

Sweet zombie jesus, it works! You're a lifesaver :D

Literally, even. One of my players has been driving me crazy with undead summons, and trying to track the stat drains by hand was driving me batty. Now I have time to prepare for tonight!

User avatar
lmarkus001
Great Wyrm
Posts: 1867
Joined: Sat Mar 29, 2008 12:30 am
Location: Layfayette Hill, PA

Post by lmarkus001 »

Vandin wrote:Sweet zombie jesus, it works! You're a lifesaver :D

Literally, even. One of my players has been driving me crazy with undead summons, and trying to track the stat drains by hand was driving me batty. Now I have time to prepare for tonight!
Woo hoo!!!

btw, I updated the setupBlank macro to preserve a few stats in case you care about that.

Feel free to report any issues/ideas you have as this is all very organic and growing. My primary goal is to make it easier to DM. Most of my players are actually face to face and enjoy to roll their own dice, but using MapTool for what I have to track as a DM is quite effective. I would say my details processing time has been cut by 30% at the game table since I got this working. And the overall accuracy is much higher.

Oh a neat trick for entering new monsters.

If on the initial run of the "edit Core" macro, you enter a die roll for the max hitpoints, that then gets randomly generated then next time you run the "edit Core" macro. So you can do things like, save a populated token for a goblin with max hp = "1d8". Then drop that token on a map and "edit Core". It will calculate the hitpoints and store that value discarding the 1d8.

Big_Mac
Dragon
Posts: 631
Joined: Thu Aug 17, 2006 10:37 am
Location: Brockton, MA
Contact:

Post by Big_Mac »

Please do keep it up! I am planning on testing this week coming. Just have not had time to get the new version and test it.
--
Big Mac

Locked

Return to “D&D 3.5/Pathfinder 1e Campaign Macros”