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

Helper functions with default template

Cannot get helper functions to work with the default template. The following macro: &{template:default} {{name=Test Attack}} {{attack=[[1d20cs>20]]}} {{#rollWasCrit() attack}} {{confirm=[[1d20]]}} {{/rollWasCrit() attack}} will roll the attack, write '#rollWasCrit() attack', roll the confirm (whatever the result of the 'attack' roll), and then write '^rollWasCrit() attack'. Splitting things into several lines does not improve anything (I believe the default template is meant to be written in a single line). It seems the default template does not interpret properly the symbols '#' and '^'. Any help? Thanks in advance!
1509803597

Edited 1509803723
vÍnce
Pro
Sheet Author
None of the roll template functions can actually be used in your macros.  They have to be included within a sheet's HTML. You can only use the {{key=value}} combos in macros...  ;-(
1509808565

Edited 1509808606
Oh, I understand. Then, only character sheet-related templates can make use of those functions? Is it not possible to have a conditional roll in a macro built using the default template? What about a macro with no template, would it be possible in that case to roll a confirmation only if the attack roll was a critical?
1509808865
Jakob
Sheet Author
API Scripter
Algunillo said: Oh, I understand. Then, only character sheet-related templates can make use of those functions? Is it not possible to have a conditional roll in a macro built using the default template? What about a macro with no template, would it be possible in that case to roll a confirmation only if the attack roll was a critical? Indeed, all of what you're saying works for character sheet templates only. Though you're a pro subscriber, so you can just make whatever template you want.
All right, thanks for explaining. I will venture into building a template.
I recommend writing PowerCards macros as an alternative to coding a custom Roll Template.
Thanks for the suggestion. I will take a look at them.