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

Favored Foe Global Damage Macro Trouble

Hello! I am having trouble getting the formula I have for the Favored Foe dice progression nested into a query for whether or not to apply the damage at all.  1d[[{6,14}<@{base_level}*2+4]]  The formula by itself works in the damage field for a Global Damage modifier, but it doesn't parse when I nest it into a query.  ?{Is this the first hit against your Favored Foe this turn?|Yes,1d[[{6,14}<@{base_level}*2+4]]|No,0} I am familiar enough with nesting to know I needed to replace the } of the Target Number check with its HTML replacement, and not to do the same with the Attribute Call for base_level. The above gets the query to function to the point of having the Yes or No options on the dropdown like they should be, but the Yes option doesn't output anything at all, and the No option functions as it should.  Am I missing an HTML replacement or some other necessary bracketing in order to get the roll to parse correctly? Thank you in advance. 
You'll need to replace the comma in the roll comparison as well: ?{Is this the first hit against your Favored Foe this turn?|Yes,1d[[{6 , 14 }<@{base_level}*2+4]]|No,0} Untested, so I'm not sure if there's anything else as well.
Jarren said: You'll need to replace the comma in the roll comparison as well: ?{Is this the first hit against your Favored Foe this turn?|Yes,1d[[{6 , 14 }<@{base_level}*2+4]]|No,0} Untested, so I'm not sure if there's anything else as well. That did the trick! I had tried replacing the comma already using , and it didn't work, but using &comma: did! I'll have to keep that one in my back pocket for future use. Thank you very much for your help. 
Great! For future nesting issues, just remember that you have to replace any query control characters: commas ','; vertical pipes '|'; and closing braces '}'. Unless those control characters are part of an attribute or ability call, such as @{selected|attribute}, because those get parsed before the query.