Skip to main content

Creating Advanced Macros for Roll20 Online RPGs

A person of many hobbies and interests ranging from Dungeon & Dragons, electronics, map making, my dog. camping and now DMing on Roll20.

Writing Macros Makes Your Day

Being a DM is tough enough as you are playing all the monsters, the story maker, the map maker. the coordinator just to name a few hats you wear. Your players just have to concentrate on one thing, their character. Anything that will streamline your activities so you can concentrate on what the players are doing, is golden in my books.

When I discovered how to make macros to help me on Roll20, I was able to enjoy the game time instead of having to look ahead and shuffle page after page of stat blocks and monster stats. Let me allow you to put enjoyment back into your DM experience by using macros.

Creating Advanced Macros for Roll20 Online RPGs.

Creating a Monster Template

Under the Journal Tab open a new Character sheet name it Monster Template. Choose the NPC option but leave the rest blank. On the Character Sheet tab, click on the gear icon to right. This sets it into the NPC view. Scroll down to the General Options and set the three to Always Roll Advantage, Always Whisper Rolls, and Auto Roll Damage and Crit. This will set up the page so the macros run swiftly with no questions.

All the macros will be on the Attributes and Abilities tab. There are nine macros to add to this template. Not all Monsters will use all macros but the template will have them all, it's easier to disable the ones you don't use than add new ones that are needed and not there. Besides, making the template takes a little time but saves time in the long run.

The first four are action macros that not all sheets will use and will require editing to adapt to each monster. The last five are status type macros that will be common to all.

First Things First


View on Monster Template sheet


The Action Macros

Actions: @{selected|wtype} &{template:npcatk} {{name=@{selected|token_name}}} {{rname=Actions}} {{normal=1}} {{description=1:[@{selected|repeating_npcaction_$0_name}](~selected|repeating_npcaction_$0_npc_action) 2:[@{selected|repeating_npcaction_$1_name}](~selected|repeating_npcaction_$1_npc_action) 3:[@{selected|repeating_npcaction_$2_name}](~selected|repeating_npcaction_$2_npc_action)}} Traits: @{selected|wtype}&{template:npcatk} {{name=@{selected|token_name}}} {{rname=Traits}} {{normal=1}} {{description=1:[@{selected|repeating_npctrait_$0_name}](~selected|repeating_npctrait_$0_-npc_roll_output) 2:[@{selected|repeating_npctrait_$1_name}](~selected|repeating_npctrait_$1_-npc_roll_output)}} Reactions: @{selected|wtype}&{template:npcatk} {{name=@{selected|token_name}}} {{rname=Traits}} {{normal=1}} {{description=1:[@{selected|repeating_npctrait_$0_name}](~selected|repeating_npctrait_$0_-npc_roll_output) 2:[@{selected|repeating_npctrait_$1_name}](~selected|repeating_npctrait_$1_-npc_roll_output)}}

Understanding Each Macro

The Action Macros.

@{selected|wtype} &{template:npcatk} {{name=@{selected|token_name}}} {{rname=Actions}} {{description=1:[@{selected|repeating_npcaction_$0_name}](~selected|repeating_npcaction_$0_npc_action) 2:[@{selected|repeating_npcaction_$1_name}](~selected|repeating_npcaction_$1_npc_action) 3:[@{selected|repeating_npcaction_$2_name}](~selected|repeating_npcaction_$2_npc_action)}}

@{selected|wtype} pulls the information from the sheet that whispers the results.

&{template:npcatk} builds the look of the results by inputting the data into the template.

name=@{selected|token_name} Pulls the name from the selected token. This is a strong advantage to the DM as if there are several similar tokens on the field, if each has their own name, then each can have their own initiative and actions yet still use the same single monster stats sheet.

Scroll to Continue

{{rname=Actions}} Denotes the type and title of the template displayed.

{{description=1:[@{selected|repeating_npcaction_$0_name}](~selected|repeating_npcaction_$0_npc_action) 2:[@{selected|repeating_npcaction_$1_name}](~selected|repeating_npcaction_$1_npc_action) 3:[@{selected|repeating_npcaction_$2_name}](~selected|repeating_npcaction_$2_npc_action)

This part of the macros goes to the sheet and pulls the data from the actions section and parses it out. As written it will pull three actions. Again if the monster you are building has less than three actions then delete the parts not needed. If more just add. Note: the second action is named $1, the third action is named $2 etc. Also, note the macro ends with double brackets so if adding a 4th action make sure it is after the closing bracket for the 3rd action and before the double bracket in the end.

The Traits and Reactions macros are similar in format.

The Common Macros




@{selected|wtype}&{template:default} {{name=@{selected|token_name} Saving Throws}} {{Str Save= [[1d20+@{strength_mod}]] | [[1d20+@{strength_mod}]]}} {{Dex Save= [[1d20+@{dexterity_mod}]] | [[1d20+@{dexterity_mod}]]}} {{Con Save= [[1d20+@{constitution_mod}]] | [[1d20+@{constitution_mod}]]}} {{Int Save= [[1d20+@{intelligence_mod}]] | [[1d20+@{intelligence_mod}]]}} {{Wis Save= [[1d20+@{wisdom_mod}]] | [[1d20+@{wisdom_mod}]]}} {{Cha Save= [[1d20+@{charisma_mod}]] | [[1d20+@{charisma_mod}]]}}


@{selected|wtype}&{template:default} {{name= @{selected|token_name} DR/Immunities}} {{Damage Resistance= @{selected|npc_resistances}}} {{Damage Vulnerability= @{selected|npc_vulnerabilities}}} {{Damage Immunity= @{selected|npc_immunities}}} {{Condition Immunity= @{selected|npc_condition_immunities}}}


%{Selected|npc_perception} @{selected|wtype}&{template:npc} {{name=@{selected|token_name}}} {{rname=Perception}} {{mod=@{selected|npc_perception}}} {{r1=[[1d20+@{selected|npc_perception}]]}} @{selected|rtype}+@{selected|npc_perception}]]}}


/w gm &{template:default} {{name=@{selected|token_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}}}

Coming Up Next

If you like this template full of advanced macros and the streaming of your DM duties it offers, you'll love what's coming up next. I have a notes macro you can apply to your maps in Roll20 so you can tag maps with descriptions, pictures, even monsters and treasures. All at your fingertips in chat. No more off the cuff typing to describe a scene. No more shuffling pages to lookup info. One template, thousands of uses. Best of all, it's invisible to players, yet you don't have to keep swapping layers to use it. Stay tuned.

Related Articles