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

Macro questions

I have two, really. 1) How do I use the roll template helper functions, like: {{#rollWasCrit()&nbsp; &lt;rollname&gt;}} I'm trying to do it with the &amp;{template:default} in Pathfinder for a multiple attacks macro. Do I need to tag an inline roll something like this, maybe: {{Attack1=[[d20+@{bab}+@{STR-mod}]] [AttackRoll]]}}{{#rollWasCrit() AttackRoll}} I can't figure out how to set "the "attack" property for an inline roll" like it instructs in the wiki here: <a href="https://wiki.roll20.net/Roll_Templates#Helper_Functions" rel="nofollow">https://wiki.roll20.net/Roll_Templates#Helper_Functions</a> 2) The other thing is I'm trying to make a group perception roll for a D&amp;D 5.0 DM I know that would let him run the macro and click the token(s) of the players he wants a (secret) Perception check roll for, that would insert their character name and then roll the check plus their individual mods, either for one character, or two, three, four, etc. Thanks in advance.
1569889155
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
1) Just had time for a quick look, but I believe those are used in creating roll templates while building character sheets. I don't think they can be used in macros. 2) Since you are a Pro user, the Group Check script is your friend. It will do all that and much more.
1569898580
GiGs
Pro
Sheet Author
API Scripter
For question 1, just confirming Keith's statement: those are just used when building character sheets. Players can't use them in macros.
Then how do I use an attack roll to trigger a confirmation roll but only when needed? I've tried to get it from examining the sheet macros, but I just can't figure it out. Is there a more advanced macro/roll template tutorial available? I've watched a lot of videos on youtube, and learned a lot, but I can tell there are parts I'm missing.&nbsp; Tell me about the Group Check script. Is it available on the API library page in game options? I use a few of them, but it seems like I have to restart the sandbox engine a lot to get them to work. I've used the Pathfinder Companion script and a few others, but this Group Check piques my interest.
1569902256
GiGs
Pro
Sheet Author
API Scripter
You cant do any sort of conditional logic in basic macros. So no "if when needed" rolls. You can only do that with API scripts. I dont use GroupCheck so cant comment, but it is probably in the API library. If you are having to restart your API sandbox a lot, then one or more of your scripts is too flaky. Most scripts from the library should be robust enough that they aren't crashing frequently.&nbsp;&nbsp;&nbsp;You'd be best off identifying which one is causing your problems, and disabling it if you can live without it. But if you really cant live without the the script, figuring out what causes the crash and avoiding doing that would be the next best option.
1569905314
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
GroupCheck is available for OneClick install on your game's API page. I use a companion script alongside it by the same author, Jakob. You can find it here . Apply Damage will take the results of a group save and apply damage to each token that made or failed the save accordingly. They are amazingly useful scripts.
Nekronn99 said: I have two, really. 1) How do I use the roll template helper functions, like: {{#rollWasCrit()&nbsp; &lt;rollname&gt;}} I'm trying to do it with the &amp;{template:default} in Pathfinder for a multiple attacks macro. Do I need to tag an inline roll something like this, maybe: {{Attack1=[[d20+@{bab}+@{STR-mod}]] [AttackRoll]]}}{{#rollWasCrit() AttackRoll}} I can't figure out how to set "the "attack" property for an inline roll" like it instructs in the wiki here: <a href="https://wiki.roll20.net/Roll_Templates#Helper_Functions" rel="nofollow">https://wiki.roll20.net/Roll_Templates#Helper_Functions</a> 2) The other thing is I'm trying to make a group perception roll for a D&amp;D 5.0 DM I know that would let him run the macro and click the token(s) of the players he wants a (secret) Perception check roll for, that would insert their character name and then roll the check plus their individual mods, either for one character, or two, three, four, etc. Thanks in advance. You can do all this stuff with complicated macros.
1569961921

Edited 1569961937
Yes, I know. I was hoping to get some insight as to how to write such a macro. I've made others with similar functions, such as group stealth. I want one that I can enter as many or as few characters as I want to check, though, and can't quite get it. Do I number each entry request? As in @{selected1}, @{selected2}, @{selected3}? Will that work?
You can only "select" one token but you can "target" as many as you wish to type as target1, target2... If your group remains somewhat static, you might find it easier to just make a macro that does your whole group, whispers it to the GM and you just read the results you need. For instance, I use: /w GM &amp;{template:2Edefault} {{name=Party Perception}} {{Ameron Wolfbane=[[10+(@{Ameron Wolfbane|wisdef})-(1D20))]]}} {{Frank Frinkelgnome=[[10+(@{Frank Frinkelgnome|wisdef})-(1D20))]]}}{{Thorvar=[[10+(@{Thorvar|wisdef})-(1D20))]]}} {{Vanessa=[[10+(@{Vanessa|wisdef})-(1D20))]]}}
Yeah, thats how I made my last one, but as this was for someone else, I couldn't guarantee party consistency for his group. I tried it as an entry request, but that was just too much, and if I do it as a selectable, can I put something in to ask for "number in party" and then only request that many selections, because it'll stall if there are less characters selected than the number built into it, won't it?
No you could set a specific number, but not a range.&nbsp;
1570083055

