Skip to content

Instantly share code, notes, and snippets.

@Erreinion
Last active May 15, 2019 12:41
Show Gist options
  • Save Erreinion/df870538022c501e8a9862c11558e0a6 to your computer and use it in GitHub Desktop.
Save Erreinion/df870538022c501e8a9862c11558e0a6 to your computer and use it in GitHub Desktop.
Roll20 macros

Roll20 D&D 5e Macros

I run Roll20 D&D 5e games in a hybrid online/in-person scenario. This means that I'm running a small 13" screen so that I do not have so much of a physical barrier between me and my players who are physically present.

My challenge has been to manage all the multiple windows required to run encounters. Specifically, all the monster ("mob") character sheets. I read the sheets beforehand, but I need something that I can easily access and trigger no matter how many different kinds of mobs are in the encounter. More than 3 character sheets is too much.

My solution is to call the different sections of the character sheets from macros and display them in chat. I also have a macro to quickly roll for checks.

The annoying bit is that the macros have to work for every mob, and mobs can have different numbers of traits and actions. And macros do not have the notion of an iterator to be able to only call those traits/actions that exist. That means there needs to be error-handling for when a macro calls a trait/action that is not there. So, the result is not perfect, but workable during a game.

What I have below works 90% of the time. For BBEGs with lots of traits and actions, I just use their character sheet.

Initiative

The easy stuff first.

/w gm %{selected|npc_init}

Make this macro a token action.

Stats

Shows the token's stat block in chat with an optional roll of hit dice for HP for setting up new mobs.

/w gm &{template:default} {{name=@{selected|character_name} Stats}} {{Armor Class= @{selected|npc_AC} (@{selected|npc_actype})}} {{Hit Dice= @{selected|npc_hpformula} | [[@{selected|npc_hpformula}]]}} {{Speed= @{selected|npc_speed}}} {{Senses=@{selected|npc_senses}}} {{Resitances=@{selected|npc_resistances}}} {{Immunities=@{selected|npc_immunities}}} {{Condition Immune=@{selected|npc_condition_immunities}}} {{Languages=@{selected|npc_languages}}}

Make this a token action.

PER

Roll perception. rtype means that it rolls with/without advantage, depending on sheet configuration.

/w gm @{selected|wtype}&{template:npc} {{name=@{selected|npc_name}}} {{rname=Perception}} {{mod=@{selected|npc_perception}}} {{r1=[[@{selected|d20}+@{selected|npc_perception}]]}} @{selected|rtype}+@{selected|npc_perception}]]}}

Make this a token action.

Roll-Abilities

Roll all ability checks at once.

/w gm &{template:default} {{name=@{selected|character_name} Ability Checks}} {{Strength = [[@{selected|d20}+@{selected|strength_mod}@{selected|jack_bonus}]] -  [[@{selected|d20}+@{selected|strength_mod}@{selected|jack_bonus}]]}} {{Dexterity= [[@{selected|d20}+@{selected|dexterity_mod}@{selected|jack_bonus}]] - [[@{selected|d20}+@{selected|dexterity_mod}@{selected|jack_bonus}]]}} {{Constitution= [[@{selected|d20}+@{selected|constitution_mod}@{selected|jack_bonus}]] - [[@{selected|d20}+@{selected|constitution_mod}@{selected|jack_bonus}]]}} {{Intelligence= [[@{selected|d20}+@{selected|intelligence_mod}@{selected|jack_bonus}]] - [[@{selected|d20}+@{selected|intelligence_mod}@{selected|jack_bonus}]]}} {{Wisdom= [[@{selected|d20}+@{selected|wisdom_mod}@{selected|jack_bonus}]] - [[@{selected|d20}+@{selected|wisdom_mod}@{selected|jack_bonus}]]}} {{Charisma= [[@{selected|d20}+@{selected|charisma_mod}@{selected|jack_bonus}]] - [[@{selected|d20}+@{selected|charisma_mod}@{selected|jack_bonus}]]}}

Make this a token action.

Roll-Saves

Rolls all saving throws at once.

/w gm &{template:default} {{name= @{selected|character_name} Saving Throws}}  {{Str=[[@{selected|d20}+(@{selected|strength_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.1)))+(@{selected|npc_str_save}*@{selected|npc})]] | [[@{selected|d20}+(@{selected|strength_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.1)))+(@{selected|npc_str_save}*@{selected|npc})]]}} {{Dex=[[@{selected|d20}+(@{selected|dexterity_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.1)))+(@{selected|npc_dex_save}*@{selected|npc})]] | [[@{selected|d20}+(@{selected|dexterity_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.1)))+(@{selected|npc_dex_save}*@{selected|npc})]]}} {{Con=[[@{selected|d20}+(@{selected|constitution_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.1)))+(@{selected|npc_con_save}*@{selected|npc})]] | [[@{selected|d20}+(@{selected|constitution_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.1)))+(@{selected|npc_con_save}*@{selected|npc})]]}} {{Int=[[@{selected|d20}+(@{selected|intelligence_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.1)))+(@{selected|npc_int_save}*@{selected|npc})]] | [[@{selected|d20}+(@{selected|intelligence_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.1)))+(@{selected|npc_int_save}*@{selected|npc})]]}} {{Wis=[[@{selected|d20}+(@{selected|wisdom_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.1)))+(@{selected|npc_wis_save}*@{selected|npc})]] | [[@{selected|d20}+(@{selected|wisdom_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.1)))+(@{selected|npc_wis_save}*@{selected|npc})]]}} {{Cha=[[@{selected|d20}+(@{selected|charisma_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.1)))+(@{selected|npc_cha_save}*@{selected|npc})]] | [[@{selected|d20}+(@{selected|charisma_save_bonus}@{selected|pbd_safe}*(1-ceil((@{selected|npc})*0.1)))+(@{selected|npc_cha_save}*@{selected|npc})]]}} 

