Difference between revisions of "Macros/Initiative"
From Roll20 Wiki
Andreas J. (Talk | contribs) m |
Andreas J. (Talk | contribs) m |
||
Line 7: | Line 7: | ||
<pre>/roll 1d20 + 5 &{tracker}</pre> | <pre>/roll 1d20 + 5 &{tracker}</pre> | ||
− | <noinclude>==Initiative Rolls & Macros==</noinclude> | + | <noinclude>==Initiative Rolls & Macros== |
− | + | __TOC__</noinclude> | |
The "tracker" option tells Roll20's roll system, "Show the results of this roll, but also use the result as the value in the {{Turn Tracker}}." If the token that you have selected doesn't already have a turn in the turn order, one will be added. If it already has at least one turn, all current turns will be updated with the new value. | The "tracker" option tells Roll20's roll system, "Show the results of this roll, but also use the result as the value in the {{Turn Tracker}}." If the token that you have selected doesn't already have a turn in the turn order, one will be added. If it already has at least one turn, all current turns will be updated with the new value. | ||
Revision as of 15:36, 30 November 2021
Page Updated: 2021-11-30 |
For how the section where the initiative is tracked, see t Turn Tracker |
Main Page: Macros
Macro Creation
- Complete Guide to Macros & Rolls
- q Text Chat
- Dice Reference
- Order of Operations
- Macros
- Roll Query
- Initiative
- Reusing Rolls
- Token Reference
- Character Reference
- Roll Templates
- Roll Table
Advanced
- Formatting
- HTML Replacement
- Chat Menus
- Hidden Rolls
- Advanced Macro Tips
- API Commands
- Char Sheet Creation
- External tools
Misc.
To send a roll result directly to the t Turn Tracker, first, select the Token you wish to roll for initiative and then use the below roll option in your macro:
/roll 1d20 + 5 &{tracker}
Initiative Rolls & Macros
Contents |
The "tracker" option tells Roll20's roll system, "Show the results of this roll, but also use the result as the value in the t Turn Tracker." If the token that you have selected doesn't already have a turn in the turn order, one will be added. If it already has at least one turn, all current turns will be updated with the new value.
In addition, you can add the result of the roll, or subtract the result of the roll, from the current turn value for the selected token by using the following flags:
/roll 1d20 + 5 &{tracker:+} /roll 1d20 + 5 &{tracker:-}
For a game such as Shadowrun where you want to subtract 10 from the current initiative after every turn, you could have a global macro like so:
/em @{selected|token_name} ends their turn. [[10 &{tracker:-}]]
Note that the tracker flag works both in regular rolls and inline rolls.
Reference Values on the Turn Tracker
Values there can be called the same way you would Attributes on a Character.
Example:
@{tracker|Item Name} /em has a initiative of @{tracker|Bob}. &{template:default} {{name=Party Initiative}} {{Alice= **@{tracker|Alice}** }} {{Bob= **@{tracker|Bob}**}} {{Charlie= **@{tracker|Charlie}**}}
More Examples
Values can also be added or subtracted from chat using the +
or -
flags with the &{tracker}
command like so:
-
/roll 1d20 + 2 &{tracker}
(rolls 1d20+2 for initiative. If the token already have an initiative, it will be rerolled) -
/roll 1d20 + 5 &{tracker:+}
(adds 1d20+5 to the initiative of the selected token.) -
/roll 1 &{tracker:-}
(subtracts 1 from the selected token's initiative) -
[[10 &{tracker:-}]]
(subtracts 10 from the selected token's initiative) -
&{template:default} {{name=Bob's Initiative}} {{Result=[[1d20+@{Bob|dex_bonus}+@{Bob|init_bonus} &{tracker}]]}}
(rolls initiative based on stat's from a character sheet named "Bob", using the default roll template )
If the selected token isn't already in the turn tracker, then it is added with the value that was rolled and the additional flag is ignored.