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)

Revision as of 13:35, 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}
<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>.


The vertical pipe(<code>|</code>) key can be found above the backslash key {{button|\}} on most keyboards.
* US keyboard: usually near the {{button|Enter}}-key. {{button|Shift}}+{{button|\}} to type
* European keyboards: Usually found on the number row
* [https://kbdlayout.info/kbdfi Finnish], [https://kbdlayout.info/KBDSW/ Swedish] keyboard: next to the right {{button|Shift}}. {{button|AltGr}}+{{button||}} to type

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

===Example===

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

Ability <code>%{damage}</code>:
<pre>/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: