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:Conditions and Status Tracker"

From Roll20 Wiki

Jump to: navigation, search
m
(Changelog)
(7 intermediate revisions by one user not shown)
Line 1: Line 1:
{{script author|84478}}
+
{{script overview
 +
|name=Conditions and Status Tracker
 +
|author={{user profile|84478|Josh}}
 +
|version=1.8
 +
|lastmodified=2014-01-15}}
  
The purpose of this script is to track character and token status as well as durations of the status, with a reminder given on each turn. It allows the GM to manimpulate the controls, while players can only test their characters current status, if the GM allows it. It will use basic API commands.
+
'''Conditions and Status Tracker''' tracks arbitrary statuses associated with tokens. Statuses may have a turn-limited duration, or may be permanent. Only the GM may modify what statuses exist on a given token, but depending on settings the status may be broadcast to all players.
  
===Code===
+
The API commands <code>!StatusAdd</code>, <code>!StatusDel</code>, <code>!StatusAll</code>, and <code>!StatusClearAll</code> are used to manipulate what statuses are present.
 +
<br clear="both">
  
https://gist.github.com/DarokinB/5776368
+
=== Syntax ===
 +
{{syntaxbox top|formal=true|Conditions and Status Tracker}}
 +
{{API command|StatusAdd}} {{API parameter|name=status}} {{API parameter|name=duration}} {{API parameter|name=description}} {{API parameter|name=GM only flag|optional=true}} {{API parameter|name=</em>// <em>marker|optional=true}}<br>
 +
{{API command|StatusDel}} {{API parameter|name=status}}<br>
 +
{{API command|StatusAll}}<br>
 +
{{API command|StatusClearAll}}
 +
{{Formal API command|
 +
{{token|S}} {{rarr}} {{API command|StatusAdd}} {{token|status}} {{token|duration}} {{token|description}} {{token|GMFlag}} {{token|marker|-}}
 +
{{token|S}} {{rarr}} {{API command|StatusDel}} {{token|status|-}}
 +
{{token|S}} {{rarr}} {{API command|StatusAll}}<br>
 +
{{token|S}} {{rarr}} {{API command|StatusClearAll}}<br>
 +
{{token|status}} {{rarr}} {{string|-}}
 +
{{token|duration}} {{rarr}} {{integer|-}}
 +
{{token|description}} {{rarr}} {{string|-}}
 +
{{token|GMFlag}} {{rarr}} {{epsilon}}
 +
{{token|GMFlag}} {{rarr}} GM<br>
 +
{{token|marker}} {{rarr}} {{epsilon}}
 +
{{token|marker}} {{rarr}} // {{string}}
 +
}}
 +
{{syntaxbox end}}
  
[[Category:API Commands]]
+
{{param description top}}
[[Category:User API Scripts]]
+
{{param description|name=status|value=Name of the status to add. No spaces are allowed.}}
 +
{{param description|name=duration|value=Number of turns the status lasts. Use <code>-1</code> for permanent duration.}}
 +
{{param description|name=description|value=Description of the status.}}
 +
{{param description|name=GM only flag|value=Optional. <code>GM</code> is the only accepted value. If this flag is set, only the GM will be notified about this status.}}
 +
{{param description|name=marker|value=Optional. Defines the statusmarker to set on the token representing this status.}}
 +
{{param description bottom}}
 +
 
 +
=== Installation ===
 +
There are several configuration variables near the top of the script. You may alter them to customize the script functionality:
 +
 
 +
* '''StatusTracker.statusIndicator''' &ndash; Then default marker to use if <code>marker</code> is not supplied.
 +
* '''StatusTracker.Chat''' &ndash; Set to <code>true</code> to indicate the status in the chat window, or <code>false</code> otherwise.
 +
* '''StatusTracker.ChatDescriptions''' &ndash; Set to <code>true</code> to display the status descriptions, or <code>false</code> otherwise.
 +
* '''StatusTracker.ChatOnlyGM''' &ndash; If set to <code>true</code>, all chat messages will be sent to the GM regardless of the <code>GM</code> flag. Set to <code>false</code> to control statuses individually.
 +
* '''StatusTracker.currentTurn''' &ndash; Not customizable.
 +
* '''StatusTracker.bloodiedTintColor''' &ndash; Set to a hexadecimal color value in order to tint the token to the set color when <code>bar1</code> is below half of its maximum. Set to <code>"transparent"</code> to disable this behavior.
 +
* '''StatusTracker.bloodiedMarker''' &ndash; Set to a statusmarker name in order to mark the token when <code>bar1</code> is below half of its maximum. Set to <code>"none"</code> to disable this behavior.
 +
* '''StatusTracker.deadMarker''' &ndash; Set to a statusmarker name which indicates that the token is dead (<code>bar1</code> is 0).
 +
* '''StatusTracker.statusIncidatorBG''' &ndash; Background style color for status chat messages.
 +
* '''StatusTracker.statusIndicatorFontColor''' &ndash; Foreground style color for status chat messages.
 +
 
 +
=== Changelog ===
 +
{{changelog version|1.8|2014-01-15|* Release}}

Revision as of 17:35, 13 January 2015

API ScriptAuthor: Josh
Version: 1.8
Last Modified: 2014-01-15
Code: Conditions and Status Tracker
Dependencies: None
Conflicts: None

Conditions and Status Tracker tracks arbitrary statuses associated with tokens. Statuses may have a turn-limited duration, or may be permanent. Only the GM may modify what statuses exist on a given token, but depending on settings the status may be broadcast to all players.

The API commands !StatusAdd, !StatusDel, !StatusAll, and !StatusClearAll are used to manipulate what statuses are present.

Syntax

!StatusAdd <status> <duration> <description> [GM only flag] [// marker]
!StatusDel <status>
!StatusAll
!StatusClearAll
Formally:

S

→ !StatusAdd status
duration
description
GMFlag
marker


S

→ !StatusDel status


S

→ !StatusAll

S

→ !StatusClearAll

status

string

duration

integer

description

string

GMFlag

→ ε

GMFlag

→ GM

marker

→ ε

marker

→ // string
Parameter Values
status Name of the status to add. No spaces are allowed.
duration Number of turns the status lasts. Use -1 for permanent duration.
description Description of the status.
GM only flag Optional. GM is the only accepted value. If this flag is set, only the GM will be notified about this status.
marker Optional. Defines the statusmarker to set on the token representing this status.

Installation

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

  • StatusTracker.statusIndicator – Then default marker to use if marker is not supplied.
  • StatusTracker.Chat – Set to true to indicate the status in the chat window, or false otherwise.
  • StatusTracker.ChatDescriptions – Set to true to display the status descriptions, or false otherwise.
  • StatusTracker.ChatOnlyGM – If set to true, all chat messages will be sent to the GM regardless of the GM flag. Set to false to control statuses individually.
  • StatusTracker.currentTurn – Not customizable.
  • StatusTracker.bloodiedTintColor – Set to a hexadecimal color value in order to tint the token to the set color when bar1 is below half of its maximum. Set to "transparent" to disable this behavior.
  • StatusTracker.bloodiedMarker – Set to a statusmarker name in order to mark the token when bar1 is below half of its maximum. Set to "none" to disable this behavior.
  • StatusTracker.deadMarker – Set to a statusmarker name which indicates that the token is dead (bar1 is 0).
  • StatusTracker.statusIncidatorBG – Background style color for status chat messages.
  • StatusTracker.statusIndicatorFontColor – Foreground style color for status chat messages.

Changelog

v1.8 (2014-01-15)

  • Release