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 Templates + API command buttons

1450733137

Edited 1450811338
I am trying to define an  API Command Button as a  property in a roll template , but am not having any luck -- that is, the template rolls but the property containing the Button is missing. Is there some trick to finagle this, or is it just not possible? Ex: {{Button=[Button](!
%{selected|Button} ) }}
1450736659

Edited 1450832438
vÍnce
Pro
Sheet Author
This might help Glenn API command button usage in macros and AFAIK, you can't have a carriage return inside of a roll template. Update: I stand corrected.  Cool. Thanks Silvyre.
1450746872
Silvyre
Forum Champion
Try this: {{Button=[Button](!
%{selected|Button})}}
1450807410

Edited 1450807580
Eureka! That works! +9000 After some more fiddling around with the  HTML entities (specifically, replacing the button's pipe | with 124 and nesting the ampersand in the closing 125), I even got it to work inside a roll query. Here's the example for those interested: &{template:default} ?{Which Button?|Effect 1, {{Effect 1=[Apply Effect 1](!
%{selected|ApplyEffect1})}}|Effect 2, {{Effect 2=[Apply Effect 2](!
%{selected|ApplyEffect2})}}}
1450810861
Silvyre
Forum Champion
Nice. :)