We use Cookies to help personalize and improve Roll20. For more information on our use of non-essential Cookies, visit our Privacy Policy here.
Accept
Advertisement Create a free account

Ability with Variable and Max Macro

1593500547
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
Plus
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.
1593502000
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
Plus
No problem - everyone runs into this issue at some point :)