Saturday, April 18, 2020
My Roll20 GM macros
Different virtual tabletop programs have different advantages and disadvantages. Roll20 is one of the easier to learn, but it isn't highly automated. You need to do a lot of things by hand, which takes time. But you can program macros that automate some stuff and speed the game up a lot, especially for things that you as the DM will use a lot. So here are my Roll20 macros:
1) Initiative
The tricky thing about initiative in Roll20 is that it is only correctly added to the initiative tracker if you selected your token before rolling for initiative. So the correct sequence by hand is to select your token, Alt+doubleclick to open your character sheet, then click initiative on your character sheet, then close the character sheet to see the tracker again. But you can have a macro as a token action, so the sequence is down to select token, press initiative token action button. As you can't see the initiative token action button if you don't have the token selected, this is more or less fool-proof. The macro looks like this:
2) Saving Throws
Another macro I set up as a token action and visible to all players is the saving throw macro. It pops up a menu in which you select which type of saving throw you want, and then gives you a nicely formatted output for a single roll. There are fancier versions that take into account various special cases like advantage, but I felt I didn't need those.
The following macros only work for NPCs, as NPC character sheets are different from player character sheets. What I wanted was a quick way to have a monster make a standard attack without me having to open its character sheet. That turned out to be exceedingly simple, as the macro for the first attack on the monster's list of possible actions is
So how do I know what the first, second, third, and fourth action for a NPC are? Well, I could open the NPC character sheet. Or I use the following macro:
1) Initiative
The tricky thing about initiative in Roll20 is that it is only correctly added to the initiative tracker if you selected your token before rolling for initiative. So the correct sequence by hand is to select your token, Alt+doubleclick to open your character sheet, then click initiative on your character sheet, then close the character sheet to see the tracker again. But you can have a macro as a token action, so the sequence is down to select token, press initiative token action button. As you can't see the initiative token action button if you don't have the token selected, this is more or less fool-proof. The macro looks like this:
&{template:simple} {{rname=Initiative}} {{mod=[[@{selected|dexterity_mod}+@{selected|dexterity}/100]]}} {{r1=[[1d20+@{selected|dexterity_mod}+@{selected|dexterity}/100&{tracker}]]}} {{normal=[[1]]}} {{charname=@{selected|token_name}}}It works for both players and NPCs, so you need to select "Show as Token Action" and "Visible to Players: All Players" at the bottom of the macro window. Oh, the "+@{selected|dexterity}/100" part is optional, I use it as tiebreaker for people with different dexterity scores rolling the same initiative.
2) Saving Throws
Another macro I set up as a token action and visible to all players is the saving throw macro. It pops up a menu in which you select which type of saving throw you want, and then gives you a nicely formatted output for a single roll. There are fancier versions that take into account various special cases like advantage, but I felt I didn't need those.
@{selected|wtype}&{template:npcaction} {{rname=Saving Throw}} {{name=@{selected|token_name}}}{{description=?{Save|Strength, [[@{selected|d20}+[[(@{selected|strength_save_bonus})]]]][STR] |Dexterity, [[@{selected|d20}+[[(@{selected|dexterity_save_bonus})]]]][DEX]|Constitution, [[@{selected|d20}+[[(@{selected|constitution_save_bonus})]]]][CON]|Intelligence, [[@{selected|d20}+[[(@{selected|intelligence_save_bonus})]]]][INT]|Wisdom, [[@{selected|d20}+[[(@{selected|wisdom_save_bonus})]]]][WIS]|Charisma, [[@{selected|d20}+[[(@{selected|charisma_save_bonus})]]]][CHA]]]}}}3) Monster attacks
The following macros only work for NPCs, as NPC character sheets are different from player character sheets. What I wanted was a quick way to have a monster make a standard attack without me having to open its character sheet. That turned out to be exceedingly simple, as the macro for the first attack on the monster's list of possible actions is
%{selected|repeating_npcaction_$0_npc_action}Change the 0 to 1, 2, 3, .. and you get the second, third, fourth, ... action on the list of NPC actions. The output depends on how you set up your game. Personally I have it set up to make 2 attack rolls, as advantage and disadvantage in attack rolls happens a lot more often than for saving throws. I have it set up to not immediately roll damage, but if it is a hit, I can click on the name of the attack in the chat window and get the damage.
So how do I know what the first, second, third, and fourth action for a NPC are? Well, I could open the NPC character sheet. Or I use the following macro:
/w gm&{template:npcaction} {{rname=@{selected|npc_name}}} {{name=Actions}} {{normal=1}} {{description=1:[@{selected|repeating_npcaction_$0_name}](~selected|repeating_npcaction_$0_npc_action)This macro is far from perfect. The output gets ugly if a monster has less than 4 possible attack actions. And while the output is whispered to the GM in the form of buttons that I can click, if I use that function the attack and damage is also whispered. And I am more a "roll in the open" kind of DM.
2:[@{selected|repeating_npcaction_$1_name}](~selected|repeating_npcaction_$1_npc_action)
3:[@{selected|repeating_npcaction_$2_name}](~selected|repeating_npcaction_$2_npc_action)
4:[@{selected|repeating_npcaction_$3_name}](~selected|repeating_npcaction_$3_npc_action)
}}
Labels: Dungeons & Dragons