Tuesday, June 27, 2017

Useful Roll20 Macros


Major Update 2017-10-10: With the upgrade of the OGL Sheet to 2.0 many things have changed, all the macros below *should* be working correctly now with the versions listed here, if you have any problems let me know.

Here is a list of valuable Roll20 Macros for use in 5e games (these use the OGL 5e sheet, your milage may vary if you use a different sheet). As I get new ones or find improvements I'll add this post!

Init (NPC or PC):

@{selected|wtype}%{selected|initiative}


Get PC Level:

/w GM @{selected|token_name}: @{selected|level}

SKILL CHECK (NPC) OGL2.0:
(for this to work it requires the } character to be escaped out in the query, after you save the macro it "un-escapes" the characters, the only fix is to re-escape or copy the code back in with the } escaped out with the })
@{selected|wtype}&{template:npc} @{selected|npc_name_flag} @{selected|rtype}+?{Ability|Acrobatics,[[@{selected|npc_acrobatics}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_acrobatics}]]]]}} {{mod=[[[[@{selected|npc_acrobatics}]]]]}} {{rname=Acrobatics}} {{type=Skill}} |Animal Handling,[[@{selected|npc_animal_handling}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_animal_handling}]]]]}} {{mod=[[[[@{selected|npc_animal_handling}]]]]}} {{rname=Animal Handling}} {{type=Skill}} |Arcana,[[@{selected|npc_arcana}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_arcana}]]]]}} {{mod=[[[[@{selected|npc_arcana}]]]]}} {{rname=Arcana}} {{type=Skill}} |Athletics,[[@{selected|npc_athletics}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_athletics}]]]]}} {{mod=[[[[@{selected|npc_athletics}]]]]}} {{rname=Athletics}} {{type=Skill}} |Deception,[[@{selected|npc_deception}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_deception}]]]]}} {{mod=[[[[@{selected|npc_deception}]]]]}} {{rname=Deception}} {{type=Skill}} |History,[[@{selected|npc_history}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_history}]]]]}} {{mod=[[[[@{selected|npc_history}]]]]}} {{rname=History}} {{type=Skill}} |Insight,[[@{selected|npc_insight}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_insight}]]]]}} {{mod=[[[[@{selected|npc_insight}]]]]}} {{rname=Insight}} {{type=Skill}} |Intimidation,[[@{selected|npc_intimidation}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_intimidation}]]]]}} {{mod=[[[[@{selected|npc_intimidation}]]]]}} {{rname=Intimidation}} {{type=Skill}} |Investigation,[[@{selected|npc_investigation}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_investigation}]]]]}} {{mod=[[[[@{selected|npc_investigation}]]]]}} {{rname=Investigation}} {{type=Skill}} |Medicine,[[@{selected|npc_medicine}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_medicine}]]]]}} {{mod=[[[[@{selected|npc_medicine}]]]]}} {{rname=Medicine}} {{type=Skill}} |Nature,[[@{selected|npc_nature}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_nature}]]]]}} {{mod=[[[[@{selected|npc_nature}]]]]}} {{rname=Nature}} {{type=Skill}} |Perception,[[@{selected|npc_perception}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_perception}]]]]}} {{mod=[[[[@{selected|npc_perception}]]]]}} {{rname=Perception}} {{type=Skill}} |Performance,[[@{selected|npc_performance}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_performance}]]]]}} {{mod=[[[[@{selected|npc_performance}]]]]}} {{rname=Performance}} {{type=Skill}} |Persuasion,[[@{selected|npc_persuasion}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_persuasion}]]]]}} {{mod=[[[[@{selected|npc_persuasion}]]]]}} {{rname=Persuasion}} {{type=Skill}} |Religion,[[@{selected|npc_religion}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_religion}]]]]}} {{mod=[[[[@{selected|npc_religion}]]]]}} {{rname=Religion}} {{type=Skill}} |Sleight of Hand,[[@{selected|npc_sleight_of_hand}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_sleight_of_hand}]]]]}} {{mod=[[[[@{selected|npc_sleight_of_hand}]]]]}} {{rname=Sleight of Hand}} {{type=Skill}} |Stealth,[[@{selected|npc_stealth}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_stealth}]]]]}} {{mod=[[[[@{selected|npc_stealth}]]]]}} {{rname=Stealth}} {{type=Skill}} |Survival,[[@{selected|npc_survival}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_survival}]]]]}} {{mod=[[[[@{selected|npc_survival}]]]]}} {{rname=Survival}} {{type=Skill}} |Strength,[[@{selected|strength_mod}]][STR]]]}} {{rname=Strength}} {{mod=[[[[@{selected|strength_mod}]][STR]]]}} {{r1=[[@{selected|d20}+[[@{selected|strength_mod}]][STR]]]}} {{type=Ability}} |Dexterity,[[@{selected|dexterity_mod}]][DEX]]]}} {{rname=Dexterity}} {{mod=[[[[@{selected|dexterity_mod}]][DEX]]]}} {{r1=[[@{selected|d20}+[[@{selected|dexterity_mod}]][DEX]]]}} {{type=Ability}} |Constitution,[[@{selected|constitution_mod}]][CON]]]}} {{rname=Constitution}} {{mod=[[[[@{selected|constitution_mod}]][CON]]]}} {{r1=[[@{selected|d20}+[[@{selected|constitution_mod}]][CON]]]}} {{type=Ability}} |Intelligence,[[@{selected|intelligence_mod}]][INT]]]}} {{rname=Intelligence}} {{mod=[[[[@{selected|intelligence_mod}]][INT]]]}} {{r1=[[@{selected|d20}+[[@{selected|intelligence_mod}]][INT]]]}} {{type=Ability}} |Wisdom,[[@{selected|wisdom_mod}]][WIS]]]}} {{rname=Wisdom}} {{mod=[[[[@{selected|wisdom_mod}]][WIS]]]}} {{r1=[[@{selected|d20}+[[@{selected|wisdom_mod}]][WIS]]]}} {{type=Ability}} |Charisma,[[@{selected|charisma_mod}]][CHA]]]}} {{rname=Charisma}} {{mod=[[[[@{selected|charisma_mod}]][CHA]]]}} {{r1=[[@{selected|d20}+[[@{selected|charisma_mod}]][CHA]]]}} {{type=Ability}}}


SKILL CHECK (PC) OGL2.0:
(for this to work it requires the } character to be escaped out in the query, after you save the macro it "un-escapes" the characters, the only fix is to re-escape or copy the code back in with the } escaped out with the })
@{selected|wtype}&{template:simple} @{selected|rtype}?{Ability|Acrobatics, +@{selected|acrobatics_bonus}@{selected|pbd_safe} ]]}} {{rname=Acrobatics}} {{mod=@{selected|acrobatics_bonus}}} {{r1=[[ @{selected|d20} + @{selected|acrobatics_bonus}@{selected|pbd_safe} ]]}} |Animal Handling, +@{selected|animal_handling_bonus}@{selected|pbd_safe} ]]}} {{rname=Animal Handling}} {{mod=@{selected|animal_handling_bonus}}} {{r1=[[ @{selected|d20} + @{selected|animal_handling_bonus}@{selected|pbd_safe} ]]}} |Arcana, +@{selected|arcana_bonus}@{selected|pbd_safe} ]]}} {{rname=Arcana}} {{mod=@{selected|arcana_bonus}}} {{r1=[[ @{selected|d20} + @{selected|arcana_bonus}@{selected|pbd_safe} ]]}} |Athletics, +@{selected|athletics_bonus}@{selected|pbd_safe} ]]}} {{rname=Athletics}} {{mod=@{selected|athletics_bonus}}} {{r1=[[ @{selected|d20} + @{selected|athletics_bonus}@{selected|pbd_safe} ]]}} |Deception, +@{selected|deception_bonus}@{selected|pbd_safe} ]]}} {{rname=Deception}} {{mod=@{selected|deception_bonus}}} {{r1=[[ @{selected|d20} + @{selected|deception_bonus}@{selected|pbd_safe} ]]}} |History, +@{selected|history_bonus}@{selected|pbd_safe} ]]}} {{rname=History}} {{mod=@{selected|history_bonus}}} {{r1=[[ @{selected|d20} + @{selected|history_bonus}@{selected|pbd_safe} ]]}} |Insight, +@{selected|insight_bonus}@{selected|pbd_safe} ]]}} {{rname=Insight}} {{mod=@{selected|insight_bonus}}} {{r1=[[ @{selected|d20} + @{selected|insight_bonus}@{selected|pbd_safe} ]]}} |Intimidation, +@{selected|intimidation_bonus}@{selected|pbd_safe} ]]}} {{rname=Intimidation}} {{mod=@{selected|intimidation_bonus}}} {{r1=[[ @{selected|d20} + @{selected|intimidation_bonus}@{selected|pbd_safe} ]]}} |Investigation, +@{selected|investigation_bonus}@{selected|pbd_safe} ]]}} {{rname=Investigation}} {{mod=@{selected|investigation_bonus}}} {{r1=[[ @{selected|d20} + @{selected|investigation_bonus}@{selected|pbd_safe} ]]}} |Medicine, +@{selected|medicine_bonus}@{selected|pbd_safe} ]]}} {{rname=Medicine}} {{mod=@{selected|medicine_bonus}}} {{r1=[[ @{selected|d20} + @{selected|medicine_bonus}@{selected|pbd_safe} ]]}} |Nature, +@{selected|nature_bonus}@{selected|pbd_safe} ]]}} {{rname=Nature}} {{mod=@{selected|nature_bonus}}} {{r1=[[ @{selected|d20} + @{selected|nature_bonus}@{selected|pbd_safe} ]]}} |Perception, +@{selected|perception_bonus}@{selected|pbd_safe} ]]}} {{rname=Perception}} {{mod=@{selected|perception_bonus}}} {{r1=[[ @{selected|d20} + @{selected|perception_bonus}@{selected|pbd_safe} ]]}} |Performance, +@{selected|performance_bonus}@{selected|pbd_safe} ]]}} {{rname=Performance}} {{mod=@{selected|performance_bonus}}} {{r1=[[ @{selected|d20} + @{selected|performance_bonus}@{selected|pbd_safe} ]]}} |Persuasion, +@{selected|persuasion_bonus}@{selected|pbd_safe} ]]}} {{rname=Persuasion}} {{mod=@{selected|persuasion_bonus}}} {{r1=[[ @{selected|d20} + @{selected|persuasion_bonus}@{selected|pbd_safe} ]]}} |Religion, +@{selected|religion_bonus}@{selected|pbd_safe} ]]}} {{rname=Religion}} {{mod=@{selected|religion_bonus}}} {{r1=[[ @{selected|d20} + @{selected|religion_bonus}@{selected|pbd_safe} ]]}} |Sleight of Hand, +@{selected|sleight_of_hand_bonus}@{selected|pbd_safe} ]]}} {{rname=Sleight of Hand}} {{mod=@{selected|sleight_of_hand_bonus}}} {{r1=[[ @{selected|d20} + @{selected|sleight_of_hand_bonus}@{selected|pbd_safe} ]]}} |Stealth, +@{selected|stealth_bonus}@{selected|pbd_safe} ]]}} {{rname=Stealth}} {{mod=@{selected|stealth_bonus}}} {{r1=[[ @{selected|d20} + @{selected|stealth_bonus}@{selected|pbd_safe} ]]}} |Survival, +@{selected|survival_bonus}@{selected|pbd_safe} ]]}} {{rname=Survival}} {{mod=@{selected|survival_bonus}}} {{r1=[[ @{selected|d20} + @{selected|survival_bonus}@{selected|pbd_safe} ]]}} |Strength, +@{selected|strength_mod}@{selected|jack_attr}[STR]]]}} {{rname=Strength}} {{mod=@{selected|strength_mod}@{selected|jack_bonus}}} {{r1=[[ @{selected|d20} + @{selected|strength_mod}@{selected|jack_attr}[STR]]]}} |Dexterity, +@{selected|dexterity_mod}@{selected|jack_attr}[DEX]]]}} {{rname=Dexterity}} {{mod=@{selected|dexterity_mod}@{selected|jack_bonus}}} {{r1=[[ @{selected|d20} + @{selected|dexterity_mod}@{selected|jack_attr}[DEX]]]}} |Constitution, +@{selected|constitution_mod}@{selected|jack_attr}[CON]]]}} {{rname=Constitution}} {{mod=@{selected|constitution_mod}@{selected|jack_bonus}}} {{r1=[[ @{selected|d20} + @{selected|constitution_mod}@{selected|jack_attr}[CON]]]}} |Intelligence, +@{selected|intelligence_mod}@{selected|jack_attr}[INT]]]}} {{rname=Intelligence}} {{mod=@{selected|intelligence_mod}@{selected|jack_bonus}}} {{r1=[[ @{selected|d20} + @{selected|intelligence_mod}@{selected|jack_attr}[INT]]]}} |Wisdom, +@{selected|wisdom_mod}@{selected|jack_attr}[WIS]]]}} {{rname=Wisdom}} {{mod=@{selected|wisdom_mod}@{selected|jack_bonus}}} {{r1=[[ @{selected|d20} + @{selected|wisdom_mod}@{selected|jack_attr}[WIS]]]}} |Charisma, +@{selected|charisma_mod}@{selected|jack_attr}[CHA]]]}} {{rname=Charisma}} {{mod=@{selected|charisma_mod}@{selected|jack_bonus}}} {{r1=[[ @{selected|d20} + @{selected|charisma_mod}@{selected|jack_attr}[CHA]]]}} } @{selected|global_skill_mod} @{selected|charname_output}