Make this a token action.

Token Traits

This will show traits in chat for the selected token.

Strategy: set up a raw macro that does the work and then call the macro from a wrapper that can do error handling.

raw-traits

Calls 4 (0-3) traits from the character sheet. Will throw errors if there are not enough traits.

/w gm @{selected|wtype}&{template:npcaction} {{name=@{selected|npc_name}}} {{rname=@{selected|repeating_npctrait_$0_name}}} {{description=@{selected|repeating_npctrait_$0_desc}}}
/w gm @{selected|wtype}&{template:npcaction} {{rname=@{selected|repeating_npctrait_$1_name}}} {{description=@{selected|repeating_npctrait_$1_desc}}}
/w gm @{selected|wtype}&{template:npcaction} {{rname=@{selected|repeating_npctrait_$2_name}}} {{description=@{selected|repeating_npctrait_$2_desc}}}
/w gm @{selected|wtype}&{template:npcaction} {{rname=@{selected|repeating_npctrait_$3_name}}} {{description=@{selected|repeating_npctrait_$3_desc}}}

Mob-Traits

Error-handling wrapper for raw-traits.

/w gm #raw-traits &{noerror}

Make this a token action.

Token Actions

This will show available actions in chat as clickable buttons for the selected token.

raw-actions

/w gm @{selected|wtype}&{template:default} {{name=@{selected|character_name} Actions}} {{ Actions= [@{selected|repeating_npcaction_$0_name}](~selected|repeating_npcaction_$0_npc_action) 
[@{selected|repeating_npcaction_$1_name}](~selected|repeating_npcaction_$1_npc_action) 
[@{selected|repeating_npcaction_$2_name}](~selected|repeating_npcaction_$2_npc_action) 
[@{selected|repeating_npcaction_$3_name}](~selected|repeating_npcaction_$3_npc_action)
}} 

Mob-Acts

Wrapper for raw-actions.

/w gm #raw-actions &{noerror}

Make this a token action.

Curse of Strahd

[SPOILERS]

There are a lot of random elements to CoS and even the official WotC Roll20 module does not cover them all.

Trinkets

Yes, the official module includes a rollable table, but fumbling around the UI to find and click it is annoying. I love dropping a lot of trinkets around to keep the creep factor high.

/w gm [[1t[Gothic-Trinkets]]]

Just your basic "call a table" macro. Add new trinkets as you see fit. Put in the macro bar.

Random Encounters

Random encounters are really important in CoS. They provide clues, keep the creep factor up, and even provide important help. But gosh, that's a lot of flipping around tables and charts for a single encounter, even if they just come across a random grave!

You are supposed to roll for an encounter every 30 minutes of game time and random encounters trigger differently when it is daytime or nighttime and when the party is on a path or in the wilderness. It's the sort of decision-tree thing that a macro can help with. Because macros cannot have conditionals (if-then logic), you have to roll for everything at once. But it's not so bad.

First, set up two rollable tables. One for daytime encounters and one for nighttime encounters. Add the 19 items from the appropriate chart to each table. Do not place numbers as the first character of the table item or the macro gets confused but add a number to each table item in order as it appears in the chart in the books. (If the party is travelling with Vistani, only the first 11 items from the table applies. The numbering you do in the tables helps with this.) [12] 3d6 wolves for example, works for the 12th item in the chart.

Second, go through the description of each item after the charts and add that detail to the table item. Things like what it means that there is a swarm of ravens and how they behave, etc. I really condensed the material and used shorthand notes to make it reasonable.

Third, write this macro:

/w gm &{template:default} {{name=Random Encounters}} {{encounter=[[1d20]]}} {{note= 18+ if on road, 15+ if in wilderness. Only items 1-11 apply if travelling with Vistani.}} {{Handout= [Random Encounters](http://journal.roll20.net/handout/-KhxK-OuP_0e2e9Qjsh8)}}{{Day= [[1t[Daytime-Encounters]]]}} {{Night= [[1t[Nighttime-Encounters]]]}}

It rolls a d20 and displays a note to tell you how to determine if it triggers. I include a handy link to the Random Encounters journal page from the official module in case I need to quickly look something up. (Need to figure out the URL? Create a new note and use the shorthand [Random Encounters] then right click and save the URL of the resulting link. That notation works for any Journal page.) Then it rolls from both the daytime and nighttime tables.

You still need to roll the d6s or d4s to determine how many things there are for a few things, but that's a small amount of effort compared to not having a macro at all. Or you could just take an average of the die and not roll at all. I considered adding constant dice rolls as part of the macro, but it got cluttered.

Result in image below.

Put in the macro bar.

@Erreinion
Copy link
Author

random encounter output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment