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 "Script:Auto Initiative"

From Roll20 Wiki

Jump to: navigation, search
(2 intermediate revisions by one user not shown)
Line 5: Line 5:
 
|version=2.2}}
 
|version=2.2}}
  
Creates the API commands <code>!CombatBegins</code> and <code>!CombatEnds</code>. The former will roll initiative for all selected tokens and show the turn tracker window, while the latter will clear the turn tracker and hide it. Only the GM may execute these commands.
+
'''Auto Initiative''' creates the API commands <code>!CombatBegins</code> and <code>!CombatEnds</code>. The former will roll initiative for all selected tokens and show the turn tracker window, while the latter will clear the turn tracker and hide it. Only the GM may execute these commands.
 
<br clear="both">
 
<br clear="both">
  
 
=== Syntax ===
 
=== Syntax ===
{{syntaxbox top}}
+
{{syntaxbox top|Auto Initiative}}
 
{{API command|CombatBegins}}<br>
 
{{API command|CombatBegins}}<br>
 
{{API command|CombatEnds}}
 
{{API command|CombatEnds}}
Line 21: Line 21:
 
* '''Combat_Begins.sendChat''' &ndash; Set to <code>true</code> if you want the chat log to show the initiative results, or <code>false</code> otherwise
 
* '''Combat_Begins.sendChat''' &ndash; Set to <code>true</code> if you want the chat log to show the initiative results, or <code>false</code> otherwise
 
* '''Combat_Begins.includeChars''' &ndash; Set to <code>false</code> if you want to roll for players. It determines players based on if the token is linked to a character in the journal pane.
 
* '''Combat_Begins.includeChars''' &ndash; Set to <code>false</code> if you want to roll for players. It determines players based on if the token is linked to a character in the journal pane.
 +
 +
=== Changelog ===
 +
{{changelog version|2.2|2013-12-30|* Release}}

Revision as of 17:29, 13 January 2015

API ScriptAuthor: Josh
Version: 2.2
Last Modified: 2013-12-30
Code: Auto Initiative
Dependencies: None
Conflicts: None

Auto Initiative creates the API commands !CombatBegins and !CombatEnds. The former will roll initiative for all selected tokens and show the turn tracker window, while the latter will clear the turn tracker and hide it. Only the GM may execute these commands.

Syntax

!CombatBegins
!CombatEnds

Installation

There are four configuration variables near the top of the script. You may alter them to customize the script functionality:

  • Combat_Begins.statName – Stats to be added to roll, commas between values
  • Combat_Begins.rollValue – Size of die to roll for initiative (for example, 1d20)
  • Combat_Begins.sendChat – Set to true if you want the chat log to show the initiative results, or false otherwise
  • Combat_Begins.includeChars – Set to false if you want to roll for players. It determines players based on if the token is linked to a character in the journal pane.

Changelog

v2.2 (2013-12-30)

  • Release