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

[5e OGL] Universal Saving Throw Macro updated for v2.0

1506769273

Edited 1507515582
Updated my macro for the new version 2.0 of the OGL sheet, this macro works for all saving throws (including death saves) for both PC and NPC. (support for global modifiers supplied by Kyle G.) My other macros: Universal Ability Checks Universal Skill Checks @{selected|wtype}&{template:simple} @{selected|rtype}?{Save |Strength,+[[(@{selected|strength_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_str_save}*@{selected|npc})]][STR SAVE] ]]}} {{rname=^{strength-save-u}}} {{mod=[[ [[(@{selected|strength_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_str_save}*@{selected|npc})]][STR SAVE] ]]}} {{r1=[[@{selected|d20}+[[(@{selected|strength_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_str_save}*@{selected|npc})]][STR SAVE] ]] |Dexterity,+[[(@{selected|dexterity_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_dex_save}*@{selected|npc})]][DEX SAVE] ]]}} {{rname=^{dexterity-save-u}}} {{mod=[[ [[(@{selected|dexterity_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_dex_save}*@{selected|npc})]][DEX SAVE] ]]}} {{r1=[[@{selected|d20}+[[(@{selected|dexterity_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_dex_save}*@{selected|npc})]][DEX SAVE] ]] |Constitution,+[[(@{selected|constitution_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_con_save}*@{selected|npc})]][CON SAVE] ]]}} {{rname=^{constitution-save-u}}} {{mod=[[ [[(@{selected|constitution_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_con_save}*@{selected|npc})]][CON SAVE] ]]}} {{r1=[[@{selected|d20}+[[(@{selected|constitution_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_con_save}*@{selected|npc})]][CON SAVE] ]] |Intelligence,+[[(@{selected|intelligence_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_int_save}*@{selected|npc})]][INT SAVE] ]]}} {{rname=^{intelligence-save-u}}} {{mod=[[ [[(@{selected|intelligence_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_int_save}*@{selected|npc})]][INT SAVE] ]]}} {{r1=[[@{selected|d20}+[[(@{selected|intelligence_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_int_save}*@{selected|npc})]][INT SAVE] ]] |Wisdom,+[[(@{selected|wisdom_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_wis_save}*@{selected|npc})]][WIS SAVE] ]]}} {{rname=^{wisdom-save-u}}} {{mod=[[ [[(@{selected|wisdom_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_wis_save}*@{selected|npc})]][WIS SAVE] ]]}} {{r1=[[@{selected|d20}+[[(@{selected|wisdom_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_wis_save}*@{selected|npc})]][WIS SAVE] ]] |Charisma,+[[(@{selected|charisma_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_cha_save}*@{selected|npc})]][CHA SAVE] ]]}} {{rname=^{charisma-save-u}}} {{mod=[[ [[(@{selected|charisma_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_cha_save}*@{selected|npc})]][CHA SAVE] ]]}} {{r1=[[@{selected|d20}+[[(@{selected|charisma_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_cha_save}*@{selected|npc})]][CHA SAVE] ]] |Death,+[[@{selected|death_save_bonus}@{selected|pbd_safe}]][DEATH SAVE] ]]}} {{rname=^{death-save-u}}} {{mod=[[ [[@{selected|death_save_bonus}@{selected|pbd_safe}]][DEATH SAVE] ]]}} {{r1=[[@{selected|d20}+[[@{selected|death_save_bonus}@{selected|pbd_safe}]][DEATH SAVE] ]] }}} @{selected|global_save_mod} @{selected|charname_output}
1506783244

Edited 1506783396
Giger
API Scripter
Can't follow instructions, but thanks for this!
Thanks Craig really appreciated!! The instructions are clear don't worry 
Just so you know for the future Craig, you can do } in the roll20 forum without the space by putting amp; between & and #. Essentially you are HTML encoding the & symbol to get it to work.
1506794351

Edited 1506794545
I copied the macro into notepad, replaced all the codes with the ones with amp; inserted, then copied that into the code block, but when I paste here it converts instantly back to the original code which then converts to } when I click save.
Craig said: I copied the macro into notepad, replaced all the codes with the ones with amp; inserted, then copied that into the code block, but when I paste here it converts instantly back to the original code which then converts to } when I click save. Yup, I have that happen too with Notepad++. I just add an additional amp;. So in notepad++ I have &#, so that when copying here results in &#, and the final output is &#. (even for this message I added an extra amp; where needed, it's a fun cycle sometimes :))
That worked, thanks. :)
1507235655

