Character Vault
Any Concept / Any System
Compendium
Your System Come To Life
Roll20 for Android
Streamlined for your Tablet
Roll20 for iPad
Streamlined for your Tablet

Personal tools

Difference between revisions of "Macros/Nested Abilities"

From Roll20 Wiki

Jump to: navigation, search
m
m
Line 1: Line 1:
<noinclude>{{revdate}}{{clear}}{{main|Macros}}
+
<noinclude>{{revdate}}{{main|Macros}}{{clear}}
 
+
 
{{NavMacroDocs}}</noinclude>   
 
{{NavMacroDocs}}</noinclude>   
 
An [[Character#Abilities|ability]] is a macro which is tied to to a specific [[character]]'s [[Character#Attributes_.26_Abilities_Tab|Attributes & Abilities]]-tab. Like macros, abilities can be nested inside each other, which gives you the capacity to chain abilities together, and call multiple abilities with a single command.  
 
An [[Character#Abilities|ability]] is a macro which is tied to to a specific [[character]]'s [[Character#Attributes_.26_Abilities_Tab|Attributes & Abilities]]-tab. Like macros, abilities can be nested inside each other, which gives you the capacity to chain abilities together, and call multiple abilities with a single command.  

Revision as of 13:38, 30 November 2021

Main Page: Macros

An ability is a macro which is tied to to a specific character's Attributes & Abilities-tab. Like macros, abilities can be nested inside each other, which gives you the capacity to chain abilities together, and call multiple abilities with a single command.

Nesting an ability is similar to nesting a macro but with a slight twist. Like a macro, simply include the name of the abilities you wish to call on separate lines inside your main ability.

Converting a nested macro to a nested ability

#attack
#damage

becomes

%{bob|attack}
%{bob|dmg}

You need to change the # into %, type {, then the name of the character, a vertical pipe (|), the ability name, and closing the expression with }.


The vertical pipe(|) key can be found above the backslash key \ on most keyboards.

  • US keyboard: usually near the Enter-key. Shift+\ to type
  • European keyboards: Usually found on the number row
  • Finnish, Swedish keyboard: next to the right Shift. AltGr+| to type

Note: Currently the ability reference symbol (%) does not auto complete at this time like the attribute reference symbol (@) or macro reference symbol (#) do. You must type the entire thing yourself.

Example

In this example, we'll have three abilities: %{damage} %{attack} and %{both} and our character who will be named Bugbear

Ability %{damage}:

/roll 1d4+11

Ability %{attack}:

/roll 1d20+9

Ability %{both}:

%{Bugbear|attack}
%{Bugbear|damage}

Then You can have a chat command where you can choose which ability to use: (example might need converted to HTML Entities):

?{Which ability?|Attack,%{Bugbear|attack} |Damage,%{Bugbear|damage} |Both,%{Bugbear|Both} }

See Roll Queries for more info on nesting.

More Examples

Other pages with macro examples: