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
This post has been closed. You can still view previous posts, but you can't post any new replies.

Roll Templates in macros not accepting helper phrases

Are helper phrases integrated into macros and, if so, what's the correct syntax? While I can build a template into a macro, the only examples of using phrases like {{#rollWasCrit}} on the wiki are in HTML, which doesn't work in chat-friendly macros as line-breaks break the template, and I've honestly tried fifty different ways of phrasing it in a macro with no success whatsoever (I'm not exaggerating, I counted my failures): either the helper phrase shows up in the template as though it were any other entry or everything is hidden (even parts not between {{#<property>}} and {{/<property>}}), regardless of whether or not the property is met.
Line breaks should no longer break the template as of today. just FYI.
Hmm, but that seems to have broken some sequential template macros I had, by making them all inline.
Thanks Riley; the logic functions still seem not to be going through, though - it's still hiding things for which the terms are met so which should be visible.
Update: it's claiming not to recognise the command "/rollWasCrit() attack"
1427212823
Stephen Koontz
Forum Champion
Marketplace Creator
Sheet Author
API Scripter
Compendium Curator
Which sheet are you using and which roll template?
It's in D&D 4e which doesn't have a roll template; I'm trying to use the phrases listed on the Wiki to construct a macro-friendly one from the default template; is this possible to do? Because I can't find a way of implementing logic phrases.
1427220679

Edited 1427220715
Stephen Koontz
Forum Champion
Marketplace Creator
Sheet Author
API Scripter
Compendium Curator
The helper functions are supposed to go in the Roll Template itself which is usually located on the character sheet or in the case of the default in Roll20's code. The helper functions don't go into the macro that you use to plug information into the Roll Template. For example, this is a macro calling the default roll template: &{template:default} {{name=Test Attack}} {{attack=[[1d20]]}} This is the code for a roll template where the helper functions would be included, usually included with the HTML of a character sheet: <rolltemplate> <table> <tr><th>{{rollname}}</th></tr> <tr><td><span>Attack: </span>{{attack}} | {{attackadvantage}} vs AC</td></tr> {{#damage}} <tr> <td><span>Damage: </span>{{damage}} <span>Crit: </span>{{dmgcrit}}</td> </tr> <tr> <td><span>Type: </span>{{dmgtype}}</td> </tr> {{/damage}} <tr> <td><span>Effect: </span>{{atteffect}}</td> </tr> </table> </rolltemplate>
Thanks - just to clarify, logic functions can only be used in pre-made roll templates they're already a part of and can't be applied to an existing one they're not an inherent part of?
1427226908
Stephen Koontz
Forum Champion
Marketplace Creator
Sheet Author
API Scripter
Compendium Curator
Milkbeard said: Thanks - just to clarify, logic functions can only be used in pre-made roll templates they're already a part of and can't be applied to an existing one they're not an inherent part of? Exactly.
Thanks.
1430327884

Edited 1430328083
is there a place to see the things the default roll template supports? the wiki talks about using them but there seems to be no documentation of what is available inside any roll template i have found. i have resorted to looking at the html code for the 5e character sheet so i know what things i can incorporate into my macros.
1430329655
The Aaron
Roll20 Production Team
API Scripter
B33f3r, can you open a question in Specific Use? This forum is for bugs, so you will get a much better answer over there.