Edited 1588688579
Update for future viewers. I HTML encoded the necessary values so that you can simply copy-paste this into your game without having to the replacement yourself. I also changed the macro to use the simple roll template so that it works with the global save modifier for a PC. @{selected|wtype}&{template:simple} @{selected|rtype}?{Save |Strength,+[[(@{selected|strength_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_str_save}*@{selected|npc})]][STR SAVE] ]]}} {{rname=^{strength-save-u}}} {{mod=[[ [[(@{selected|strength_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_str_save}*@{selected|npc})]][STR SAVE] ]]}} {{r1=[[@{selected|d20}+[[(@{selected|strength_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_str_save}*@{selected|npc})]][STR SAVE] ]] |Dexterity,+[[(@{selected|dexterity_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_dex_save}*@{selected|npc})]][DEX SAVE] ]]}} {{rname=^{dexterity-save-u}}} {{mod=[[ [[(@{selected|dexterity_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_dex_save}*@{selected|npc})]][DEX SAVE] ]]}} {{r1=[[@{selected|d20}+[[(@{selected|dexterity_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_dex_save}*@{selected|npc})]][DEX SAVE] ]] |Constitution,+[[(@{selected|constitution_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_con_save}*@{selected|npc})]][CON SAVE] ]]}} {{rname=^{constitution-save-u}}} {{mod=[[ [[(@{selected|constitution_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_con_save}*@{selected|npc})]][CON SAVE] ]]}} {{r1=[[@{selected|d20}+[[(@{selected|constitution_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_con_save}*@{selected|npc})]][CON SAVE] ]] |Intelligence,+[[(@{selected|intelligence_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_int_save}*@{selected|npc})]][INT SAVE] ]]}} {{rname=^{intelligence-save-u}}} {{mod=[[ [[(@{selected|intelligence_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_int_save}*@{selected|npc})]][INT SAVE] ]]}} {{r1=[[@{selected|d20}+[[(@{selected|intelligence_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_int_save}*@{selected|npc})]][INT SAVE] ]] |Wisdom,+[[(@{selected|wisdom_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_wis_save}*@{selected|npc})]][WIS SAVE] ]]}} {{rname=^{wisdom-save-u}}} {{mod=[[ [[(@{selected|wisdom_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_wis_save}*@{selected|npc})]][WIS SAVE] ]]}} {{r1=[[@{selected|d20}+[[(@{selected|wisdom_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_wis_save}*@{selected|npc})]][WIS SAVE] ]] |Charisma,+[[(@{selected|charisma_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_cha_save}*@{selected|npc})]][CHA SAVE] ]]}} {{rname=^{charisma-save-u}}} {{mod=[[ [[(@{selected|charisma_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_cha_save}*@{selected|npc})]][CHA SAVE] ]]}} {{r1=[[@{selected|d20}+[[(@{selected|charisma_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.00001)))+(@{selected|npc_cha_save}*@{selected|npc})]][CHA SAVE] ]] }}} {{global= @{selected|global_save_mod} }} @{selected|charname_output} EDIT: apparently the template used previously has changed and a {{global}} section has been added. As such the previous version of this macro wouldn't show the global save modifier. Now it should.
Edited main post to add Kyle G.'s global modifiers code and removed carriage returns to fix formatting.
1507284484
Jakob
Sheet Author
API Scripter
I guess this means the previous universal formulas don't work anymore? Guess I'll have to update GroupCheck in case anyone uses GroupCheck with the OGL sheet...
It was a major update, many variables were removed and new ones added, it broke all my macros.
Does anyone have an updated one for Skill Checks? :)
Cody P. said: Does anyone have an updated one for Skill Checks? :) Added links to OP.
I have a question about some of the attributes used here. When I search the sheets of some existing NPCs I can't seem to find values like dexterity_save_bonus or pbd_safe, which are used throughout the macro. Also, I've read the 2.0 release document, and maybe I'm just missing something. But what exactly changed on the character sheets that I should be aware of for existing macros I have like this?
I just clicked on the character sheet entry to generate the formula then pressed up arrow in the chat box to see it. Don't need to know what the variables are or what they do, just use them.
Hi everyone,  In first, thx for ur macro, it's usefull and works perfectly. Someone have try to put in a power card ?
Does anyone know a way to turn this into a whisper to the gm? I've tried inserting /w gm in places and all that does is break the macro (doesn't even whisper the broken mess to the gm :P)
You will need to replace @{selected|wtype} with /w gm[space]. the @{selected|wtype} actually looks at the character sheet and determines how to say the roll based on an attribute. 
ash w. said: Does anyone know a way to turn this into a whisper to the gm? I've tried inserting /w gm in places and all that does is break the macro (doesn't even whisper the broken mess to the gm :P) The design as it stands will whisper the GM if that option is selected on the character sheet (PC or NPC), if you want to force always whispering the GM regardless of what the character sheet says then as Jeremy R. said just replace the @{selected|wtype} with /w gm[space] at the beginning of the macro.
1516720629

Edited 1516720835
Hi all, Ty for this 3 usefull macros. When I had use your three universals macros for the first time they work as well but after a few time I get this issue (see below). May someone can help me ? My apologies for my poor english. Thanks !
1516721137
Ziechael
Forum Champion
Sheet Author
API Scripter
If you have added the macros on the collections tab don't reopen them to edit, it will replace the html in the code and break the macro. You'll need to re-add from the original example with the html intact... then never open it up again... ever! :)
Oh, ok I see, "never open" "never open", "never open" ^^. TY for the tips
1516737807
Ziechael
Forum Champion
Sheet Author
API Scripter
You're welcome, I generally advise keeping html enabled macros in an off-site repository for safety but the abilities section of a journal works just as well since that won't replace the html entities if edited/opened after their initial creation :)
I'd recommend saving the macros "as-is" in a text file somewhere and making changes there. I really wish they would solve this issue of having to do this.
Is there a way to do these dropdown macros for a certain character but remove the need for targeting a token?
Replace all instances of @{selected| with @{character name| character name has to exactly match the full name of the PC or NPC you want to assign the macro to.including spaces.
now just a matter of converting it to be a sheet abilities so you can drop some of the @ for ~ and tweak as needed  if i undertand my coding right anyway.