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 .
×

I want to be able to do a macro that gives me a choice after a choice

Hello, I am very new to the macro's of Roll20 and I rather find the guide confusing since it's trying to explain what doesn't work vs what does work. Can anyone please help me with the correct syntax I am after? or is it even possible? ?{Attack|         Arms|             Jab, **Jab** [[r1d6+1]]             Punch, **Punch** [[r1d6+2]]         Legs|             Front Kick, **Front Kick** [[r2d10+1]]             Side Kick, **Side Kick** [[r2d10+2]]     Spell|             Staff Attack|                 Magical, **Magical** [[1d20+5]]                 Pysical, **Pysical** [[1d4+2]] }
1631969355
timmaugh
Roll20 Production Team
API Scripter
When you're asked a question, we call that a roll query. And, yes, you can nest a roll query within another roll query. Currently it requires some HTML replacements, though Roll20 is trying out a manner of parsing that will not require those replacements (on the Dev server). The basic format for the outer query is the same: ?{Query name|First Option,First Value|Second Option,Second Value|Third Option,Third Value} The basic format for nested queries is to replace all commas (,), right brace (}), and vertical bars (|): ?{Nested query name|First Nested Option,FIrst Nested Value|Second Nested Option,Second Nested Value} You don't need to perform replacements on sheet/attribute calls, like @{selected|level}. The nested query can be subbed in for the value side of an option/value pair in the outer query, for you that might be: ?{Attack|   Arms|     ?{Arms Options|Jab, **Jab** [[r1d6+1]]|Punch, **Punch** [[r1d6+2]]}   Legs|     ?{Legs Options|Front Kick, **Front Kick** [[r2d10+1]]|Side Kick, **Side Kick** [[r2d10+2]]}   Spell|   Staff Attack|     ?{Staff Options|Magical, **Magical** [[1d20+5]]|Physical, **Physical** [[1d4+2]]} } I believe that should work. I'm not sure what you intended with the relationship of the Spell and Staff Attack parts of that query, since there were no sub-options to the Spell choice, but maybe this is enough to get you able to see what you have to do to make the nested query work.