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 sheet roll button in macro

Hello, I'm trying to create an ability that contains a query where the player can choose which attribute will be tested. Each option invokes a specific sheet roll button for the character sheet. I already consulted the wiki "Advanced Usage for Roll Queries" I know that the problem is at this point but I couldn't solve it because I didn't understand where to make the HTML substitutions. Could anyone help? ?{Attribute:|STR, %{selected|-strength-Check} | Des, %{selected|-dexterity-Check}}
1607135327

Edited 1607135742
Oosh
Sheet Author
API Scripter
The HTML substitutions you need are in the content of the Abilities you're linking, %{selected|attr-Check}. The first thing the parser does is fully expand those Abilities, which contain plenty of characters to break your Query. For example, if the contents of %{selected|-strength-Check} is &{template:default}{{name=Strength Check}}{{Roll=[[1d20 + @{selected|strength_modifier}]]}} , you'd need to copy that text into your macro instead of the %{ability reference}, and replace all the } braces which are not part of an @{attribute} or %{ability} call with } The easiest options are a Chat Menu , or, if you don't mind the extra click, you can create a button from a drop-down instead: [?{Ability|Strength|Dexterity} Check](~selected|-?{Ability}-Check) To get the drop-down functioning without any buttons, you'll need to expand the entire thing, and create something like these 5e drop-down macros , but for the sheet you're using. It's a bit of work, but can be done.
Oosh! You were an angel for me today, thank you very much for your patience and for the tip !!!!