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/Initiative"

From Roll20 Wiki

Jump to: navigation, search
(consolidate initiative-related macros to single place, implement proper transclusion)
 
m (transclude section)
 
(9 intermediate revisions by one user not shown)
Line 1: Line 1:
<noinclude>{{revdate}}{{main|Macros}}
+
<noinclude>{{revdate}}
 +
{{notebox|For how the section where the initiative is tracked works, see '''{{Turn Tracker}}''' }}
 +
 
 +
{{main|Macros}}
 
{{clear}}{{NavMacroDocs}}</noinclude>
 
{{clear}}{{NavMacroDocs}}</noinclude>
==Initiative Rolls & Macros==
 
 
To send a roll result directly to the {{Turn Tracker}}, first, select the [[Token]] you wish to roll for initiative and then use the below roll option in your macro:
 
To send a roll result directly to the {{Turn Tracker}}, first, select the [[Token]] you wish to roll for initiative and then use the below roll option in your macro:
 
<pre>/roll 1d20 + 5 &{tracker}</pre>
 
<pre>/roll 1d20 + 5 &{tracker}</pre>
  
 +
<noinclude>==Initiative Rolls & Macros==
 +
__TOC__</noinclude>
 
The &quot;tracker&quot; option tells Roll20's roll system, &quot;Show the results of this roll, but also use the result as the value in the {{Turn Tracker}}.&quot; 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 &quot;tracker&quot; option tells Roll20's roll system, &quot;Show the results of this roll, but also use the result as the value in the {{Turn Tracker}}.&quot; 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:
 
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:
  
<code>/roll 1d20 + 5 &{tracker:+}</code>
+
<pre>
<br/>
+
/roll 1d20 + 5 &{tracker:+}
<code>/roll 1d20 + 5 &{tracker:-}</code>
+
/roll 1d20 + 5 &{tracker:-}
 +
</pre>
  
 
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:
 
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:
  
<code>/me @{selected|token_name} ends their turn. [[10 &{tracker:-}]]</code>
+
<pre>
 +
/em @{selected|token_name} ends their turn. [[10 &{tracker:-}]]
 +
</pre>
  
 
Note that the tracker flag works both in regular rolls and [[Inline Rolls|inline rolls]].
 
Note that the tracker flag works both in regular rolls and [[Inline Rolls|inline rolls]].
  
<noinclude>===</noinclude><includeonly>'''</includeonly>Reference Values on the <includeonly>{{Turn Tracker}}'''</includeonly><noinclude>Turn Tracker===</noinclude>
+
<noinclude>===</noinclude><includeonly>'''</includeonly>Reference Values on the <includeonly>{{Turn Tracker}}'''<br></includeonly><noinclude>Turn Tracker===</noinclude>
Values there can be called the same way you would Attributes on a [[Character]].
+
Values on the Turn Tracker can be called the same way you would call [[Character#Attributes|Attributes]] from a Character Sheet.
  
 
{{ex}}
 
{{ex}}
Line 40: Line 47:
 
<br>
 
<br>
 
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.
 
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.
 +
 +
===Tricks===
 +
Tricks using the {{Turn Tracker}}:
 +
{{:Turn Tracker/Tricks}}
 +
===API===
 +
{{:Turn Tracker/API}}
  
 
==Related==
 
==Related==
* [[Turn Tracker#API|APIs for Initiative]]
+
* {{Turn Tracker}}
 
* [[Cards#Using_Cards_for_Initiative_Order|Using Cards for Initiative Order]]
 
* [[Cards#Using_Cards_for_Initiative_Order|Using Cards for Initiative Order]]
 +
 
[[Category:Macros]]
 
[[Category:Macros]]
 +
[[Category:Combat/Initiative]]
 
</noinclude>
 
</noinclude>

Latest revision as of 07:54, 11 February 2022


Main Page: Macros

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 on the Turn Tracker can be called the same way you would call Attributes from a Character Sheet.


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}**}}


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

[edit] Tricks

Tricks using the t Turn Tracker:

[edit] API

There are a number of API Scripts that improves the handling of the t Turn Tracker and Initiative in general.

  • GroupInitiative -- Adds the selected tokens to the turn order after rolling their initiative + configurable data. Also has commands for open/close/reset Turn Tracker.
  • TurnMarker1 -- provides a visual marker to show which token's turn it is & centers map on them.
  • CombatMaster(Forum) -- API for improving various aspects of combat. Automating condition duration in combat, Initiative improvement, and more. Version of CombatMaster in API Drowdown might not be latest version, check thread/CombatMaster repo for latest version.
  • InitiativeTrackerPlus -- Initiative and effect tracker with other features.
  • Script:RoundMaster
  • More APIs: API:Script Index - Combat


[edit] Related