Saves (NPC) OGL2.0:
(for this to work it requires the } character to be escaped out in the query, after you save the macro it "un-escapes" the characters, the only fix is to re-escape or copy the code back in with the } escaped out with the })
@{selected|wtype}&{template:npc} @{selected|npc_name_flag} @{selected|rtype}+?{Save|Strength,[[@{selected|npc_str_save}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_str_save}]]]]}} {{mod=[[@{selected|npc_str_save}]]}}{{rname=Strength Save}} {{type=Save}} |Dexterity,[[@{selected|npc_dex_save}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_dex_save}]]]]}} {{mod=[[@{selected|npc_dex_save}]]}}{{rname=Dexterity Save}} {{type=Save}} |Constitution,[[@{selected|npc_con_save}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_con_save}]]]]}} {{mod=[[@{selected|npc_con_save}]]}}{{rname=Constitution Save}} {{type=Save}} |Intelligence,[[@{selected|npc_int_save}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_int_save}]]]]}} {{mod=[[@{selected|npc_int_save}]]}}{{rname=Intelligence Save}} {{type=Save}} |Wisdom,[[@{selected|npc_wis_save}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_wis_save}]]]]}} {{mod=[[@{selected|npc_wis_save}]]}}{{rname=Wisdom Save}} {{type=Save}} |Charisma,[[@{selected|npc_cha_save}]]]]}} {{r1=[[@{selected|d20}+[[@{selected|npc_cha_save}]]]]}} {{mod=[[@{selected|npc_cha_save}]]}}{{rname=Charisma Save}} {{type=Save}}}
Saves (PC) OGL2.0:
(for this to work it requires the } character to be escaped out in the query, after you save the macro it "un-escapes" the characters, the only fix is to re-escape or copy the code back in with the } escaped out with the })
@{selected|wtype}&{template:simple} @{selected|rtype}?{Save|Strength, +@{selected|strength_save_bonus}@{selected|pbd_safe}]]}} {{rname=Strength Save}&#125 {{mod=@{selected|strength_save_bonus}}} {{r1=[[@{selected|d20}+@{selected|strength_save_bonus}@{selected|pbd_safe}]]}} |Dexterity, +@{selected|dexterity_save_bonus}@{selected|pbd_safe}]]}} {{rname=Dexterity Save}&#125 {{mod=@{selected|dexterity_save_bonus}}} {{r1=[[@{selected|d20}+@{selected|dexterity_save_bonus}@{selected|pbd_safe}]]}} |Constitution, +@{selected|constitution_save_bonus}@{selected|pbd_safe}]]}} {{rname=Constitution Save}&#125 {{mod=@{selected|constitution_save_bonus}}} {{r1=[[@{selected|d20}+@{selected|constitution_save_bonus}@{selected|pbd_safe}]]}} |Intelligence, +@{selected|intelligence_save_bonus}@{selected|pbd_safe}]]}} {{rname=Intelligence Save}&#125 {{mod=@{selected|intelligence_save_bonus}}} {{r1=[[@{selected|d20}+@{selected|intelligence_save_bonus}@{selected|pbd_safe}]]}} |Wisdom, +@{selected|wisdom_save_bonus}@{selected|pbd_safe}]]}} {{rname=Wisdom Save}&#125 {{mod=@{selected|wisdom_save_bonus}}} {{r1=[[@{selected|d20}+@{selected|wisdom_save_bonus}@{selected|pbd_safe}]]}} |Charisma, +@{selected|charisma_save_bonus}@{selected|pbd_safe}]]}} {{rname=Charisma Save}&#125 {{mod=@{selected|charisma_save_bonus}}} {{r1=[[@{selected|d20}+@{selected|charisma_save_bonus}@{selected|pbd_safe}]]}}}@{selected|global_save_mod}@{selected|charname_output}

Whisper (GM only as most characters can't select other tokens):

/w @{selected|token_name} ?{Message}


Attacks (NPC):

%{selected|repeating_npcaction_$0_npc_action}
%{selected|repeating_npcaction_$1_npc_action}
%{selected|repeating_npcaction_$2_npc_action}


Spell - Cantrip (PC or NPC) OGL2.0:

%{selected|repeating_spell-cantrip_$0_spell}


Spell - Non-Cantrip (PC or NPC) OGL2.0:
Replace the X with the level of the Spell
%{selected|repeating_spell-X_$0_spell}
i.e.:
%{selected|repeating_spell-1_$0_spell}
%{selected|repeating_spell-1_$1_spell}
%{selected|repeating_spell-2_$0_spell}


Traits (NPC):

&{template:npcaction} {{name=@{selected|npc_name}}} {{rname=@{selected|repeating_npctrait_$0_name}}} {{description=@{selected|repeating_npctrait_$0_desc}}}


Reaction (NPC):

&{template:npcaction} {{name=@{selected|npc_name}}} {{rname=@{selected|repeating_npcreaction_$0_name}}} {{description=@{selected|repeating_npcreaction_$0_desc}}}


Legendary Actions:

%{selected|repeating_npcaction-l_$0_npc_action}


Ability Recharges:

/emas @{selected|npc_name} Attempts to recharge Whirlwind [[1d6>5]].


Formatted Spell Save DC:

``@{selected|npc_spelldc}``


These items require TokenMod to function:

Better Set Vision via a Query
New Version works with -5 for Darkvision and doesn't require any escaped characters

!token-mod --set ?{Vision|Torch, light_radius#40 light_dimradius#20 light_hassight#yes light_angle#360 light_otherplayers#yes|Hooded Lantern, light_radius#60 light_dimradius#30 light_hassight#yes light_angle#360 light_otherplayers#yes|Bullseye Lantern, light_radius#120 light_dimradius#60 light_angle#60 light_hassight#yes light_otherplayers#yes|Lamp, light_radius#30 light_dimradius#15 light_hassight#yes light_angle#360 light_otherplayers#yes|Candle, light_radius#5 light_dimradius#=0 light_hassight#yes light_angle#360 light_otherplayers#yes|Darkvision, light_radius#60 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no|Darkvision (90'), light_radius#90 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no|Warlock Devil's Sight, light_radius#120 light_dimradius#=120 light_hassight#yes light_angle#360 light_otherplayers#no|No light source(Dusk), light_radius#120 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no|Fog, light_radius#200 light_dimradius#=5 light_hassight#yes light_angle#360 light_otherplayers#no|No light source, light_radius#5 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no|Blinded, light_hassight#no light_angle#360 light_otherplayers#no}


Setup Token (NPC) OGL2.0:
It appears you can no longer pull HP as a value @{selected|hp} and @{selected|hp_max} doesn't appear to work anymore and @{selected|npcd_hp} is gone now - the only way to do this is to either manually set or setup your bar1 to hp_max in game settings.
!token-mod --set bar1_link| bar2_link| bar3_link| bar2| bar3|
!token-mod {{
--set bar2_value|@{selected|npc_ac}
--set bar3_value|[[@{selected|passive_wisdom}]]
--set name|"@{selected|character_name}"
--on showname
--on showplayers_name
--off showplayers_bar1
--off showplayers_bar2
--off showplayers_bar3
}}


Setup Token (PC) OGL2.0:

!token-mod --set bar1_link| bar2_link| bar3_link| bar1| bar2| bar3|
!token-mod {{
--set bar1_link|hp
--set bar2_link|ac
--set bar3_link|passive_wisdom
--set bar3_value|[[@{selected|passive_wisdom}]]
--set name|"@{selected|character_name}"
--on showname
--on showplayers_name
--on showplayers_bar1
--on showplayers_bar2
--on showplayers_aura1
--on showplayers_aura2
--on light_hassight
}}

3 comments:

  1. Anyway to make the PC macro only for perception or add a whisper/general chat option?

    ReplyDelete
    Replies
    1. You know I can make it just perception, Im an idiot. But a whisper/general chat option would be nice.

      Delete