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

Nesting macro help with drop down options.

I am attempting to put together a macro that starts with a drop down menu option that results in a straight 2d6, a DL1 and DH1 option. The macro functions fine in that regard. But when I attempt to insert a " ?{text|0} " prompt to each roll, the wheels fall off.  Could someone point me in the right direction for completing this macro? Example: &{template:default} {{name=Smoke His Ass}} {{When you = take aim and shot at an enemy at range, roll + Hustle.…}} {{ Smoke His Ass=?{Rollin' with |Straight,[[2d6+ ?{Hustle|0} ]] |Extra, [[3d6dl1]] |Less, [[3d6dh1]]}}} {{10+=you have a clear shot. Deal your damage. }} {{7-9= choose one:}}{{a. = You deal your damage but have to move to get the shot, exposing someone (often yourself) to danger.}}{{b. = You have to take what you can get: deal 1-harm damage.}}
1482419782

Edited 1482419849
Tetsuo
Forum Champion
Roll Queries currently end at the first closing curly brace the parser encounters. Within a Roll Query, other characters that serve as Roll Query syntax (vertical bars and commas) will always be treated as such by the parser, potentially causing unwanted behavior when placed within the Roll Query for other purposes. So your macro is seeing: ?{Rollin' with |Straight,[[2d6+ ?{Hustle|0} as the complete roll query To work around this, replace some but not all of these "problematic" characters with their HTML entities Please see  Advanced Usage For Roll Queries for more info.
Instead of bothering with a nested Query in this case, I'd recommend factoring the nested Query outside of the main Roll Query: [[ ?{Rollin' with|Straight, 2d6|Extra, 3d6dl1|Less, 3d6dh1} + ?{Hustle|0} ]]
An elegant solution, for a more civilized macro. Thank you! Silvyre said: Instead of bothering with a nested Query in this case, I'd recommend factoring the nested Query outside of the main Roll Query: [[ ?{Rollin' with|Straight, 2d6|Extra, 3d6dl1|Less, 3d6dh1} + ?{Hustle|0} ]]