
Hey guys, I call upon the superior knowledge of the r20 macro community to come to my aid. So I am making a set of heavily stacked rolls/queries. The campaigns I am using don't have access to character sheets for a variety of reasons so I'm making do with a set of macros in a notepad on my computer for quick copy/paste. The character I'm playing does full rounds a lot, and I get sick of constantly punching up his attack rolls and damage values. So I wanted to use the query system to come up with a kind of hamfisted variable/if/then system. "The Code", dressed up to be visually pleasing and flow like the basic code I'm trying to imitate and it helps to keep things straight in my mind when looking for closed brackets. &{template:default} {{name=Dragons Claw Damage}}
{{ Variables = ?{STR|3} Str, ?{Power|1} Power, ?{Enh|1} Enh }} //Set up the "variables"
{{ Spell Combat =
?{ Spell Combat Hit/Miss? | //Did the attack hit or miss?
Miss , Miss |
Hit , ?{Critical Hit? | //If it hit, is it a critical blow?
No , [[ //If not, roll damage
1d10
+ floor( 1.5 * ?{ STR } )[STR]
+ floor( 1.5 * (2 * ?{ Power } ))[Power]
+ ?{ Enh }[ENH]
+ ?{ Bonus Dmg | 0 }
]] |
Yes , [[ //It crit, roll 3x damage
3d10 + ( 3 *
floor( 1.5 * ?{ STR } )[STR]
+ floor( 1.5 * (2 * ?{ Power } ))[Power]
+ ?{ Enh }[ENH]
+ ?{ Bonus Dmg | 0 }
)
]]
}
+ [[ // The trouble bit.
?{Spell Damage Yes/No | // If I deal additional spell damage for various
No , 0 | // reasons I need it added on regardless of crit
Yes , ?{Spell Damage | 0 } // damage. This is also good for stuff like the
} // Flaming Burst property on a weapon.
]] // Unfortunately I cannot get this part to resolve
} // In the roll20 system.
}} The macro in roll20 chat format for testing purposes. &{template:default} {{name=Dragons Claw Damage}} {{ Variables = ?{STR|3} Str, ?{Power|1} Power, ?{Enh|1} Enh }} {{ Spell Combat = ?{ Spell Combat Hit/Miss? | Miss , Miss | Hit , ?{Critical Hit? | No , [[ 1d10 + floor( 1.5 * ?{ STR } )[STR] + floor( 1.5 * (2 * ?{ Power } ))[Power] + ?{ Enh }[ENH] + ?{ Bonus Dmg | 0 } ]] | Yes , [[ 3d10 + ( 3 * floor( 1.5 * ?{ STR } )[STR] + floor( 1.5 * (2 * ?{ Power } ))[Power] + ?{ Enh }[ENH] + ?{ Bonus Dmg | 0 } ) ]] } + [[ ?{Spell Damage Yes/No | No , 0 | Yes , ?{Spell Damage | 0 } } ]] } }}
I have tried the &#XXX; bit under "Spell Damage Yes/No" in an assortment of different combinations. The closest I ever got was the entire Yes/No query in a single box requesting the input value for "Spell Damage". If I can pull this off I will be able to cover my entire attack repertoire in two macros by toggling attacks and damages on and off making my life a beautifully over complicated simplicity. Additionally as I level I'll only have to change the values in the upper "variable" boxes, not find every entry of Strength in a half dozen requests. Is it easier to ask the gm's to enable character sheets? Yes, probably. But that wasn't what I set out to do. Edit: Are you kidding me? It converted the HTML text into regular text. Even the stuff in the code boxes. Guess I'll be sticking them in a gist.github. Links to follow. The Gist