Difference between revisions of "Script:AttackMaster"
From Roll20 Wiki
(→General Database information) |
|||
(15 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
|name=AttackMaster | |name=AttackMaster | ||
|author=[[Richard E]] | |author=[[Richard E]] | ||
− | |version= | + | |version=1.5.02 |
− | |lastmodified= | + | |lastmodified=2023-05-31 |
|code=AttackMaster | |code=AttackMaster | ||
− | |dependencies= | + | |dependencies= |
+ | {{api repository link|RPGMlibrary AD+D2e}} | ||
|conflicts=None}} | |conflicts=None}} | ||
'''AttackMaster''' API provides functions to manage weapons, armour & shields, including taking weapons in hand and using them to attack, for the AD&D 2E sheet. It's a part of the '''[[RPGMaster]]''' suite of APIs. | '''AttackMaster''' API provides functions to manage weapons, armour & shields, including taking weapons in hand and using them to attack, for the AD&D 2E sheet. It's a part of the '''[[RPGMaster]]''' suite of APIs. | ||
− | It uses | + | It uses the attack definitions defined in the [[API:RPGMaster-AttacksDB|<b>Attacks-DB</b> attack definition database]] (which the [[GM]] / Game Creator can add to or replace), taking into account: ranged weapon ammo management with ranges varying appropriately and range penalties/bonuses applied; Strength & Dexterity bonuses where appropriate; any magic bonuses to attacks that is in effect (if used with [[Script:RoundMaster|RoundMaster]] API effects); penalties & bonuses for non-proficiency, proficiency, specialisation & mastery; penalties for non-Rangers attacking with two weapons; use of 1-handed, 2-handed or many-handed weapons and restrictions on the number of weapons & shields that can be held at the same time; plus many other features. This API ''requires'' '''[[Script:RPGMaster Library|RPGMaster Library]]''' to work (make sure it is loaded alongside AttackMaster), and works best with the '''[[Script:MagicMaster|MagicMaster API]]''' and its databases which hold the data for automatic definition of weapons and armour. However, some attack commands will generally work with manual entry of weapons onto the character sheet. The <b>[[Script:CommandMaster|CommandMaster API]]</b> can be used by the GM to easily manage weapon proficiencies. |
− | <p>Specification for weapons, armour & shields are implemented as ability macros in specific database character sheets. This API comes with a wide selection of weapon and armour macros, held in | + | <p>Specification for weapons, armour & shields are implemented as ability macros in specific database character sheets. This API comes with a wide selection of weapon and armour macros, held in the [[API:RPGMaster-WeaponsArmorDB|<b>MI-DB-Weapons, -Ammo and -Armour</b> databases]] that are created and updated automatically when the API is run. If the MagicMaster API is also loaded, it provides many more specifications for standard and magic items that are beneficial to melee actions and armour class. The [[GM]] can add to the provided items in the databases using standard Roll20 Character Sheet editing, as explained in the associated weapons, ammo & armour database [[API:RPGMaster-WeaponsArmorDB|Help Handout and Wiki page.]]</p> |
− | = Forum = | + | == Forum == |
− | [https://app.roll20.net/forum/post/ | + | [https://app.roll20.net/forum/post/11115777/script-rpgmaster-apis-for-ad-and-d-2e RPGMaster Forum] |
+ | == AttackMaster Database Help == | ||
+ | [[API:RPGMaster-WeaponsArmorDB|Weapon, Ammo & Armour Database]] - RPGMaster Weapons & Armour database Wiki page<br> | ||
+ | [[API:RPGMaster-AttacksDB|Attack Templates Database]] - Attack macro definition database Wiki page | ||
+ | == Configuring Character Sheets == | ||
+ | [[API:RPGMaster-CharacterSheets|RPGMaster Character Sheet setup]] - RPGMaster Character Sheet setup Wiki page | ||
=How AttackMaster Works= | =How AttackMaster Works= | ||
− | ==Specifying a token | + | {| role="presentation" class="wikitable mw-collapsible mw-collapsed" |
+ | | | ||
+ | |- | ||
+ | |<p style="font-size: 150%">Specifying a token</p> | ||
<p>Most of the AttackMaster API commands need to know the token_id of the token that represents the character, NPC or creature that is to be acted upon. This ID can be specified in two possible ways:</p> | <p>Most of the AttackMaster API commands need to know the token_id of the token that represents the character, NPC or creature that is to be acted upon. This ID can be specified in two possible ways:</p> | ||
<ol><li>explicitly in the command call using either a literal Roll20 token ID or using @{selected|token_id} or @{target|token_id} in the command string to read the token_id of a selected token on the map window,<br>or</li> | <ol><li>explicitly in the command call using either a literal Roll20 token ID or using @{selected|token_id} or @{target|token_id} in the command string to read the token_id of a selected token on the map window,<br>or</li> | ||
<li>by having a token selected on the map window, not specifying the token_id in the command call, and allowing the API to discover the selected token_id.</li></ol> | <li>by having a token selected on the map window, not specifying the token_id in the command call, and allowing the API to discover the selected token_id.</li></ol> | ||
<p>In either case, if more than one token is selected at the time of the call then using either @{selected|token_id} to specify the token in the command call, or allowing the command to find a selected token, is likely (but not guaranteed) to take the first token that was selected. To avoid ambiguity, it is generally recommended to make command calls with only one token selected on the map window.</p> | <p>In either case, if more than one token is selected at the time of the call then using either @{selected|token_id} to specify the token in the command call, or allowing the command to find a selected token, is likely (but not guaranteed) to take the first token that was selected. To avoid ambiguity, it is generally recommended to make command calls with only one token selected on the map window.</p> | ||
− | = | + | |
+ | <p style="font-size: 150%">Who can make AttackMaster API command calls</p> | ||
<p>The majority of API command calls can be made by both the GM and all Players. The typical means for command calls to be made is via Character Sheet Token Action Buttons (standard Roll20 functionality - see Roll20 Help Centre for information) which trigger Ability macros on the Character Sheet which simply make the API command call. The Character Sheets can be controlled by the GM or Players. The API knows if it is a GM or a Player that has triggered the call, and reacts accordingly.</p> | <p>The majority of API command calls can be made by both the GM and all Players. The typical means for command calls to be made is via Character Sheet Token Action Buttons (standard Roll20 functionality - see Roll20 Help Centre for information) which trigger Ability macros on the Character Sheet which simply make the API command call. The Character Sheets can be controlled by the GM or Players. The API knows if it is a GM or a Player that has triggered the call, and reacts accordingly.</p> | ||
− | = | + | |
− | <p>Any weapon in the Weapons tables on the Character Sheet can be used for attacks. However, the very best approach is to use the functions in this and other RPGMaster APIs | + | <p style="font-size: 150%">Weapons that can be used</p> |
− | = | + | <p>Any weapon in the Weapons tables on the Character Sheet can be used for attacks. However, the very best approach is to use the functions in this and other RPGMaster APIs to manage weapon choice. Weapon definitions are held in weapon databases: see Database-specific handouts for details. All standard weapons are included, as well as many magic variations.</p> |
− | <p>Weapons and ammunition are held in the Items table, which holds data on all items that the Character / NPC / creature has on their person- see | + | |
− | <p>The easiest way to enter the correct data into the Items table is to | + | <p style="font-size: 150%">Allocating weapons to a Character</p> |
+ | <p>Weapons and ammunition are held in the Items table, which holds data on all items that the Character / NPC / creature has on their person - see the Character Sheet setup help handout regarding where the Item table is on the Character Sheet and the data that is held in it. The added weapon must have a listing in the Weapons database.</p> | ||
+ | <p>The easiest way to enter the correct data into the Items table is to use the <b>MagicMaster API</b>, which supports finding and looting weapons e.g. from a chest or a dead body, or just the DM or Player choosing weapons from a menu. If a Ranged Weapon that uses ammunition is added, a quantity of the respective ammunition (or multiple types of ammunition) must also be added to the Items table.</p> | ||
<p>Multiple weapons of many different types can be added, including those with magical properties. The system will take all the weapon statistics into account using the information in the associated databases.</p> | <p>Multiple weapons of many different types can be added, including those with magical properties. The system will take all the weapon statistics into account using the information in the associated databases.</p> | ||
− | = | + | |
− | <p>Each Character / NPC / creature has a defined number of hands (which can be different from 2), and AttackMaster provides a menu to take any weapon(s) | + | <p style="font-size: 150%">Selecting weapons to attack with</p> |
− | = | + | <p>Each Character / NPC / creature has a defined number of hands (which can be different from 2), and AttackMaster provides a menu to take any weapon(s) in hand. Doing so enters all the correct information from the weapons database into the Weapons, Damage and Ranged Weapons tables, and the correct ammunition type(s) held in the Items table into the Ammo table.</p> |
+ | |||
+ | <p style="font-size: 150%">Making attacks</p> | ||
<p>Several different attack approaches are supported by the API.</p> | <p>Several different attack approaches are supported by the API.</p> | ||
− | <table><tr><th scope="row">Roll20 rolls:</th><td>the system makes an attack dice roll and modifies it using the data on the Character Sheet, then displays the results to the Player. Hovering the mouse over the displayed values of AC (armour class) hit and the Adjustments will display information explaining the values. Buttons are displayed to make Damage rolls which can be used if the attack was deemed successful (the target's AC was the same or worse than the AC hit).</ | + | <table><tr><th scope="row">Roll20 rolls:</th><td>the system makes an attack dice roll and modifies it using the data on the Character Sheet, then displays the results to the Player. Hovering the mouse over the displayed values of AC (armour class) hit and the Adjustments will display information explaining the values. Buttons are displayed to make Damage rolls which can be used if the attack was deemed successful (the target\'s AC was the same or worse than the AC hit).</d></tr> |
<tr><th scope="row">Player rolls:</th><td>the system prompts for the Player to roll a dice and enter the result, and then modifies the roll entered using the data on the Character Sheet and displays the result to the Player. As above, hovering the mouse over the displayed results will explain how the amounts were calculated. Buttons to make Damage rolls are also displayed, which will also prompt the user to make a dice roll (showing the dice that should be rolled).</td></tr> | <tr><th scope="row">Player rolls:</th><td>the system prompts for the Player to roll a dice and enter the result, and then modifies the roll entered using the data on the Character Sheet and displays the result to the Player. As above, hovering the mouse over the displayed results will explain how the amounts were calculated. Buttons to make Damage rolls are also displayed, which will also prompt the user to make a dice roll (showing the dice that should be rolled).</td></tr> | ||
− | <tr><th scope="row">Targeted attack:</th><td>DM | + | <tr><th scope="row">Targeted attack:</th><td>Option under DM --config control. The DM can, if they choose, make targeted attacks available which prompts the Player to select the target. The system then rolls the Attack dice and the Damage dice and displays all possible results, and also displays the AC and the HP status of the target for quick analysis.</td></tr></table> |
− | = | + | |
− | <p>The system handles both Ranged weapons that take ammunition, such as bows and slings, and also | + | <p style="font-size: 150%">Ammunition</p> |
− | = | + | <p>The system handles both Ranged weapons that take ammunition, such as bows and slings, and also "self-ammoed" Ranged weapons like daggers, that can be thrown at a target. The quantity of ammunition or self-ammoed weapons is managed by the system: as they are used in attacks, the quantity in the Characters Item table decreases. A menu can be called to recover ammunition, in agreement with the DM - the same menu can be used to add or remove quantities of ammunition for other reasons (such as being purchased). Some types of ammo always breaks and can\'t be recovered (for example glass arrows) - this is charged ammo.</p> |
+ | |||
+ | <p style="font-size: 150%">Ranged weapon and ammunition ranges</p> | ||
<p>Each type of ammunition has a range with the weapon used to fire it. These ranges can be different for different types of weapon - thus a longbow can fire an flight arrow further than a short bow, and a sheaf arrow has different ranges than the flight arrow with each. The ranges that can be achieved by the weapon and ammunition combination are displayed when they are used in an attack, and the Player is asked to select which range to use, which then applies the correct range modifier to the attack roll.</p> | <p>Each type of ammunition has a range with the weapon used to fire it. These ranges can be different for different types of weapon - thus a longbow can fire an flight arrow further than a short bow, and a sheaf arrow has different ranges than the flight arrow with each. The ranges that can be achieved by the weapon and ammunition combination are displayed when they are used in an attack, and the Player is asked to select which range to use, which then applies the correct range modifier to the attack roll.</p> | ||
− | = | + | |
− | <p>The system can support any weapon becoming a dancing weapon, with qualities that can be the same as or different from a Sword of Dancing. In the system a dancing weapon does not have to be held in hand in order for it to be available for attacks and, if using the <b>InitiativeMaster API</b>, the weapon is also automatically added to the Turn Order Tracker for its attacks to be performed in battle sequence. All of this can be achieved automatically if used with the <b>RoundMaster API</b>, with durations of 'warm up' and 'dancing' dealt with, as well as magical properties changing as the rounds progress - that function requires some editing of the Effects database to adapt for a particular weapon - see | + | <p style="font-size: 150%">Dancing weapons</p> |
− | ==Armour Class management | + | <p>The system can support any weapon becoming a dancing weapon, with qualities that can be the same as or different from a Sword of Dancing. In the system a dancing weapon does not have to be held in hand in order for it to be available for attacks and, if using the <b>InitiativeMaster API</b>, the weapon is also automatically added to the Turn Order Tracker for its attacks to be performed in battle sequence. All of this can be achieved automatically if used with the <b>RoundMaster API</b>, with durations of \'warm up\' and \'dancing\' dealt with, as well as magical properties changing as the rounds progress - that function requires some editing of the Effects database to adapt for a particular weapon - see the RoundMaster API Effect Database documentation for details.</p> |
+ | |||
+ | <p style="font-size: 150%">Fighting Styles</p> | ||
+ | <p><i>The Complete Fighter\'s Handbook</i> introduced the concept of Fighters being able to become proficient or a specialist in various styles of fighting, such as with two-handed melee weapons, a weapon and a shield, and such like. These are supported in the RPGMaster APIs via the <b>Styles-DB</b> database, and functions in the <b>CommandMaster API, InitiativeMaster API</b> as well as here in AttackMaster. Each time weapons & shields in-hand are changed using the <i>Attack Menu / Change Weapons</i> menu, AttackMaster checks what is in-hand against any Fighting Styles the character is proficient or specialised in (as defined via the <b>CommandMaster</b> <i>Token-Setup / Set Proficiencies</i> menu). If any are applicable given what is currently in use, AttackMaster will apply the relevant fighting style benefits to the character and their use of their weapons and armour. The APIs are distributed with rules defined for the four styles defined in <i>The Complete Fighter\'s Handbook</i>, and DMs and game authors can add their own as desired. See the <b>Styles Database Help</b> handout for more information.</p> | ||
+ | |||
+ | <p style="font-size: 150%">Armour Class management</p> | ||
<p>The system continually checks the Armour Class of each Character / NPC / creature by examining the information on the Character Sheet and the items in the Item table. Armour and Shields can be placed in the Items table which will be discovered, and the specifications from the Armour database used to calculate the appropriate AC under various conditions and display them to the Player. The process the system made to achieve the calculated AC will be shown.</p> | <p>The system continually checks the Armour Class of each Character / NPC / creature by examining the information on the Character Sheet and the items in the Item table. Armour and Shields can be placed in the Items table which will be discovered, and the specifications from the Armour database used to calculate the appropriate AC under various conditions and display them to the Player. The process the system made to achieve the calculated AC will be shown.</p> | ||
<p>Many magic items have AC qualities, such as Bracers of Defence and Rings of Protection, and if the <b>MagicMaster API</b> is used these are also taken into account - invalid combinations will also be prevented, such as Rings of Protection with magical armour. If allocated to a Token Circle, the calculated AC is compared to the displayed Token AC and any difference highlighted - this may be due to magical effects currently in place, for instance - the highlight allows the Player to review why this might be.</p> | <p>Many magic items have AC qualities, such as Bracers of Defence and Rings of Protection, and if the <b>MagicMaster API</b> is used these are also taken into account - invalid combinations will also be prevented, such as Rings of Protection with magical armour. If allocated to a Token Circle, the calculated AC is compared to the displayed Token AC and any difference highlighted - this may be due to magical effects currently in place, for instance - the highlight allows the Player to review why this might be.</p> | ||
− | = | + | |
− | <p>The corollary to attacks is saves. The system provides | + | <p style="font-size: 150%">Saves</p> |
− | <p> | + | <p>The corollary to attacks is saves. The system provides two menus: one to access, review, update and make saving throws and the appropriate modifiers; and the other to make attribute checks, again with the appropriate modifiers.</p> |
+ | <p>For each menu, the initial menu presented shows the saving throw and attribute tables from the Character Sheet (always the one from the Character tab rather than the Monster Tab - monster saving throws should be copied to both). Each type of save or attribute check has a button to make the saving throw: the system will perform the roll and display the result with an indication of success or failure. The menu also shows buttons to add a situational adjustment (as per the AD&D 2e PHB) and to modify the saving throw table, either automatically (taking into account race, class, level and magic items) or manually.</p> | ||
<p>The easiest way to set the correct saving throws for each type of save, based on class, level & race, is to use the <b>CommandMaster API</b> Character Sheet setup commands.</p> | <p>The easiest way to set the correct saving throws for each type of save, based on class, level & race, is to use the <b>CommandMaster API</b> Character Sheet setup commands.</p> | ||
+ | |} | ||
<br> | <br> | ||
=How To Use AttackMaster= | =How To Use AttackMaster= | ||
== Installation and Configuration == | == Installation and Configuration == | ||
− | + | The best way to install AttackMaster API is to use the Roll20 [[https://wiki.roll20.net/API:Install_Menu|"One-Click Install" menu]], which will automatically keep the code an databases updated to the latest versions. Alternatively, 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 <i>AttackMaster Help</i> provides a full manual of how to use AttackMaster. The handout <i>RPGMaster CharSheet Setup</i> provides information on setting up a character sheet for use with AttackMaster. The handout <i>Weapon & Armour Database Help</i> provides information on the databases that come with the API, and how to add to and change them. | |
+ | |||
== Script Use == | == Script Use == | ||
After installing the script, refer the the handout '''AttackMaster Help''' for full information on use. Below is a copy of the contents of that handout. | After installing the script, refer the the handout '''AttackMaster Help''' for full information on use. Below is a copy of the contents of that handout. | ||
Line 71: | Line 95: | ||
=Command Index= | =Command Index= | ||
+ | ==Command Index== | ||
===Menus=== | ===Menus=== | ||
<pre>--menu [token_id] | <pre>--menu [token_id] | ||
Line 84: | Line 109: | ||
--mod-weapon [token_id] | weapon | MELEE / RANGED / DMG / AMMO | adjustments | --mod-weapon [token_id] | weapon | MELEE / RANGED / DMG / AMMO | adjustments | ||
--quiet-modweap [token_id] | weapon | MELEE / RANGED / DMG / AMMO | adjustments | --quiet-modweap [token_id] | weapon | MELEE / RANGED / DMG / AMMO | adjustments | ||
− | --edit-weapons [token_id]</pre> | + | --edit-weapons [token_id] |
+ | --blank-weapon [token_id] | weapon | [ SILENT ]</pre> | ||
===Ammunition Management=== | ===Ammunition Management=== | ||
<pre>--ammo [token_id] | <pre>--ammo [token_id] | ||
Line 91: | Line 117: | ||
<pre>--edit-armour [token_id] | <pre>--edit-armour [token_id] | ||
--checkac [token_id] | [ SILENT ] | [SADJ / PADJ / BADJ] | --checkac [token_id] | [ SILENT ] | [SADJ / PADJ / BADJ] | ||
− | --save [token_id] | [situation-mod]</pre> | + | --save [token_id] | [situation-mod] |
+ | --attr-check [token_id] | [situation-mod] | [message] | [DCval]</pre> | ||
===Other Commands=== | ===Other Commands=== | ||
<pre>--help | <pre>--help | ||
+ | --config [PROF/ALL-WEAPS/WEAP-CLASS/ALL-ARMOUR/MASTER-RANGE/SPECIALIST-RULES/SPELL-NUM] | [TRUE/FALSE] | ||
--check-db [ db-name ] | --check-db [ db-name ] | ||
+ | --extract-db db-name | ||
--handshake from | [cmd] | --handshake from | [cmd] | ||
--hsq from | [cmd] | --hsq from | [cmd] | ||
Line 100: | Line 129: | ||
--debug [ ON / OFF ]</pre> | --debug [ ON / OFF ]</pre> | ||
<br> | <br> | ||
− | =Command | + | |
+ | ==Command details== | ||
==Menus== | ==Menus== | ||
===Display a menu to do actions relating to attacks=== | ===Display a menu to do actions relating to attacks=== | ||
<pre>--menu [token_id]</pre> | <pre>--menu [token_id]</pre> | ||
− | <p>Takes an optional token ID | + | <p>Takes an optional token ID - if not specified uses selected token</p> |
− | <p>Displays a Chat menu with buttons for: Attacking, with | + | <p>Displays a Chat menu with buttons for: Attacking, with Roll20 rolling a dice or the Player entering a dice roll result, or the Player selecting a target and getting the result of an attack (if allowed by the DM in setting the API options); changing what is in the Character's (or NPC's) hands; to recover spent ammo; and to check the current Armour Class for the Character under various circumstances.</p> |
===Display a menu of other actions=== | ===Display a menu of other actions=== | ||
<pre>--other-menu [token_id]</pre> | <pre>--other-menu [token_id]</pre> | ||
− | <p>Takes an optional token ID | + | <p>Takes an optional token ID - if not specified uses selected token</p> |
− | <p>Displays a Chat menu with buttons for: saving throws and saving throw management; and managing light sources for the | + | <p>Displays a Chat menu with buttons for: saving throws and saving throw management; managing character classes and levels (if the <b>CommandMaster API</b> is loaded) and managing light sources for the character's token (if Dynamic Lighting is being used) (requires <b>MagicMaster API</b> to work). If the GM uses the menu, two further options appear: mark the token selected as Dead (which also marks the body as an inanimate object that can be looted); and the ability to adjust damage for the selected token for any arbitrary reason, which can also be noted.</p> |
+ | |||
==Attacking Commands== | ==Attacking Commands== | ||
===Attack an opponent with a weapon=== | ===Attack an opponent with a weapon=== | ||
<pre>--attk-hit [token_id] | [message] | [monster weap1] | [monster weap2] | [monster weap3] | <pre>--attk-hit [token_id] | [message] | [monster weap1] | [monster weap2] | [monster weap3] | ||
+ | --attk-menu-hit [token_id] | [message] | [monster weap1] | [monster weap2] | [monster weap3] | ||
--attk-roll [token_id] | [message] | [monster weap1] | [monster weap2] | [monster weap3] | --attk-roll [token_id] | [message] | [monster weap1] | [monster weap2] | [monster weap3] | ||
--attk-target [token_id] | [message] | [monster weap1] | [monster weap2] | [monster weap3]</pre> | --attk-target [token_id] | [message] | [monster weap1] | [monster weap2] | [monster weap3]</pre> | ||
<p>Each takes an optional token ID (if not specified uses selected token), an optional formatted message to include with the attack damage, and up to three optional names for each of the monster attacks that are displayed on the attack menu.</p> | <p>Each takes an optional token ID (if not specified uses selected token), an optional formatted message to include with the attack damage, and up to three optional names for each of the monster attacks that are displayed on the attack menu.</p> | ||
<p>Each of these three commands present a menu of currently possible attacks, using the weapons and ammo in-hand or, for monsters using the Monster tab on the AD&D 2e Character Sheet, up to 3 types of monster attacks. Ranged weapon attacks will prompt the Player to specify which range to fire at. Selecting one of the possible attacks has different outcomes based on the command used:</p> | <p>Each of these three commands present a menu of currently possible attacks, using the weapons and ammo in-hand or, for monsters using the Monster tab on the AD&D 2e Character Sheet, up to 3 types of monster attacks. Ranged weapon attacks will prompt the Player to specify which range to fire at. Selecting one of the possible attacks has different outcomes based on the command used:</p> | ||
+ | <dl><dt>--attk-hit<dd>displays a menu of current possible attacks with buttons the Player or GM can use to change the type of attack that will be done (Roll20 rolls, Player rolls, or Targeted attack, default Roll20 rolls) which is remembered for each Player and carried between campaign sessions. | ||
+ | <dt>--attk-menu-hit<dd>prompts Roll20 to make an attack roll, using 3D dice if they are enabled, displays the AC hit with supporting information on how this was calculated and displays buttons to roll for damage if the attack is successful. | ||
+ | <dt>--attk-roll<dd>displays an entry field to allow the Player to enter the value of their own dice roll (for those that prefer to roll their own dice) though the default entry will also roll the dice for the player. Subsequently, the process is the same as --attk-hit. | ||
+ | <dt>--attk-target<dd>asks the Player to select a target token for the attack. It then displays the AC the attack roll will hit and the AC of the selected target. It also automatically rolls damage for Small/Medium and Large targets, and displays the relative proportion of Hit Points for the targeted token at the time of the attack. Recommended only for the DM, as it reveals information about the target, but can be enabled for Players using the <b>--config</b> command.</dl> | ||
+ | <p>The attack menu also has buttons that allow the Player or GM to change the default attack type made: Roll20 rolls, Player rolls, or a targeted attack. It also has a button to turn 3D dice on or off. This configuration is held by Player for each Campaign, and preserved between sessions of game play.</p> | ||
+ | <p>The optional message is displayed as part of the display of the damage done on a successful hit. If a monster, the message can be three concatenated messages separated by '$$'. The message can include API Buttons if needed. The following characters must be replaced (escaped) using these replacements:</p> | ||
<table> | <table> | ||
− | <tr><th scope="row"> | + | <tr><th scope="row">Character</th><td>?</td><td>[</td><td>]</td><td>@</td><td>-</td><td>|</td><td>:</td><td>&</td><td>{</td><td>}</td></tr> |
− | + | <tr><th scope="row">Substitute</th><td>^</td><td><<</td><td>>></td><td>`</td><td>~</td><td>&#124;</td><td> </td><td>&amp;</td><td>&#123;</td><td>&#125;</td></tr> | |
− | + | <tr><th scope="row">Alternative</th><td>\\ques;</td><td>\\lbrak;</td><td>\\rbrak;</td><td>\\at;</td><td>\\dash;</td><td>\\vbar;</td><td>\\clon;</td><td>\\amp;</td><td>\\lbrc;</td><td>\\rbrc;</td></tr> | |
− | < | + | </table> |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
<br> | <br> | ||
===Use two weapons to attack=== | ===Use two weapons to attack=== | ||
<pre>--twoswords [token_id]|[prime-weapon]</pre> | <pre>--twoswords [token_id]|[prime-weapon]</pre> | ||
<p>Takes an optional token ID (if not specified uses selected token) and an optional weapon name.</p> | <p>Takes an optional token ID (if not specified uses selected token) and an optional weapon name.</p> | ||
− | <p>This command sets the system up to apply the correct penalties / bonuses when using two weapons to attack. | + | <p>This command sets the system up to apply the correct penalties / bonuses when using two weapons to attack. For example, under AD&D 2e rules only types of Fighter & Rogue can use 2 weapons at a time to attack in a round, and only Rangers do so without penalty. Using this command with the name of a <i>prime-weapon</i> specified will mark that weapon as the Primary which will get the smaller penalty of the two and will also be allowed multiple attacks per round (if using <b>InitiativeMaster API</b>). Use of any other weapon during the current or subsequent rounds will incur a larger penalty and be restricted to one attack per round regardless of type of weapon, level & proficiency. Penalties are adjusted by the Dexterity Reaction Adjustment. See AD&D 2e PHB p96 for full explanation of rules applied if using the AD&D 2e RPGMaster Library rule set.</p> |
<p>Calling this command without a prime-weapon specified will terminate two-weapon mode and no penalties will be applied for the current and subsequent rounds.</p> | <p>Calling this command without a prime-weapon specified will terminate two-weapon mode and no penalties will be applied for the current and subsequent rounds.</p> | ||
<br> | <br> | ||
+ | |||
==Weapon Management== | ==Weapon Management== | ||
===Change weapons currently in hand=== | ===Change weapons currently in hand=== | ||
<pre>--weapon [token_id]</pre> | <pre>--weapon [token_id]</pre> | ||
− | <p>Takes an optional token ID | + | <p>Takes an optional token ID - if not specified uses selected token.</p> |
− | <p>This command displays a chat menu displaying what is currently in the | + | <p>This command displays a chat menu displaying what is currently in the Character's (or NPC or creature's) hands, and allowing the Player to change what is held to any weapon, shield, or light source that they have in their items, or for spell casters any weaponised spell (a spell that requires an attack roll, either in Melee combat or at range) they have menorised. Subsequent attacks will then use the newly specified weapon(s) or weaponised spell(s). When selecting a ranged weapon that uses ammunition, the appropriate ammunition held in their on-person items is also loaded into the character's "quiver".</p> |
− | <p>Selecting a hand (either Left or Right) will display any 1-handed | + | <p>Selecting a hand (either Left or Right) will display any 1-handed items and spells that can be used for selection in a list. Selecting the Both Hands button will display all the 2-handed items (including bows) that can be used for selection in a list. Some weapons can be used either 1-handed or 2-handed, and the appropriate stats will be given based on the selection made.</p> |
+ | <p>A button is also shown to allow the Character to "lend" their hands to another Character: this will allow the receiving Character to use weapons and devices that require more than 2 hands, such as large siege engines and windlasses on ships. If the donating Character selects to take any new weapon in-hand, the "lent" hands will be removed from the receiving Character and any device needing more hands than are left will be dropped. Multiple Characters can lend hands to a receiving Character so that very large devices (such as a Battering Ram) can be used.</p> | ||
+ | <p>Buttons are also provided to set the rings worn on each hand. Rings affecting armour class and/or saves will only take effect in the system if worn.</p> | ||
<p>If being used by the GM, the menu also has an option to change the number of hands the creature has, which will then allow the creature to hold (and attack with) more than two items, or to hold items that require more than two hands.</p> | <p>If being used by the GM, the menu also has an option to change the number of hands the creature has, which will then allow the creature to hold (and attack with) more than two items, or to hold items that require more than two hands.</p> | ||
− | <p><b>Note:</b> this function is dependent on the weapon | + | <p><b>Note:</b> this function is dependent on the weapon, shield, light source and spell definitions including certain key information in a specified format: see the [Weapon & Armour Database Help] or [Magic Database Help] for details.</p> |
===Manage a dancing weapon=== | ===Manage a dancing weapon=== | ||
<pre>--dance [token_id] | weapon | [ STOP ]</pre> | <pre>--dance [token_id] | weapon | [ STOP ]</pre> | ||
<p>Takes an optional token ID (if not specified uses selected token), a mandatory weapon name, and an optional STOP command.</p> | <p>Takes an optional token ID (if not specified uses selected token), a mandatory weapon name, and an optional STOP command.</p> | ||
− | <p>This command marks the named weapon as | + | <p>This command marks the named weapon as "dancing" which means it will no longer occupy a hand, but will still appear in the list of possible attacks when an attack is made. When started, the --weapon command is automatically run so that an additional weapon can be taken in the freed-up hand.</p> |
− | <p>Appending the | + | <p>Appending the "STOP" command will un-mark the weapon as dancing. The Player will have to take the no-longer dancing weapon back in hand, if they so desire, using the --weapon command.</p> |
<p><b>Note:</b> the most effective use of the --dance command is when combined with the RoundMaster effect management system, to count down rounds of use, automatically call the --dance command at the appropriate time, and stop the dancing automatically after the appropriate duration.</p> | <p><b>Note:</b> the most effective use of the --dance command is when combined with the RoundMaster effect management system, to count down rounds of use, automatically call the --dance command at the appropriate time, and stop the dancing automatically after the appropriate duration.</p> | ||
===Manage weapon statistics=== | ===Manage weapon statistics=== | ||
Line 159: | Line 188: | ||
--quiet-modweap [token_id] | weapon | MELEE / RANGED / DMG / AMMO | adjustments</pre> | --quiet-modweap [token_id] | weapon | MELEE / RANGED / DMG / AMMO | adjustments</pre> | ||
<p>Each command takes an optional token ID (if not specified uses selected token), a mandatory weapon name, and a mandatory data type.</p> | <p>Each command takes an optional token ID (if not specified uses selected token), a mandatory weapon name, and a mandatory data type.</p> | ||
− | <p>These commands allow the specifications of any weapon currently in-hand to be adjusted programmatically. E.g. the magical plus on to-hit and damage can be adjusted round by round (as for a Sword of Dancing. The type of data to be adjusted must be identified using the data type parameter: MELEE & RANGED alter To-Hit data, and DMG & AMMO alter Damage.</p> | + | <p>These commands allow the specifications of any weapon currently in-hand to be adjusted programmatically. E.g. the magical plus on to-hit and damage can be adjusted round by round (as for a Sword of Dancing). The type of data to be adjusted must be identified using the data type parameter: MELEE & RANGED alter To-Hit data, and DMG & AMMO alter Damage.</p> |
− | <p>The weapon parameter can name a specific weapon name, a type of weapon (e.g. bow, long-blade, club etc), a changed weapon name (previously changed by this command), or even | + | <p>The weapon parameter can name a specific weapon name, a type of weapon (e.g. bow, long-blade, club etc), a changed weapon name (previously changed by this command), or even 'all' for all currently held weapons. All data of the specified data type for all weapons that match the weapon parameter may then be altered, using the comma-separated adjustments parameter. Each adjustment is of the format <i><pre>field_id:[=][+/-]value</pre></i> where the field_ids are:</p> |
<table><tr><td>w:</td><td>weapon name</td><td>t:</td><td>weapon type</td><td>st:</td><td>weapon super-type</td></tr> | <table><tr><td>w:</td><td>weapon name</td><td>t:</td><td>weapon type</td><td>st:</td><td>weapon super-type</td></tr> | ||
<tr><td>sb:</td><td>strength bonus</td><td>db:</td><td>dexterity bonus</td><td>+:</td><td>magical plus</td></tr> | <tr><td>sb:</td><td>strength bonus</td><td>db:</td><td>dexterity bonus</td><td>+:</td><td>magical plus</td></tr> | ||
Line 173: | Line 202: | ||
===Adding & removing weapons and ammunition=== | ===Adding & removing weapons and ammunition=== | ||
<pre>--edit-weapons [token_id]</pre> | <pre>--edit-weapons [token_id]</pre> | ||
− | <p>Takes an optional token ID | + | <p>Takes an optional token ID - if not specified uses selected token.</p> |
− | <p>The very best way for the Character, NPC or creature to acquire weapons (or any other items including magic items) is to use the <b>MagicMaster API</b> and its commands and databases. However, AttackMaster provides a small subset of those facilities to allow the DM and/or Players to add weapons, ammo & armour to their Character Sheet item bags. Once added, these items can be taken | + | <p>The very best way for the Character, NPC or creature to acquire weapons (or any other items including magic items) is to use the <b>MagicMaster API</b> and its commands and databases. However, AttackMaster provides a small subset of those facilities to allow the DM and/or Players to add weapons, ammo & armour to their Character Sheet item bags. Once added, these items can be taken 'in-hand' by the Character (using the <b>--weapon</b> command) and then used to attack.</p> |
<p>The advantage of doing this over just typing the item names into the Character Sheet tables is that the items are assured to exist in the weapon, ammo & armour databases that come with the API and so all other aspects of the API will work properly.</p> | <p>The advantage of doing this over just typing the item names into the Character Sheet tables is that the items are assured to exist in the weapon, ammo & armour databases that come with the API and so all other aspects of the API will work properly.</p> | ||
<p>This command and <b>--edit-armour</b> are identical, and call the same menu.</p> | <p>This command and <b>--edit-armour</b> are identical, and call the same menu.</p> | ||
+ | ===Blanking a weapon from attack tables=== | ||
+ | <pre>--blank-weapon [token_id] | weapon | [ SILENT ]</pre> | ||
+ | <p>Takes an optional token ID (if not specified uses selected token), the mandatory name of a weapon, and an optional "SILENT" command.</p> | ||
+ | <p>This command will programmatically remove the named weapon, and any associated ammunition for ranged weapons, from all attack tables on the character sheet, and from the system in-hand table and quiver, on the Character Sheet associated with the specified or selected token. This is especially useful for "weaponised" spells that need to be immediately removed once cast and attacked with.</p> | ||
<br> | <br> | ||
+ | |||
==Ammunition Management== | ==Ammunition Management== | ||
===Ammunition recovery=== | ===Ammunition recovery=== | ||
<pre>--ammo [token_id]</pre> | <pre>--ammo [token_id]</pre> | ||
− | <p>Takes an optional token ID | + | <p>Takes an optional token ID - if not specified uses selected token.</p> |
<p>This command displays a chat menu of ammunition that the Character has on their person (not just the ammo that they have in their quiver or in-hand) including any ammunition that has run-out but might still be recoverable. The Player can ask the DM if they can retrieve any ammunition of the types displayed that they have recently used and, once the DM responds with the amount recovered, click on the type of ammunition in the list and enter the amount recovered. Both the amount on their person, and any amount in their quiver or in-hand are updated.</p> | <p>This command displays a chat menu of ammunition that the Character has on their person (not just the ammo that they have in their quiver or in-hand) including any ammunition that has run-out but might still be recoverable. The Player can ask the DM if they can retrieve any ammunition of the types displayed that they have recently used and, once the DM responds with the amount recovered, click on the type of ammunition in the list and enter the amount recovered. Both the amount on their person, and any amount in their quiver or in-hand are updated.</p> | ||
<p><b>Note:</b> enter the amount recovered <em>not</em> the new total. The amount entered will be added to the current amount held, and then this new value set as the new maximum. A negative amount can also be entered, which will be removed from the current quantity and will also set the new maximum.</p> | <p><b>Note:</b> enter the amount recovered <em>not</em> the new total. The amount entered will be added to the current amount held, and then this new value set as the new maximum. A negative amount can also be entered, which will be removed from the current quantity and will also set the new maximum.</p> | ||
<p><b>Note:</b> after a Long Rest (see <b>MagicMaster API</b>) all ammunition maximum totals are set to current quantities at that time. It is assumed that during the period of a long rest, some creature will have found any loose ammo, or it will otherwise have been broken or lost.</p> | <p><b>Note:</b> after a Long Rest (see <b>MagicMaster API</b>) all ammunition maximum totals are set to current quantities at that time. It is assumed that during the period of a long rest, some creature will have found any loose ammo, or it will otherwise have been broken or lost.</p> | ||
− | <p><b>Note:</b> ammunition that has the item-type of <i> | + | <p><b>Note:</b> ammunition that has the item-type of <i>'charged'</i> will appear on the menu with a grey box which cannot be selected, indicating that the ammo cannot be recovered - such ammunition always breaks on contact: e.g. glass arrows.</p> |
===Ammunition quantity amendment=== | ===Ammunition quantity amendment=== | ||
<pre>--setammo [token_id] | ammo_name | [ [+/-]cur_qty / = ] | [ [+/-]max_qty / = ] | [ SILENT ]</pre> | <pre>--setammo [token_id] | ammo_name | [ [+/-]cur_qty / = ] | [ [+/-]max_qty / = ] | [ SILENT ]</pre> | ||
− | <p>Takes an optional token ID (if not specified uses selected token), the unique name of the ammunition, an optional value for the current quantity, optionally preceded by +/- or replaced by an =, an optional value for the maximum quantity with the same +/- & = possibilities, and an optional parameter of | + | <p>Takes an optional token ID (if not specified uses selected token), the unique name of the ammunition, an optional value for the current quantity, optionally preceded by +/- or replaced by an =, an optional value for the maximum quantity with the same +/- & = possibilities, and an optional parameter of "Silent" (case insensitive).</p> |
<p>This command allows programmatic or macro alteration of the quantity of a type of ammo:</p> | <p>This command allows programmatic or macro alteration of the quantity of a type of ammo:</p> | ||
− | <ul><li>The current quantity and/or the maximum held (i.e. the amount to which ammunition can be recovered up to | + | <ul><li>The current quantity and/or the maximum held (i.e. the amount to which ammunition can be recovered up to - see section 4.1 Ammunition Recovery, above) can be set to absolute values just by entering numbers for the parameters.</li> |
<li>Either parameter can be preceded by a + or -, in which case the parameter will modify the corresponding current value, rather than replacing it.</li> | <li>Either parameter can be preceded by a + or -, in which case the parameter will modify the corresponding current value, rather than replacing it.</li> | ||
<li>Either parameter can be an = by itself. In this instance, the corresponding value is set to the other corresponding value (after any modification) i.e. putting = for cur_qty sets the current quantity held to be the maximum possible, or putting = for max_qty sets the maximum possible to be the current quantity. Putting = for both does nothing.</li> | <li>Either parameter can be an = by itself. In this instance, the corresponding value is set to the other corresponding value (after any modification) i.e. putting = for cur_qty sets the current quantity held to be the maximum possible, or putting = for max_qty sets the maximum possible to be the current quantity. Putting = for both does nothing.</li> | ||
<li>No value can go below 0, and the current quantity will be constrained at or below the maximum quantity.</li></ul> | <li>No value can go below 0, and the current quantity will be constrained at or below the maximum quantity.</li></ul> | ||
<p>So, for example, this command will set the maximum quantity to 10 and set the current quantity to be equal to it:</p> | <p>So, for example, this command will set the maximum quantity to 10 and set the current quantity to be equal to it:</p> | ||
− | <pre>!attk | + | <pre>!attk -setammo @{selected|token_id}|Flight-Arrow+1|=|10|silent</pre> |
− | <p>If the | + | <p>If the "Silent" parameter is not specified, then the Ammunition Recovery chat menu will display with the amended values once complete, and a message is displayed with the changes that occurred.</p> |
− | <p><b>Note:</b> if more than one ammo item of the same name is listed in the | + | <p><b>Note:</b> if more than one ammo item of the same name is listed in the items table (see [RPGMaster CharSheet Setup] handout), only the first item found will be amended. If no item of that name is found, nothing happens and no menus or messages are displayed.</p> |
<br> | <br> | ||
+ | |||
==Armour Class and Saving Throws== | ==Armour Class and Saving Throws== | ||
===Edit Armour=== | ===Edit Armour=== | ||
<pre>--edit-armour [token_id] | <pre>--edit-armour [token_id] | ||
--edit-armor [token_id]</pre> | --edit-armor [token_id]</pre> | ||
− | <p>Takes an optional token ID | + | <p>Takes an optional token ID - if not specified uses selected token.</p> |
− | <p>The very best way for the Character, NPC or creature to acquire armour (or any other items including magic items) is to use the <b>MagicMaster API</b> and its commands and databases. However, AttackMaster provides a small subset of those facilities to allow the DM and/or Players to add weapons, ammo & armour to their Character Sheet item bags. Once added, these items can be taken | + | <p>The very best way for the Character, NPC or creature to acquire armour (or any other items including magic items) is to use the <b>MagicMaster API</b> and its commands and databases. However, AttackMaster provides a small subset of those facilities to allow the DM and/or Players to add weapons, ammo & armour to their Character Sheet item bags. Once added, these items can be taken 'in-hand' by the Character (using the <b>--weapon</b> command), and improve the Armour Class of the Character appropriately.</p> |
− | <p>The advantage of doing this over just typing the item names into the Character Sheet tables is that the items are assured to exist in the weapon, ammo & armour databases that come with the API and so all other aspects of the API will work properly (see section 5.2 below).</p> | + | <p>The advantage of doing this over just typing the item names into the Character Sheet tables is that the items are assured to exist in the weapon, ammo & armour databases that come with the API and so all other aspects of the API will work properly (e.g. see section 5.2 below).</p> |
<p>This command is identical to the <b>--edit-weapons</b> command and uses the same menu.</p> | <p>This command is identical to the <b>--edit-weapons</b> command and uses the same menu.</p> | ||
===Review Armour Class=== | ===Review Armour Class=== | ||
<pre>--checkac [token_id] | [ SILENT ] | [SADJ / PADJ / BADJ]</pre> | <pre>--checkac [token_id] | [ SILENT ] | [SADJ / PADJ / BADJ]</pre> | ||
− | <p>Takes an optional token ID (if not specified uses selected token), an optional | + | <p>Takes an optional token ID (if not specified uses selected token), an optional "Silent" command, and an optional damage type which can be "SADJ", "PADJ" or "BADJ" (the "Silent" and damage type parameters are not case sensitive).</p> |
− | <p>This command analyses the items in the | + | <p>This command analyses the items in the Character's items table (see [RPGMaster CharSheet Setup] handout) using the information in the various item databases supplied / created by the API(s), and taking into account the current Dexterity bonuses calculates the current Armour Class of the Character. It then displays a chat message with its results and an explanation of how it came to them. If the optional damage type is provided, the calculation takes this into account.</p> |
<p>The system can use the information in the databases to take into account magical armour plusses, combined effects of armour that can work together (like Armour and Shields), exclude combinations that are not allowed (like Rings of Protection with magical armour), and the armour types allowed for various character classes and races including specialist variations.</p> | <p>The system can use the information in the databases to take into account magical armour plusses, combined effects of armour that can work together (like Armour and Shields), exclude combinations that are not allowed (like Rings of Protection with magical armour), and the armour types allowed for various character classes and races including specialist variations.</p> | ||
<p>The system automatically updates this information any time the Character changes what is in their hands (e.g. if they pick up or put down a shield) using the <b>--weapon</b> command. If using the InitMaster API, the command is also run every time the character does an Initiative roll. If using the MagicMaster API, the command is also run any time items are looted from a chest or NPC, or stored away or given to another character.</p> | <p>The system automatically updates this information any time the Character changes what is in their hands (e.g. if they pick up or put down a shield) using the <b>--weapon</b> command. If using the InitMaster API, the command is also run every time the character does an Initiative roll. If using the MagicMaster API, the command is also run any time items are looted from a chest or NPC, or stored away or given to another character.</p> | ||
− | <p>The system remembers on the Character Sheet what its calculations are each time. If the most recent calculation results in a change in Armour Class for the character, the | + | <p>The system remembers on the Character Sheet what its calculations are each time. If the most recent calculation results in a change in Armour Class for the character, the character's token AC (if displayed) will be modified by the difference between the old and new values. This modified value will be shown on the Armour Class Review message in the chat window if it is different from the calculated value.</p> |
<p><b>Note:</b> the token displayed AC is only modified by the difference between the previous and current calculations. This allows magical and other effects (such as those managed by the RoundMaster API) to alter the token displayed AC and not be overwritten by a change in calculated AC, but still take into account the change. The token AC can be manually updated at any time without impact on this functionality, to overcome any errors.</p> | <p><b>Note:</b> the token displayed AC is only modified by the difference between the previous and current calculations. This allows magical and other effects (such as those managed by the RoundMaster API) to alter the token displayed AC and not be overwritten by a change in calculated AC, but still take into account the change. The token AC can be manually updated at any time without impact on this functionality, to overcome any errors.</p> | ||
− | <p><b>Note:</b> if the token is configured following the Master Series API standard (see CommandMaster API documentation), the token bar for the displayed AC is normally hidden. if the calculated AC and token displayed AC are different (see above) then the AC token bar appears, representing the difference between the two. This acts as a visual reminder to the DM and Player that the token is the subject of some effect on AC | + | <p><b>Note:</b> if the token is configured following the Master Series API standard (see CommandMaster API documentation), the token bar for the displayed AC is normally hidden. if the calculated AC and token displayed AC are different (see above) then the AC token bar appears, representing the difference between the two. This acts as a visual reminder to the DM and Player that the token is the subject of some effect on AC - it also helps to identify if there is a difference in error, so that this can be manually rectified (by manually altering the token displayed AC). Once the two are again the same and the <b>-check-ac</b> command run, the token AC bar will again be hidden.</p> |
===Saving Throws=== | ===Saving Throws=== | ||
<pre>--save [token_id] | [ situation-mod ] | <pre>--save [token_id] | [ situation-mod ] | ||
--save [token_id] | [ situation-mod ] | save-type | saving-throw</pre> | --save [token_id] | [ situation-mod ] | save-type | saving-throw</pre> | ||
− | <p>Takes an optional token ID (if not specified uses selected token), and different forms of the command take an optional situational modifier to the saving throw, a type of save (which can be one of | + | <p>Takes an optional token ID (if not specified uses selected token), and different forms of the command take an optional situational modifier to the saving throw, a type of save (which can be one of 'paralysis', 'poison', 'death', 'rod', 'staff', 'wand', 'petrification', 'polymorph', 'breath', or 'spell', not sensitive to case), and the base, unmodified saving throw achieved on a dice.</p> |
<p>This command can either display a menu from which to display and manage the saving throw table, and make saving throws or, in its second form, to make a saving throw and check the result against the saving throw table.</p> | <p>This command can either display a menu from which to display and manage the saving throw table, and make saving throws or, in its second form, to make a saving throw and check the result against the saving throw table.</p> | ||
− | <p>The first form shows all the possible saves that can be made, the saving | + | <p>The first form shows all the possible saves that can be made, the saving throw that needs to be achieved to make the save, and any modifiers that apply to this particular character. There are buttons to modify the saving throw table and the modifiers, to apply a "situational modifier" to immediate saving throws (the "situational modifier" only applies to current rolls and is not remembered), and/or to check the current saving throw table automatically (taking into account race, class, level, and magic items on their person). Also, each type of saving throw can actually be made by clicking the buttons provided. Doing so effectively runs the second form of the command.</p> |
<p>The situational modifier can optionally be passed in as a value with the command call if so desired, instead of selecting via the button on the menu.</p> | <p>The situational modifier can optionally be passed in as a value with the command call if so desired, instead of selecting via the button on the menu.</p> | ||
− | <p>Running the second form of the command (or selecting to make a saving throw from the first | + | <p>Running the second form of the command (or selecting to make a saving throw from the first form's menu) will execute the saving throw (as a dice roll if this is specified instead of a straight value) of the specified type, using the data in the character's saving throw table to assess success or failure, displaying the outcome and the calculation behind it in the chat window.</p> |
+ | ===Attribute Checks=== | ||
+ | <pre>--attr-check [token_id] | [situation-mod] | [message] | [DCval]</pre> | ||
+ | <p>Takes an optional token ID (defaults to the selected token), an optional situational modifier, an optional message to display as the last action, and an optional "DC value".</p> | ||
+ | <p>This command presents a menu which can be used to perform attribute checks for the character. The menu displays the character's attribute values and the currently applicable modifiers for attribute checks. Each line has a button which will run the Attribute Check roll and display success or failure. As for the Saving Throw table, buttons also exist to set a situational modifier and to check the modifiers against current magic items in use and magic in effect.</p> | ||
+ | <p>A DC value parameter is provided to emulate attribute check modifiers for D&D 3e and later, though as these checks and modifiers work very differently this is not a direct equivalence. If a DC value is set as a parameter, 10 minus the DC value is added to all the modifiers.</p> | ||
<br> | <br> | ||
+ | |||
==Other commands== | ==Other commands== | ||
===Display help on these commands=== | ===Display help on these commands=== | ||
Line 233: | Line 274: | ||
<p>Takes two optional arguments, the first a switchable flag name, and the second TRUE or FALSE.</p> | <p>Takes two optional arguments, the first a switchable flag name, and the second TRUE or FALSE.</p> | ||
<p>Allows configuration of several API behaviors. If no arguments given, displays menu for DM to select configuration. Parameters have the following effects:</p> | <p>Allows configuration of several API behaviors. If no arguments given, displays menu for DM to select configuration. Parameters have the following effects:</p> | ||
− | + | <table> | |
− | + | <tr><th>Flag</th><th>True</th><th>False</th></tr> | |
− | + | <tr><th scope="row">FANCY-MENUS</th><td>Chat templates will use textured backgrounds</td><td>Chat templates will use plain backgrounds</td></tr> | |
− | + | <tr><th scope="row">PROF</th><td>Strictly apply non-proficient weapon penalties as per PHB</td><td>Use the non-proficient weapon penalty displayed on the Character Sheet</td></tr> | |
− | + | <tr><th scope="row">ALL-WEAPS</th><td>Allow any character of any class to use and become proficient in any weapon.</td><td>Restrict the use of weapons by class to some degree set by WEAP-CLASS</td></tr> | |
− | + | <tr><th scope="row">WEAP-CLASS</th><td>Weapons not allowed to a class get a penalty of -100</td><td>Weapons not allowed to a class get double non-proficient penalty</td></tr> | |
− | + | <tr><th scope="row">ALL-ARMOUR</th><td>All armour types allowed for all classes</td><td>Armour not allowed to a class not included in AC calculations</td></tr> | |
− | + | <tr><th scope="row">MASTER-RANGE</th><td>Ranged weapon Mastery gives double damage at Point Blank range</td><td>Ranged weapon Mastery not allowed, as per PHB</td></tr> | |
− | + | <tr><th scope="row">SPECIALIST-RULES</th><td>Only Specialist Wizards specified in the PHB get an extra spell per spell level</td><td>Any non-Standard Wizard gets an extra spell per spell level</td></tr> | |
− | + | <tr><th scope="row">SPELL-NUM</th><td>Spellcaster spells per level restricted to PHB rules</td><td>Spellcaster spells per level alterable using Misc Spells button</td></tr> | |
− | + | <tr><th scope="row">ALL-SPELLS</th><td>Spellcaster spell schools are unrestricted</td><td>Spellcaster spell schools are restricted by class rules</td></tr> | |
− | + | </table> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
===Check database completeness & integrity=== | ===Check database completeness & integrity=== | ||
<pre>--check-db [ db-name ]</pre> | <pre>--check-db [ db-name ]</pre> | ||
− | <p>Takes an optional database name or part of a database name: if a partial name, checks all character sheets with the provided text in their name that also have | + | <p>Takes an optional database name or part of a database name: if a partial name, checks all character sheets with the provided text in their name that also have '-db' as part of their name. If omitted, checks all character sheets with '-db' in the name. Not case sensitive. Can only be used by the GM.</p> |
− | <p>This command finds all databases that match the name or partial name provided (not case sensitive), and checks them for completeness and integrity. The command does not alter any ability macros, but ensures that the casting time ( | + | <p>This command finds all databases that match the name or partial name provided (not case sensitive), and checks them for completeness and integrity. The command does not alter any ability macros, but ensures that the casting time ('ct-') attributes are correctly created, that the item lists are sorted and complete, and that any item-specific power & spell specifications are correctly built and saved.</p> |
− | <p>This command is very useful to run after creating/adding new items as ability macros to the databases (see | + | <p>This command is very useful to run after creating/adding new items as ability macros to the databases (see Database-specific handouts). It does not check if the ability macro definition itself is valid, but if it is then it ensures all other aspects of the database consistently reflect the new ability(s).</p> |
+ | ===Extract database for Editing=== | ||
+ | <pre>--extract-db [db-name]</pre> | ||
+ | <p>Takes an optional database name or part of a database name: if a partial name, checks all character sheets with the provided text in their name that also have '-db' as part of their name. If omitted, checks all character sheets with '-db' in the name. Not case sensitive. Can only be used by the GM.</p> | ||
+ | <p>Extracts a named database or all provided databases from the loaded RPGMaster Library, and builds the database in a Character Sheet format: see the Database specific help handouts for further details of this format. This allows editing of the standard items in the databases, adding additional items to the databases, or for items to be copied into the GM's own databases. Unlike with previous versions of the Master Series APIs, these extracted databases will not be overwritten by the system. <b>However:</b> using extracted databases will slow the system down - the use of the internal API databases held in memory is much faster. The best use for these extracts is to examine how various items have been programmed so that the GM can create variations of the standard items in their own databases by copying and making small alterations to the definitions, and then the extracted databases can be deleted.</p> | ||
+ | <p><b>Important:</b> Once a Character Sheet database is changed or deleted, run the <b>--check-db</b> command against any database (especially a changed one) to prompt the APIs to re-index the objects in all databases.</p> | ||
===Handshake with other APIs=== | ===Handshake with other APIs=== | ||
− | <pre> | + | <pre>-hsq from|[command] |
− | + | -handshake from|[command]</pre> | |
− | <p>Either form performs a handshake with another API, whose call (without the | + | <p>Either form performs a handshake with another API, whose call (without the '!') is specified as <i>from</i> in the command parameters (the response is always an <b>-hsr</b> command). The command calls the <i>from</i> API command responding with its own command to confirm that RoundMaster is loaded and running: e.g. </p> |
− | + | <dl><dt>Received:<dd><i>!attk -hsq init</i> | |
− | + | <dt>Response:<dd><i>!init -hsr attk</i></dl> | |
− | <p>Optionally, a command query can be made to see if the command is supported by RoundMaster if the <i>command</i> string parameter is added, where <i>command</i> is the RoundMaster command (the | + | <p>Optionally, a command query can be made to see if the command is supported by RoundMaster if the <i>command</i> string parameter is added, where <i>command</i> is the RoundMaster command (the '--' text without the '--'). This will respond with a <i>true/false</i> response: e.g.</p> |
− | + | <dl><dt>Received:<dd><i>!attk -handshake init|menu</i> | |
− | + | <dt>Response:<dd><i>!init -hsr attk|menu|true</i></dl> | |
===Switch on or off Debug mode=== | ===Switch on or off Debug mode=== | ||
<pre>--debug (ON/OFF)</pre> | <pre>--debug (ON/OFF)</pre> | ||
<p>Takes one mandatory argument which should be ON or OFF.</p> | <p>Takes one mandatory argument which should be ON or OFF.</p> | ||
− | <p>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 | + | <p>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.</p> |
<br> | <br> | ||
+ | |||
=Configuring the Token and Character Sheet for use with the API= | =Configuring the Token and Character Sheet for use with the API= | ||
<p>At the time of writing this Wiki, the RPGMaster APIs, including AttackMaster, are initially configured and distributed to support the Advanced Dungeons & Dragons 2nd Edition RPG and matching Advanced 2nd Edition Character Sheet on Roll20. The Character Sheets and tokens that represent them are best set up for game play by using the facilities provided by the APIs, and especially those menus and commands provided by the [[Script:CommandMaster#Setup_Tokens_.26_Character_Sheets|CommandMaster API]]. However, if desired, it is possible to set up Character Sheets and tokens manually (especially if not using all the APIs): instructions on how to achieve this are provided in the [[API:RPGMaster-CharacterSheets|RPGMaster Character Sheet and Token setup Handout and Wiki page]].</p> | <p>At the time of writing this Wiki, the RPGMaster APIs, including AttackMaster, are initially configured and distributed to support the Advanced Dungeons & Dragons 2nd Edition RPG and matching Advanced 2nd Edition Character Sheet on Roll20. The Character Sheets and tokens that represent them are best set up for game play by using the facilities provided by the APIs, and especially those menus and commands provided by the [[Script:CommandMaster#Setup_Tokens_.26_Character_Sheets|CommandMaster API]]. However, if desired, it is possible to set up Character Sheets and tokens manually (especially if not using all the APIs): instructions on how to achieve this are provided in the [[API:RPGMaster-CharacterSheets|RPGMaster Character Sheet and Token setup Handout and Wiki page]].</p> | ||
Line 283: | Line 316: | ||
=Weapon, Ammo & Armour Databases= | =Weapon, Ammo & Armour Databases= | ||
− | <p>As with other items that can be acquired and used by Characters, NPCs and Creatures in the RPGMaster suite, the definitions for Weapons, Ammunition and Armour | + | <p>As with other items that can be acquired and used by Characters, NPCs and Creatures in the RPGMaster suite, the definitions for Weapons, Ammunition and Armour for use by the AttackMaster API are held in Character Sheet databases. See the [[API:RPGMaster-WeaponsArmorDB|Weapon, Ammo & Armour Database Help handout and Wiki page]] for information on these databases.</p> |
− | == | + | = Changelog = |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | {{changelog version|1.5.02|2023-05-31|* Fixed bug with calculation of magic hit adjustment, which was treating numbers as strings.}} | |
− | {| | + | {{changelog version|1.5.01|2023-05-19|* Fixed issues with checking AC for TotalAC item types. |
− | + | * Added data attribute to suppress a character's dexterity bonus. | |
− | |- | + | * Added warning if trying to change weapon when holding a cursed weapon. |
− | + | * Support weapons and magic item attacks that use multiple power charges. | |
− | + | * Added ac combination rules to MI database data specifications. | |
− | + | * Fixed ac support for magic helms. | |
− | + | * Support the item charge type 'single-uncharged' for charged items with non-standard discharging mechanisms. | |
− | + | * Display the ac mod effect of each valid item on the Check AC dialog. | |
− | + | * Fix --mod-weap command selection of specified weapons for mod-ing.}} | |
− | + | {{changelog version|1.4.07|2023-04-15|* Added 'discharging' item type which is charged but does not divide.}} | |
− | + | {{changelog version|1.4.06|2023-04-06|* Fixed bug in manual Update Saves dialog which prevented changes. | |
− | + | * Fixed Change Weapon dialog to put rings in correct hand. | |
− | + | * Fixed issues with inconsistencies in hyphenated item names & spell storing items.}} | |
− | + | {{changelog version|1.4.05|2023-03-02|* Added character attribute checks to saving throw functions. | |
− | {| | + | * Added magical attacks by MIs to Attack menu. |
− | + | * Allow MIs with magical attacks (item class Magic) to be taken in-hand with Change Weapon. | |
− | + | * Added "successcmd" as tag in targeted attacks that have magical charges expended on successful hit. | |
− | + | * Fixed Targeted attack type (i.e. S,P & B) specific calculations for -ve ACs.}} | |
− | + | {{changelog version|1.4.04|2023-01-21|* Fixed error in attack calculations if effects were in play that altered token Thac0 bar. | |
− | |- | + | * Added support for configurable default token bars. |
− | + | * Added ammo range '=' qualifier which forces literal ranges without multiplication. | |
− | + | * Given Ammo its own list on Edit weapons & armour dialogue. | |
− | | | + | * Changed attack calcs to show changes to token thac0 as magic-adjust to the To-Hit calc.}} |
− | + | {{changelog version|1.4.03|2023-01-15|* Allow creature innate attack specs to be either of attk_name,dmg_roll,speed,type or dmg_roll,attk_name,speed,type. | |
− | + | * Fixed error in parsing the class & race dBs for attks}} | |
− | + | {{changelog version|1.4.02|2022-12-16|* Specify weapons and armour for creatures with probability of different sets. | |
− | + | * Also added ammo reuse type 2: becomes only possible ammo of several for that weapon e.g. spitting snake venom, and type 3: reduces in qty by 1, and all other ammo for same weapon increases qty by 1.}} | |
− | + | {{changelog version|1.4.01|2022-11-26|* Added Fighting Style database and implementation. | |
− | + | * Improved the way Situational Modifiers are shown & applied for saves. | |
− | + | * Fixed targeted attack failure on certain armour types. | |
− | + | * Fixed help menu. | |
− | + | * Added support for creature database.}} | |
− | + | {{changelog version|1.3.04|2022-11-15|* Fixed sub-race to-hit bonus calculation.}} | |
− | + | {{changelog version|1.3.03|2022-10-19|* Added Race database parsing & use. | |
− | + | * Fixed error in taking a weapon in hand that can be either 1 or 2 handed (such as a Bastard Sword).}} | |
− | + | {{changelog version|1.3.02|2022-10-14|* Added support for "weaponised" spells - spells that act exactly like weapons (and spells).}} | |
− | + | {{changelog version|1.3.01|2022-10-04|* Fixed bugs in rings that execute 'on:' and 'off:' commands}} | |
− | + | {{changelog version|1.3.00|2022-10-01|* Major release to extract all RPG version-specific data and rule processing to RPGMaster Library API}} | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | | | + | |
− | | | + | |
− | + | ||
− | + | ||
− | | | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | {| | + | |
− | + | ||
− | |- | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | |- | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | |- | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | |- | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | | | + | |
− | + | ||
− | + | ||
− | |- | + | |
− | + | ||
− | + | ||
− | | | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | {| | + | |
− | | | + | |
− | |- | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | {| | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | |- | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | {| | + | |
− | + | ||
− | |- | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | || | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
{{changelog version|2.046|2022-03-28|* Added Class database with PHB Character Class definitions. | {{changelog version|2.046|2022-03-28|* Added Class database with PHB Character Class definitions. | ||
* Added Attacks database with standard attack calculation definitions. | * Added Attacks database with standard attack calculation definitions. | ||
Line 741: | Line 380: | ||
[[Category:AD&D 2E]] | [[Category:AD&D 2E]] | ||
+ | [[Category:API:RPGMaster]] |
Latest revision as of 16:52, 11 June 2023
Page Updated: 2023-06-11 |
Main Page: API:Script Index
Version: 1.5.02
Last Modified: 2023-05-31
Code: AttackMaster
Dependencies: RPGMlibrary AD+D2e
Conflicts: None
AttackMaster API provides functions to manage weapons, armour & shields, including taking weapons in hand and using them to attack, for the AD&D 2E sheet. It's a part of the RPGMaster suite of APIs.
It uses the attack definitions defined in the Attacks-DB attack definition database (which the GM / Game Creator can add to or replace), taking into account: ranged weapon ammo management with ranges varying appropriately and range penalties/bonuses applied; Strength & Dexterity bonuses where appropriate; any magic bonuses to attacks that is in effect (if used with RoundMaster API effects); penalties & bonuses for non-proficiency, proficiency, specialisation & mastery; penalties for non-Rangers attacking with two weapons; use of 1-handed, 2-handed or many-handed weapons and restrictions on the number of weapons & shields that can be held at the same time; plus many other features. This API requires RPGMaster Library to work (make sure it is loaded alongside AttackMaster), and works best with the MagicMaster API and its databases which hold the data for automatic definition of weapons and armour. However, some attack commands will generally work with manual entry of weapons onto the character sheet. The CommandMaster API can be used by the GM to easily manage weapon proficiencies.
Specification for weapons, armour & shields are implemented as ability macros in specific database character sheets. This API comes with a wide selection of weapon and armour macros, held in the MI-DB-Weapons, -Ammo and -Armour databases that are created and updated automatically when the API is run. If the MagicMaster API is also loaded, it provides many more specifications for standard and magic items that are beneficial to melee actions and armour class. The GM can add to the provided items in the databases using standard Roll20 Character Sheet editing, as explained in the associated weapons, ammo & armour database Help Handout and Wiki page.
[edit] Forum
[edit] AttackMaster Database Help
Weapon, Ammo & Armour Database - RPGMaster Weapons & Armour database Wiki page
Attack Templates Database - Attack macro definition database Wiki page
[edit] Configuring Character Sheets
RPGMaster Character Sheet setup - RPGMaster Character Sheet setup Wiki page
[edit] How AttackMaster Works
Specifying a token Most of the AttackMaster API commands need to know the token_id of the token that represents the character, NPC or creature that is to be acted upon. This ID can be specified in two possible ways:
In either case, if more than one token is selected at the time of the call then using either @{selected|token_id} to specify the token in the command call, or allowing the command to find a selected token, is likely (but not guaranteed) to take the first token that was selected. To avoid ambiguity, it is generally recommended to make command calls with only one token selected on the map window. Who can make AttackMaster API command calls The majority of API command calls can be made by both the GM and all Players. The typical means for command calls to be made is via Character Sheet Token Action Buttons (standard Roll20 functionality - see Roll20 Help Centre for information) which trigger Ability macros on the Character Sheet which simply make the API command call. The Character Sheets can be controlled by the GM or Players. The API knows if it is a GM or a Player that has triggered the call, and reacts accordingly. Weapons that can be used Any weapon in the Weapons tables on the Character Sheet can be used for attacks. However, the very best approach is to use the functions in this and other RPGMaster APIs to manage weapon choice. Weapon definitions are held in weapon databases: see Database-specific handouts for details. All standard weapons are included, as well as many magic variations. Allocating weapons to a Character Weapons and ammunition are held in the Items table, which holds data on all items that the Character / NPC / creature has on their person - see the Character Sheet setup help handout regarding where the Item table is on the Character Sheet and the data that is held in it. The added weapon must have a listing in the Weapons database. The easiest way to enter the correct data into the Items table is to use the MagicMaster API, which supports finding and looting weapons e.g. from a chest or a dead body, or just the DM or Player choosing weapons from a menu. If a Ranged Weapon that uses ammunition is added, a quantity of the respective ammunition (or multiple types of ammunition) must also be added to the Items table. Multiple weapons of many different types can be added, including those with magical properties. The system will take all the weapon statistics into account using the information in the associated databases. Selecting weapons to attack with Each Character / NPC / creature has a defined number of hands (which can be different from 2), and AttackMaster provides a menu to take any weapon(s) in hand. Doing so enters all the correct information from the weapons database into the Weapons, Damage and Ranged Weapons tables, and the correct ammunition type(s) held in the Items table into the Ammo table. Making attacks Several different attack approaches are supported by the API.
Ammunition The system handles both Ranged weapons that take ammunition, such as bows and slings, and also "self-ammoed" Ranged weapons like daggers, that can be thrown at a target. The quantity of ammunition or self-ammoed weapons is managed by the system: as they are used in attacks, the quantity in the Characters Item table decreases. A menu can be called to recover ammunition, in agreement with the DM - the same menu can be used to add or remove quantities of ammunition for other reasons (such as being purchased). Some types of ammo always breaks and can\'t be recovered (for example glass arrows) - this is charged ammo. Ranged weapon and ammunition ranges Each type of ammunition has a range with the weapon used to fire it. These ranges can be different for different types of weapon - thus a longbow can fire an flight arrow further than a short bow, and a sheaf arrow has different ranges than the flight arrow with each. The ranges that can be achieved by the weapon and ammunition combination are displayed when they are used in an attack, and the Player is asked to select which range to use, which then applies the correct range modifier to the attack roll. Dancing weapons The system can support any weapon becoming a dancing weapon, with qualities that can be the same as or different from a Sword of Dancing. In the system a dancing weapon does not have to be held in hand in order for it to be available for attacks and, if using the InitiativeMaster API, the weapon is also automatically added to the Turn Order Tracker for its attacks to be performed in battle sequence. All of this can be achieved automatically if used with the RoundMaster API, with durations of \'warm up\' and \'dancing\' dealt with, as well as magical properties changing as the rounds progress - that function requires some editing of the Effects database to adapt for a particular weapon - see the RoundMaster API Effect Database documentation for details. Fighting Styles The Complete Fighter\'s Handbook introduced the concept of Fighters being able to become proficient or a specialist in various styles of fighting, such as with two-handed melee weapons, a weapon and a shield, and such like. These are supported in the RPGMaster APIs via the Styles-DB database, and functions in the CommandMaster API, InitiativeMaster API as well as here in AttackMaster. Each time weapons & shields in-hand are changed using the Attack Menu / Change Weapons menu, AttackMaster checks what is in-hand against any Fighting Styles the character is proficient or specialised in (as defined via the CommandMaster Token-Setup / Set Proficiencies menu). If any are applicable given what is currently in use, AttackMaster will apply the relevant fighting style benefits to the character and their use of their weapons and armour. The APIs are distributed with rules defined for the four styles defined in The Complete Fighter\'s Handbook, and DMs and game authors can add their own as desired. See the Styles Database Help handout for more information. Armour Class management The system continually checks the Armour Class of each Character / NPC / creature by examining the information on the Character Sheet and the items in the Item table. Armour and Shields can be placed in the Items table which will be discovered, and the specifications from the Armour database used to calculate the appropriate AC under various conditions and display them to the Player. The process the system made to achieve the calculated AC will be shown. Many magic items have AC qualities, such as Bracers of Defence and Rings of Protection, and if the MagicMaster API is used these are also taken into account - invalid combinations will also be prevented, such as Rings of Protection with magical armour. If allocated to a Token Circle, the calculated AC is compared to the displayed Token AC and any difference highlighted - this may be due to magical effects currently in place, for instance - the highlight allows the Player to review why this might be. Saves The corollary to attacks is saves. The system provides two menus: one to access, review, update and make saving throws and the appropriate modifiers; and the other to make attribute checks, again with the appropriate modifiers. For each menu, the initial menu presented shows the saving throw and attribute tables from the Character Sheet (always the one from the Character tab rather than the Monster Tab - monster saving throws should be copied to both). Each type of save or attribute check has a button to make the saving throw: the system will perform the roll and display the result with an indication of success or failure. The menu also shows buttons to add a situational adjustment (as per the AD&D 2e PHB) and to modify the saving throw table, either automatically (taking into account race, class, level and magic items) or manually. The easiest way to set the correct saving throws for each type of save, based on class, level & race, is to use the CommandMaster API Character Sheet setup commands. |
[edit] How To Use AttackMaster
[edit] Installation and Configuration
The best way to install AttackMaster API is to use the Roll20 ["One-Click Install" menu], which will automatically keep the code an databases updated to the latest versions. Alternatively, 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 AttackMaster Help provides a full manual of how to use AttackMaster. The handout RPGMaster CharSheet Setup provides information on setting up a character sheet for use with AttackMaster. The handout Weapon & Armour Database Help provides information on the databases that come with the API, and how to add to and change them.
[edit] Script Use
After installing the script, refer the the handout AttackMaster Help for full information on use. Below is a copy of the contents of that handout.
[edit] Syntax
The AttackMaster API is called using !attk.
!attk --help
Commands to be sent to the AttackMaster API must be preceded by two hyphens ‘--’ as above for the --help command. Parameters to these commands are separated by vertical bars ‘|’, for example:
!attk --attk-hit token_id | [message] | [monster weap1] | [monster weap2] | [monster weap3]
If optional parameters are not to be included, but subsequent parameters are needed, use two vertical bars together with nothing between them, e.g.
!attk --checkac token_id || [SADJ / PADJ / BADJ]
Commands can be stacked in the call, for example:
!attk --checkac token_id | [ SILENT ] | [SADJ / PADJ / BADJ] –weapon token_id
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).
[edit] Command Index
[edit] Command Index
[edit] Menus
--menu [token_id] --other-menu [token_id]
[edit] Attacking commands
--attk-hit [token_id] | [message] | [monster weap1] | [monster weap2] | [monster weap3] --attk-roll [token_id] | [message] | [monster weap1] | [monster weap2] | [monster weap3] --attk-target [token_id] | [message] | [monster weap1] | [monster weap2] | [monster weap3] --twoswords [token_id]|[prime-weapon]
[edit] Weapon Management
--weapon [token_id] --dance [token_id] | weapon | [ STOP ] --mod-weapon [token_id] | weapon | MELEE / RANGED / DMG / AMMO | adjustments --quiet-modweap [token_id] | weapon | MELEE / RANGED / DMG / AMMO | adjustments --edit-weapons [token_id] --blank-weapon [token_id] | weapon | [ SILENT ]
[edit] Ammunition Management
--ammo [token_id] --setammo [token_id] | ammo_name | [ [+/-]cur_qty / = ] | [ [+/-]max_qty / = ] | [ SILENT ]
[edit] Armour Class and Saving Throws
--edit-armour [token_id] --checkac [token_id] | [ SILENT ] | [SADJ / PADJ / BADJ] --save [token_id] | [situation-mod] --attr-check [token_id] | [situation-mod] | [message] | [DCval]
[edit] Other Commands
--help --config [PROF/ALL-WEAPS/WEAP-CLASS/ALL-ARMOUR/MASTER-RANGE/SPECIALIST-RULES/SPELL-NUM] | [TRUE/FALSE] --check-db [ db-name ] --extract-db db-name --handshake from | [cmd] --hsq from | [cmd] --hsr from | [cmd] | [TRUE/FALSE] --debug [ ON / OFF ]
[edit] Command details
[edit] Menus
[edit]
--menu [token_id]
Takes an optional token ID - if not specified uses selected token
Displays a Chat menu with buttons for: Attacking, with Roll20 rolling a dice or the Player entering a dice roll result, or the Player selecting a target and getting the result of an attack (if allowed by the DM in setting the API options); changing what is in the Character's (or NPC's) hands; to recover spent ammo; and to check the current Armour Class for the Character under various circumstances.
[edit]
--other-menu [token_id]
Takes an optional token ID - if not specified uses selected token
Displays a Chat menu with buttons for: saving throws and saving throw management; managing character classes and levels (if the CommandMaster API is loaded) and managing light sources for the character's token (if Dynamic Lighting is being used) (requires MagicMaster API to work). If the GM uses the menu, two further options appear: mark the token selected as Dead (which also marks the body as an inanimate object that can be looted); and the ability to adjust damage for the selected token for any arbitrary reason, which can also be noted.
[edit] Attacking Commands
[edit] Attack an opponent with a weapon
--attk-hit [token_id] | [message] | [monster weap1] | [monster weap2] | [monster weap3] --attk-menu-hit [token_id] | [message] | [monster weap1] | [monster weap2] | [monster weap3] --attk-roll [token_id] | [message] | [monster weap1] | [monster weap2] | [monster weap3] --attk-target [token_id] | [message] | [monster weap1] | [monster weap2] | [monster weap3]
Each takes an optional token ID (if not specified uses selected token), an optional formatted message to include with the attack damage, and up to three optional names for each of the monster attacks that are displayed on the attack menu.
Each of these three commands present a menu of currently possible attacks, using the weapons and ammo in-hand or, for monsters using the Monster tab on the AD&D 2e Character Sheet, up to 3 types of monster attacks. Ranged weapon attacks will prompt the Player to specify which range to fire at. Selecting one of the possible attacks has different outcomes based on the command used:
- --attk-hit
- displays a menu of current possible attacks with buttons the Player or GM can use to change the type of attack that will be done (Roll20 rolls, Player rolls, or Targeted attack, default Roll20 rolls) which is remembered for each Player and carried between campaign sessions.
- --attk-menu-hit
- prompts Roll20 to make an attack roll, using 3D dice if they are enabled, displays the AC hit with supporting information on how this was calculated and displays buttons to roll for damage if the attack is successful.
- --attk-roll
- displays an entry field to allow the Player to enter the value of their own dice roll (for those that prefer to roll their own dice) though the default entry will also roll the dice for the player. Subsequently, the process is the same as --attk-hit.
- --attk-target
- asks the Player to select a target token for the attack. It then displays the AC the attack roll will hit and the AC of the selected target. It also automatically rolls damage for Small/Medium and Large targets, and displays the relative proportion of Hit Points for the targeted token at the time of the attack. Recommended only for the DM, as it reveals information about the target, but can be enabled for Players using the --config command.
The attack menu also has buttons that allow the Player or GM to change the default attack type made: Roll20 rolls, Player rolls, or a targeted attack. It also has a button to turn 3D dice on or off. This configuration is held by Player for each Campaign, and preserved between sessions of game play.
The optional message is displayed as part of the display of the damage done on a successful hit. If a monster, the message can be three concatenated messages separated by '$$'. The message can include API Buttons if needed. The following characters must be replaced (escaped) using these replacements:
Character | ? | [ | ] | @ | - | | | : | & | { | } |
---|---|---|---|---|---|---|---|---|---|---|
Substitute | ^ | << | >> | ` | ~ | | | & | { | } | |
Alternative | \\ques; | \\lbrak; | \\rbrak; | \\at; | \\dash; | \\vbar; | \\clon; | \\amp; | \\lbrc; | \\rbrc; |
[edit] Use two weapons to attack
--twoswords [token_id]|[prime-weapon]
Takes an optional token ID (if not specified uses selected token) and an optional weapon name.
This command sets the system up to apply the correct penalties / bonuses when using two weapons to attack. For example, under AD&D 2e rules only types of Fighter & Rogue can use 2 weapons at a time to attack in a round, and only Rangers do so without penalty. Using this command with the name of a prime-weapon specified will mark that weapon as the Primary which will get the smaller penalty of the two and will also be allowed multiple attacks per round (if using InitiativeMaster API). Use of any other weapon during the current or subsequent rounds will incur a larger penalty and be restricted to one attack per round regardless of type of weapon, level & proficiency. Penalties are adjusted by the Dexterity Reaction Adjustment. See AD&D 2e PHB p96 for full explanation of rules applied if using the AD&D 2e RPGMaster Library rule set.
Calling this command without a prime-weapon specified will terminate two-weapon mode and no penalties will be applied for the current and subsequent rounds.
[edit] Weapon Management
[edit] Change weapons currently in hand
--weapon [token_id]
Takes an optional token ID - if not specified uses selected token.
This command displays a chat menu displaying what is currently in the Character's (or NPC or creature's) hands, and allowing the Player to change what is held to any weapon, shield, or light source that they have in their items, or for spell casters any weaponised spell (a spell that requires an attack roll, either in Melee combat or at range) they have menorised. Subsequent attacks will then use the newly specified weapon(s) or weaponised spell(s). When selecting a ranged weapon that uses ammunition, the appropriate ammunition held in their on-person items is also loaded into the character's "quiver".
Selecting a hand (either Left or Right) will display any 1-handed items and spells that can be used for selection in a list. Selecting the Both Hands button will display all the 2-handed items (including bows) that can be used for selection in a list. Some weapons can be used either 1-handed or 2-handed, and the appropriate stats will be given based on the selection made.
A button is also shown to allow the Character to "lend" their hands to another Character: this will allow the receiving Character to use weapons and devices that require more than 2 hands, such as large siege engines and windlasses on ships. If the donating Character selects to take any new weapon in-hand, the "lent" hands will be removed from the receiving Character and any device needing more hands than are left will be dropped. Multiple Characters can lend hands to a receiving Character so that very large devices (such as a Battering Ram) can be used.
Buttons are also provided to set the rings worn on each hand. Rings affecting armour class and/or saves will only take effect in the system if worn.
If being used by the GM, the menu also has an option to change the number of hands the creature has, which will then allow the creature to hold (and attack with) more than two items, or to hold items that require more than two hands.
Note: this function is dependent on the weapon, shield, light source and spell definitions including certain key information in a specified format: see the [Weapon & Armour Database Help] or [Magic Database Help] for details.
[edit] Manage a dancing weapon
--dance [token_id] | weapon | [ STOP ]
Takes an optional token ID (if not specified uses selected token), a mandatory weapon name, and an optional STOP command.
This command marks the named weapon as "dancing" which means it will no longer occupy a hand, but will still appear in the list of possible attacks when an attack is made. When started, the --weapon command is automatically run so that an additional weapon can be taken in the freed-up hand.
Appending the "STOP" command will un-mark the weapon as dancing. The Player will have to take the no-longer dancing weapon back in hand, if they so desire, using the --weapon command.
Note: the most effective use of the --dance command is when combined with the RoundMaster effect management system, to count down rounds of use, automatically call the --dance command at the appropriate time, and stop the dancing automatically after the appropriate duration.
[edit] Manage weapon statistics
--mod-weapon [token_id] | weapon | MELEE / RANGED / DMG / AMMO | adjustments --quiet-modweap [token_id] | weapon | MELEE / RANGED / DMG / AMMO | adjustments
Each command takes an optional token ID (if not specified uses selected token), a mandatory weapon name, and a mandatory data type.
These commands allow the specifications of any weapon currently in-hand to be adjusted programmatically. E.g. the magical plus on to-hit and damage can be adjusted round by round (as for a Sword of Dancing). The type of data to be adjusted must be identified using the data type parameter: MELEE & RANGED alter To-Hit data, and DMG & AMMO alter Damage.
The weapon parameter can name a specific weapon name, a type of weapon (e.g. bow, long-blade, club etc), a changed weapon name (previously changed by this command), or even 'all' for all currently held weapons. All data of the specified data type for all weapons that match the weapon parameter may then be altered, using the comma-separated adjustments parameter. Each adjustment is of the format field_id:[=][+/-]value
where the field_ids are:
w: | weapon name | t: | weapon type | st: | weapon super-type |
sb: | strength bonus | db: | dexterity bonus | +: | magical plus |
n: | number of attacks per round | pl: | proficiency level | pd: | dancing proficiency level |
ch: | critical hit roll | cm: | critical miss roll | sz: | size |
r: | range (can be #/#/#) | ty: | damage type | sp: | speed in segments |
sm: | damage vs small & medium | l: | damage vs large |
Numeric values can be preceeded by + or -, which will adjust rather than replace the current value. To set a value as negative, precede the minus by an equals thus =-value. For attributes that are relevant to multiple data types, only the specified data type will be adjusted. Multiple attributes can be adjusted using one command call by concatenating comma-delimited adjustments. E.g.
--mod-weap @{selected|token_id}|Sword-of-Dancing|MELEE|sb:0,+:+1,sp:-1
If the weapon is not found, the GM receives an error message, but no other issues occur.
[edit] Adding & removing weapons and ammunition
--edit-weapons [token_id]
Takes an optional token ID - if not specified uses selected token.
The very best way for the Character, NPC or creature to acquire weapons (or any other items including magic items) is to use the MagicMaster API and its commands and databases. However, AttackMaster provides a small subset of those facilities to allow the DM and/or Players to add weapons, ammo & armour to their Character Sheet item bags. Once added, these items can be taken 'in-hand' by the Character (using the --weapon command) and then used to attack.
The advantage of doing this over just typing the item names into the Character Sheet tables is that the items are assured to exist in the weapon, ammo & armour databases that come with the API and so all other aspects of the API will work properly.
This command and --edit-armour are identical, and call the same menu.
[edit] Blanking a weapon from attack tables
--blank-weapon [token_id] | weapon | [ SILENT ]
Takes an optional token ID (if not specified uses selected token), the mandatory name of a weapon, and an optional "SILENT" command.
This command will programmatically remove the named weapon, and any associated ammunition for ranged weapons, from all attack tables on the character sheet, and from the system in-hand table and quiver, on the Character Sheet associated with the specified or selected token. This is especially useful for "weaponised" spells that need to be immediately removed once cast and attacked with.
[edit] Ammunition Management
[edit] Ammunition recovery
--ammo [token_id]
Takes an optional token ID - if not specified uses selected token.
This command displays a chat menu of ammunition that the Character has on their person (not just the ammo that they have in their quiver or in-hand) including any ammunition that has run-out but might still be recoverable. The Player can ask the DM if they can retrieve any ammunition of the types displayed that they have recently used and, once the DM responds with the amount recovered, click on the type of ammunition in the list and enter the amount recovered. Both the amount on their person, and any amount in their quiver or in-hand are updated.
Note: enter the amount recovered not the new total. The amount entered will be added to the current amount held, and then this new value set as the new maximum. A negative amount can also be entered, which will be removed from the current quantity and will also set the new maximum.
Note: after a Long Rest (see MagicMaster API) all ammunition maximum totals are set to current quantities at that time. It is assumed that during the period of a long rest, some creature will have found any loose ammo, or it will otherwise have been broken or lost.
Note: ammunition that has the item-type of 'charged' will appear on the menu with a grey box which cannot be selected, indicating that the ammo cannot be recovered - such ammunition always breaks on contact: e.g. glass arrows.
[edit] Ammunition quantity amendment
--setammo [token_id] | ammo_name | [ [+/-]cur_qty / = ] | [ [+/-]max_qty / = ] | [ SILENT ]
Takes an optional token ID (if not specified uses selected token), the unique name of the ammunition, an optional value for the current quantity, optionally preceded by +/- or replaced by an =, an optional value for the maximum quantity with the same +/- & = possibilities, and an optional parameter of "Silent" (case insensitive).
This command allows programmatic or macro alteration of the quantity of a type of ammo:
- The current quantity and/or the maximum held (i.e. the amount to which ammunition can be recovered up to - see section 4.1 Ammunition Recovery, above) can be set to absolute values just by entering numbers for the parameters.
- Either parameter can be preceded by a + or -, in which case the parameter will modify the corresponding current value, rather than replacing it.
- Either parameter can be an = by itself. In this instance, the corresponding value is set to the other corresponding value (after any modification) i.e. putting = for cur_qty sets the current quantity held to be the maximum possible, or putting = for max_qty sets the maximum possible to be the current quantity. Putting = for both does nothing.
- No value can go below 0, and the current quantity will be constrained at or below the maximum quantity.
So, for example, this command will set the maximum quantity to 10 and set the current quantity to be equal to it:
!attk -setammo @{selected|token_id}|Flight-Arrow+1|=|10|silent
If the "Silent" parameter is not specified, then the Ammunition Recovery chat menu will display with the amended values once complete, and a message is displayed with the changes that occurred.
Note: if more than one ammo item of the same name is listed in the items table (see [RPGMaster CharSheet Setup] handout), only the first item found will be amended. If no item of that name is found, nothing happens and no menus or messages are displayed.
[edit] Armour Class and Saving Throws
[edit] Edit Armour
--edit-armour [token_id] --edit-armor [token_id]
Takes an optional token ID - if not specified uses selected token.
The very best way for the Character, NPC or creature to acquire armour (or any other items including magic items) is to use the MagicMaster API and its commands and databases. However, AttackMaster provides a small subset of those facilities to allow the DM and/or Players to add weapons, ammo & armour to their Character Sheet item bags. Once added, these items can be taken 'in-hand' by the Character (using the --weapon command), and improve the Armour Class of the Character appropriately.
The advantage of doing this over just typing the item names into the Character Sheet tables is that the items are assured to exist in the weapon, ammo & armour databases that come with the API and so all other aspects of the API will work properly (e.g. see section 5.2 below).
This command is identical to the --edit-weapons command and uses the same menu.
[edit] Review Armour Class
--checkac [token_id] | [ SILENT ] | [SADJ / PADJ / BADJ]
Takes an optional token ID (if not specified uses selected token), an optional "Silent" command, and an optional damage type which can be "SADJ", "PADJ" or "BADJ" (the "Silent" and damage type parameters are not case sensitive).
This command analyses the items in the Character's items table (see [RPGMaster CharSheet Setup] handout) using the information in the various item databases supplied / created by the API(s), and taking into account the current Dexterity bonuses calculates the current Armour Class of the Character. It then displays a chat message with its results and an explanation of how it came to them. If the optional damage type is provided, the calculation takes this into account.
The system can use the information in the databases to take into account magical armour plusses, combined effects of armour that can work together (like Armour and Shields), exclude combinations that are not allowed (like Rings of Protection with magical armour), and the armour types allowed for various character classes and races including specialist variations.
The system automatically updates this information any time the Character changes what is in their hands (e.g. if they pick up or put down a shield) using the --weapon command. If using the InitMaster API, the command is also run every time the character does an Initiative roll. If using the MagicMaster API, the command is also run any time items are looted from a chest or NPC, or stored away or given to another character.
The system remembers on the Character Sheet what its calculations are each time. If the most recent calculation results in a change in Armour Class for the character, the character's token AC (if displayed) will be modified by the difference between the old and new values. This modified value will be shown on the Armour Class Review message in the chat window if it is different from the calculated value.
Note: the token displayed AC is only modified by the difference between the previous and current calculations. This allows magical and other effects (such as those managed by the RoundMaster API) to alter the token displayed AC and not be overwritten by a change in calculated AC, but still take into account the change. The token AC can be manually updated at any time without impact on this functionality, to overcome any errors.
Note: if the token is configured following the Master Series API standard (see CommandMaster API documentation), the token bar for the displayed AC is normally hidden. if the calculated AC and token displayed AC are different (see above) then the AC token bar appears, representing the difference between the two. This acts as a visual reminder to the DM and Player that the token is the subject of some effect on AC - it also helps to identify if there is a difference in error, so that this can be manually rectified (by manually altering the token displayed AC). Once the two are again the same and the -check-ac command run, the token AC bar will again be hidden.
[edit] Saving Throws
--save [token_id] | [ situation-mod ] --save [token_id] | [ situation-mod ] | save-type | saving-throw
Takes an optional token ID (if not specified uses selected token), and different forms of the command take an optional situational modifier to the saving throw, a type of save (which can be one of 'paralysis', 'poison', 'death', 'rod', 'staff', 'wand', 'petrification', 'polymorph', 'breath', or 'spell', not sensitive to case), and the base, unmodified saving throw achieved on a dice.
This command can either display a menu from which to display and manage the saving throw table, and make saving throws or, in its second form, to make a saving throw and check the result against the saving throw table.
The first form shows all the possible saves that can be made, the saving throw that needs to be achieved to make the save, and any modifiers that apply to this particular character. There are buttons to modify the saving throw table and the modifiers, to apply a "situational modifier" to immediate saving throws (the "situational modifier" only applies to current rolls and is not remembered), and/or to check the current saving throw table automatically (taking into account race, class, level, and magic items on their person). Also, each type of saving throw can actually be made by clicking the buttons provided. Doing so effectively runs the second form of the command.
The situational modifier can optionally be passed in as a value with the command call if so desired, instead of selecting via the button on the menu.
Running the second form of the command (or selecting to make a saving throw from the first form's menu) will execute the saving throw (as a dice roll if this is specified instead of a straight value) of the specified type, using the data in the character's saving throw table to assess success or failure, displaying the outcome and the calculation behind it in the chat window.
[edit] Attribute Checks
--attr-check [token_id] | [situation-mod] | [message] | [DCval]
Takes an optional token ID (defaults to the selected token), an optional situational modifier, an optional message to display as the last action, and an optional "DC value".
This command presents a menu which can be used to perform attribute checks for the character. The menu displays the character's attribute values and the currently applicable modifiers for attribute checks. Each line has a button which will run the Attribute Check roll and display success or failure. As for the Saving Throw table, buttons also exist to set a situational modifier and to check the modifiers against current magic items in use and magic in effect.
A DC value parameter is provided to emulate attribute check modifiers for D&D 3e and later, though as these checks and modifiers work very differently this is not a direct equivalence. If a DC value is set as a parameter, 10 minus the DC value is added to all the modifiers.
[edit] Other commands
[edit] 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.
[edit] Configure API behavior
--config [PROF/ALL-WEAPS/WEAP-CLASS/ALL-ARMOUR/MASTER-RANGE/SPECIALIST-RULES/SPELL-NUM] | [TRUE/FALSE]
Takes two optional arguments, the first a switchable flag name, and the second TRUE or FALSE.
Allows configuration of several API behaviors. If no arguments given, displays menu for DM to select configuration. Parameters have the following effects:
Flag | True | False |
---|---|---|
FANCY-MENUS | Chat templates will use textured backgrounds | Chat templates will use plain backgrounds |
PROF | Strictly apply non-proficient weapon penalties as per PHB | Use the non-proficient weapon penalty displayed on the Character Sheet |
ALL-WEAPS | Allow any character of any class to use and become proficient in any weapon. | Restrict the use of weapons by class to some degree set by WEAP-CLASS |
WEAP-CLASS | Weapons not allowed to a class get a penalty of -100 | Weapons not allowed to a class get double non-proficient penalty |
ALL-ARMOUR | All armour types allowed for all classes | Armour not allowed to a class not included in AC calculations |
MASTER-RANGE | Ranged weapon Mastery gives double damage at Point Blank range | Ranged weapon Mastery not allowed, as per PHB |
SPECIALIST-RULES | Only Specialist Wizards specified in the PHB get an extra spell per spell level | Any non-Standard Wizard gets an extra spell per spell level |
SPELL-NUM | Spellcaster spells per level restricted to PHB rules | Spellcaster spells per level alterable using Misc Spells button |
ALL-SPELLS | Spellcaster spell schools are unrestricted | Spellcaster spell schools are restricted by class rules |
[edit] Check database completeness & integrity
--check-db [ db-name ]
Takes an optional database name or part of a database name: if a partial name, checks all character sheets with the provided text in their name that also have '-db' as part of their name. If omitted, checks all character sheets with '-db' in the name. Not case sensitive. Can only be used by the GM.
This command finds all databases that match the name or partial name provided (not case sensitive), and checks them for completeness and integrity. The command does not alter any ability macros, but ensures that the casting time ('ct-') attributes are correctly created, that the item lists are sorted and complete, and that any item-specific power & spell specifications are correctly built and saved.
This command is very useful to run after creating/adding new items as ability macros to the databases (see Database-specific handouts). It does not check if the ability macro definition itself is valid, but if it is then it ensures all other aspects of the database consistently reflect the new ability(s).
[edit] Extract database for Editing
--extract-db [db-name]
Takes an optional database name or part of a database name: if a partial name, checks all character sheets with the provided text in their name that also have '-db' as part of their name. If omitted, checks all character sheets with '-db' in the name. Not case sensitive. Can only be used by the GM.
Extracts a named database or all provided databases from the loaded RPGMaster Library, and builds the database in a Character Sheet format: see the Database specific help handouts for further details of this format. This allows editing of the standard items in the databases, adding additional items to the databases, or for items to be copied into the GM's own databases. Unlike with previous versions of the Master Series APIs, these extracted databases will not be overwritten by the system. However: using extracted databases will slow the system down - the use of the internal API databases held in memory is much faster. The best use for these extracts is to examine how various items have been programmed so that the GM can create variations of the standard items in their own databases by copying and making small alterations to the definitions, and then the extracted databases can be deleted.
Important: Once a Character Sheet database is changed or deleted, run the --check-db command against any database (especially a changed one) to prompt the APIs to re-index the objects in all databases.
[edit] Handshake with other APIs
-hsq from|[command] -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:
- !attk -hsq init
- Response:
- !init -hsr attk
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:
- !attk -handshake init|menu
- Response:
- !init -hsr attk|menu|true
[edit] 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.
[edit] Configuring the Token and Character Sheet for use with the API
At the time of writing this Wiki, the RPGMaster APIs, including AttackMaster, are initially configured and distributed to support the Advanced Dungeons & Dragons 2nd Edition RPG and matching Advanced 2nd Edition Character Sheet on Roll20. The Character Sheets and tokens that represent them are best set up for game play by using the facilities provided by the APIs, and especially those menus and commands provided by the CommandMaster API. However, if desired, it is possible to set up Character Sheets and tokens manually (especially if not using all the APIs): instructions on how to achieve this are provided in the RPGMaster Character Sheet and Token setup Handout and Wiki page.
The APIs are currently capable of being adjusted to support any RPG and Character Sheet by adjusting the mappings and database entries supplied as default, but at present this is a significant task. The RPGMaster Character Sheet and Token Setup handout & Wiki, and the individual database help handouts and wiki pages provide information on how to do this. A future development currently planned (but with no date for release) is to reprogram the APIs to include a RPG-defining Library API, one for each supported game system, that will include the RPG rules for the RPGMaster APIs and adjust the API behaviours to work for the RPG the Library is for.
[edit] Weapon, Ammo & Armour Databases
As with other items that can be acquired and used by Characters, NPCs and Creatures in the RPGMaster suite, the definitions for Weapons, Ammunition and Armour for use by the AttackMaster API are held in Character Sheet databases. See the Weapon, Ammo & Armour Database Help handout and Wiki page for information on these databases.
[edit] Changelog
v1.5.02 (2023-05-31)
- Fixed bug with calculation of magic hit adjustment, which was treating numbers as strings.
v1.5.01 (2023-05-19)
- Fixed issues with checking AC for TotalAC item types.
- Added data attribute to suppress a character's dexterity bonus.
- Added warning if trying to change weapon when holding a cursed weapon.
- Support weapons and magic item attacks that use multiple power charges.
- Added ac combination rules to MI database data specifications.
- Fixed ac support for magic helms.
- Support the item charge type 'single-uncharged' for charged items with non-standard discharging mechanisms.
- Display the ac mod effect of each valid item on the Check AC dialog.
- Fix --mod-weap command selection of specified weapons for mod-ing.
v1.4.07 (2023-04-15)
- Added 'discharging' item type which is charged but does not divide.
v1.4.06 (2023-04-06)
- Fixed bug in manual Update Saves dialog which prevented changes.
- Fixed Change Weapon dialog to put rings in correct hand.
- Fixed issues with inconsistencies in hyphenated item names & spell storing items.
v1.4.05 (2023-03-02)
- Added character attribute checks to saving throw functions.
- Added magical attacks by MIs to Attack menu.
- Allow MIs with magical attacks (item class Magic) to be taken in-hand with Change Weapon.
- Added "successcmd" as tag in targeted attacks that have magical charges expended on successful hit.
- Fixed Targeted attack type (i.e. S,P & B) specific calculations for -ve ACs.
v1.4.04 (2023-01-21)
{{{3}}}
v1.4.03 (2023-01-15)
- Allow creature innate attack specs to be either of attk_name,dmg_roll,speed,type or dmg_roll,attk_name,speed,type.
- Fixed error in parsing the class & race dBs for attks
v1.4.02 (2022-12-16)
- Specify weapons and armour for creatures with probability of different sets.
- Also added ammo reuse type 2: becomes only possible ammo of several for that weapon e.g. spitting snake venom, and type 3: reduces in qty by 1, and all other ammo for same weapon increases qty by 1.
v1.4.01 (2022-11-26)
- Added Fighting Style database and implementation.
- Improved the way Situational Modifiers are shown & applied for saves.
- Fixed targeted attack failure on certain armour types.
- Fixed help menu.
- Added support for creature database.
v1.3.04 (2022-11-15)
- Fixed sub-race to-hit bonus calculation.
v1.3.03 (2022-10-19)
- Added Race database parsing & use.
- Fixed error in taking a weapon in hand that can be either 1 or 2 handed (such as a Bastard Sword).
v1.3.02 (2022-10-14)
- Added support for "weaponised" spells - spells that act exactly like weapons (and spells).
v1.3.01 (2022-10-04)
- Fixed bugs in rings that execute 'on:' and 'off:' commands
v1.3.00 (2022-10-01)
- Major release to extract all RPG version-specific data and rule processing to RPGMaster Library API
v2.046 (2022-03-28)
- Added Class database with PHB Character Class definitions.
- Added Attacks database with standard attack calculation definitions.
- Added full support for damage types (S, P & B) for both weapons and armour.
- Added support for non-standard fractional numbers of weapon attacks per round.
- Updated saving throw table calculations to automatically add in appropriate Magic Item bonuses.
- Made several long running processes asynchronous to eliminate "infinite loop" detection errors.
- Fixed handling of manual character sheet table entries.
v1.042 (2022-02-18)
- Fixed restricted weapon proficiency calculations.
- Fixed prioritisation of user-defined database entries
v1.040 (2022-02-02)
- Added --config command and menu for DM to alter some API behavior.
- Multiple weapon changes and additions
v1.039 (2022-01-23)
- Fixed Spear definition for self-ammo-ed ranged weapon & added powerful-longsword
- Fixed illegal characters not rendered by One-Click install
- Added Bow mastery to do double damage at PB range (removed from specialist)
v1.038 (2022-01-09)
- Improved Indexing & Performance
- Changed data tags to reflect newest standard
- Fixed bug relating to AC0 when calculating AC
- Added magically summoned weapons (e.g. Mordenkainen's Sword) for new spells
v1.037 (2021-12-14)
- First version for public release