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

Difference between revisions of "Script:InitiativeTrackerPlus"

From Roll20 Wiki

Jump to: navigation, search
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{revdate}}{{main|API:Script Index}}
 
{{script overview
 
{{script overview
 
|name=Initiative Tracker Plus
 
|name=Initiative Tracker Plus
 
|author={{user profile|4306461|Chuz}}
 
|author={{user profile|4306461|Chuz}}
|version=1.25
+
|version=1.29
|lastmodified=2021-02-13
+
|lastmodified=2022-03
 
|code=InitiativeTrackerPlus
 
|code=InitiativeTrackerPlus
 
|dependencies=None
 
|dependencies=None
 
|conflicts=None}}
 
|conflicts=None}}
 +
'''Initiative Tracker Plus''' (Formerly ''TrackerJacker'') is an API to improve Initiative Tracking on Roll20.
  
Initiative Tracker Plus is derived from TrackerJacker written by Ken L. which was apparently related to The Aaron's TurnMarker.  The author James C. (Chuz) has updated TrackerJacker to automatically detect token markers included in a lobby and allow their use in the status effects.
+
Help & Start commands:
 +
<pre style="overflow:auto;white-space:pre-wrap;">!itp -help
 +
!itp -start</pre>
  
 
The intent is to continue supporting the script and update it with new features and functionality as they are requested or come to me.
 
The intent is to continue supporting the script and update it with new features and functionality as they are requested or come to me.
  
 
+
* {{fpl|9805171/ Initiative Tracker Plus - successor to Tracker Jacker}} Jul 2021
 
== Installation and Configuration ==
 
== Installation and Configuration ==
 +
{{apiboxRec}}
 
Script is now available on the one-click API installer.
 
Script is now available on the one-click API installer.
  
Copy the script's code, available from the menu on the right and stored at Roll20's [https://github.com/Roll20/roll20-api-scripts/InitiativeTrackerPlus API GitHub Repository]. Paste the code into a new script in your campaign's [[API:Use_Guide#The_Script_Editor|API Script Editor]]. Save the new script and it will be available inside your campaign.
+
Copy the script's code, available from the menu on the right and stored at Roll20's {{repo|Roll20/roll20-api-scripts/InitiativeTrackerPlus API Repository}}. Paste the code into a new script in your campaign's [[API:Use_Guide#The_Script_Editor|API Script Editor]]. Save the new script and it will be available inside your campaign.
  
 
== Script Use ==
 
== Script Use ==
Line 96: Line 101:
 
* rotation - [true] - true or false, turns the spinning animation for the turn indicator on (true) or off (false)
 
* rotation - [true] - true or false, turns the spinning animation for the turn indicator on (true) or off (false)
 
* show_eot - [true] - true or false, shows or hides the EOT button when announcing actor turns.
 
* show_eot - [true] - true or false, shows or hides the EOT button when announcing actor turns.
* turncolor - [#D8F9FF] - Hex color code, changes the color of the background of the chat message announcing who's turn it is.
+
* turncolor - [#FFFFFF] - Hex color code, changes the color of the background of the chat message announcing who's turn it is.
* roundcolor - [#363574] - Hex color code, changes the color of the round announcement chat message.
+
* turnbgcolor - [#D8F9FF] - Hex color code, changes the background color of the background of the chat message announcing who's turn it is.
* statuscolor - [#F0D6FF] - Hex color code, changes the color of the text of the chat message announcing statuses of the current actor.
+
* roundcolor - [#FFFFFF] - Hex color code, changes the color of the round announcement chat message.
* statusbgcolor - [#897A87] - Hex color code, changes the background color of the chat message announcing statuses of the current actor.
+
* roundbgcolor - [#363574] - Hex color code, changes the background color of the round announcement chat message.
 +
* statuscolor - [#FFFFFF] - Hex color code, changes the color of the text of the chat message announcing statuses of the current actor.
 +
* statusbgcolor - [#333333] - Hex color code, changes the background color of the chat message announcing statuses of the current actor.
 
* statusbordercolor [#430D3D] - Hex color code, changes the color of the border of the chat message announcing statuses of the current actor.
 
* statusbordercolor [#430D3D] - Hex color code, changes the color of the border of the chat message announcing statuses of the current actor.
 
* statusargscolor [#FFFFFF] - Hex color code, changes the color of the feedback text when changing the marker for a status.
 
* statusargscolor [#FFFFFF] - Hex color code, changes the color of the feedback text when changing the marker for a status.
 +
* statusargsbgcolor [#333333] - Hex color code, changes the background color of the feedback text when changing the marker for a status.
 +
* eotcolor [#FFFFFF] - Hex color code, changes the color of the EOT button.
 +
* eotbgcolor [#FF0000] - Hex color code, changes the background color of the EOT button.
 +
* playcombatmusic [0] - Will a track from the jukebox be played when the tracker is active. Values should be 0 for off, 1 for on.
 +
* combatmusic [] - The name of the track to play when the tracker is active if playcombatmusic is turned on [1]. Track can not contain spaces (example: Combat).
 +
 +
==History==
 +
'''Initiative Tracker Plus''' is a derived from the older '''TrackerJacker''' written by Ken L. which was apparently related to The Aaron's TurnMarker.  The author James C. (Chuz) has updated TrackerJacker to automatically detect token markers included in a lobby and allow their use in the status effects.
  
 
== Changelog ==
 
== Changelog ==
{{changelog version|1.25| 2021-02-13 |* Added '!itp -setConfig' functionality to modify various fields, flags and design variables.  These changes will be stored in the state so they will persist between sessions.}}
+
{{repo|Roll20/roll20-api-scripts/tree/master/InitiativeTrackerPlus#readme Changelog}}
{{changelog version|1.25| 2020-12-28 |* Changed '? Round 1' (which changes to '?? Round 1' when paused) to use a play button image and a pause button image instead.}}
+
 
{{changelog version|1.25| 2020-12-04 |* Added `!itp -purge` alias to remove all statuses.}}
+
[[Category:Combat/Initiative]]
{{changelog version|1.25| 2020-12-02 |* Some minor code cleanup to make it easier for me to work with.}}
+
{{changelog version|1.24| 2020-12-02 |* Added ability to remove all statuses from a token in one go.}}
+
{{changelog version|1.24| 2020-12-02 |* Cleaned up some code tabulation and such to make it easier for me to read.}}
+
{{changelog version|1.0| 2020-11-23 |* Changed references to Tracker Jacker to Initiative Tracker Plus.  I am doing this to differentiate the new and drastically changing codebase from Ken L.'s original codebase so users that are happy with OG Tracker Jacker can continue to use it without confusion.}}
+
{{changelog version|| 2020-11-23 |* Updated initiative round indicator to have Play, Stop and Pause buttons instead of ? and ??}}
+
{{changelog version|| 2020-11-23 |* Submit current codebase to Roll20's Script repository in the hopes of becoming a one-click API script.}}
+
{{changelog version|| 2020-11-22 |* Added the ability to change the initiative indicator (spinning green thing by default) to any other image.}}
+
{{changelog version|| 2020-11-22 |* The first actor's turn is now announced when starting the tracker.}}
+
{{changelog version|| 2020-11-18 |* Added the ability to save and load favorite.  The save creates a Handout called "ITPFavsJSON", the load looks for that handout and loads the JSON from it.}}
+
{{changelog version|| 2020-09-25 |* Added the ability to display favorites alphabetically, it remains in the first in first out order by default.  To get an alphabetical list change `!itp -listfavs` to `!itp -listfavs 1`  }}
+
{{changelog version|| 2020-09-20 |* Added mouseover text to token marker selector list  }}
+
{{changelog version|| 2020-09-20 |* Added EOT link to turn indicator  }}
+
{{changelog version|| 2020-09-12 |* Added -cleanSlate command (!itp -cleanSlate) to completely wipe all persistent state data should not be used lightly but if effects get stuck in the system this will clear them  }}
+
{{changelog version|| 2020-09-12 |* Updated heavily to pull all token markers enabled in the campaign and make them useable for condition/status effects  }}
+

Latest revision as of 13:55, 29 March 2022

Main Page: API:Script Index

API ScriptAuthor: Chuz
Version: 1.29
Last Modified: 2022-03
Code: InitiativeTrackerPlus
Dependencies: None
Conflicts: None

Initiative Tracker Plus (Formerly TrackerJacker) is an API to improve Initiative Tracking on Roll20.

Help & Start commands:

!itp -help
!itp -start

The intent is to continue supporting the script and update it with new features and functionality as they are requested or come to me.

Contents

[edit] Installation and Configuration

Script is now available on the one-click API installer.

Copy the script's code, available from the menu on the right and stored at Roll20's API Repository. Paste the code into a new script in your campaign's API Script Editor. Save the new script and it will be available inside your campaign.

[edit] Script Use

!itp -help
Display help message

!itp -start
Start/Pause the tracker. If not started starts; if active pauses; if paused, resumes. Behaves as a toggle.

!itp -stop
Stops the tracker and clears all status effects.

!itp -clear
Stops the tracker as the -stop command, but in addition clears the turnorder

!itp -pause
Pauses the tracker.

!itp -reset [round#]
Reset the tracker's round counter to the given round, if none is supplied, it is set to round 1.

!itp -addstatus [name]:[duration]:[direction]:[message]
Add a status to the group of selected tokens, if it does not have the named status. name name of the status. duration duration of the status (numeric). direction + or - direction (+# or -#) indicating the increase or decrease of the the status' duration when the token's turn comes up. +0 or -0 for a permanent affect. message optional description of the status. If dice text, ie: 1d4 exist, it'll roll this result when the token's turn comes up.

!itp -removestatus [name]
Remove a status from a group of selected tokens given the name.

!itp -dispmultistatusconfig removeall>
Remove all statuses from one or more selected tokens.

!itp -edit
Edit statuses on the selected tokens

!itp -addfav [name]:[duration]:[direction]:[message]
Add a favorite status for quick application to selected tokens later.

!itp -listfavs
Displays favorite statuses with options to apply or edit.

!itp -listfavs 1
Displays favorite statuses (in alphabetical order) with options to apply or edit.

!eot
Ends a player's turn and advances the tracker if the player has control of the current turn's token. Player usable command.

!itp -saveFavs
Save your current Favorites into in the GM notes section of a handout called "ITPFavsJSON". This can be copy/pasted into a handout with the same name in another lobby and then "!itp -loadFavs" can be run to load them there.

!itp -loadFavs
Load Favorites previously saved via "!itp -saveFavs". Requires the handout "ITPFavsJSON" to exist and have properly exported data in the GM notes section.

!itp -setIndicatorImage
Replaces the current initiative indicator with a new image Note: The token will be removed from the field, along with any others with the name 'tracker_image'

  • Place the image you wish to use as the indicator image (animated turn indicator) on the play field (any layer). Please note, rollable tokens can be used for this as well.
  • Edit the new token and change it's name to 'tracker_image', save the change
  • Pause the tracker if it's currently active
  • Use this command
  • Unpause the tracker if it was active, else wise the next time the tracker is started your new indicator will be used.


!itp -defaultIndicatorImage
Revert the initiative indicator to the original green one.

  • Pause the tracker if it's currently active
  • Use this command
  • Unpause the tracker if it was active, elsewise the next time the tracker is started the indicator will be the default green one.


!itp -setConfig [key]:[value] Changes various configuration values. Permitted keys and what they expect for values are:

  • trackerImgRatio - [2.25] - a decimal number, how much larger than the token it's highlighting that the turn indicator should be
  • rotation_degree - [15] - an integer number, how many degrees per step of the indicator animation that it rotates.
  • rotation_rate - [250] - an integer number, how many milliseconds between frames of the animation, smaller numbers are a faster animation but will load down roll20 more.
  • round_separator_initiative - [-100] - an integer number, displays the "initiative" for the round separator 100 will put it at the top of the round, -100 will put it at the bottom of the round.
  • rotation - [true] - true or false, turns the spinning animation for the turn indicator on (true) or off (false)
  • show_eot - [true] - true or false, shows or hides the EOT button when announcing actor turns.
  • turncolor - [#FFFFFF] - Hex color code, changes the color of the background of the chat message announcing who's turn it is.
  • turnbgcolor - [#D8F9FF] - Hex color code, changes the background color of the background of the chat message announcing who's turn it is.
  • roundcolor - [#FFFFFF] - Hex color code, changes the color of the round announcement chat message.
  • roundbgcolor - [#363574] - Hex color code, changes the background color of the round announcement chat message.
  • statuscolor - [#FFFFFF] - Hex color code, changes the color of the text of the chat message announcing statuses of the current actor.
  • statusbgcolor - [#333333] - Hex color code, changes the background color of the chat message announcing statuses of the current actor.
  • statusbordercolor [#430D3D] - Hex color code, changes the color of the border of the chat message announcing statuses of the current actor.
  • statusargscolor [#FFFFFF] - Hex color code, changes the color of the feedback text when changing the marker for a status.
  • statusargsbgcolor [#333333] - Hex color code, changes the background color of the feedback text when changing the marker for a status.
  • eotcolor [#FFFFFF] - Hex color code, changes the color of the EOT button.
  • eotbgcolor [#FF0000] - Hex color code, changes the background color of the EOT button.
  • playcombatmusic [0] - Will a track from the jukebox be played when the tracker is active. Values should be 0 for off, 1 for on.
  • combatmusic [] - The name of the track to play when the tracker is active if playcombatmusic is turned on [1]. Track can not contain spaces (example: Combat).

[edit] History

Initiative Tracker Plus is a derived from the older TrackerJacker written by Ken L. which was apparently related to The Aaron's TurnMarker. The author James C. (Chuz) has updated TrackerJacker to automatically detect token markers included in a lobby and allow their use in the status effects.

[edit] Changelog

Changelog