Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Ability with Variable and Max Macro

I have a cleric in my campaign. I'm trying to setup a button macro for him to use when he casts his cure spells. This is the formula that I came up with after some research... &{template:default} {{name=Est casts a cure spell}} {{?{Spell | Cure Light Wounds , Cure Light Wounds [[3d8+({@{class1_level}+1,10}kl1)]] | Cure Moderate Wounds , Cure Moderate Wounds [[3d8+({@{class1_level}+1,10}kl1)]] | Cure Serious Wounds , Cure Serious Wounds [[3d8+({@{class1_level}+1,15}kl1)]] | Cure Critical Wounds , Cure Critical Wounds [[4d8+({@{class1_level}+1,20}kl1)]] | Mass Cure Light Wounds ,  Mass Cure Light Wounds [[3d8+( {@{class1_level}+1,25} kl1 )]] | Mass Cure Moderate Wounds , Mass Cure Moderate Wounds [[3d8+({@{class1_level}+1,30}kl1)]] | Mass Cure Serious Wounds , Mass Cure Serious Wounds [[3d8+({@{class1_level}+1,35}kl1)]] | Mass Cure Critical Wounds , Mass Cure Critical Wounds [[3d8+({@{class1_level}+1,40}kl1)]] }}} The popup appears when I run this macro, but I can't select anything in the drop-down menu. I have a similar macro for when the character drinks a potion ... &{template:default} {{name=Est drinks a potion}} {{ ?{ Potion | Cure Light Wounds , Cure Light Wounds [[1d8+1]] | Cure Moderate Wounds , Cure Moderate Wounds [[2d8+3]] | Cure Serious Wounds , Cure Serious Wounds [[3d8+5]] }}} Any suggestions would be appreciated. Thank you.
1593501213

Edited 1593501629
Oosh
Sheet Author
API Scripter
You'll need to replace a bunch of characters inside your Query, as per Advanced usage for roll queries . The commas and closing curlies are the problem there, the Query interprets these as Query instructions and gets very confused. Make sure you don't replace } | and , characters  in Attribute calls like @{class1_level} - these are parsed before the Query. So the first couple of lines would look like this: &{template:default} {{name=Est casts a cure spell}} {{?{Spell | Cure Light Wounds , Cure Light Wounds [[3d8+({@{class1_level}+1 , 10 } kl1)]] | Cure Moderate Wounds , Cure Moderate Wounds [[3d8+({@{class1_level}+1 , 10 } kl1)]]} }} Note that you can put a line break after a | pipe in a Query, just to make it more readable. You can probably get away with a "replace all" by replacing +1, with +1, and }kl1 with }kl1 . This should catch all the problem characters but leave the others alone.
Thank you! That worked like a charm. Spent 3 hours looking for the answer, and never found the Advanced Usage for Roll Queries page.
1593502710
Oosh
Sheet Author
API Scripter
No problem - everyone runs into this issue at some point :)