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

Roll Queries in a Template

Is this possible to add a roll query into a template... ie (template) &{template:default} {{name=Test Attack}} {{attack=[[1d20+3]]}} {{note= This is some note content}} {{Saving Throw= vs Will}} but add in  ?{Choose a Roll| STR,/roll 1d20 + @{STR} + ?{Bonus} | DEX,/roll 1d20 + @{DEX} + ?{Bonus} | CON,/roll 1d20 + @{CON} + ?{Bonus} } Im in a Traveller game and I was hoping to add a query to ask: standard attack | boon (advantage) | bane (disadvantage) and have each of these conditions have their own dice logic..but it seems templates dont like the characters used in the roll queries.. Any suggestions?
1633747836

Edited 1633747998
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
You just need to use an inline roll. I'm assuming you want to replace the attack= roll with this? It would look like so (I've also swapped the } for & rbrace ; cause it's easier to read: &{template:default} {{name=Test Attack}} {{attack=[[?{Choose a Roll| STR,1d20 + @{STR} + ?{Bonus} | DEX,1d20 + @{DEX} + ?{Bonus} | CON,1d20 + @{CON} + ?{Bonus} }]]}} {{note= This is some note content}} {{Saving Throw= vs Will}}
1633789562

Edited 1633789605
So I thought I'd take this a different way and start with a roll Query that calls upon 3 other macros that is a "standard", "boon", "bane" template macro..which seems to work..that is until I stopped being able to save special entity characters.. The main macro: ?{Attack Type|Standard,#dap-standard |Boon,#dap-boon&nbsp; |Bane,#dap-bane } The dap-standard macro: &amp;{template:default}{{name=Blake Attack}}&nbsp; {{fires a both autopistols}} {{Slug +1 Dex(9) +1 -2 Dual}} {{name=[x]( <a href="https://i.pinimg.com/originals/b0/b1/bf/b0b1bf56259661fb45bd74feab056d21.jpg" rel="nofollow">https://i.pinimg.com/originals/b0/b1/bf/b0b1bf56259661fb45bd74feab056d21.jpg</a> )}} {{attack1=[[(2d6)+1[slug]-2[dual]+1[DEX]+?{Modifier}[Modifier]]]}}&nbsp; {{damage1=[[(3d6)-3[slug]]]}} {{attack2=[[(2d6)+1[slug]-2[dual]+1[DEX]+?{Modifier}[Modifier]]]}}&nbsp; {{damage2=[[(3d6)-3[slug]]]}} No matter how I replace the "}" entities, the second I save it gets put back to "}" and breaks the system.&nbsp; &nbsp; This is fustrating as I keep returning to this same issue over the years and posts regarding this are now 4 years old...&nbsp; I guess they want me to go pro so I can use other methods to do the same thing.&nbsp;&nbsp;
1633790542
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The global macro editor eats html code whenever you reopen the macro and resave it. For this reason, a macro mule character is the preferred solution. No Pro account required.
1633790616

Edited 1633790659
Are you talking about Macros in the collection tab? The entity characters get replaced when you try to edit the macro, and are updated when you save those edits. Check out the last entry of the Troubleshooting section here . I tested your macro (replaced all } in dap-standarad and executed it from the main macro) and it works! Edit: What Scott said...
1633790770
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Also, I might recommend looking at chat menus as an alternative to the complexities of nesting roll templates inside roll queries.