Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[Script] RoundMaster API - Turn Tracker with Status Effects

1644502756

Edited 1648549125
Richard @ Damery
Pro
API Scripter
The RoundMaster API is part of the RPGMaster series of APIs, and works for any  campaign (D&D 5e, Pathfinder, AD&D2e, ...) that needs the Turn Order managing and uses status markers with durations set on tokens. The RoundMaster API is available via One-Click install, and is actively maintained by the author (e.g. fixing it for the recent Turn Tracker change).  When installed, it adds the latest documentation as Handouts to your Campaign, explaining all the commands and the Effects database that comes with it (to which you can add your own database of effects - there's documentation on how to do that, too). Feel free to review the Wiki page and see if it is useful to you. The big bonus:  any status marker can trigger macros to make calls to any API, run any Roll20 macro commands, make dice rolls, in fact anything that can be done in a Roll20 Ability Macro. Up to three different macros can be set for whenever a status is  added  to a token using the RoundMaster API call, and also  each turn  the status marker stays on the Token, and also when the status  time countdown ends . The "status effects" can use attributes from the token, and the character sheet represented by the token  even though the token is not currently selected .  RoundMaster uses its own syntax for attribute replacing in the "status effect macro", so that the status can change current attributes - e.g. adding a status marker representing drinking a Strength-enhancing potion can actually increase the Strength score on the Character Sheet for the duration of the status countdown, and then automatically reverse the increase at the end of the predetermined duration (this would use calls to ChatSetAttr API in the status effect macro to make the attribute changes). RoundMaster can also use any token marker you have loaded  to identify a token as having a status.  It can use the default markers, you can purchase token marker libraries from the marketplace and load them into your campaign, or you can create your own token marker library and use those. You can display all the markers available to you using the --listmarkers  command and hovering your mouse pointer over each displayed marker will display a tooltip of the marker name to use in the  --addstatus, --target,  and other RoundMaster status management commands. (Requires the libTokenMarkers API  to be loaded with RoundMaster API - will be loaded automatically if One-Click install is used for RoundMaster).
1644521856
vÍnce
Pro
Sheet Author
What a great contribution(s) to the roll20 community Richard!  Awesome work.
vÍnce said: What a great contribution(s) to the roll20 community Richard!  Awesome work. Thanks, vince.  I developed it for my own group of DMs and players (as with the rest of the RPGMaster APIs) but I hope others can benefit.
I'm very interested in using this script, I just have one question.  Is it possible to have the durations tick down for multiple units during the same turn? To give you some context, the system I'm running is one where all the players go at once, and then all the enemies go, and then repeat.  So, in effect, there are no individual turns, and I was hoping to have one "Player Turn" and one "Enemy Turn" where it would tick down the status durations for all units on that side. Thanks in advance!
Yep absolutely this is supported.  Each Token can have multiple different statuses, and each status can be on multiple tokens, and all can have different or the same durations.  Every token added to the Turn Order with the --addtotracker  command is handled individually, or you can add a custom entry (tokenID of -1) for groups.  Each status added to a token using --target  command (or the --addtargetstatus  command) is handled totally independently. If you load the API into a campaign, it will create a Handout called RoundMaster Help which has a full list of all the commands provided.  Alternatively, you can read the Wiki entry here  without loading the API iteself. RoundMaster is fully multi-user enabled and can be used concurrently by all the users in a campaign - generally the Campaign creator would create Roll20 macros to allow the Players to easily use RoundMaster functions to target tokens with actions and statuses, or alternatively use the RPGMaster suite of APIs (InitiativeMaster, AttackMaster, MagicMaster and CommandMaster APIs). Does this help?
Thank you!  I'm going to load it up and try it out. Richard @ Damery said: Yep absolutely this is supported.  Each Token can have multiple different statuses, and each status can be on multiple tokens, and all can have different or the same durations.  Every token added to the Turn Order with the --addtotracker  command is handled individually, or you can add a custom entry (tokenID of -1) for groups.  Each status added to a token using --target  command (or the --addtargetstatus  command) is handled totally independently. If you load the API into a campaign, it will create a Handout called RoundMaster Help which has a full list of all the commands provided.  Alternatively, you can read the Wiki entry here  without loading the API iteself. RoundMaster is fully multi-user enabled and can be used concurrently by all the users in a campaign - generally the Campaign creator would create Roll20 macros to allow the Players to easily use RoundMaster functions to target tokens with actions and statuses, or alternatively use the RPGMaster suite of APIs (InitiativeMaster, AttackMaster, MagicMaster and CommandMaster APIs). Does this help?
Found bug (25th Feb 2022): If the optional message parameter is used for --addstatus, --addtargetstatus,  or --target  and includes 2 dice rolls separated only by one character that is not a digit (e.g. 2d4/1d4) caused a Chat Window sendchat() API crash (such crashes cannot be trapped by the APIs in the same way as JavaScript or functional errors). Workaround:  Ensure that all message parameters do not include two dice rolls separated by one other character.  Unfortunately, the databases supplied with RPGMaster APIs (if used in conjunction with RoundMaster) have many messages and not all of them have been checked.  So if the APIs stop working, the DM/Game Creator must go to the API Sandbox and restart it. Fix ETA: The bug has been fixed in the code, and will be in the next merge to be released by Wednesday 2nd March.
Do you have any plans to allow using custom token markers for the --addstatus command, maybe via the libTokenMarkers script?
Persephone said: Do you have any plans to allow using custom token markers for the --addstatus command, maybe via the libTokenMarkers script? Yes, I've been meaning to do that for some time.  I have a major release of the rest of the RPGMaster API suite coming up, and any work on this will have to wait until after that release ( and dealing with any issues people find with it), but it shouldn't take too much to support given the data structures used.  I'll keep you posted.
Persephone said: Do you have any plans to allow using custom token markers for the --addstatus command, maybe via the libTokenMarkers script? I'm bench-testing a version of RoundMaster that uses the libTokenMarkers script, with game-play testing happening over the next couple of weeks, so release possibly happening in the 30 March merge, if everything goes OK. FYI, if using RoundMaster with the rest of the RPGMaster library, the statuses set by spells & magic items distributed with the MagicMaster API will still use the standard markers by default, as they cannot rely on GMs / Game Creators buying specific marker sets.  However, any GM / Game Creator can create their own copies of the various databases (as defined in the MagicMaster database help handouts & Wiki pages) and alter any or all of the status marker names to whatever they want. Enjoy!
1647784962

Edited 1648549294
Richard @ Damery
Pro
API Scripter
Release 4.031 uploaded for merge this week Persephone said: Do you have any plans to allow using custom token markers for the --addstatus command, maybe via the libTokenMarkers script? RoundMaster v4.031 (a major release) has been uploaded to the repository ready for this week's merge, and should be available to 1-Click and automatic updates from Wednesday 23-03-22.  This release uses the libTokenMarkers API library (thanks to The Aaron) to enable the use of all loaded Token Marker sets.  I have added the command  !rounds --listmarkers  to display all loaded token markers.  Hovering the mouse over any marker will display a tooltip of the marker name that can be used with the --addstatus, --target, or any other command. I've also fixed a slight issue with "Token Marker Stacking": RoundMaster allows multiple different statuses on a token to share the same token marker.  Rather than clutter a token with multiple images of the same marker, instead it "stacks" them, only displaying the duration of the shortest duration status using that marker (as it gets below 9).  When that status reaches zero duration, it displays the duration of the next lowest duration in the stack (other statuses with different markers display as normal).  All the statuses on a token, including each stacked status, displays in the turn announcement for that token when their turn is reached in the Turn Order. For this to work, the libTokenMarkers API library must be loaded from 1-Click or otherwise.  When RoundMaster is installed by 1-Click install, it will attempt to load libTokenMarkers as a dependency.  If libTokenMarkers is not present, RoundMaster will display errors that it is missing each time a !rounds command is used. Edit 29/03/2022:  Now available via One-Click install.  Requires LibTokenMarkers API  also available on One-Click: Existing RoundMaster users will need to install LibTokenMarkers via One-Click for their existing RoundMaster API to work, I hope this is of use.  Enjoy!
The latest version of RoundMaster has finally been released for installation and update via One-Click install.  Sorry for the delay. Important Note for Existing RoundMaster users:   You will need to install libTokenMarkers API  via One-Click install, as the automatic update to RoundMaster will not do this for you.  Even if you are not going to use any but the default marker set, this is required.
Keeping this thread alive, ready for the next big release of the RPGMaster suite, due in about 1 month.  This will not affect RoundMaster very much, but it will be part of the next release.
Just keeping this thread alive once more, so that anyone with issues can contact me, though feel free to also use the RPG Master Forum , of which RoundMaster is part.