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

From Roll20 Wiki

Jump to: navigation, search
Line 1: Line 1:
=Script:RoundMaster=
 
 
{{revdate}}
 
{{revdate}}
RoundMaster is an API for the Roll20 RPG-DS.  Its purpose is to extend the functionality of the Turn Order Tracker capability already built in to Roll20.  The USP of this Turn Order Tracker  is the full richness of its functionality, including optionally triggering status effect macros when statuses are applied or removed from tokens, and/or each turn they remain.  It deals with Player page movements automatically with token statuses following the Player page.  It supports multiple Turn Order entries per token, and multiple tokens per Character Sheet.
+
This API supports initiative for RPGs (initially only AD&D 2e) using the Turn Order and the Tracker window.  The InitiativeMaster API provides functions dealing with all aspects of: managing how initiative is done; rolling for initiative; for “group” and “individual” initiative types providing Character action selection to determine the speed and number of attacks of weapons, the casting time of spells & the usage speed of magic items; supporting initiative for multiple attacks with one or multiple weapons per round; supporting and tracking actions that take multiple rounds; managing the resulting Turn Order; as well as performing the “End of Day” activity.  It works very closely with the RoundMaster API to the extent that InitiativeMaster cannot work without RoundMaster (though the reverse is possible).  InitiativeMaster also works closely with AttackMaster API and MagicMaster API and uses the data configured on the Character Sheet by these other APIs, although it can use manually completed Character Sheets once correctly configured.<br>
RoundMaster is based on the much older TrackerJacker API, and many thanks to Ken L. for creating TrackerJacker.  However, RoundMaster is a considerable fix and extension to TrackerJacker, suited to many different applications in many different RPG scenariosRoundMaster is also the first release as part of the wider RPGMaster series of APIs for Roll20, composed of RoundMaster, CommandMaster, InitiativeMaster, AttackMaster, MagicMaster and MoneyMaster - other than RoundMaster (which is generic) and InitiativeMaster (which has wider but not generic applicability) these initially support only the AD&D2e RPG.
+
This API is currently configured to only use the AD&D2e Character Sheet from Peter B.  It uses the Roll Templates defined in that sheet extensively.  It may be possible to use it with other character sheets if you follow the instructions in the Section on '''Character Sheet Data Fields''' and future development will focus on implementing more generic functionality.
 
{{script overview
 
{{script overview
 
|name=RoundMaster
 
|name=RoundMaster
 
|author={{user profile|6497708|Richard E}}
 
|author={{user profile|6497708|Richard E}}
|version=3.022
+
|version=1.037
|lastmodified=2021-11-25
+
|lastmodified=2021-12-02
|code=RoundMaster
+
|code=InitMaster
|dependencies=(recommended){{api repository link|ChatSetAttr}}, (recommended){{api repository link|Tokenmod}}
+
|dependencies={{api repository link|RoundMaster}}
 
|conflicts=None}}
 
|conflicts=None}}
  
 
== Syntax ==
 
== Syntax ==
The roundMaster API is called using !rounds, though it reveals its history in that it can also be called using !tj (the command for the TrackerJacker API roundMaster is based on).  
+
The InitiativeMaster API is called using !init.  
<pre>!rounds --start
+
<pre>!init --help</pre>
!tj --start</pre>
+
Commands to be sent to the InitiativeMaster API must be preceeded by two hyphens ‘--’ as above for the --help command.  Parameters to these commands are separated by vertical bars ‘|’, for example:
Commands to be sent to the roundMaster API must be preceeded by two hyphens ‘--’ as above for the --start command.  Parameters to these commands are separated by vertical bars ‘|’, for example:
+
<pre>!init --init [party-roll]|[foes-roll]</pre>
<pre>!rounds --addtotracker name|tokenID|3|all|sleeping|sleepy</pre>
+
 
If optional parameters are not to be included, but subsequent parameters are needed, use two vertical bars together with nothing between them, e.g.
 
If optional parameters are not to be included, but subsequent parameters are needed, use two vertical bars together with nothing between them, e.g.
<pre>!rounds --addtotracker name|tokenID|3|all||sleepy</pre>
+
<pre>!--init  |[foes-roll]</pre>
 
Commands can be stacked in the call, for example:
 
Commands can be stacked in the call, for example:
<pre>!rounds --start --addtotracker name|tokenID|3|all|sleeping|sleepy --sort</pre>
+
<pre>!init --doCharList  ALL  --init </pre>
 
When specifying the commands in this document, parameters enclosed in square brackets [like this] are optional: the square brackets are not included when calling the command with an optional parameter, they are just for description purposes in this document.  Parameters that can be one of a small number of options have those options listed, separated by forward slash ‘/’, meaning at least one of those listed must be provided (unless the parameter is also specified in [] as optional): again, the slash ‘/’ is not part of the command.  Parameters in UPPERCASE are literal, and must be spelt as shown (though their case is actually irrelevant).
 
When specifying the commands in this document, parameters enclosed in square brackets [like this] are optional: the square brackets are not included when calling the command with an optional parameter, they are just for description purposes in this document.  Parameters that can be one of a small number of options have those options listed, separated by forward slash ‘/’, meaning at least one of those listed must be provided (unless the parameter is also specified in [] as optional): again, the slash ‘/’ is not part of the command.  Parameters in UPPERCASE are literal, and must be spelt as shown (though their case is actually irrelevant).
  
 
== Installation and Configuration ==
 
== Installation and Configuration ==
Copy the script's code, available from the menu on the right and stored at Roll20's [https://github.com/Roll20/roll20-api-scripts 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.  It will install several new Character Sheets & Handouts: The handout '''RoundMaster Help''' provides a full manual of how to use RoundMaster.  The handout '''Effects Database Help''' provides information on adding and updating status effects.  The Character Sheet '''Effects-DB''' holds ''Ability Macros'' that deliver the status effects.
+
Copy the script's code, available from the menu on the right and stored at Roll20's [https://github.com/Roll20/roll20-api-scripts 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.  It will install several new Character Sheets & Handouts: The handout '''InitiativeMaster Help''' provides a full manual of how to use InitiativeMaster.  The handout '''RPGMaster CharSheet Setup''' provides information on setting up a character sheet for use with InitiativeMaster.
If you want to use the Effect-DB and status effect macros, it is ''highly recommended'' that you load the APIs '''ChatSetAttr''' amd '''Tokenmod'''.  The pre-loaded Effect macros use these two APIs extensively and will not work without them.  Of course, if you do not want status effect macros to work, then do not load these APIs.
+
  
 
== Script Use ==
 
== Script Use ==
After installing the script, refer the the handout '''RoundMaster Help''' for full information on use.  Below is a copy of the contents of that handout.
+
After installing the script, refer the the handout '''InitiativeMaster Help''' for full information on use.  Below is a copy of the contents of that handout.
  
 
=Command Index=
 
=Command Index=
==Tracker commands==
+
All commands are preceded by !init unless otherwise stated.
<pre>--start
+
==Manage Initiative type, rolls & party==
--stop
+
<pre>--init [party-roll]|[foes-roll]
--pause
+
--type < STANDARD / GROUP / INDIVIDUAL ></pre>
--reset [number]
+
==Show group / individual Initiative menus==
--sort
+
<pre>--menu [token-id]
--clear
+
--monmenu [token-id]</pre>
--clearonround [OFF/ON]
+
==Show action-specific Initiative menus==
--clearonclose [OFF/ON]
+
<pre>--weapon [token-id]
--sortorder [NOSORT/ATOZ/ZTOA/DESCENDING/ASCENDING]
+
--monster [token-id]
--addToTracker name|tokenID/-1|priority|[qualifier]|[message]|[detail]
+
--complex [token-id]
--removefromtracker name|tokenID/-1|[retain]</pre>
+
--muspell [token-id]
==Token Status Marker commands==
+
--prspell [token-id]
<pre>--addstatus status|duration|direction|[message]|[marker]
+
--power [token-id]
--addtargetstatus tokenID|status|duration|direction|[message]|[marker]
+
--mibag [token-id]
--edit
+
--thief [token-id]
--target CASTER|casterID|status|duration|direction|[message]|[marker]
+
--other [token-id]</pre>
--target SINGLE/AREA|casterID|targetID|status|duration|direction|[message]|[marker]
+
==Maintain the Turn Order and Rounds==
--aoe tokenID|[shape]|[units]|[range]|[length]|[width]|[image]|[confirmed]
+
<pre>--maint
--clean
+
--check-tracker
--removestatus status(es)
+
--list-pcs  ALL / MAP / REPLACE / ADD</pre>
--deletestatus status(es)
+
==End of Day processing==
--deltargetstatus tokenID|status(es)
+
<pre>--end-of-day [cost]</pre>
--movestatus
+
--s_marker
+
--disptokenstatus [tokenID]
+
--listfav<br></pre>
+
 
==Other commands==
 
==Other commands==
<pre>–help
+
<pre>--help
–hsq from|[command]
+
--debug ON/OFF</pre>
–handshake from|[command]
+
==Configuring the Token and Character Sheet for use==
--debug (ON/OFF)</pre>
+
==Character Sheet data fields==
 +
<br>
 +
<br>
 +
=Command Details=
 +
==Manage Initiative type, rolls & party==
 +
===Manage the Initiative process===
 +
<pre>--init [party-roll]|[foes-roll]</pre>
 +
DM Only command.  Takes an optional dice roll result for the Party, and an optional dice roll result for the foes.<br>
 +
This command displays a chat menu to specify:<br>
 +
<ul><li>the type of initiative to do (standard, group or individual),</li>
 +
<li>the initiative rolls for the Party and the Foes (for standard and group initiative),</li>
 +
<li>who is in the Party,</li>
 +
<li>to check if everyone has selected their action for the next round (for group and individual initiative),</li>
 +
<li>and whether to show this menu automatically as each new round starts.</li></ul>
 +
The different types of AD&D2e Initiative process are explained in the DMG p55, and consist of “standard”, “group”, and “initiative”:<br>
 +
{| class="wikitable"
 +
|+
 +
|-
 +
! scope="row"| Standard:
 +
|| the Party and the Foes (DM) each roll 1d10, and all of whichever gets the lowest roll goes first.  The system supports taking the two rolls, and putting entries in the Turn Order for all defined Party members, and one entry for the Foes.
 +
|-
 +
! scope="row"| Group:
 +
|| the Party and the Foes (DM) each roll 1d10, and then all Party members and all Foes choose what actions they will perform during the next round.  The speed/casting time of the Character’s / Foes selected action will then be added to the relevant roll to define the Character’s / Foes initiative(s) which are added to the Turn Order.
 +
|-
 +
! scope="row"| Individual:
 +
|| each individual Character & Foe chooses what action they will do each round, and the speed/casting time of that action is added to an individual system-rolled 1d10 for that Character / Foe resulting in each Character’s initiative(s) which are all added to the Turn Order.
 +
|}
 +
The type of initiative selected persists between game sessions.<br>
 +
Who is in the party can be defined by using API Buttons on the menu to do one of: search all maps in the Campaign for tokens controlled by Players; search just the map the Players are on for tokens controlled by Players; select a number of tokens on any map and add them to the list; or replace the whole list with the selected tokens.
 +
Another API button checks to see if the Turn Order contains entries for every token listed as being in the Party, i.e. that everybody has selected their actions for the next round.<br>
 +
This menu can appear automatically as each completed round finishes if RoundMaster API is managing the Turn Order and Rounds.  This is useful for standard and group initiative, as the first thing that needs to happen is for the Party & Foe initiative dice rolls to be entered.  It is less useful for this menu to appear for individual initiative, and it can be turned off with another API Button.<br>
  
=Tracker Command detail=
+
===Set the type of Initiative being used in the Campaign===
<pre>!rounds --start</pre>
+
<pre>--type < STANDARD / GROUP / INDIVIDUAL ></pre>
This command alternates between starting the automatic functions of the Turn Tracker, and pausing the Tracker.  In its started state, the tracker will follow the current token at the top of the tracker with a highlight graphic, report the token’s turn to all players, and follow the options selected for ‘sortorder’ and ‘clearonround’.  When paused, the Tracker will not highlight the top token, report turns or execute the options.
+
Takes a mandatory initiative type which must be one of those shown.<br>
<pre>!rounds --stop</pre>
+
This command sets the initiative type to the specified type without bringing up the complete --init menuThe type of initiative specified persists between game sessions.<br>
Stops the tracker and removes all statuses and status markers from tokens currently held by roundMaster.  This also dumps the tables held in the campaign status object.  It is useful if you want to start a fresh version of a campaign, or if everything goes wrong.
+
<pre>!rounds --pause</pre>
+
Pauses the Turn Tracker in its current state without deleting any information, and is the same as using the --start command again having already called it once.  The Turn Tracker can still be moved on, cleared, sorted, and reset, but the highlight graphic is paused.  It can be restarted using --start
+
<pre>!rounds --reset [number]</pre>
+
Sets the round in the Turn Order to the number, or to 1 if number is not provided.
+
<pre>!rounds --sort</pre>
+
Sorts the Turn Tracker entries according to the previously set sort order, with the default being ascending numeric priority.
+
<pre>!rounds --clear</pre>
+
Clears all entries in the Turn Tracker without stopping it.
+
<pre>!rounds --clearonround [off/on]</pre>
+
Sets the ‘clear on round’ option.  If set, this option means that when the Tracker is running and reaches the end of the round, all entries in the Turn Tracker are automatically removed ready for players to do initiative for the next round.  Otherwise, the Turn Tracker is not cleared automatically at any point.  Any parameter other than ‘off’ turns clearonround on.  Default on.
+
<pre>!rounds --clearonclose [off/on]</pre>
+
Sets the ‘clear on close’ option.  If set, this option means that when the Tracker window is closed, the Turn Tracker is cleared.  Any parameter other than ‘on’ turns clear on close off.  Default off.
+
<pre>!rounds --sortorder [nosort/atoz/ztoa/descending/ascending]</pre>
+
This command sets the automatic sort order of the entries in the Turn Tracker.  The Turn Tracker is automatically sorted at the beginning of each round as the Turn Tracker is moved on to the first entry, based on the order set by this option.  Descending and Ascending are numeric sorts based on the Priority number of each entry.  AtoZ and ZtoA are alphabetic sorts based on the name of each entry in the Turn Tracker.  Nosort will mean that no sorting takes place, and the order remains the order in which the entries were made.  The default order is Ascending.
+
<pre>!rounds --addToTracker name|tokenID/-1|priority|[qualifier]|[message]|[detail]</pre>
+
This command adds an entry to the TurnTracker.  tokenID can either be the ID of a valid token, or -1 to create a custom entry.  If a custom entry, name is used for the entry in the Turn Tracker with the provided priority, otherwise the token name is used for the entry with the provided priority.  The qualifier can be one of first/last/smallest/largest/all.<br>
+
<ul><li>First keeps only the first entry made for that name (for custom entries) or token and removes any others, but leaves all entries for other tokens and names in the Tracker</li>
+
<li>Last keeps only the latest entry for that token or name (i.e. the one now being set)</li>
+
<li>Smallest keeps only the entry with the lowest numeric priority for that token or name</li>
+
<li>Largest keeps only the entry with the highest numeric priority for that token or name</li>
+
<li>All keeps all entries in the list and adds this one to those for that token or name, meaning that the Turn Tracker can have multiple entries for one or more tokens or names</li></ul>
+
The optional message will be displayed on the turn announcement for this turn when it is reached in the Turn Order.  Generally, the message relates what the player said the character was doing for their initiative.  The optional detail can be the detail of how the initiative priority was calculated or any other additional message you want to show to the Player only when the command is processed.
+
By using the name, tokenID/-1 and qualifier parameters judiciously, group initiative, individual initiative, or any combination of other types can be created.  When used with the InitiativeMaster API, Players get menus of actions they can take (based on their weapons, powers, memorised spells, magic items, thieving skills etc) which manage the calls to RoundMaster for the desired initiative type, and the DM gets menus to control all RoundMaster functions, and to set the type of initiative to undertake..
+
<pre>!rounds --removefromtracker name|tokenID/-1|[retain]</pre>
+
This command removes entries from the Turn Tracker for the specified tokenID or nameHowever, if the optional retain number is given, it will retain this number of entries for the specified token or name, and only remove any beyond this number. The earliest entries made are kept when the retain parameter is set.
+
<pre>!rounds --viewer on/off/all/tokenID</pre>
+
This command controls the viewer mode setting for the Player who calls it.  Rather than showing what that Player’s characters can see when Dynamic Lighting is turned on, viewer mode shows that Player what each player-character (even if not theirs) can see as their token reaches the top of the Turn Tracker and it is their turn.  Quite often, this can be a Player ID set up just to be a viewer e.g. for a DM view of what players can see, or for a touchscreen playing surface. The current player-character is defined as the token representing a character sheet controlled by any Player at the top of the Turn Tracker.  As each new token comes to the top of the Turn Tracker, if it is a player-character the display changes to only what it can see.  If it is a token representing an NPC, or when the Turn Order reaches the next round and clears, the map for the Player reverts to showing what all player-characters can see (but not what NPCs can see).
+
The on option turns on viewer mode for the Player, and off turns it off.  The all option immediately turns on vision for all player-characters, and passing a tokenID as a parameter shows vision for that token (even if it represents an NPC).  Options off, all and tokenID can be used by any Player or the DM to affect the viewer Player’s screen.
+
  
=Token Status Marker commands=
+
==Show Group / Individual initiative action selection menus==
<pre>!rounds --addstatus status|duration|direction|[message]|[marker]</pre>
+
Adds a status and a marker for that status to the currently selected token(s).  The status has the name given in the status parameter and will be given the duration specified, which will be changed by direction each round.  Thus setting a duration of 8 and direction of -1 will decrement the duration by 1 each round.  If the duration gets to 0 the status and token marker will be removed automatically.  direction can be any number - including a positive one meaning duration will increase.  Each Turn Announcement for the turn of a token with one or more statuses will display the status, the duration and direction, and the message, if specified.  The specified marker (from the default token marker set) will be applied to the token - if it is not specified the option will be given to pick one from a menu in the chat window (which can be declined).
+
For player-characters, when the duration reaches 9 or less the duration will be counted-down by a number appearing on the marker.  For NPCs this number does not appear (so that Players don’t see the remaining duration for statuses on NPCs), but the remaining duration does appear for DM only on the status message below the Turn Announcement on the NPCs turn.
+
If a Player other than the DM uses this command, the DM will be asked to confirm the setting of the status and marker.  This allows the DM to make any decisions on effectiveness.
+
If an Effects database of effect macros exists within the campaign (a character sheet with the name Effects-DB, with Ability Macros named the same as the status status parameter set for markers) the Effects database will be searched in three ways: when a status marker is set, any Ability Macro with the name status-start (where status is the status name specified in the command) is run.  Each round when it is the turn of a token with the status marker set, the Ability Macro with the name status-turn is run.  And when the status ends (duration reaches 0) or the status is removed using --removestatus, or the token has the Dead marker set or is deleted, an Ability Macro with the name status-end is run.  See the Effects database documentation for full information on effect macros and the options and parameters that can be used in them.
+
<pre>!rounds --addtargetstatus tokenID|status|duration|direction|[message]|[marker]</pre>
+
This command is identical to addstatus, except for the addition of a tokenID.  Instead of using a selected token or tokens to apply the status to, this applies the status to the specified token.
+
<pre>!rounds --edit</pre>
+
This command brings up a menu in the chat window showing the current status(es) set on the selected token(s), with the ability to remove or edit them.  Against each named status, a spanner icon opens another menu to edit the selected status name, duration, direction, message and marker on all the selected token(s), and also allows this status to be set as a favourite.  A bin icon will remove the status from all the selected token(s), and run any status-end macros, if any.
+
<pre>!rounds --target CASTER|casterID|status|duration|direction|[message]|[marker]
+
!rounds --target SINGLE/AREA|casterID|targetID|status|duration|direction|[message]|[marker]</pre>
+
This command targets a status on a token or a series of tokens.  If a version using CASTER is called, it acts identically to the addtargetstatus command, using the casterID as the target token.  If the SINGLE version is called, the targetID is used.  If the AREA version is used, after applying the status to the targetID token, the system asks in the chat window if the status is to be applied to another target and, if confirmed, asks for the next target to be selected, repeating this process after each targeting and application.  In each case, it applies the status, effect macro and marker to the specified token(s) in the same way as addtargetstatus.
+
<pre>!rounds --aoe tokenID|[shape]|[units]|[range]|[length]|[width]|[image]|[confirmed]
+
  
shape = [Bolt/Circle/Cone/Ellipse/Rectangle/Square/Wall]
+
===Display a menu of possible actions for the selected Character / NPC===
units = [Squares/Feet/Yards/Units]
+
<pre>--menu [token-id]</pre>
image = [Acid/Cold/Dark/Fire/Light/Lightning/Magic/Red/Yellow/Blue/Green/Magenta/Cyan/ White/Black]
+
Takes an optional token ID.<br>
confirmed = [true / false]
+
This command displays a chat menu of buttons for types of action that the Character / NPC / creature can performEach of these buttons may take the Player to a more detailed list of specific action buttonsSelecting any of the buttons will add the speed/casting time and correct number of instances of the selected action to the group or individual initiative dice roll (1d10) and enter the result in the Turn Order using the RoundMaster API – ‘individual’-type initiative dice rolls are performed in the background by the API and there is currently no option for the Player to do the roll instead.<br>
range, length & width are numbers specified in whatever unit was specified as [units]</pre>
+
The system displays immediately and also records the action selected and the speed of that action along with any modifiers as a message to display when the Character’s / NPCs / creature’s turn comes aroundFor each type of action, once chosen, the “rate” is displayed as the number of attacks per round multiplied by any magical modifier (such as a Haste spell).  The “speed” is displayed as the speed of the action in segments (1/10ths of a round), and the “modifier” is the bonus or penalty to the roll for other magical effects (such as a Slow spell).<br>
This command displays an Area of Effect for an action that has or is to occur, such as a spell.  This quite often can be used before the --target area command to identify targetsThe system will present lists of options for the Player to select for each parameter that is not specifiedOn executing this command, if the range is not zero the Player will be given a crosshair to position the effect, and if the range is zero the effect will be centred on the Token (or at its “finger-tips” for directional effects like cones).  The range of the effect will be centred on the TokenID specified and will be displayed as a coloured circle - the crosshair should be positioned within this area (the system does not check).  The Crosshair (or if range is zero, the Token) can be turned to affect the direction of the effect. The effect ‘direction’ will be the direction the token/crosshair is facing.  If Confirmed is false or omitted, the Player will be asked to confirm the positioning of the token/crosshair with a button in the chat window (setting it to true will apply the effect immediately - good for range zero circular effects (i.e. don’t need placing or direction setting).  The effect can have one of the shapes listed:<br>
+
For multiple actions per round, those subsequent to the first action with the same item have speeds in the Turn Order incremented from each other by the speed of the action: thus multiple attacks with a Longbow (2 per round, speed 8), after an initiative roll of 5 on a 1d10, will happen at priority 13 & 21. For attacks by a Fighter with two weapons, such as a Longsword (sp 5) in their left hand and a Short sword (sp 3) in their right hand, after an initiative roll of 5, the Short sword will get a Turn Order priority of 8 and the Longsword 10 – that is they are consecutive not sequential.<br>
<ul><li>Bolt is a long rectangle extending away from the crosshair/token for length, and width wide.</li>
+
See the individual menu explanations for more detail on each type of action.<br>
<li>Circle is a circle centred on the crosshair/token of diameter length.</li>
+
<li>Cone is a cone starting at the crosshair/token of length, with an end width.</li>
+
<li>Ellipse is an ellipse of length extending away, and width wide.</li>
+
<li>Rectangle is a rectangle of length extending away, and width wide.</li>
+
<li>Square is a square of sides length parallel with the direction the crosshair/token.</li>
+
<li>Wall is a rectangle perpendicular to the crosshair or token, i.e. width away and length wide.</li></ul>
+
For the units, Feet & Yards are obvious and are scaled to the mapSquares are map squares (whatever scale they are set to), and Units are the map scale units and are not scaled. 
+
Images are set with transparency and sent to the back of the Object layer.  Red/ Yellow/ Blue/ Green/ Magenta/ Cyan/ White/ Black colour the effect area the specified colour, and Acid/ Cold/ Dark/ Fire/ Light/ Lightning/ Magic use textured fills.
+
<pre>!rounds --clean</pre>
+
Rebuilds the status markers on the selected token(s), without removing the status(es) from the campaign status object.  Markers that do not have associated statuses (including manually applied ones) are removedThis deals with situations where token markers have become corrupted for some reason, and should not be needed very often.
+
<pre>!rounds --removestatus status(es) / ALL</pre>
+
Removes the status, or comma-delimited list of statuses, or `all’ for all statuses, and their status marker(s) from the selected token(s), and runs any associated status-end Ability Macros in any existing Effects database in the campaign.  See addstatus command and the Effect database documentation for details on effect macros.  Statuses can be ‘all’ which will remove all statuses from the selected token(s).
+
<pre>!rounds --deletestatus status(es) / ALL</pre>
+
Removes the status, or comma-delimited list of statuses, and status marker(s) from the selected token(s), but does not run any associated status-end Ability Macros in any existing Effects database in the campaign.  Statuses can be ‘all’ which will delete all statuses from the selected token(s).
+
<pre>!rounds --deltargetstatus tokenID|status(es) / ALL</pre>
+
Works the same as deletestatus command, except only on the specified tokenID rather than selected tokens.
+
<pre>!rounds --movestatus</pre>
+
For each of the selected tokens in turn, searches for tokens in the whole campaign with the same name and representing the same character sheet, and moves all existing statuses and markers from all the found tokens to the selected token (removing any duplicates).  This supports Players moving from one Roll20 map to another and, indeed, roundMaster detects page changes and automatically runs this command for all tokens on the new page controlled by the Players who have moved to the new page.
+
<pre>!rounds --disptokenstatus [tokenID]</pre>
+
Shows the statuses on the specified token to the DM using the same display format as used in the Turn Announcement.
+
<pre>!rounds --listmarkers</pre>
+
Shows a display of all markers available in the API to the DM, and also lists which are currently in use.
+
<pre>!rounds --listfav</pre>
+
Shows statuses to the DM that have been defined as favourites (see the edit command), and provides buttons to allow the DM to apply one or more favourite statuses to the selected token(s), and to edit the favourite statuses or remove them as favourites.
+
  
=Other commands=
+
===Display a menu of possible actions for the selected creature===
<pre>!rounds –help</pre>
+
<pre>--monmenu [token-id]</pre>
Displays a listing of RoundMaster commands and their syntax.
+
Takes an optional token ID.<br>
 +
This produces a slightly simpler form of the initiative action menu for creatures.  Otherwise, all actions result in similar processing as per the normal action selection.
 +
If the creature is very simple (only uses the simple attack lines on the Monster tab of the AD&D2e Character Sheet), then it might be sensible to use the --monster command instead: see below.<br>
 +
 
 +
==Action specific Initiative menus==
 +
===Display initiative actions to attack with the weapons ‘in-hand’===
 +
<pre>--weapon [token-id]</pre>
 +
Takes an optional token ID.<br>
 +
Displays a chat menu listing all the weapons that the Character / NPC / creature has ‘in-hand’ (i.e. that are currently in the Weapon and Ranged tables), with additional options as appropriate to the Character Sheet.  Rogue class characters will get a ‘Backstab’ option which will apply the Rogue backstab multiplier as appropriate.  Fighter & Rogue classes will get an option to choose two weapons (if there are two one-handed weapons in-hand) which presents the option of selecting a Primary and a Secondary weapon to do initiative for.  Weapons can be those typed into the Character Sheet weapons tables (see Section 7 below) or loaded using AttackMaster API (see AttackMaster documentation).<br>
 +
If the Character / NPC / creature has Powers or Magic Items they can use, buttons also appear on the menu to go to the menus to select these instead of doing a weapon initiative – see the --power and --mibag commands.  There is also a button for ‘Other’ actions, such as Moving, Changing Weapon (which takes a round), doing nothing, or Player-specified actions – see the --other command.<br>
 +
 
 +
===Display initiative actions for a simple creature to attack===
 +
<pre>--monster [token-id]</pre>
 +
Takes an optional token ID.<br>
 +
Displays a chat menu only listing innate monster attacks from the Monster tab of the AD&D2e Character Sheet.<br>
 +
Creatures using the Innate Monster Attack fields on the AD&D2e Character Sheet Monster tab benefit from an extended syntax for entries in these fields: each field can take [<Attack name>,]<damage dice roll>[,<speed>] for example Claw,1d8,2 and Sword+1,2d4+1,5.  These will result in possible initiative actions for that creature for Claw and Sword+1.  If Attack Name is omitted, the dice roll is displayed as the action name instead.  If the speed is omitted, the Innate attack speed field value is used instead.  The speed will then be used to calculate the Turn Order priority.<br>
 +
 
 +
===Display initiative actions for a weapon-wielding creature to attack===
 +
<pre>--complex [token-id]</pre>
 +
Takes an optional token ID.<br>
 +
Displays a more complex monster attack menu, with both ‘Innate’ attacks from the Monster tab as well as weapon attacks from the Character tab weapons tables (the API does not use the recently introduced Weapon table for Monsters on the Monster tab so that the AttackMaster API only has to deal with one set of tables) – see 3.1 above for entering weapons and 3.2 for setting up monster attacks.  If the creature has powers or magic items, it will also offer action menu buttons for those.  The selected attack or weapon speed will then be used to calculate the Turn Order priority.<br>
 +
 
 +
===Display initiative actions for Wizard spells===
 +
<pre>--muspell [token-id]</pre>
 +
Takes an optional token ID.<br>
 +
Displays a menu of Wizard spells that the Character / NPC has memorised (see the MagicMaster API documentation for memorising spells, or see Section 7 below for entering spells manually).  Any spell that is still memorised can be selected for initiative, and the relevant casting time will be used to calculate the Turn Order priority.<br>
 +
 
 +
===Display initiative actions for Priest spells===
 +
--prspell [token-id]
 +
Takes an optional token ID.<br>
 +
Displays a menu of Priest spells that the Character / NPC has memorised (see the MagicMaster API documentation for memorising spells, or see Section 7 below for entering spells manually).  Any spell that is still memorised can be selected for initiative, and the relevant casting time will be used to calculate the Turn Order priority.<br>
 +
 
 +
===Display initiative actions for powers===
 +
<pre>--power [token-id]</pre>
 +
Takes an optional token ID.<br>
 +
Displays a menu of Powers that the Character / NPC has been granted (see the MagicMaster API documentation for managing powers, or see Section 7 below for entering powers manually).  Any power that has not been consumed can be selected for initiative, and the relevant casting time will be used to calculate the Turn Order priority.<br>
 +
 
 +
===Display initiative actions for Magic Items===
 +
<pre>--mibag [token-id]</pre>
 +
Takes an optional token ID.<br>
 +
Displays a menu of Magic Items and non-magical equipment that the Character / NPC / creature has on their person - that is in the Items table (by default, the Potions table on the AD&D2e character sheet): see Section 7.5 below and the MagicMaster API documentation for information on Items.  Selecting an item for initiative uses the speed of action of that item to calculate the Turn Order priority.<br>
 +
 
 +
===Display initiative actions for Thieves===
 +
<pre>--thief [token-id]</pre>
 +
Takes an optional token ID.<br>
 +
Displays a menu of Thievish actions (with current percentage proficiencies of each).  Selecting one for initiative uses the speed of action of that item to calculate the Turn Order priority.<br>
 +
 
 +
===Display other actions===
 +
<pre>--other [token-id]</pre>
 +
Takes an optional token ID.<br>
 +
Displays a menu of other (non-attacking) actions that the Character / NPC / creature can take, namely: Moving (speed 0 as it is an innate ability); Changing Weapon (also speed 0 but takes all round); Doing Nothing (obviously speed 0); and one that allows the Player to enter a description and specify a speed for that action (presumably with the agreement of the DM).<br>
 +
 
 +
==Maintain the Turn Order and Rounds==
 +
===Display the DM’s round maintenance menu===
 +
<pre>--maint</pre>
 +
DM Only command.  Does not take any parameters.<br>
 +
Displays a chat menu of action API Buttons to control the Turn Order Tracker window using commands sent to the RoundMaster API.  The key one is Start/Pause, which initialises RoundMaster and starts it managing the Turn Order, or pauses it so that stepping through the Turn Order does not trigger any RoundMaster actions (such as counting down token status timers or initiating Effects).  The full list of functions is:<br>
 +
{| class="wikitable"
 +
|+
 +
|-
 +
! Maintenance Menu Button !! Command Implemented !! Description
 +
|-
 +
! scope="row"| Start / Pause
 +
|| !rounds --start || Starts / Pauses RoundMaster functioning
 +
|-
 +
! scope="row"| Start Melee
 +
|| !rounds --clearonround on<br>--clear || Causes the Turn Order to automatically clear at the end of each round (once all actions have completed) ready for Players to select actions for their Characters
 +
|-
 +
! scope="row| Stop Melee
 +
|| !rounds --clearonround off || Stops the Turn Order from automatically clearing at the end of each round, so that the Turn Order is preserved.  Can be useful when just wanting to cycle around a list of Characters selected in the !init –init menu command and running ‘Standard’ initiative.
 +
|-
 +
! scope="row"| Re-start
 +
|| !rounds --sort || Re-sorts the current Turn Order, effectively re-starting the round.  Useful if the DM accidentally starts the next round by moving the Turn Order on before all Players have completed their initiative actions – allow new actions to be selected and then use Re-start
 +
|-
 +
! scope="row"| Set Round Number
 +
|| !rounds --reset # || Sets the current Round number to #.  If # is larger than the current round, all token status counters will advance by the number of rounds difference, ending if they reach 0 with the consequential Effects triggered
 +
|-
 +
! scope="row"| Clear Turn Order
 +
|| !rounds --clear || Clears the Turn Order of all entries (except the round number)
 +
|-
 +
! scope="row"| Remove Tokens from Tracker
 +
|| !rounds --removefromtracker || Removes all the selected tokens from the Turn Order and the Tracker window.  Multiple tokens can be selected and removed all at the same time.
 +
|-
 +
! scope="row"| Edit Selected Tokens
 +
|| !rounds --edit || Displays the status markers on all the selected tokens, and offers options to edit or delete them.  The “spanner” icon edits the status, and the “bin” icon deletes it.
 +
|-
 +
! scope="row"| Move Token Status
 +
|| !rounds --moveStatus || For each of the selected tokens in turn, searches for tokens in the whole campaign with the same name and representing the same character sheet, and moves all existing statuses and markers from all the found tokens to the selected token (removing any duplicates).  This supports Players moving from one Roll20 map to another and, indeed, roundMaster detects page changes and automatically runs this command for all tokens on the new page controlled by the Players who have moved to the new page.
 +
|-
 +
! scope="row"| Clean Selected Tokens
 +
|| !rounds --clean || Drops all status markers from the selected token, whether they have associated effects or time left, or are just manually applied markers.  Useful when there might have been corruption, or everyone is just confused!  The token statuses still exist, and associated markers will be correctly rebuilt at the start of the next round or the next trigger event (but not manually added ones).
 +
|-
 +
! scope="row"| Enable Long Rest for PCs
 +
|| !init –end-of-day <cost> || Run the normal initMaster end-of-day command
 +
|-
 +
! scope="row"| Enable Long Rest for selected tokens
 +
|| !init –enable-rest || Enable a long rest only for the characters / NPCs / creatures represented by the selected tokens.  See the MagicMaster API documentation for information on Long Rests
 +
|-
 +
! scope="row"| Set Date
 +
|| || Currently not implemented – future expansion
 +
|-
 +
! scope="row"| Set Campaign
 +
|| || Currently not implemented – future expansion
 +
|-
 +
! scope="row"| Update Selected Tokens
 +
|| !cmd --abilities || Use the CommandMaster API function to setup and maintain Character ability action buttons, weapon proficiencies, spell books & granted powers, saving throws, token “bar & circle” assignment etc.  See CommandMaster API documentation on the –abilities command.
 +
|-
 +
! scope="row"| Emergency Stop!
 +
|| !rounds --stop || After confirmation, performs a Full Stop and re-start of the RoundMaster API, dropping all internal tables of statuses & effects, token markers, timers etc.  Use with care!
 +
|}
 +
===Display those characters that have not yet had initiative actions selected===
 +
<pre>--check-tracker</pre>
 +
DM Only command.  Does not take any parameters.<br>
 +
Uses the Player Character name list created & maintained in the –init menu or with the –list-pcs command, and checks that all of the Character’s named have completed initiative selection to the point where their token name is in the Turn Order at least once, and appears in the Tracker window.  Names those that have not in a message to the DM, or states that initiative is complete.<br>
 +
 
 +
===Change the list of characters in the Party===
 +
<pre>--list-pcs < ALL / MAP / REPLACE / ADD ></pre>
 +
DM Only command.  Takes a specifier for the tokens to have in the Player Character list which must be one of those listed.<br>
 +
Updates the internally held list of Characters that are controlled by Players (and others that the DM can add at will).  This list is displayed on the --init menu, and is used by --check-tracker and --end-of-day commands.  The list persists between sessions of game-play.  The following parameters have the following effects:<br>
 +
{| class="wikitable"
 +
|+
 +
|-
 +
! scope="row"| all:
 +
|| looks across all tokens in the campaign and creates a new list composed of those representing Character Sheets controlled by a Player (standard Roll20 Character Sheet functionality – refer to the Help Centre for information on setting Players to control Character Sheets and their tokens).
 +
|-
 +
! scope="row"| map:
 +
|| creates a new list that only has Characters represented by tokens on the current Player map that are controlled by Players.  (See Roll20 Help Centre on how to select the current Player map).
 +
|-
 +
! scope="row"| replace:
 +
|| creates a new list including all the currently selected token(s) (whomever controls them), and no others.
 +
|-
 +
! scope="row"| add:
 +
|| adds the currently selected token(s) (whomever controls them) to the existing list leaving all the others unchanged.
 +
|}
 +
 
 +
==End of Day processing==
 +
<pre>--end-of-day [ASK/ASKTOREST/OVERNIGHT/REST/SET/FOES]|[=][cost]</pre>
 +
DM Only command.  Takes an optional type of rest (which, if provided, must be one of those shown – defaults to ASK) and an optional cost parameter, optionally preceded by an ‘=’ character.  If cost is not provided, it defaults to that previously set with SET and/or ‘=’.<br>
 +
This command performs the ‘End-of-Day’ processing for the campaign.  This consists of enabling Long Rests for all Characters / NPCs / creatures to regain their spells and powers, and for recharging Magic Items to regain their charges (see MagicMaster API documentation for information on Long Rests).  It also removes spent ammunition from quivers that has not been recovered, as it is assumed to be lost, broken or taken by other creatures during the period of the night (see AttackMaster API documentation about recovery of ammunition and its loss over a Long Rest).<br>
 +
Each day can cost or earn the members of the Party money, perhaps depending on where they stay overnight, whether they eat just camp rations or lavish meals, use an Inn and drink too much, or earn money doing a job.  The optional cost parameter can be set to a positive cost to the party which will be deducted from every member, or a negative quantity which will be earned (a negative cost).<br>
 +
{| class="wikitable"
 +
|+
 +
|-
 +
! scope="row"| ASK:
 +
|| If no rest type is supplied, or ASK is used, the DM is asked to confirm if they wish the cost to be deducted from/earned by all the Characters listed.  If No is selected, nothing is deducted or earned.  The system then sets flags to allow Players to perform a Rest command on their characters (see MagicMaster API).
 +
|-
 +
! scope="row"| ASKTOREST:
 +
|| Asks the DM to confirm the cost/earnings in the same way as ASK, but then automatically performs the MagicMaster API –rest command for each character in the party, and the Players do not need to do so.
 +
|-
 +
! scope="row"| OVERNIGHT:
 +
|| Applies the cost to the Party members and enables them to rest (they have to do the rest themselves).  If cost (or the previously set default cost) is not a number (e.g. a Roll Query), asks if a charge is to be made.
 +
|-
 +
! scope="row"| REST:
 +
|| Does the same as OVERNIGHT, but automatically runs the MagicMaster API –rest command for all characters in the party, and the Players do not need to do so.
 +
FOES: Does the same as OVERNIGHT, but for all NPCs and Monsters, allowing them to rest.
 +
|-
 +
! scope="row"| SET:
 +
|| If the rest type is SET and/or there is an ‘=’ before the cost, will not run the ‘End-of-Day’, but instead will set the standard cost for each night if no cost parameter is given when other commands are used.  If the ‘=’ is followed by a Roll Query (see Roll20 Help Centre for information on Roll Queries), the Roll Query will be run each time the –end-of-day command is run without a cost parameter, allowing (for instance) the DM to select from a list of possible daily costs or earnings.  However, remember to replace the ‘?’ at the start of the Roll Query with &#63; so that the Roll Query does not run when it is passed in to be set.  Other characters can be substituted as follows:
 +
|}
 +
{| class="wikitable"
 +
|+
 +
|-
 +
! Character !! ? !! [ !! ] !! < !! > !! @ !! - !! | !! : !! & !! { !! }
 +
|-
 +
! scope="row"| Substitute
 +
|| ^ || << || >> ||  ||  || ` || ~ || ¦ ||  || &amp; || &#123; || &#125;
 +
|-
 +
! scope="row"| Alternative (no ; )
 +
|| \ques || \lbrak || \rbrak || \lt || \gt || \at || \dash || \vbar || \clon || \amp || \lbrc || \rbrc
 +
|}
 +
 
 +
==Other Commands==
 +
===Display help on these commands===
 +
<pre>--help</pre>
 +
This command does not take any arguments.  It displays a very short version of this document, showing the mandatory and optional arguments, and a brief description of each command.<br>
 +
 
 +
===Handshake with other APIs===
 
<pre>!rounds –hsq from|[command]
 
<pre>!rounds –hsq from|[command]
 
!rounds –handshake from|[command]</pre>
 
!rounds –handshake from|[command]</pre>
Either form performs a handshake with another API, whose call (without the ‘!’) is specified as from in the command parameters.  The command calls the from API command responding with its own command to confirm that RoundMaster is loaded and running: e.g.  
+
Either form performs a handshake with another API, whose call (without the ‘!’) is specified as from in the command parameters (the response is always an –hsr command).  The command calls the from API command responding with its own command to confirm that RoundMaster is loaded and running: e.g. <br>
Received: !rounds –hsq magic
+
'''Received:''' !init –hsq magic<br>
Response: !magic –hsr rounds
+
'''Response:''' !magic –hsr init<br>
Optionally, a command query can be made to see if the command is supported by RoundMaster if the command string parameter is added, where command is the RoundMaster command (the ‘--’ text without the ‘--‘).  This will respond with a true/false response: e.g.
+
Which means the MagicMaster API has requested a handshake with InitiativeMaster to see if it is loaded, and InitiativeMaster has responded, proving it is running and taking commands.<br>
Received: !rounds –hsq init|addtotraker
+
Optionally, a command query can be made to see if the command is supported by RoundMaster if the command string parameter is added, where command is the RoundMaster command (the ‘--’ text without the ‘--‘).  This will respond with a true/false response: e.g.<br>
Response: !init –hsr rounds|addtotracker|true
+
'''Received:''' !init –handshake attk|monster<br>
<pre>!rounds --debug (ON/OFF)</pre>
+
'''Response:''' !attk –hsr init|monster|true<br>
Takes one mandatory argument which should be ON or OFF.
+
Which means AttackMaster has queried if InitiativeMaster has a command called --monster, and InitiativeMaster has responded in the affirmative.<br>
The command turns on a verbose diagnostic mode for the API which will trace what commands are being processed, including internal commands, what attributes are being set and changed, and more detail about any errors that are occurring.  The command can be used by the DM or any Player – so the DM or a technical advisor can play as a Player and see the debugging messages.
+
 
 +
===Switch on or off Debug mode===
 +
<pre>--debug (ON/OFF)</pre>
 +
Takes one mandatory argument which should be ON or OFF.<br>
 +
The command turns on a verbose diagnostic mode for the API which will trace what commands are being processed, including internal commands, what attributes are being set and changed, and more detail about any errors that are occurring.  The command can be used by the DM or any Player – so the DM or a technical advisor can play as a Player and see the debugging messages.<br>
 +
 
 +
=Configuring the Token and Character Sheet for use with the API=
 +
==Token configuration==
 +
The API can work with any Token configuration but requires tokens that are going to participate in initiative actions for ‘Group’ and ‘Individual’ initiative to represent a Character Sheet, so that actions relevant to the token can be selected.<br>
 +
A single Character Sheet can have multiple Tokens representing it, and each of these are able to do individual initiative using the actions made possible by the data on the Character Sheet jointly represented.  However, if such multi-token Characters / NPCs / creatures are likely to encounter spells that will affect the Character Sheet (such as Haste and Slow) they must be split with each Token representing a separate Character Sheet, or else the one spell will affect all tokens associated with the Character Sheet, whether they were targeted or not!  In fact, it is recommended that tokens and character sheets are 1-to-1 to keep things simple.<br>
 +
The recommended Token Bar assignments for all APIs in the Master Series are:<br>
 +
{| class="wikitable"
 +
|+
 +
|-
 +
! scope="row"| Bar1 (Green Circle):
 +
|| Armour Class (AC field) – only current value
 +
|-
 +
! scope="row"| Bar2 (Blue Circle):
 +
|| Base Thac0 (thac0-base field) before adjustments – only current value
 +
|-
 +
! scope="row"| Bar3 (Red Circle):
 +
|| Hit Points (HP field) – current & max
 +
|}
 +
It is recommended to use these assignments, and they are the bar assignments set by the CommandMaster API if its facilities are used to set up the tokens.  All tokens must be set the same way, whatever way you eventually choose.<br>
 +
These assignments can be changed in each API, by changing the fields object near the top of the API script (note: no underscore, and ‘bar#’ and ‘value’ or ‘max’ are separate entries in an array of 2 elements).  All APIs must use the same field definitions:<br>
 +
{| class="wikitable"
 +
|+
 +
|-
 +
! scope="row"| fields.Token_AC:
 +
|| defines the token field for the AC value (normally [‘bar1’,’value’])
 +
|-
 +
! scope="row"| fields.Token_MaxAC:
 +
|| defines the token field for the AC max (normally [‘bar1’,’max’])
 +
|-
 +
! scope="row"| fields.Token_Thac0:
 +
|| defines the token field for the Thac0 value (normally [‘bar2’,’value’])
 +
|-
 +
! scope="row"| fields.Token_MaxThac0:
 +
|| defines the token field for the Thac0 max (normally [‘bar2’,’max’])
 +
|-
 +
! scope="row"| fields.Token_HP:
 +
|| defines the token field for the HP value (normally [‘bar3’,’value’])
 +
|-
 +
! scope="row"| fields.Token_MaxHP:
 +
|| defines the token field for the HP max (normally [‘bar3’,’max’])
 +
|}
 +
Alter the bar numbers appropriately or, if you are not wanting one or more of these assigned: leave the two elements of the array as [‘’,’’].  The system will generally work fine with reassignment or no assignment, but not always.  Specifically, some effects in the Effects-DB, which implement spell effects on Character Sheets and Tokens, may not set the right values if no assignment of one or more of HP, AC & Thac0 are made to the Token.<br>
 +
 
 +
==Use with various game system character sheets==
 +
The API issued is initially set up to work with the AD&D 2E character sheet (as this is what the author mostly plays).  However, it can be set up for any character sheet.  In each API script, right at the top, is an object definition called ‘fields’: see 7.2 for details.  This can be altered to get the API to work with other character sheets. 
 +
The coding of the API is designed to use the AD&D 2E system of initiative systems and calculations.  If you use another system (e.g. the D&D 5e system) the API coding will need to change.  This might be a future enhancement.<br>
 +
 
 +
==Matching the API to a type of Character Sheet==
 +
The API has an object definition called ‘fields’, which contains items of the form<br>
 +
''Internal_api_name: [sheet_field_name, field_attribute, optional_default_value, optional_set_with_worker_flag]''<br>
 +
A typical example might be:<br>
 +
<pre> Fighter_level:['level-class1','current'],
 +
Or
 +
MUSpellNo_memable:['spell-level-castable','current','',true],</pre>
 +
Table names are slightly different: always have an internal_api_name ending in ‘_table’ and their definition specifies the repeating table name and the index of the starting row of the table or -1 for a static field as the 1st row, with the 2nd row starting at repeating row number 0.<br>
 +
''Internal_api_table: [sheet_repeating_table_name,starting_index]''<br>
 +
An example is:<br>
 +
<pre>MW_table:['repeating_weapons',0],</pre>
 +
<u>'''The internal_api_name must not be altered!'''</u> Doing so will cause the system not to work.  However, the sheet_repeating_table_name and starting_index can be altered to match any character sheet.<br>
 +
Each character sheet must have repeating tables to hold weapons, ammo and magic items.  By default, melee weapons ‘in hand’ are held in sections of the repeating_weapons table, melee weapon damage in the repeating_weapons-damage table, ranged weapons in the repeating_weapons2 table, ammo in the repeating_ammo table, and magic items are held in the repeating_potions table.  Other repeating tables are also used, some of which are intended to be hidden and not visible in the Character Sheet.  The table management system provided by the API creates, expands and writes to repeating attributes automatically, and the DM & Players do not need to worry about altering or updating any of these tables on the Character Sheet.<br>
 +
 
 +
==Character Attributes, Races, Classes and Levels==
 +
Character Attributes of Strength, Dexterity, Constitution, Intelligence, Wisdom and Charisma are not directly important to the Initiative Master API, but the resulting bonuses and penalties are.  All Attributes and resulting modifiers should be entered into the Character Sheet in the appropriate places (that is in the Character Sheet fields identified in the ‘fields’ API object as noted in section 7.2 above).<br>
 +
The Character’s race is also important for calculating saves and ability to use certain items.  The race should be set in the appropriate Character Sheet field.  Currently, the races ‘dwarf’, ‘elf’, ‘gnome’, ‘halfelf’, ‘halfling’, ‘half-orc’, and ‘human’ are implemented (not case sensitive, and spaces, hyphens and underscores are ignored).  If not specified, human is assumed.  The race impacts saves, some magic items and armour, and bonuses on some attacks.<br>
 +
The system supports single-class and multi-class characters.  Classes must be entered in the appropriate fields on the Character Sheet.  Classes and levels affect spell casting ability, weapon multiple attack numbers per round, ability to do two-weapon attacks with or without penalty, and the ability to backstab and the related modifiers among other things.  Class and level also determine valid armour, shields, some magic items and saves.<br>
 +
Note: on the Advanced D&D 2e Character Sheet, Fighter classes must be in the first class column, Wizard classes in the second column, Priest classes in the third, Rogues in the fourth, and Psions (or any others) in the fifth.  It is important that these locations are adhered to.<br>
 +
Note: classes of Fighter and Rogue (such as Rangers and Bards) that can use clerical &/or wizard spells will automatically be allowed to cast spells once they reach the appropriate level by AD&D 2e rules, but not before.<br>
 +
The following Classes are currently supported:<br>
 +
{| class="wikitable"
 +
|+
 +
|-
 +
! Fighter classes !! Wizard Classes !! Priest Classes !! Rogue Classes
 +
|-
 +
| Warrior || Wizard || Priest || Rogue
 +
|-
 +
| Fighter || Mage || Cleric || Thief
 +
|-
 +
| Ranger || Abjurer || Druid || Bard
 +
|-
 +
| Paladin || Conjurer || Healer || Assassin
 +
|-
 +
| Beastmaster || Diviner || Priest of Life ||
 +
|-
 +
| Barbarian || Enchanter || Priest of War ||
 +
|-
 +
| Defender (Dwarven) || Illusionist || Priest of Light ||
 +
|-
 +
| || Invoker || Priest of Knowledge ||
 +
|-
 +
| || Necromancer || Shaman ||
 +
|-
 +
| || Transmuter || ||
 +
|}
 +
The level for each class must be entered in the corresponding field.  Multiple classes and levels can be entered, and will be dealt with accordingly.  Generally, the most beneficial outcome for any combination will be used.<br>
  
=How to use RoundMaster=
+
==Spells and Powers==
==Who uses RoundMaster calls?==
+
The best (and easiest) way to give a Character or NPC spells and powers is to use the MagicMaster API.  However, for the purposes of just doing initiative and selecting which spell to cast in the round, the spells and powers can be entered manually onto the character sheetSpells are held in the relevant section of the Spells table, which by default is set to the character sheet spells table, repeating_spells. As with other fields, this can be changed in the ‘fields’ object. Note that on the Advanced D&D 2e character sheet Wizard spells, Priest spells & Powers are all stored in various parts of this one very large table.<br>
The vast majority of RoundMaster calls are designed for the DM/GM to use, or to be called from RPGMaster APIs and database macros, rather than being called by the Player directly.  RoundMaster should be hidden from the Players in most circumstances.  It is highly recommended that RoundMaster is used with the other RPGMaster APIs, but especially InitiativeMaster API which uses RoundMaster to create and manage entries in the Roll20 Turn Order Tracker.
+
If you are just using the character sheet fields to type into, add spells (or powers) to the relevant “Spells Memorised” section (using the [+Add] buttons to add more as required) a complete row at a time (that is add columns before starting the next row).  Enter the spell names into the “Spell Name” field, and “1” into each of the “current” & “maximum” “Cast Today” fields – the API suite counts down to zero on using a spell, so in order for a spell to appear as available (not greyed out) on the initiative menus, the “current” number left must be > 0. This makes spells consistent with other tables in the system (e.g. potion dose quantities also count down as they are consumed, etc).<br>
==Managing the Turn Order Tracker==
+
Then, you need to set the “Spell Slots” values on each level of spell to be correct for the level of caster.  Just enter numbers into each of the “Level”, “Misc.” and “Wisdom” (for Priests) fields, and/or tick “Specialist” for the Wizard levels as relevantThis will determine the maximum number of spells memorised each day, that will appear in the spells Initiative Menu.  Do the same for Powers using the “Powers Available” field.  As with other fields on the character sheet, each of these fields can be re-mapped by altering the ‘fields’ object in the APIs.<br>
If the InitiativeMaster API is used, it must be accompanied by RoundMaster – it will not work otherwiseInitiativeMaster provides many menu-driven and data-driven means of controlling RoundMaster, making it far easier for the DM to run their campaign.  The InitiativeMaster --maint command supports the necessary calls to RoundMaster for control of the Turn Order Tracker, and its --menu command uses the data on the Character Sheet to create Turn Order initiative entries with the correct speeds and adjustments.  See the InitiativeMaster API Handout for more information.
+
==Adding and managing Token Statuses==
+
The Token status management functions allow the application and management of status markers with durations in rounds passed to tokens.  The easiest way to use status markers is to use the MagicMaster API which runs spell and magic item macros the Player can initiate, which in turn ally the right status markers and statuses with the appropriate durations to the relevant tokensSee the MagicMaster API handout for more information.
+
==Status Effects==
+
RoundMaster comes with a number of status ‘effects’: Roll20 Ability Macros that are automatically run when certain matching statuses are applied to, exist on, and/or removed from a token.  These macros can use commands (typically using APIs like ChatSetAttr API and/or Tokenmod API from the Roll20 API Script Library) to temporarily or permanently alter the characteristics of the Token or the represented Character Sheet, thus impacting the state of play.
+
If used with the MagicMaster API, its pre-configured databases of spell and magic item macros work well with the Effect macros provided in the Effects Database provided with this API.
+
For full information on Status Effects, how to use them, and how to add more of your own, see the separate Effects Database handout.
+
==Token Death and Removal==
+
If a token is marked as Dead by using the Dead status marker (either via the Roll20 token emoticon menu or any other means), the system will automatically end all statuses, remove all status markers and run all status-end effect macros (if any) for the token.
+
If a token is deleted on a map and not previously marked as Dead, the API will search for any other token in the Campaign (with a preference to one on the current page) with the same name and representing the same character, and if found the API will transfer all statuses and status markers to the first token found (even if not on the current page).  If no such token is found, all statuses and status markers are removed from the token being deleted, and any corresponding status-end effect macros are run.
+
==Page Change and Adding Tokens==
+
If a Player, or all Players, are moved to another Roll20 page in the campaign (i.e. a different map), the API will automatically migrate all current statuses and status markers from the previous page (and all other pages in the Campaign, to support where tokens have come from different pages) to any token on the new page with the same Token Name and representing the same CharacterThese statuses and their effects will then continue to apply on the new page for their set durations.
+
If a token is added to the current map the Players are on, either by dragging a character onto the map or by dragging on a picture and editing its properties to give it a name and optionally a representation, the API will again search for tokens with the same name and representing the same character, and move statuses and markers to the new token.
+
Of course, either before or after each of these situations, the --edit command can be used to change or remove statuses from any token(s).
+
  
=Effect Database for RoundMaster API=
+
==Magic Items and Equipment==
Effect-DB is a database character sheet created, used and updated by the RoundMaster API.  The database holds macros as Ability Macros that are run when certain matching statuses are placed on or removed from tokens (see Roll20 Help Centre for information on Ability Macros and Character Sheet maintenance).  The macros have certain defined parameters dynamically replaced when run by RoundMaster, providing the token & character IDs and names, and values such as AC, HP and Thac0, available for manipulation.
+
All magic items and standard equipment, including weapons, armour, lanterns etc, are held in the Items table, which by default is set to the potions table, repeating_potions, on the Character Sheet.  As with other fields, this can be changed in the ‘fields’ object.  The best way to put items into this table is by using the MagicMaster API.  However, it generally is possible to enter item names and quantities directly into the table and use them within the systemOnly items that also exist in the supplied databases will actually work fully with the API (i.e. be recognised by the API as weapons, armour, ammo, etc).  Initial weapon, ammunition and armour databases are provided with the AttackMaster API, and in addition to these Initial magic item, spell and power databases are provided with the MagicMaster API.  Other items can be in the table and used for undertaking initiative actions but will not otherwise be effectiveNew databases and database items can be added using the specifications and instructions contained in the AttackMaster and MagicMaster API documentation.<br>
Important Note: all Character Sheet databases must have their ‘ControlledBy’ value (found under the [Edit] button at the top right of each sheet) set to ‘All Players’.  This must be for all databases, both those provided (set by the API) and any user-defined ones.  Otherwise, Players will not be able to run the macros contained in them.
+
==Weapons and Ammo==
Effect macros are primarily intended to act on the Token and its variables, but can also act on the represented Character Sheet.  A single Character Sheet can have multiple Tokens representing it, and each of these are able to do individual actions using the data on the Character Sheet jointly representedHowever, if such multi-token Characters / NPCs / creatures are likely to encounter effects that will affect the Character Sheet they must be split with each Token representing a separate Character Sheet, or else the one effect will affect all tokens associated with the Character Sheet, whether they were targeted or not!  In fact, it is recommended that tokens and character sheets are 1-to-1 to keep things simple.
+
For the InitiativeMaster API to support weapon attack actions melee weapons, damage, ranged weapons and ammo must be entered directly into the melee weapon, damage, ranged weapon and ammo tables on the Character SheetThis is best done using the AttackMaster API, which will ensure all the right values are entered in the right fields, including taking into account the impact of weapon proficiencies, specialisation, mastery, character races and class/levelHowever, manual entry will generally work to the extent to allow weapon attack initiative actions to be selected. Weapon name, speed and number of attacks are the most important fields for initiative.<br>
==Setting up a token for use with effects==
+
<br>
The recommended Token Bar assignments for all APIs in the Master Series are:
+
=Character Sheet data fields =
<table>
+
As stated in section 7, the Character Sheet field mapping to the API script can be altered using the definition of the fields objectYou can find the complete mapping for all APIs in the RPGMaster series, with an explanation of each, in a separate document.
<tr><td><b>Bar1 (Green Circle):</b></td><td>Armour Class (AC field) – only current value</td></tr>
+
<tr><td><b>Bar2 (Blue Circle):</b></td><td>Base Thac0 (thac0-base field) before adjustments – only current value</td></tr>
+
<tr><td><b>Bar3 (Red Circle):</b></td><td>Hit Points (HP field) – current & max</td></tr>
+
</table>
+
It is recommended to use these assignments, and they are the bar assignments set by the CommandMaster API if its facilities are used to set up the tokens.  All tokens must be set the same way, whatever way you eventually choose.
+
These assignments can be changed in each API, by changing the fields object near the top of the API scriptSee individual API documentation for details of how to do this.
+
==Adding, deleting and changing status effect macros==
+
If you wish to add your own status effect macros, these '''must''' be added to a different database with the ''root-name'' of "Effect-DB-": for example "Effect-DB-Additions".  The provided database will be overwritten each time a new release is made, so best to not touch it.  However, do look at it for examples.
+
You can ''amend'' an existing macro by making a copy of it in your own database, altering it there, and deleting it from the Effects-DB databaseIf the system finds your copy when updating the supplied database it will not recreate it so yours will still work.
+
If you want to totally remove a status effect macro, you can only do this by creating a ''blank'' version in your own database - that is a macro with the same name, but an empty macro definition. As above for amending, delete the original from the supplied Effects-DB and the ''blank'' one will then be used if called, doing nothing.
+
==Macro Parameter Fields==
+
Dynamic parameters are identified in the macros by bracketing them with two carets: ^^parameter^^.  The standard Roll20 syntax of @{selected|…} is not available, as at the time the macros run the targeted token may not be selected, and @{character_name|…} will not enable the token to be affected (especially where the Character Sheet is represented by more than one token).  The ^^…^^ parameters always relate to the token on which a status has been set, and the Character Sheet it represents.  Currently available parameters are:
+
<table>
+
<tr><td>^^tid^^</td><td>TokenID</td></tr>
+
<tr><td>^^tname^^</td><td>Token_name</td></tr>
+
<tr><td>^^cid^^</td><td>CharacterID</td></tr>
+
<tr><td>^^cname^^</td><td>Character_name</td></tr>
+
<tr></tr>
+
<tr><td>^^ac^^</td><td>Armour Class value (order looked for: a token bar, Character Sheet AC field, MonsterAC)</td></tr>
+
<tr><td>^^ac_max^^</td><td>Maximum value of AC, wherever it is found</td></tr>
+
<tr><td>^^token_ac^^</td><td>The token field name for AC value field, if set as a token bar</td></tr>
+
<tr><td>^^token_ac_max^^</td><td>The token field name for AC max field, if set as a token bar</td></tr>
+
<tr></tr>
+
<tr><td>^^thac0^^</td><td>Thac0 value (order looking: a token bar, Character Sheet Thac0_base field, MonsterThac0)</td></tr>
+
<tr><td>^^thac0_max^^</td><td>Maximum value of Thac0, wherever it is found</td></tr>
+
<tr><td>^^token_thac0^^</td><td>The token field name for Thac0 value field, if set as a token bar</td></tr>
+
<tr><td>^^token_thac0_max^^</td><td>The token field name for Thac0 max field, if set as a token bar</td></tr>
+
<tr></tr>
+
<tr><td>^^hp^^</td><td>HP value (order looked for: a token bar, Character Sheet HP field)</td></tr>
+
<tr><td>^^hp_max^^</td><td>Maximum value of HP, wherever it is found</td></tr>
+
<tr><td>^^token_hp^^</td><td>The token field name for HP value field, if set as a token bar</td></tr>
+
<tr><td>^^token_hp_max^^</td><td>The token field name for HP max field, if set as a token bar</td></tr>
+
<tr></tr>
+
<tr><td>^^bar1_current^^</td><td>Value of the token Bar1_value field</td></tr>
+
<tr><td>^^bar2_current^^</td><td>Value of the token Bar2_value field</td></tr>
+
<tr><td>^^bar3_current^^</td><td>Value of the token Bar3_value field</td></tr>
+
</table>
+
This allows most data on both the token and the character sheet to be accessedFor example @{^^cname^^|strength} will return the strength value from the represented character sheet.  Of course all loaded RPGMaster series API commands are available.
+
Two other APIs from the Roll20 Script Library are extremely useful for these macros, and indeed are used by many of the provided APIs: ChatSetAttr API from joesinghaus allows easy and flexible setting of Character Sheet attributes.  Tokenmod API from The Aaron supports easy setting and modifying of Token attributes.  Combined with the dynamic parameters above, these make for exceptionally powerful real-time effects in game-play.
+
==Effect Macro qualifiers==
+
Each effect macro runs when a particular status event occurs.  Here is the complete list of effect macro status name qualifiers that can be used.  Each of these is appended to the status whenever the status experiences the relevant event, and an effect macro with that name searched for and run if found:
+
<table>
+
<tr><td>statusname-start</td><td>The status is created on a token</td></tr>
+
<tr><td>statusname-turn</td><td>Each round the status has a duration that is not zero</td></tr>
+
<tr><td>statusname-end</td><td>The status duration reaches zero</td></tr>
+
</table>
+
These effect macros are triggered for weapons when certain events take place:
+
<table>
+
<tr><td>weaponname-inhand</td><td>A weapon is taken in-hand (triggered by AttackMaster API --weapon command)</td></tr>
+
<tr><td>weaponname-dancing</td><td>A weapon starts dancing (triggered by AttackMaster API --dance command)</td></tr>
+
<tr><td>weaponname-sheathed</td><td>A weapon  is sheathed (out of hand - triggered by AttackMaster --weapon cmd)</td></tr>
+
</table>
+
==Examples of Effect Macros==
+
Here is an example of an effect macro that runs when a Faerie fire (twilight form) status is placed on a tokenThe following --target command might be run to set this status, with the caster token selected:
+
<pre>!rounds --target area|@{selected|token_id}|&{target|Select first target|token_id}|Faerie-Fire-twilight|[[4*@{selected|Casting-Level}]]|-1|Outlined in dim Faerie Fire, 1 penalty to AC|aura</pre>
+
This will result in the following effect macro being run when the first token is targeted:<br>
+
<br>'''Faerie-fire-twilight-start'''
+
<pre>!token-mod --ignore-selected --ids ^^tid^^ --set ^^token_ac^^|+1
+
^^tname^^ is surrounded by Faerie Fire, and becomes easier to hit</pre>
+
This uses the Tokenmod API to increase the AC number of the targeted token by 1 (making it 1 worse), and then display a message to all Players stating the name of the targeted token, and the effect on itThis will be run for each token targeted, and will be individual to each. Note: the tokens are not ‘selected’ in Roll20 terms, and so @{selected|…} will not work
+
When the Faerie Fire status counts down to zero, the following effect macro will be run on each of the tokens it was applied to:<br>
+
<br>'''Faerie-fire-twilight-end'''
+
<pre>!token-mod --ignore-selected --ids ^^tid^^ --set ^^token_ac^^|-1
+
^^tname^^ has lost that glow and is now harder to aim at</pre>
+
Again, the Tokenmod API is used to decrease the token AC and a message issued confirming what has happened.  If messages should only be sent to the Player(s) controlling the character represented by the token, use /w “^^cname^^” before the message.  If the message is only for the gm, use /w gm.
+
A more complex example is a Quarterstaff of Dancing, that uses the complete suite of possible effect macros and certain aspects of the AttackMaster API functionality triggered by Weapon table field settingsThe first macro is triggered by AttackMaster API when a Character takes a Quarterstaff-of-Dancing in hand to use as a weapon:<br>
+
<br>'''Quarterstaff-of-Dancing-inhand'''
+
<pre>!rounds --addtargetstatus ^^tid^^|Quarterstaff-of-Dancing|4|-1|Quarterstaff not yet dancing so keep using it|stopwatch</pre>
+
This command sets a status marker on the Token of the Character taking the Quarterstaff in hand, and sets a countdown of 4 rounds, running the next effect macro in each of those rounds:<br>
+
<br>'''Quarterstaff-of-Dancing-turn'''
+
<pre>!attk --quiet-modweap ^^tid^^|quarterstaff-of-dancing|melee|+:+1 --quiet-modweap ^^tid^^|quarterstaff-of-dancing|dmg|+:+1
+
/w “^^cname^^” Updating the quarterstaff +1 to attk & dmg</pre>
+
This command then runs each round as the Quarterstaff-of-Dancing status counts down, and uses the !attk --quiet-modweap command to gradually increment the magical to-hit and dmg plus, round by roundOnce the countdown reaches zero, the next effect macro is run:<br>
+
<br>'''Quarterstaff-of-Dancing-end'''
+
<pre>!attk --dance ^^tid^^|Quarterstaff-of-Dancing</pre>
+
This calls an AttackMaster API command to start the weapon dancing, resets the weapon to its specs that it starts dancing with, and calls the next effect macro:<br>
+
<br>'''Quarterstaff-of-Dancing-dancing'''
+
<pre>!rounds --addtargetstatus ^^tid^^|Dancing-Quarterstaff|4|-1|The Quarterstaff is Dancing by itself. Use this time wisely!|all-for-one
+
!attk --quiet-modweap ^^tid^^|quarterstaff-of-dancing|melee|sb:0 --quiet-modweap ^^tid^^|quarterstaff-of-dancing|dmg|sb:0</pre>
+
This places a new status marker on the token representing the Character with the dancing weapon (note the new status name Dancing-Quarterstaff), and resets the Strength Bonus flags for the weapon - a dancing weapon can’t have the Strength Bonus of the wielder. As each round now passes, the following different status effect macro is run:<br>
+
<br>'''Dancing-Quarterstaff-turn'''
+
<pre>!attk --quiet-modweap ^^tid^^|quarterstaff-of-dancing|melee|+:+1 --quiet-modweap ^^tid^^|quarterstaff-of-dancing|dmg|+:+1</pre>
+
As per the previous -turn effect macro, this increments the magical plusses on To-Hit and Dmg, round by round.  It has to have a different name, as the -end effect macro does different actions:<br>
+
<br>'''Dancing-Quarterstaff-end'''
+
<pre>!attk --dance ^^tid^^|Quarterstaff-of-Dancing|stop</pre>
+
This uses the AttackMaster API command to stop the Quarterstaff from dancingAs can be seen from the above, quite complex sequences of effect macros can be created.
+
  
 
= Changelog =
 
= Changelog =
{{changelog version|3.022|2021-11-24|* First release to the Roll20 community}}
+
{{changelog version|1.037|2021-12-24|* First version for public release}}
{{changelog version|3.001|2021-01-02|* Major release for multi-page support}}
+
{{changelog version|2.001|2020-10-31|* First stable version used in gaming}}
+
{{changelog version|1.201|2020-07-24|* Initial split from TrackerJacker}}
+

Revision as of 18:15, 3 December 2021

This API supports initiative for RPGs (initially only AD&D 2e) using the Turn Order and the Tracker window. The InitiativeMaster API provides functions dealing with all aspects of: managing how initiative is done; rolling for initiative; for “group” and “individual” initiative types providing Character action selection to determine the speed and number of attacks of weapons, the casting time of spells & the usage speed of magic items; supporting initiative for multiple attacks with one or multiple weapons per round; supporting and tracking actions that take multiple rounds; managing the resulting Turn Order; as well as performing the “End of Day” activity. It works very closely with the RoundMaster API to the extent that InitiativeMaster cannot work without RoundMaster (though the reverse is possible). InitiativeMaster also works closely with AttackMaster API and MagicMaster API and uses the data configured on the Character Sheet by these other APIs, although it can use manually completed Character Sheets once correctly configured.
This API is currently configured to only use the AD&D2e Character Sheet from Peter B. It uses the Roll Templates defined in that sheet extensively. It may be possible to use it with other character sheets if you follow the instructions in the Section on Character Sheet Data Fields and future development will focus on implementing more generic functionality.

API ScriptAuthor: Richard E
Version: 1.037
Last Modified: 2021-12-02
Code: InitMaster
Dependencies: RoundMaster
Conflicts: None

Contents

Syntax

The InitiativeMaster API is called using !init.

!init --help

Commands to be sent to the InitiativeMaster API must be preceeded by two hyphens ‘--’ as above for the --help command. Parameters to these commands are separated by vertical bars ‘|’, for example:

!init --init [party-roll]|[foes-roll]

If optional parameters are not to be included, but subsequent parameters are needed, use two vertical bars together with nothing between them, e.g.

!--init  |[foes-roll]

Commands can be stacked in the call, for example:

!init --doCharList  ALL  --init 

When specifying the commands in this document, parameters enclosed in square brackets [like this] are optional: the square brackets are not included when calling the command with an optional parameter, they are just for description purposes in this document. Parameters that can be one of a small number of options have those options listed, separated by forward slash ‘/’, meaning at least one of those listed must be provided (unless the parameter is also specified in [] as optional): again, the slash ‘/’ is not part of the command. Parameters in UPPERCASE are literal, and must be spelt as shown (though their case is actually irrelevant).

Installation and Configuration

Copy the script's code, available from the menu on the right and stored at Roll20's API GitHub 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. It will install several new Character Sheets & Handouts: The handout InitiativeMaster Help provides a full manual of how to use InitiativeMaster. The handout RPGMaster CharSheet Setup provides information on setting up a character sheet for use with InitiativeMaster.

Script Use

After installing the script, refer the the handout InitiativeMaster Help for full information on use. Below is a copy of the contents of that handout.

Command Index

All commands are preceded by !init unless otherwise stated.

Manage Initiative type, rolls & party

--init [party-roll]|[foes-roll]
--type < STANDARD / GROUP / INDIVIDUAL >

Show group / individual Initiative menus

--menu [token-id]
--monmenu [token-id]

Show action-specific Initiative menus

--weapon [token-id]
--monster [token-id]
--complex [token-id]
--muspell [token-id]
--prspell [token-id]
--power [token-id]
--mibag [token-id]
--thief [token-id]
--other [token-id]

Maintain the Turn Order and Rounds

--maint
--check-tracker
--list-pcs  ALL / MAP / REPLACE / ADD

End of Day processing

--end-of-day [cost]

Other commands

--help
--debug ON/OFF

Configuring the Token and Character Sheet for use

Character Sheet data fields



Command Details

Manage Initiative type, rolls & party

Manage the Initiative process

--init [party-roll]|[foes-roll]

DM Only command. Takes an optional dice roll result for the Party, and an optional dice roll result for the foes.
This command displays a chat menu to specify:

  • the type of initiative to do (standard, group or individual),
  • the initiative rolls for the Party and the Foes (for standard and group initiative),
  • who is in the Party,
  • to check if everyone has selected their action for the next round (for group and individual initiative),
  • and whether to show this menu automatically as each new round starts.

The different types of AD&D2e Initiative process are explained in the DMG p55, and consist of “standard”, “group”, and “initiative”:

Standard: the Party and the Foes (DM) each roll 1d10, and all of whichever gets the lowest roll goes first. The system supports taking the two rolls, and putting entries in the Turn Order for all defined Party members, and one entry for the Foes.
Group: the Party and the Foes (DM) each roll 1d10, and then all Party members and all Foes choose what actions they will perform during the next round. The speed/casting time of the Character’s / Foes selected action will then be added to the relevant roll to define the Character’s / Foes initiative(s) which are added to the Turn Order.
Individual: each individual Character & Foe chooses what action they will do each round, and the speed/casting time of that action is added to an individual system-rolled 1d10 for that Character / Foe resulting in each Character’s initiative(s) which are all added to the Turn Order.

The type of initiative selected persists between game sessions.
Who is in the party can be defined by using API Buttons on the menu to do one of: search all maps in the Campaign for tokens controlled by Players; search just the map the Players are on for tokens controlled by Players; select a number of tokens on any map and add them to the list; or replace the whole list with the selected tokens. Another API button checks to see if the Turn Order contains entries for every token listed as being in the Party, i.e. that everybody has selected their actions for the next round.
This menu can appear automatically as each completed round finishes if RoundMaster API is managing the Turn Order and Rounds. This is useful for standard and group initiative, as the first thing that needs to happen is for the Party & Foe initiative dice rolls to be entered. It is less useful for this menu to appear for individual initiative, and it can be turned off with another API Button.

Set the type of Initiative being used in the Campaign

--type < STANDARD / GROUP / INDIVIDUAL >

Takes a mandatory initiative type which must be one of those shown.
This command sets the initiative type to the specified type without bringing up the complete --init menu. The type of initiative specified persists between game sessions.

Show Group / Individual initiative action selection menus

Display a menu of possible actions for the selected Character / NPC

--menu [token-id]

Takes an optional token ID.
This command displays a chat menu of buttons for types of action that the Character / NPC / creature can perform. Each of these buttons may take the Player to a more detailed list of specific action buttons. Selecting any of the buttons will add the speed/casting time and correct number of instances of the selected action to the group or individual initiative dice roll (1d10) and enter the result in the Turn Order using the RoundMaster API – ‘individual’-type initiative dice rolls are performed in the background by the API and there is currently no option for the Player to do the roll instead.
The system displays immediately and also records the action selected and the speed of that action along with any modifiers as a message to display when the Character’s / NPCs / creature’s turn comes around. For each type of action, once chosen, the “rate” is displayed as the number of attacks per round multiplied by any magical modifier (such as a Haste spell). The “speed” is displayed as the speed of the action in segments (1/10ths of a round), and the “modifier” is the bonus or penalty to the roll for other magical effects (such as a Slow spell).
For multiple actions per round, those subsequent to the first action with the same item have speeds in the Turn Order incremented from each other by the speed of the action: thus multiple attacks with a Longbow (2 per round, speed 8), after an initiative roll of 5 on a 1d10, will happen at priority 13 & 21. For attacks by a Fighter with two weapons, such as a Longsword (sp 5) in their left hand and a Short sword (sp 3) in their right hand, after an initiative roll of 5, the Short sword will get a Turn Order priority of 8 and the Longsword 10 – that is they are consecutive not sequential.
See the individual menu explanations for more detail on each type of action.

Display a menu of possible actions for the selected creature

--monmenu [token-id]

Takes an optional token ID.
This produces a slightly simpler form of the initiative action menu for creatures. Otherwise, all actions result in similar processing as per the normal action selection. If the creature is very simple (only uses the simple attack lines on the Monster tab of the AD&D2e Character Sheet), then it might be sensible to use the --monster command instead: see below.

Action specific Initiative menus

Display initiative actions to attack with the weapons ‘in-hand’

--weapon [token-id]

Takes an optional token ID.
Displays a chat menu listing all the weapons that the Character / NPC / creature has ‘in-hand’ (i.e. that are currently in the Weapon and Ranged tables), with additional options as appropriate to the Character Sheet. Rogue class characters will get a ‘Backstab’ option which will apply the Rogue backstab multiplier as appropriate. Fighter & Rogue classes will get an option to choose two weapons (if there are two one-handed weapons in-hand) which presents the option of selecting a Primary and a Secondary weapon to do initiative for. Weapons can be those typed into the Character Sheet weapons tables (see Section 7 below) or loaded using AttackMaster API (see AttackMaster documentation).
If the Character / NPC / creature has Powers or Magic Items they can use, buttons also appear on the menu to go to the menus to select these instead of doing a weapon initiative – see the --power and --mibag commands. There is also a button for ‘Other’ actions, such as Moving, Changing Weapon (which takes a round), doing nothing, or Player-specified actions – see the --other command.

Display initiative actions for a simple creature to attack

--monster [token-id]

Takes an optional token ID.
Displays a chat menu only listing innate monster attacks from the Monster tab of the AD&D2e Character Sheet.
Creatures using the Innate Monster Attack fields on the AD&D2e Character Sheet Monster tab benefit from an extended syntax for entries in these fields: each field can take [<Attack name>,]<damage dice roll>[,<speed>] for example Claw,1d8,2 and Sword+1,2d4+1,5. These will result in possible initiative actions for that creature for Claw and Sword+1. If Attack Name is omitted, the dice roll is displayed as the action name instead. If the speed is omitted, the Innate attack speed field value is used instead. The speed will then be used to calculate the Turn Order priority.

Display initiative actions for a weapon-wielding creature to attack

--complex [token-id]

Takes an optional token ID.
Displays a more complex monster attack menu, with both ‘Innate’ attacks from the Monster tab as well as weapon attacks from the Character tab weapons tables (the API does not use the recently introduced Weapon table for Monsters on the Monster tab so that the AttackMaster API only has to deal with one set of tables) – see 3.1 above for entering weapons and 3.2 for setting up monster attacks. If the creature has powers or magic items, it will also offer action menu buttons for those. The selected attack or weapon speed will then be used to calculate the Turn Order priority.

Display initiative actions for Wizard spells

--muspell [token-id]

Takes an optional token ID.
Displays a menu of Wizard spells that the Character / NPC has memorised (see the MagicMaster API documentation for memorising spells, or see Section 7 below for entering spells manually). Any spell that is still memorised can be selected for initiative, and the relevant casting time will be used to calculate the Turn Order priority.

Display initiative actions for Priest spells

--prspell [token-id] Takes an optional token ID.
Displays a menu of Priest spells that the Character / NPC has memorised (see the MagicMaster API documentation for memorising spells, or see Section 7 below for entering spells manually). Any spell that is still memorised can be selected for initiative, and the relevant casting time will be used to calculate the Turn Order priority.

Display initiative actions for powers

--power [token-id]

Takes an optional token ID.
Displays a menu of Powers that the Character / NPC has been granted (see the MagicMaster API documentation for managing powers, or see Section 7 below for entering powers manually). Any power that has not been consumed can be selected for initiative, and the relevant casting time will be used to calculate the Turn Order priority.

Display initiative actions for Magic Items

--mibag [token-id]

Takes an optional token ID.
Displays a menu of Magic Items and non-magical equipment that the Character / NPC / creature has on their person - that is in the Items table (by default, the Potions table on the AD&D2e character sheet): see Section 7.5 below and the MagicMaster API documentation for information on Items. Selecting an item for initiative uses the speed of action of that item to calculate the Turn Order priority.

Display initiative actions for Thieves

--thief [token-id]

Takes an optional token ID.
Displays a menu of Thievish actions (with current percentage proficiencies of each). Selecting one for initiative uses the speed of action of that item to calculate the Turn Order priority.

Display other actions

--other [token-id]

Takes an optional token ID.
Displays a menu of other (non-attacking) actions that the Character / NPC / creature can take, namely: Moving (speed 0 as it is an innate ability); Changing Weapon (also speed 0 but takes all round); Doing Nothing (obviously speed 0); and one that allows the Player to enter a description and specify a speed for that action (presumably with the agreement of the DM).

Maintain the Turn Order and Rounds

Display the DM’s round maintenance menu

--maint

DM Only command. Does not take any parameters.
Displays a chat menu of action API Buttons to control the Turn Order Tracker window using commands sent to the RoundMaster API. The key one is Start/Pause, which initialises RoundMaster and starts it managing the Turn Order, or pauses it so that stepping through the Turn Order does not trigger any RoundMaster actions (such as counting down token status timers or initiating Effects). The full list of functions is:

Maintenance Menu Button Command Implemented Description
Start / Pause  !rounds --start Starts / Pauses RoundMaster functioning
Start Melee  !rounds --clearonround on
--clear
Causes the Turn Order to automatically clear at the end of each round (once all actions have completed) ready for Players to select actions for their Characters
Stop Melee  !rounds --clearonround off Stops the Turn Order from automatically clearing at the end of each round, so that the Turn Order is preserved. Can be useful when just wanting to cycle around a list of Characters selected in the !init –init menu command and running ‘Standard’ initiative.
Re-start  !rounds --sort Re-sorts the current Turn Order, effectively re-starting the round. Useful if the DM accidentally starts the next round by moving the Turn Order on before all Players have completed their initiative actions – allow new actions to be selected and then use Re-start
Set Round Number  !rounds --reset # Sets the current Round number to #. If # is larger than the current round, all token status counters will advance by the number of rounds difference, ending if they reach 0 with the consequential Effects triggered
Clear Turn Order  !rounds --clear Clears the Turn Order of all entries (except the round number)
Remove Tokens from Tracker  !rounds --removefromtracker Removes all the selected tokens from the Turn Order and the Tracker window. Multiple tokens can be selected and removed all at the same time.
Edit Selected Tokens  !rounds --edit Displays the status markers on all the selected tokens, and offers options to edit or delete them. The “spanner” icon edits the status, and the “bin” icon deletes it.
Move Token Status  !rounds --moveStatus For each of the selected tokens in turn, searches for tokens in the whole campaign with the same name and representing the same character sheet, and moves all existing statuses and markers from all the found tokens to the selected token (removing any duplicates). This supports Players moving from one Roll20 map to another and, indeed, roundMaster detects page changes and automatically runs this command for all tokens on the new page controlled by the Players who have moved to the new page.
Clean Selected Tokens  !rounds --clean Drops all status markers from the selected token, whether they have associated effects or time left, or are just manually applied markers. Useful when there might have been corruption, or everyone is just confused! The token statuses still exist, and associated markers will be correctly rebuilt at the start of the next round or the next trigger event (but not manually added ones).
Enable Long Rest for PCs  !init –end-of-day <cost> Run the normal initMaster end-of-day command
Enable Long Rest for selected tokens  !init –enable-rest Enable a long rest only for the characters / NPCs / creatures represented by the selected tokens. See the MagicMaster API documentation for information on Long Rests
Set Date Currently not implemented – future expansion
Set Campaign Currently not implemented – future expansion
Update Selected Tokens  !cmd --abilities Use the CommandMaster API function to setup and maintain Character ability action buttons, weapon proficiencies, spell books & granted powers, saving throws, token “bar & circle” assignment etc. See CommandMaster API documentation on the –abilities command.
Emergency Stop!  !rounds --stop After confirmation, performs a Full Stop and re-start of the RoundMaster API, dropping all internal tables of statuses & effects, token markers, timers etc. Use with care!

Display those characters that have not yet had initiative actions selected

--check-tracker

DM Only command. Does not take any parameters.
Uses the Player Character name list created & maintained in the –init menu or with the –list-pcs command, and checks that all of the Character’s named have completed initiative selection to the point where their token name is in the Turn Order at least once, and appears in the Tracker window. Names those that have not in a message to the DM, or states that initiative is complete.

Change the list of characters in the Party

--list-pcs < ALL / MAP / REPLACE / ADD >

DM Only command. Takes a specifier for the tokens to have in the Player Character list which must be one of those listed.
Updates the internally held list of Characters that are controlled by Players (and others that the DM can add at will). This list is displayed on the --init menu, and is used by --check-tracker and --end-of-day commands. The list persists between sessions of game-play. The following parameters have the following effects:

all: looks across all tokens in the campaign and creates a new list composed of those representing Character Sheets controlled by a Player (standard Roll20 Character Sheet functionality – refer to the Help Centre for information on setting Players to control Character Sheets and their tokens).
map: creates a new list that only has Characters represented by tokens on the current Player map that are controlled by Players. (See Roll20 Help Centre on how to select the current Player map).
replace: creates a new list including all the currently selected token(s) (whomever controls them), and no others.
add: adds the currently selected token(s) (whomever controls them) to the existing list leaving all the others unchanged.

End of Day processing

--end-of-day [ASK/ASKTOREST/OVERNIGHT/REST/SET/FOES]|[=][cost]

DM Only command. Takes an optional type of rest (which, if provided, must be one of those shown – defaults to ASK) and an optional cost parameter, optionally preceded by an ‘=’ character. If cost is not provided, it defaults to that previously set with SET and/or ‘=’.
This command performs the ‘End-of-Day’ processing for the campaign. This consists of enabling Long Rests for all Characters / NPCs / creatures to regain their spells and powers, and for recharging Magic Items to regain their charges (see MagicMaster API documentation for information on Long Rests). It also removes spent ammunition from quivers that has not been recovered, as it is assumed to be lost, broken or taken by other creatures during the period of the night (see AttackMaster API documentation about recovery of ammunition and its loss over a Long Rest).
Each day can cost or earn the members of the Party money, perhaps depending on where they stay overnight, whether they eat just camp rations or lavish meals, use an Inn and drink too much, or earn money doing a job. The optional cost parameter can be set to a positive cost to the party which will be deducted from every member, or a negative quantity which will be earned (a negative cost).

ASK: If no rest type is supplied, or ASK is used, the DM is asked to confirm if they wish the cost to be deducted from/earned by all the Characters listed. If No is selected, nothing is deducted or earned. The system then sets flags to allow Players to perform a Rest command on their characters (see MagicMaster API).
ASKTOREST: Asks the DM to confirm the cost/earnings in the same way as ASK, but then automatically performs the MagicMaster API –rest command for each character in the party, and the Players do not need to do so.
OVERNIGHT: Applies the cost to the Party members and enables them to rest (they have to do the rest themselves). If cost (or the previously set default cost) is not a number (e.g. a Roll Query), asks if a charge is to be made.
REST: Does the same as OVERNIGHT, but automatically runs the MagicMaster API –rest command for all characters in the party, and the Players do not need to do so.

FOES: Does the same as OVERNIGHT, but for all NPCs and Monsters, allowing them to rest.

SET: If the rest type is SET and/or there is an ‘=’ before the cost, will not run the ‘End-of-Day’, but instead will set the standard cost for each night if no cost parameter is given when other commands are used. If the ‘=’ is followed by a Roll Query (see Roll20 Help Centre for information on Roll Queries), the Roll Query will be run each time the –end-of-day command is run without a cost parameter, allowing (for instance) the DM to select from a list of possible daily costs or earnings. However, remember to replace the ‘?’ at the start of the Roll Query with ? so that the Roll Query does not run when it is passed in to be set. Other characters can be substituted as follows:
Character  ? [ ] < > @ -  : & { }
Substitute ^ << >> ` ~ ¦ & { }
Alternative (no ; ) \ques \lbrak \rbrak \lt \gt \at \dash \vbar \clon \amp \lbrc \rbrc

Other Commands

Display help on these commands

--help

This command does not take any arguments. It displays a very short version of this document, showing the mandatory and optional arguments, and a brief description of each command.

Handshake with other APIs

!rounds –hsq from|[command]
!rounds –handshake from|[command]

Either form performs a handshake with another API, whose call (without the ‘!’) is specified as from in the command parameters (the response is always an –hsr command). The command calls the from API command responding with its own command to confirm that RoundMaster is loaded and running: e.g.
Received: !init –hsq magic
Response: !magic –hsr init
Which means the MagicMaster API has requested a handshake with InitiativeMaster to see if it is loaded, and InitiativeMaster has responded, proving it is running and taking commands.
Optionally, a command query can be made to see if the command is supported by RoundMaster if the command string parameter is added, where command is the RoundMaster command (the ‘--’ text without the ‘--‘). This will respond with a true/false response: e.g.
Received: !init –handshake attk|monster
Response: !attk –hsr init|monster|true
Which means AttackMaster has queried if InitiativeMaster has a command called --monster, and InitiativeMaster has responded in the affirmative.

Switch on or off Debug mode

--debug (ON/OFF)

Takes one mandatory argument which should be ON or OFF.
The command turns on a verbose diagnostic mode for the API which will trace what commands are being processed, including internal commands, what attributes are being set and changed, and more detail about any errors that are occurring. The command can be used by the DM or any Player – so the DM or a technical advisor can play as a Player and see the debugging messages.

Configuring the Token and Character Sheet for use with the API

Token configuration

The API can work with any Token configuration but requires tokens that are going to participate in initiative actions for ‘Group’ and ‘Individual’ initiative to represent a Character Sheet, so that actions relevant to the token can be selected.
A single Character Sheet can have multiple Tokens representing it, and each of these are able to do individual initiative using the actions made possible by the data on the Character Sheet jointly represented. However, if such multi-token Characters / NPCs / creatures are likely to encounter spells that will affect the Character Sheet (such as Haste and Slow) they must be split with each Token representing a separate Character Sheet, or else the one spell will affect all tokens associated with the Character Sheet, whether they were targeted or not! In fact, it is recommended that tokens and character sheets are 1-to-1 to keep things simple.
The recommended Token Bar assignments for all APIs in the Master Series are:

Bar1 (Green Circle): Armour Class (AC field) – only current value
Bar2 (Blue Circle): Base Thac0 (thac0-base field) before adjustments – only current value
Bar3 (Red Circle): Hit Points (HP field) – current & max

It is recommended to use these assignments, and they are the bar assignments set by the CommandMaster API if its facilities are used to set up the tokens. All tokens must be set the same way, whatever way you eventually choose.
These assignments can be changed in each API, by changing the fields object near the top of the API script (note: no underscore, and ‘bar#’ and ‘value’ or ‘max’ are separate entries in an array of 2 elements). All APIs must use the same field definitions:

fields.Token_AC: defines the token field for the AC value (normally [‘bar1’,’value’])
fields.Token_MaxAC: defines the token field for the AC max (normally [‘bar1’,’max’])
fields.Token_Thac0: defines the token field for the Thac0 value (normally [‘bar2’,’value’])
fields.Token_MaxThac0: defines the token field for the Thac0 max (normally [‘bar2’,’max’])
fields.Token_HP: defines the token field for the HP value (normally [‘bar3’,’value’])
fields.Token_MaxHP: defines the token field for the HP max (normally [‘bar3’,’max’])

Alter the bar numbers appropriately or, if you are not wanting one or more of these assigned: leave the two elements of the array as [‘’,’’]. The system will generally work fine with reassignment or no assignment, but not always. Specifically, some effects in the Effects-DB, which implement spell effects on Character Sheets and Tokens, may not set the right values if no assignment of one or more of HP, AC & Thac0 are made to the Token.

Use with various game system character sheets

The API issued is initially set up to work with the AD&D 2E character sheet (as this is what the author mostly plays). However, it can be set up for any character sheet. In each API script, right at the top, is an object definition called ‘fields’: see 7.2 for details. This can be altered to get the API to work with other character sheets. The coding of the API is designed to use the AD&D 2E system of initiative systems and calculations. If you use another system (e.g. the D&D 5e system) the API coding will need to change. This might be a future enhancement.

Matching the API to a type of Character Sheet

The API has an object definition called ‘fields’, which contains items of the form
Internal_api_name: [sheet_field_name, field_attribute, optional_default_value, optional_set_with_worker_flag]
A typical example might be:

	Fighter_level:['level-class1','current'],
	Or
	MUSpellNo_memable:['spell-level-castable','current','',true],

Table names are slightly different: always have an internal_api_name ending in ‘_table’ and their definition specifies the repeating table name and the index of the starting row of the table or -1 for a static field as the 1st row, with the 2nd row starting at repeating row number 0.
Internal_api_table: [sheet_repeating_table_name,starting_index]
An example is:

MW_table:['repeating_weapons',0],

The internal_api_name must not be altered! Doing so will cause the system not to work. However, the sheet_repeating_table_name and starting_index can be altered to match any character sheet.
Each character sheet must have repeating tables to hold weapons, ammo and magic items. By default, melee weapons ‘in hand’ are held in sections of the repeating_weapons table, melee weapon damage in the repeating_weapons-damage table, ranged weapons in the repeating_weapons2 table, ammo in the repeating_ammo table, and magic items are held in the repeating_potions table. Other repeating tables are also used, some of which are intended to be hidden and not visible in the Character Sheet. The table management system provided by the API creates, expands and writes to repeating attributes automatically, and the DM & Players do not need to worry about altering or updating any of these tables on the Character Sheet.

Character Attributes, Races, Classes and Levels

Character Attributes of Strength, Dexterity, Constitution, Intelligence, Wisdom and Charisma are not directly important to the Initiative Master API, but the resulting bonuses and penalties are. All Attributes and resulting modifiers should be entered into the Character Sheet in the appropriate places (that is in the Character Sheet fields identified in the ‘fields’ API object as noted in section 7.2 above).
The Character’s race is also important for calculating saves and ability to use certain items. The race should be set in the appropriate Character Sheet field. Currently, the races ‘dwarf’, ‘elf’, ‘gnome’, ‘halfelf’, ‘halfling’, ‘half-orc’, and ‘human’ are implemented (not case sensitive, and spaces, hyphens and underscores are ignored). If not specified, human is assumed. The race impacts saves, some magic items and armour, and bonuses on some attacks.
The system supports single-class and multi-class characters. Classes must be entered in the appropriate fields on the Character Sheet. Classes and levels affect spell casting ability, weapon multiple attack numbers per round, ability to do two-weapon attacks with or without penalty, and the ability to backstab and the related modifiers among other things. Class and level also determine valid armour, shields, some magic items and saves.
Note: on the Advanced D&D 2e Character Sheet, Fighter classes must be in the first class column, Wizard classes in the second column, Priest classes in the third, Rogues in the fourth, and Psions (or any others) in the fifth. It is important that these locations are adhered to.
Note: classes of Fighter and Rogue (such as Rangers and Bards) that can use clerical &/or wizard spells will automatically be allowed to cast spells once they reach the appropriate level by AD&D 2e rules, but not before.
The following Classes are currently supported:

Fighter classes Wizard Classes Priest Classes Rogue Classes
Warrior Wizard Priest Rogue
Fighter Mage Cleric Thief
Ranger Abjurer Druid Bard
Paladin Conjurer Healer Assassin
Beastmaster Diviner Priest of Life
Barbarian Enchanter Priest of War
Defender (Dwarven) Illusionist Priest of Light
Invoker Priest of Knowledge
Necromancer Shaman
Transmuter

The level for each class must be entered in the corresponding field. Multiple classes and levels can be entered, and will be dealt with accordingly. Generally, the most beneficial outcome for any combination will be used.

Spells and Powers

The best (and easiest) way to give a Character or NPC spells and powers is to use the MagicMaster API. However, for the purposes of just doing initiative and selecting which spell to cast in the round, the spells and powers can be entered manually onto the character sheet. Spells are held in the relevant section of the Spells table, which by default is set to the character sheet spells table, repeating_spells. As with other fields, this can be changed in the ‘fields’ object. Note that on the Advanced D&D 2e character sheet Wizard spells, Priest spells & Powers are all stored in various parts of this one very large table.
If you are just using the character sheet fields to type into, add spells (or powers) to the relevant “Spells Memorised” section (using the [+Add] buttons to add more as required) a complete row at a time (that is add columns before starting the next row). Enter the spell names into the “Spell Name” field, and “1” into each of the “current” & “maximum” “Cast Today” fields – the API suite counts down to zero on using a spell, so in order for a spell to appear as available (not greyed out) on the initiative menus, the “current” number left must be > 0. This makes spells consistent with other tables in the system (e.g. potion dose quantities also count down as they are consumed, etc).
Then, you need to set the “Spell Slots” values on each level of spell to be correct for the level of caster. Just enter numbers into each of the “Level”, “Misc.” and “Wisdom” (for Priests) fields, and/or tick “Specialist” for the Wizard levels as relevant. This will determine the maximum number of spells memorised each day, that will appear in the spells Initiative Menu. Do the same for Powers using the “Powers Available” field. As with other fields on the character sheet, each of these fields can be re-mapped by altering the ‘fields’ object in the APIs.

Magic Items and Equipment

All magic items and standard equipment, including weapons, armour, lanterns etc, are held in the Items table, which by default is set to the potions table, repeating_potions, on the Character Sheet. As with other fields, this can be changed in the ‘fields’ object. The best way to put items into this table is by using the MagicMaster API. However, it generally is possible to enter item names and quantities directly into the table and use them within the system. Only items that also exist in the supplied databases will actually work fully with the API (i.e. be recognised by the API as weapons, armour, ammo, etc). Initial weapon, ammunition and armour databases are provided with the AttackMaster API, and in addition to these Initial magic item, spell and power databases are provided with the MagicMaster API. Other items can be in the table and used for undertaking initiative actions but will not otherwise be effective. New databases and database items can be added using the specifications and instructions contained in the AttackMaster and MagicMaster API documentation.

Weapons and Ammo

For the InitiativeMaster API to support weapon attack actions melee weapons, damage, ranged weapons and ammo must be entered directly into the melee weapon, damage, ranged weapon and ammo tables on the Character Sheet. This is best done using the AttackMaster API, which will ensure all the right values are entered in the right fields, including taking into account the impact of weapon proficiencies, specialisation, mastery, character races and class/level. However, manual entry will generally work to the extent to allow weapon attack initiative actions to be selected. Weapon name, speed and number of attacks are the most important fields for initiative.

Character Sheet data fields

As stated in section 7, the Character Sheet field mapping to the API script can be altered using the definition of the fields object. You can find the complete mapping for all APIs in the RPGMaster series, with an explanation of each, in a separate document.

Changelog

v1.037 (2021-12-24)

  • First version for public release