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

Trying to make a Success/failure save macro for my NPC

1622201413

Edited 1622201585
Hello there, I'am trying to make a success/failure macro for npc save and it seems to be on a good way as this work fine : /w gm  &{template:npcaction} {{rname=CHA Group Save}} {{name=@{selected|npc_name} }} {{description= Roll is a [[ 1t[[[1d20>?{Dc?}]]] ]] }} But i have one problem : It seems i can't include the 'charisma_save_bonus' into it. This doesn't work :( /w gm  &{template:npcaction} {{rname=CHA Group Save}} {{name=@{selected|npc_name} }} {{description= Roll is a [[ 1t[[[1d20+@{selected|charisma_save_bonus}>?{Dc?}]]] ]] }} Any ideas ? Thanks for your attention :) Ps : i have two roll table named 0 & 1 with only one value in it (Failure, Success),
1622207022

Edited 1622207525
timmaugh
Forum Champion
API Scripter
The core of your roll is not going to produce a 1 or a 0. If you just send: [[1d20+@{selected|charisma_save_bonus}>?{Dc?}]] ...you will get the number value of the d20 plus the save bonus. There is a wide range of values from that, but if your save bonus is greater than 0 you will immediately run out of tables to roll against for your next step. You can fudge it by reversing the math: [[1d20>[[?{DC}-@{selected|charisma_save_bonus}]]]] That will always produce a 0 or 1, which will let you roll against your 2 tables.
Thanks so much timmaugh, i never think about reversing the math :(