1
\$\begingroup\$

How do I make a macro for Roll20 that will prompt the user for a save type once, and then roll a save for the chosen ability and output it in a format that matches the format of if they clicked it on the character sheet?

I have the following macro kindly provided by MikeQ in answer to this question - How do I make this Roll20 macro for saving throws work while only asking for the type once? - but the format isn't the same:

@{selected|token_name} rolls a ?{Save
|STR,[[1d20+@{selected|strength_save_bonus}]]/[[1d20+@{selected|strength_save_bonus}]] for a strength
|DEX,[[1d20+@{selected|dexterity_save_bonus}]]/[[1d20+@{selected|dexterity_save_bonus}]] for a dexterity
|CON,[[1d20+@{selected|constitution_save_bonus}]]/[[1d20+@{selected|constitution_save_bonus}]] for a constitution
|INT,[[1d20+@{selected|intelligence_save_bonus}]]/[[1d20+@{selected|intelligence_save_bonus}]] for an intelligence
|WIS,[[1d20+@{selected|wisdom_save_bonus}]]/[[1d20+@{selected|wisdom_save_bonus}]] for a wisdom
|CHA,[[1d20+@{selected|charisma_save_bonus}]]/[[1d20+@{selected|charisma_save_bonus}]] for a charisma } save!

It yields output of "[character name] rolls a [1d20+mod]/[1d20+mod] for a [type] save!" in the chat.

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

While you can't make it a macro this works if you save it as an ability

&{template:simple} ?{Save|STR, {{rname=Strength}} {{mod=@{selected|strength_save_bonus}}} {{r1=[[1d20+@{selected|strength_save_bonus}]]}} {{r2=[[1d20+@{selected|strength_save_bonus}]]}}{{always=1}}|DEX, {{rname=Dexterity}} {{mod=@{selected|dexterity_save_bonus}}} {{r1=[[1d20+@{selected|dexterity_save_bonus}]]}} {{r2=[[1d20+@{selected|dexterity_save_bonus}]]}} {{always=1}}|CON, {{rname=Constitution}} {{mod=@{selected|constitution_save_bonus}}} {{r1=[[1d20+@{selected|constitution_save_bonus}]]}} {{r2=[[1d20+@{selected|constitution_save_bonus}]]}}{{always=1}}|INT, {{rname=Intelligence}} {{mod=@{selected|intelligence_save_bonus}}} {{r1=[[1d20+@{selected|intelligence_save_bonus}]]}} {{r2=[[1d20+@{selected|intelligence_save_bonus}]]}} {{always=1}}|WIS, {{rname=Wisdom}} {{mod=@{selected|wisdom_save_bonus}}} {{r1=[[1d20+@{selected|wisdom_save_bonus}]]}} {{r2=[[1d20+@{selected|wisdom_save_bonus}]]}} {{always=1}}|CHA, {{rname=Charisma}} {{mod=@{selected|charisma_save_bonus}}} {{r1=[[1d20+@{selected|charisma_save_bonus}]]}} {{r2=[[1d20+@{selected|charisma_save_bonus}]]}}{{always=1}}} {{charname=@{selected|token_name}}}

It will prompt the user for the save type then roll a save of the selected type for the currently selected token then output it in the same format as if you had rolled it directly from the character sheet.

It has to be saved as an ability (on a character sheet, under the "Attributes & Abilities" tab) rather than a global macro because if you save it as a global macro every instance of } (the HTML replacement for } ) gets converted back breaking the entire thing.

\$\endgroup\$
2
  • \$\begingroup\$ Hope I was right in posting this as a separate QA since it's a different format entirely. But also if someone wants to edit the above macro to make it more readable feel free \$\endgroup\$ Jan 30, 2020 at 22:22
  • \$\begingroup\$ @V2Blast does that edit clear it up? \$\endgroup\$ Jan 30, 2020 at 23:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .