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

Need Help with a Save Vs Poison Macro

Ok, Here is the macro code: &{template:2Edefault}{{name=SAVE VS. POISON}}{{subtitle=For @{selected|character_name} the @{selected|race} @{selected|class}}}{{Rolls: [[1d20cf<[[(@{selected|partar})- ?{Miscellaneous Modifiers?|+0}  (@{selected|parmod})]]cs>[[(@{selected|partar})-(@{selected|parmod})]] ]] needs ≥ [[ @{selected|partar}-(@{selected|parmod} ]] }} What happened when I tested and put in a +3 for the miscellaneous mod for a halfling bonus, the result came out as a 1 instead of 4 as it should have been. Another thing is that I want to add descriptive text like [Par. Mod] and [Par. Target] after the attribute so that when one hovers over the result they can see what the values were for the roll. However, when I do that the macro just locks up and does not display.
1686110081
GiGs
Pro
Sheet Author
API Scripter
How did you put the modifier in? That expression looks like it uses the > operator, which means it will only generate results of either 0 or 1 (failure an success respectively).
I put the +3 in the Misc Modifer field. I don't think it only generates a 0 or 1 as I see varying results the @{selected|partar} shows correctly. If it does so, how do I change it up so it shows correctly and displays the attribute labels?!
1686117248
GiGs
Pro
Sheet Author
API Scripter
I was looking at this part 1d20cf<[[ some stuff]], which returns a 0 or 1.
Ok, I would rather it calculated out the results normally than just a success or fail because that is obviously not working right.
1686127685

Edited 1686127705
GiGs
Pro
Sheet Author
API Scripter
I don't know how it normally works so haven't suggested a replacement.
It would appear that this macro originally used crit/fail highlighting on success/fail; that gets rather problematic with modifiers. So unless you have a specific reason to use that I'd remove it. As for why your modifier didn't appear that's because it had been placed inside the nested roll for the crit fail highlight and not the roll itself. Try using &{template:2Edefault} {{name=SAVE VS. POISON}} {{subtitle=For @{selected|character_name} the @{selected|race} @{selected|class}}} {{Rolls: [[1d20 +(?{Miscellaneous Modifiers?|+0}) ]] needs ≥ [[ @{selected|partar}-(@{selected|parmod} ]] }}
Thank you RainbowEncoder! I will try the new macro!
After tinkering with it some more, this is now working correctly: Name: Save-Vs-Poison &{template:2Edefault}{{name=SAVE VS. POISON}}{{subtitle=For @{selected|character_name} the @{selected|race} @{selected|class}}}{{Rolls: [[1d20 [D20] ?{Miscellaneous Modifiers?|+0} [Misc Mod] @{selected|parmod} [Poison Mod] ]] ≥ [[@{selected|partar} [Poison Target] ]] }} You just need to add a -3 for Paralyzation or Death Magic in the miscelleaneous modifier field if you are a halfling for example, in order to cancel out the +3 bonus they get for the Poison save.
1686250949

Edited 1686251647
Hello Ricky R., May I suggest some fixes to your macro: &amp;{template:2Edefault}{{name=SAVE VS. POISON}}{{subtitle=For @{selected|token_name} the @{selected|race} @{selected|class}}}{{Rolls: [[1d20[D20] + (?{Miscellaneous Modifiers?|+0}[Misc Mod]) +(@{selected|poimod}[Poison Mod])]] ≥ [[@{selected|poitar}[Poison Target]]]}} It should prevent your macro from breaking by protecting the inputs "Misc. Modifiers?" and "poimod, parmod, ..." from any mistypes from players and/or DM (writing a 3 instead of +3 or -3 for example) and using the correct score (poitar and poimod instead of partar and parmod which targets to the Paralysis fields) If you plan to use the very same macro for both PCs and NPCs, I suggest you to delete the race and class fields from the header to avoid spoilers in your adventures. For the very same reason, I replaced the "character_name" with "token_name" to hide the true identity of some characters in the subtitle header. If you are using the ADnD 2nd Edition Character Sheet by Peter B . , the 2Esave or 2Einversecheck rolltemplates may be better suited than the 2Edefault rolltemplate for the task. The real advantage of these 2 rolltemplates is that in one glimpse everybody know if the check is a success or a failure. Below is an example using the 2Esave rolltemplate. A drop-down menu will pop-up, asking what saving throw should be rolled and thus, preventing the chat to be cluttered by macro menus: &amp;{template:2Esave}{{color=orange}}{{character=@{selected|token_name} the @{selected|race} @{selected|class}}}{{savevs=?{1/2 - Saving throw, select type| Paralysis,Paralysis&amp;#125;&amp;#125;{{savetarget=[[@{selected|partar}[Paralysis]]]| Poison,Poison&amp;#125;&amp;#125;{{savetarget=[[@{selected|poitar}[Poison]]]| Death Magic,Death Magic&amp;#125;&amp;#125;{{savetarget=[[@{selected|deatar}[Death]]]| Rod,Rod&amp;#125;&amp;#125;{{savetarget=[[@{selected|rodtar}[Rod]]]| Staff,Staff&amp;#125;&amp;#125;{{savetarget=[[@{selected|statar}[Staff]]]| Wand,Wand&amp;#125;&amp;#125;{{savetarget=[[@{selected|wantar}[Wand]]]| Petrification,Petrification&amp;#125;&amp;#125;{{savetarget=[[@{selected|pettar}[Petrification]]]| Polymorph,Polymorph&amp;#125;&amp;#125;{{savetarget=[[@{selected|poltar}[Polymorph]]]| Breath Weapon,Breath Weapon&amp;#125;&amp;#125;{{savetarget=[[@{selected|breathtar}[Breath]]]| Spell,Spell&amp;#125;&amp;#125;{{savetarget=[[@{selected|spetar}[Spell]]]}}}{{saveroll=[[1d20cs20cf1[Roll]+(?{2/2 - Saving Throw, situational modifier|+0}[Modifier])]]}} Note: purposely are omitted the 'specific' modifiers (poimod, parmod, etc...) from the calculation because those modifier may not be included in some specific situations (Reaction Adj. for a high DEX or Magic Adj. for a high WIS should not be used against a mind-affecting spell and a fireball respectively). Racial adj. should be included in the target field (poitar, partar, ...) directly on the character sheet since they are always used. Feel free to modify the above macro to suits your needs. To learn more about every available rolltemplates and their use, you may want to read the documentation here: <a href="https://wiki.roll20.net/ADnD_2nd_Edition_Character_sheet" rel="nofollow">https://wiki.roll20.net/ADnD_2nd_Edition_Character_sheet</a>
1686254932

Edited 1686254945
Erick H., thanks for the input! I am using the 2E simple sheet because in the past, players complained the regular 2E sheet was too complex and confusing! Also, because I use 1E as well, combining the information so that only the more challenging dice rolls are used for example in order to un-nerf it all. I just tried the macro and yea, the 2E simple sheet does not have some of those attribute names, so it doesn't fully work.