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
(transclude from Macro page)
 
m (revert incorrect update)
 
(4 intermediate revisions by one user not shown)
Line 1: Line 1:
<noinclude>{{revdate}}{{clear}}{{main|Macros}}
+
<noinclude>{{revdate}}{{main|Roll Queries & Nesting}}{{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.  
Line 16: Line 15:
 
%{bob|attack}
 
%{bob|attack}
 
%{bob|dmg}
 
%{bob|dmg}
<pre>  
+
</pre>  
  
 
You need to change the <code>#</code> into <code>%</code>, type <code>{</code>, then the name of the character, a vertical pipe (<code>|</code>), the ability name, and closing the expression with <code>}</code>.
 
You need to change the <code>#</code> into <code>%</code>, type <code>{</code>, then the name of the character, a vertical pipe (<code>|</code>), the ability name, and closing the expression with <code>}</code>.
Line 47: Line 46:
 
Then You can have a chat command where you can choose which ability to use:
 
Then You can have a chat command where you can choose which ability to use:
 
(example might need converted to [[HTML Entities]]):  
 
(example might need converted to [[HTML Entities]]):  
<code>?{Which ability?|Attack,%{Bugbear|attack} |Damage,%{Bugbear|damage} |Both,%{Bugbear|Both} }</code>
+
<pre>?{Which ability?|Attack,%{Bugbear|attack} |Damage,%{Bugbear|damage} |Both,%{Bugbear|Both} }</pre>
  
 
<noinclude>See [[Roll Queries]] for more info on nesting.</noinclude>   
 
<noinclude>See [[Roll Queries]] for more info on nesting.</noinclude>   

Latest revision as of 20:36, 9 December 2021

Main Page: Roll Queries & Nesting

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.

[edit] 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.

[edit] More Examples

Other pages with macro examples: