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

Saving Throw Macro

Hi everyone, I have seen some saving throw macros around and found one that work, but it's quite complicated and no idea why it uses ceil formular, multiplying and 0,000001 and things when we have a simple roll available. (of course I am noob) I was trying to create a saving throw macro myself, but can't quite get the dropdown menu to select the atribute quite right. Rather than giving me the dropdown meny it just has some text in it and can't figure out why. Can someone help me please? The basic roll I got from the atribute section on the sheet, and if I used them 1 by 1 it works just fine, is just putting it together that messes everything. My macro just as an example goes as follow: @{selected|wtype}&{template:simple} ?{Save |Strength,{{rname=^{strength-save-u}}} {{mod=@{strength_save_bonus}}} {{r1=[[@{d20}+@{strength_save_bonus}@{pbd_safe}]]}} @{advantagetoggle}+@{strength_save_bonus}@{pbd_safe}]]}} {{global=@{global_save_mod}}}   |Dexterity,{{rname=^{dexterity-save-u}}} {{mod=@{dexterity_save_bonus}}} {{r1=[[@{d20}+@{dexterity_save_bonus}@{pbd_safe}]]}} @{advantagetoggle}+@{dexterity_save_bonus}@{pbd_safe}]]}} {{global=@{global_save_mod}}} {{charname=@{selected|character_name}}}
1635125087
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
It has to do with html substitutions on drop down macros. Basically, the interpreter sees the first "}", the one in the attribute call, and wants to close the query. The trick is to substitute them with the htm code for a "}". There's a good technical discussion of how and why here , but in the meantime, here is a saving throw macro that will work with 5e. NPCs @{selected|wtype}&{template:npc} @{selected|npc_name_flag} @{selected|rtype}+?{Save|Strength,[[@{selected|npc_str_save}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_str_save}]]]]}} {{mod=[[@{selected|npc_str_save}]]}}{{rname=Strength Save}} {{type=Save}} |Dexterity,[[@{selected|npc_dex_save}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_dex_save}]]]]}} {{mod=[[@{selected|npc_dex_save}]]}}{{rname=Dexterity Save}} {{type=Save}} |Constitution,[[@{selected|npc_con_save}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_con_save}]]]]}} {{mod=[[@{selected|npc_con_save}]]}}{{rname=Constitution Save}} {{type=Save}} |Intelligence,[[@{selected|npc_int_save}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_int_save}]]]]}} {{mod=[[@{selected|npc_int_save}]]}}{{rname=Intelligence Save}} {{type=Save}} |Wisdom,[[@{selected|npc_wis_save}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_wis_save}]]]]}} {{mod=[[@{selected|npc_wis_save}]]}}{{rname=Wisdom Save}} {{type=Save}} |Charisma,[[@{selected|npc_cha_save}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_cha_save}]]]]}} {{mod=[[@{selected|npc_cha_save}]]}}{{rname=Charisma Save}} {{type=Save}}} PCs @{selected|wtype}&{template:simple} @{selected|rtype}?{Save|Strength, +@{selected|strength_save_bonus}@{selected|pbd_safe}]]}} {{rname=Strength Save}&#125 {{mod=@{selected|strength_save_bonus}}} {{r1=[[@{selected|d20}+@{selected|strength_save_bonus}@{selected|pbd_safe}]]}} |Dexterity, +@{selected|dexterity_save_bonus}@{selected|pbd_safe}]]}} {{rname=Dexterity Save}&#125 {{mod=@{selected|dexterity_save_bonus}}} {{r1=[[@{selected|d20}+@{selected|dexterity_save_bonus}@{selected|pbd_safe}]]}} |Constitution, +@{selected|constitution_save_bonus}@{selected|pbd_safe}]]}} {{rname=Constitution Save}&#125 {{mod=@{selected|constitution_save_bonus}}} {{r1=[[@{selected|d20}+@{selected|constitution_save_bonus}@{selected|pbd_safe}]]}} |Intelligence, +@{selected|intelligence_save_bonus}@{selected|pbd_safe}]]}} {{rname=Intelligence Save}&#125 {{mod=@{selected|intelligence_save_bonus}}} {{r1=[[@{selected|d20}+@{selected|intelligence_save_bonus}@{selected|pbd_safe}]]}} |Wisdom, +@{selected|wisdom_save_bonus}@{selected|pbd_safe}]]}} {{rname=Wisdom Save}&#125 {{mod=@{selected|wisdom_save_bonus}}} {{r1=[[@{selected|d20}+@{selected|wisdom_save_bonus}@{selected|pbd_safe}]]}} |Charisma, +@{selected|charisma_save_bonus}@{selected|pbd_safe}]]}} {{rname=Charisma Save}&#125 {{mod=@{selected|charisma_save_bonus}}} {{r1=[[@{selected|d20}+@{selected|charisma_save_bonus}@{selected|pbd_safe}]]}}}@{selected|global_save_mod}@{selected|charname_output}
keithcurtis said: It has to do with html substitutions on drop down macros. Basically, the interpreter sees the first "}", the one in the attribute call, and wants to close the query. The trick is to substitute them with the htm code for a "}". There's a good technical discussion of how and why here , but in the meantime, here is a saving throw macro that will work with 5e. NPCs @{selected|wtype}&{template:npc} @{selected|npc_name_flag} @{selected|rtype}+?{Save|Strength,[[@{selected|npc_str_save}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_str_save}]]]]}} {{mod=[[@{selected|npc_str_save}]]}}{{rname=Strength Save}} {{type=Save}} |Dexterity,[[@{selected|npc_dex_save}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_dex_save}]]]]}} {{mod=[[@{selected|npc_dex_save}]]}}{{rname=Dexterity Save}} {{type=Save}} |Constitution,[[@{selected|npc_con_save}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_con_save}]]]]}} {{mod=[[@{selected|npc_con_save}]]}}{{rname=Constitution Save}} {{type=Save}} |Intelligence,[[@{selected|npc_int_save}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_int_save}]]]]}} {{mod=[[@{selected|npc_int_save}]]}}{{rname=Intelligence Save}} {{type=Save}} |Wisdom,[[@{selected|npc_wis_save}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_wis_save}]]]]}} {{mod=[[@{selected|npc_wis_save}]]}}{{rname=Wisdom Save}} {{type=Save}} |Charisma,[[@{selected|npc_cha_save}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_cha_save}]]]]}} {{mod=[[@{selected|npc_cha_save}]]}}{{rname=Charisma Save}} {{type=Save}}} PCs @{selected|wtype}&{template:simple} @{selected|rtype}?{Save|Strength, +@{selected|strength_save_bonus}@{selected|pbd_safe}]]}} {{rname=Strength Save}&#125 {{mod=@{selected|strength_save_bonus}}} {{r1=[[@{selected|d20}+@{selected|strength_save_bonus}@{selected|pbd_safe}]]}} |Dexterity, +@{selected|dexterity_save_bonus}@{selected|pbd_safe}]]}} {{rname=Dexterity Save}&#125 {{mod=@{selected|dexterity_save_bonus}}} {{r1=[[@{selected|d20}+@{selected|dexterity_save_bonus}@{selected|pbd_safe}]]}} |Constitution, +@{selected|constitution_save_bonus}@{selected|pbd_safe}]]}} {{rname=Constitution Save}&#125 {{mod=@{selected|constitution_save_bonus}}} {{r1=[[@{selected|d20}+@{selected|constitution_save_bonus}@{selected|pbd_safe}]]}} |Intelligence, +@{selected|intelligence_save_bonus}@{selected|pbd_safe}]]}} {{rname=Intelligence Save}&#125 {{mod=@{selected|intelligence_save_bonus}}} {{r1=[[@{selected|d20}+@{selected|intelligence_save_bonus}@{selected|pbd_safe}]]}} |Wisdom, +@{selected|wisdom_save_bonus}@{selected|pbd_safe}]]}} {{rname=Wisdom Save}&#125 {{mod=@{selected|wisdom_save_bonus}}} {{r1=[[@{selected|d20}+@{selected|wisdom_save_bonus}@{selected|pbd_safe}]]}} |Charisma, +@{selected|charisma_save_bonus}@{selected|pbd_safe}]]}} {{rname=Charisma Save}&#125 {{mod=@{selected|charisma_save_bonus}}} {{r1=[[@{selected|d20}+@{selected|charisma_save_bonus}@{selected|pbd_safe}]]}}}@{selected|global_save_mod}@{selected|charname_output} Many thanks, Yes the deaded } I will have a look at the threat :D