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 help please

1482043732
Justin H.
Marketplace Creator
I have been working on a macro to combine saving throws based off [advantage | disadvantage] rolls. The problem is iI want to use the results off of 1 roll rather than a roll for each ability mod.  I have gotten this far, showing the roll results and the individual mod stats, but can't get the mod numbers to add to the roll results: /w gm &{template:default} {{name=Saving Throws}} {{roll=[[1d20]] | [[1d20]]}} {{Str Save= +[[0 + @{npcd_str_mod}]] | [[0 + @{npcd_str_mod}]]}} {{Dex Save= +[[0+@{npcd_dex_mod}]] | [[0 + @{npcd_dex_mod}]]}} {{Con Save= +[[0+@{npcd_con_mod}]] | [[0 + @{npcd_con_mod}]]}} {{Int Save= +[[0+@{npcd_int_mod}]] | [[0 + @{npcd_int_mod}]]}} {{Wis Save= +[[0+@{npcd_wis_mod}]] | [[0 + @{npcd_wis_mod}]]}} {{Cha Save= +[[0+@{npcd_cha_mod}]] | [[0 + @{npcd_cha_mod}]]}} Saving Throws Roll 17 | 18 Str Save +0 | 0 Dex Save +0 | 0 Con Save +1 | 1 Int Save +1 | 1 Wis Save +3 | 3 Cha Save +1 | 1 It seems I am close. Is it even possible? Thank you. 
1482050555
Andrew C
Marketplace Creator
Without powercards or API you can't "save" a die roll and use it for multiple calculations.
1482058338

Edited 1482058468
Tetsuo
Forum Champion
Try this:  /w gm &{template:default} {{name=Saving Throws}} {{roll=[[1d20 + [[?{Which ability|Strength, @{npcd_str_mod}|Dexterity, @{npcd_dex_mod}|Constitution, @{npcd_con_mod}|Intelligence, @{npcd_int_mod} + @{intelligence_save_prof}|Wisdom, @{npcd_wis_mod}|Charisma, @{npcd_cha_mod}}]] ]]|[[1d20 + [[?{Which ability|Strength, @{npcd_str_mod}|Dexterity, @{npcd_dex_mod}|Constitution, @{npcd_con_mod}|Intelligence, @{npcd_int_mod} + @{intelligence_save_prof}|Wisdom, @{npcd_wis_mod}|Charisma, @{npcd_cha_mod}}]] ]] }}
1482066896
The Aaron
Pro
API Scripter
Franky H. said: Try this:  /w gm &{template:default} {{name=Saving Throws}} {{roll=[[1d20 + [[?{Which ability|Strength, @{npcd_str_mod}|Dexterity, @{npcd_dex_mod}|Constitution, @{npcd_con_mod}|Intelligence, @{npcd_int_mod} + @{intelligence_save_prof}|Wisdom, @{npcd_wis_mod}|Charisma, @{npcd_cha_mod}}]] ]]|[[1d20 + [[?{Which ability|Strength, @{npcd_str_mod}|Dexterity, @{npcd_dex_mod}|Constitution, @{npcd_con_mod}|Intelligence, @{npcd_int_mod} + @{intelligence_save_prof}|Wisdom, @{npcd_wis_mod}|Charisma, @{npcd_cha_mod}}]] ]] }} On the second Roll Query, you only need ?{Which ability}. Since it's the same name as a prior one, the parameter list is ignored. 
1482068407
Justin H.
Marketplace Creator
Franky H. said: Try this:  /w gm &{template:default} {{name=Saving Throws}} {{roll=[[1d20 + [[?{Which ability|Strength, @{npcd_str_mod}|Dexterity, @{npcd_dex_mod}|Constitution, @{npcd_con_mod}|Intelligence, @{npcd_int_mod} + @{intelligence_save_prof}|Wisdom, @{npcd_wis_mod}|Charisma, @{npcd_cha_mod}}]] ]]|[[1d20 + [[?{Which ability|Strength, @{npcd_str_mod}|Dexterity, @{npcd_dex_mod}|Constitution, @{npcd_con_mod}|Intelligence, @{npcd_int_mod} + @{intelligence_save_prof}|Wisdom, @{npcd_wis_mod}|Charisma, @{npcd_cha_mod}}]] ]] }} This is Excellent, better than what i expected Thank you.  On this note, can we also display which ability was selected. 
Justin H. said: On this note, can we also display which ability was selected.  Try this out: /w gm &{template:default} {{name=Saving Throw ?{Which ability|   Strength, [Strength] [[@{npcd_str_mod} + @{strength_save_prof}]] |   Dexterity, [Dexterity] [[@{npcd_dex_mod} + @{dexterity_save_prof}]] |   Constitution, [Constitution] [[@{npcd_con_mod} + @{constitution_save_prof}]] |   Intelligence, [Intelligence] [[@{npcd_int_mod} + @{intelligence_save_prof}]] |   Wisdom, [Wisdom] [[@{npcd_wis_mod} + @{wisdom_save_prof}]] |   Charisma, [Charisma] [[@{npcd_cha_mod} + @{charisma_save_prof}]] } }} {{roll=[[ 1d20 + ?{Which ability} ]] | [[ 1d20 + ?{Which ability} ]] }}
1482075933
Justin H.
Marketplace Creator
Silvyre thank you, hopefully 2 more questions can be answered 1. The number appearing after [Ability} shows white, highlighted in yellow and hard to read. Can we make that more readable? 2. Can a macro be accessed from within a handout? For instance I want to direct the DM to click on the roll table with a clickable link in the handout without having to litter up the 'bar'.
Justin H. said: 2. Can a macro be accessed from within a handout? Yup, check out: Journal Command Buttons 1. The number appearing after [Ability} shows white, highlighted in yellow and hard to read. Can we make that more readable? One solution: /w gm &{template:default} {{name=Saving Throw ``?{Which ability|   Strength, [Strength] [[@{npcd_str_mod} + @{strength_save_prof}]] |   Dexterity, [Dexterity] [[@{npcd_dex_mod} + @{dexterity_save_prof}]] |   Constitution, [Constitution] [[@{npcd_con_mod} + @{constitution_save_prof}]] |   Intelligence, [Intelligence] [[@{npcd_int_mod} + @{intelligence_save_prof}]] |   Wisdom, [Wisdom] [[@{npcd_wis_mod} + @{wisdom_save_prof}]] |   Charisma, [Charisma] [[@{npcd_cha_mod} + @{charisma_save_prof}]] }`` }} {{roll=[[ 1d20 + ?{Which ability} ]] | [[ 1d20 + ?{Which ability} ]] }}
1482078029
Justin H.
Marketplace Creator
Excellent Thank you very much!! Can you please explain where the color options are coming from in this code?
Justin H. said: Can you please explain where the color options are coming from in this code? The code I added is created by Markdown code syntax from Basic Formatting . Does that help?
1482116861
Justin H.
Marketplace Creator
That does help ty, and thank you for the syntax i was unable to figure out on my  own.
1482161946

Edited 1482162080
Justin H.
Marketplace Creator
OK i got the Journal command button to work, but for some reason it wont roll as a whisper. Any ideas? the macro works as a whisper from the 'collection' tab / bar button, but not from the clickable link inside the handout. /w gm &{template:default} {{name=Random Encounter}}{{=[[1t[Encounter-table]]]}}
1482181039

Edited 1482181095
Make sure there's no space between the 
 and the /w
1482190662

Edited 1482190713
Justin H.
Marketplace Creator
TY. Will dbl chk tonite after work