Edited 1570083177
Thats too bad. I figured out what I decided on, and its a single roll for one character, click to name, and select open roll or DM whisper: ?{whisper gm?|yes, /w gm|no, } /w gm &amp;{template:simple}{{rname= Perception DC ?{DC?|15}}}{{charname=@{target|character_name}}}{{mod= +@{target|perception_bonus} mod}}{{r1=[[d20+@{target|perception_bonus}]]}}{{always=1}} {{r2=[[d20+@{target|perception_bonus}]]}} I couldn't get the "{target1},{target2}, {target3}" thing to work, though. Works for me, I guess. He'll be happy with it, maybe.
1570090159

Edited 1570090214
Ziechael
Forum Champion
Sheet Author
API Scripter
Multiple targets are setup using target labels, @{target|perception_bonus} becomes @{target |target 1 |perception_bonus} and therefore can be expanded to be @{target |target 2 |perception_bonus}, @{target |target 3 |perception_bonus} etc. Check out the wiki for full details :)
1570090260
GiGs
Pro
Sheet Author
API Scripter
wont this at the start of your macro cause issues? ?{whisper gm?|yes, /w gm|no, } /w gm Should it be ?{whisper gm?|yes, /w gm|no, } In other words, remove the /w gm between the } and &amp;{template
Nope, it worked great. switches between open chat and gm whisper as you choose.
1570143002

Edited 1570143028
"Multiple targets are setup using target labels, @{target|perception_bonus} becomes @{target |target 1 |perception_bonus} and therefore can be expanded to be @{target |target 2 |perception_bonus}, @{target |target 3 |perception_bonus} etc." I've been looking for that info on the wiki for forever! Thanks Ziechael! So just add in the "target2" label between pipes in the command! of course! Dammit, sometimes these things are so simple they just don't register at first.
GiGs said: wont this at the start of your macro cause issues? ?{whisper gm?|yes, /w gm|no, } /w gm Should it be ?{whisper gm?|yes, /w gm|no, } In other words, remove the /w gm between the } and &amp;{template Oh, wait, I see what you meant. I must've mistyped it. ?{whisper gm?|yes, /w gm|no, } /w gm &amp;{template:simple}{{rname= Perception DC ?{DC?|15}}}{{charname=@{target|character_name}}}{{mod= +@{target|perception_bonus} mod}}{{r1=[[d20+@{target|perception_bonus}]]}}{{always=1}} {{r2=[[d20+@{target|perception_bonus}]]}} Yes, remove that from the macro and all is well. But, now, I'm going to go fiddle with it some more to try to get what I intended from the beginning, thanks to&nbsp; Ziechael's tips. Thanks again!&nbsp;
1570176063
Ziechael
Forum Champion
Sheet Author
API Scripter