Character Vault
Any Concept / Any System
Compendium
Your System Come To Life
Roll20 for Android
Streamlined for your Tablet
Roll20 for iPad
Streamlined for your Tablet

Personal tools

From Roll20 Wiki

Jump to: navigation, search
(Spell books and memorisable spells)
Line 1: Line 1:
{{revdate}}
+
=Weapon and Armour Databases=
==Character Sheet and Token setup for use with RPGMaster APIs==
+
======<i>for AttackMaster v'+version+'</i>======
===Token configuration===
+
==1. General Database information==
<p>The API can work with any Token configuration but requires tokens that are going to participate in API actions to represent a Character Sheet, so that actions relevant to the token and the character it represents can be selected. </p>
+
<p>The RPGMaster APIs use a number of Character Sheets as databases to hold Ability Macros defining weapons, ammo, and items of armour and their specifications.  The API is distributed with many weapon, ammo and armour definitions and it also checks for, creates and updates these Character Sheet databases on start-up.  DMs can add their own weapons, ammo and armour to additional databases, but the databases provided are totally rewritten when new updates are released so the DM must add their own database sheets.  If the <i>provided</i> databases are accidentally deleted, they will be automatically recreated the next time the Campaign is opened. Additional databases should be named as follows:</p>
<p>A single Character Sheet can have multiple Tokens representing it, and each of these are able to do individual actions made possible by the data on the Character Sheet jointly representedHowever, if such multi-token Characters / NPCs / creatures are likely to encounter spells that will affect the Character Sheet (such as <i>Haste</i> and <i>Slow</i>) they must be split with each Token representing a separate Character Sheet, or else the one spell will affect all tokens associated with the Character Sheet, whether they were targeted or not!  In fact, <b>it is recommended that tokens and character sheets are 1-to-1 to keep things simple.</b></p>
+
<table><tr><td>Weapons:</td><td>additional databases: MI-DB-Weapons-[added name] where [added name] can be replaced with anything you want.</td></tr>
<p>The recommended Token Bar assignments for all APIs in the Master Series are:</p>
+
<tr><td>Ammo:</td><td>additional databases: MI-DB-Ammo-[added name] where [added name] can be replaced with anything you want.</td></tr>
<pre>Bar1 (Green Circle): Armour Class (AC field) - only current value
+
<tr><td>Armour:</td><td>additional databases: MI-DB-Armour-[added name] where [added name] can be replaced with anything you want.</td></tr></table>
Bar2 (Blue Circle): Base Thac0 (thac0-base field) before adjustments - only current value
+
<p><b>However:</b> the system will ignore any database with a name that includes a version number of the form "v#.#" where # can be any number or group of numbers e.g. MI-DB v2.13 will be ignored.  This is so that the DM can version control their databases, with only the current one (without a version number) being live.</p>
Bar3 (Red Circle): Hit Points (HP field) - current & max</pre>
+
<p>There can be as many additional databases as you wantOther Master series APIs come with additional databases, some of which overlap - this does not cause a problem as version control and merging unique macros is managed by the APIs.</p>
<p>It is recommended to use these assignments, and they are the bar assignments set by the <b>CommandMaster API</b> if its facilities are used to set up the tokensAll tokens must be set the same way, whatever way you eventually choose.</p>
+
<p><b>Important Note:</b> all Character Sheet databases <b><u><i>must</i></u></b> have their <i>\'ControlledBy\'</i> value (found under the [Edit] button at the top right of each sheet) set to <i>\'All Players\'</i>.  This must be for all databases, both those provided (set by the API) and any user-defined ones.  Otherwise, Players will not be able to run the macros contained in them.</p>
<p>The APIs always try to search the Token fields for appropriate Character Sheet linked fields, but will revert to the assignments above if they fail to match linked fields.  These assignments can be changed in each API, by changing the fields object near the top of the API script (<b>note:</b> 'bar#' and 'value' or 'max' are separate entries in an array of 2 elements). <b><i><u>All APIs must use the same field definitions</u></i></b>:</p>
+
<p>Each database has a similar structure, with:</p>
<pre>fields.Token_AC: defines the token field for the AC value (normally ['bar1','value'])
+
<ul><li>Ability Macros named as the weapon, ammo or armour specified, and used to describe and provide specifications for using the commands with the AttackMaster API;</li>
fields.Token_MaxAC: defines the token field for the AC max (normally ['bar1','max'])
+
<li>Custom Attributes with the attribute name "ct-ability-macro-name", one per Ability Macro, which defines the speed and type for each item;</li>
fields.Token_Thac0: defines the token field for the Thac0 value (normally ['bar2','value'])
+
<li>An entry in a list on the character sheet in the spell book of the relevant Character Sheet tab (various spell books for different items - see entry below);</li>
fields.Token_MaxThac0: defines the token field for the Thac0 max (normally ['bar2','max'])
+
<li>Optionally, some entries come also with attributes that define Powers and Spells delivered by or stored on the item.</li></ul>
fields.Token_HP: defines the token field for the HP value (normally ['bar3','value'])
+
<p><b>Note:</b> a DM only needs to program the Ability Macro using the formats shown in the next section, and then run the <b>!attk --check-db</b> or <b>!magic --check-db</b> command, which will correctly parse the ability macro and set the rest of the database entries as needed.</p>
fields.Token_MaxHP: defines the token field for the HP max (normally ['bar3','max'])</pre>
+
<p>Ability Macros can be whatever the DM wants and can be as simple or as complex as desired. Roll Templates are very useful when defining ability macros.  When a Player or an NPC or Monster views the specifications of a weapon, ammunition or piece of armour, the APIs run the relevant Ability Macro from the databases as if it had been run by the Player from the chat window.  All Roll20 functions for macros are available.</p>
<p>Alter the bar numbers appropriately or, <b><u><i>if you are not wanting one or more of these assigned</i></u></b>: leave the two elements of the array as [' ',' '].  The system will generally work fine with reassignment or no assignment, but not alwaysSpecifically, some effects in the Effects-DB, which implement spell effects on Character Sheets and Tokens, may not set the right values if no assignment of one or more of HP, AC & Thac0 are made to the Token.</p>
+
===1.1 Replacing Provided Weapons===
 +
<p>If you want to replace any item provided in any of the databases, you can do so simply by creating an Ability Macro in one of your own databases with exactly the same name as the provided item to be replaced.  The API gives preference to Ability Macros in user-defined databases, so yours will be selected in preference to the one provided with the APIs.</p>
 +
==2. Weapon & Ammunition Databases==
 +
<p>Weapon databases are all character sheets that have names that start with MI-DB-Weapon (though in fact, weapons can be in any database starting with MI-DB- if desired), and can have anything put at the end, though those with version numbers of the form v#.# as part of the name will be ignored.  Ammunition databases are similar, with the root database MI-DB-Ammo.</p>
 +
<p>As previously stated, each weapon definition has 3 parts in the database (see Section 1): an Ability Macro with a name that is unique and matches the weapon, an Attribute with the name of the Ability Macro preceded by "ct-", and a listing in the database character sheet of the ability macro name separated by \'|\' along with other weapons. The quickest way to understand these entries is to examine existing entries.  Do go to the root databases and take a look (but be careful not to alter anything unless you know what you\'re doing!)</p>
 +
<p><b>Note:</b> The DM creating new weapons does not need to worry about anything other than the Ability Macro in the database, as running the <b>AttackMaster</b> or <b>MagicMaster -check-db MI-DB-Weapons</b> command will update all other aspects of the database appropriately for all databases that have a name starting with or including <i>\'MI-DB-Weapons\'</i>, as long as the <i>Specs</i> and <i>Data</i> fields are correctly defined. Use the parameter <i>\'MI-DB-Ammo\'</i> to check and update the ammunition databases.  Running the command <b>-check-db</b> with no parameters will check and update all databases.</p>
 +
<p>Ability macros can be added to a database just by using the [+Add] button at the top of the Abilities column in the Attributes and Abilities tab of the Database Character Sheet, and then using the edit "pencil" icon on the new entry to open it for editingAbility macros are standard Roll20 functionality and not dependent on the API.  Refer to the Roll20 Help Centre for more information.</p>
 +
<p>Here are some examples:</p>
 +
===Longsword===
 +
<p style="display: inline-block; background-color: lightgrey; border: 1px solid black; padding: 4px; color: dimgrey; font-weight: extra-light;">/w "@{selected|character_name}" &{template:2Edefault}{{name=Longsword}} {{subtitle=Sword}}{{Speed=[[5]]}} {{Size=Medium}}{{Weapon=1-handed melee long-blade}}<mark style="color:green">Specs=[Longsword,Melee,1H,Long-blade]</mark>{{To-hit=+0 + Str bonus}}<mark style="color:blue">ToHitData=[w:Longsword, sb:1, +:0, n:1, ch:20, cm:1, sz:M, ty:S, r:5, sp:5]</mark>{{Attacks=1 per round + level & specialisation, Slashing}}{{Damage=+0, vs SM:1d8, L:1d12, + Str bonus}}<mark style="color:red">DmgData=[w:Longsword, sb:1, +:0, SM:1d8, L:1d12]</mark>{{desc=This is a normal sword. The blade is sharp and keen, but nothing special.}}</p>
 +
<p>The ability specification for this Longsword uses a Roll20 Roll Template, in this case defined by the Advanced D&D 2e Character Sheet by Peter B (see the documentation for the Character Sheet on Roll20 for specifications of this Roll Template), but any Roll Template you desire can be used.  The entries in the Roll Template itself can be anything you desire, giving as much or as little information as you want.  However, the important elements for the APIs are those highlighted.  Each of these elements are inserted <i>between</i> the elements of the Roll Template, meaning they will not be seen by the player when the macro is run.  Generally spaces, hyphens and underscores in the data elements are ignored, and case is not significant.  Each element is described below:</p>
 +
<pre>Specs = [Type, Class, Handedness, Weapon Group]</pre>
 +
<p>The Specs section describes what weapon type and proficiency groups this weapon belongs to.  These fields must be in this order.  This format is identical for all database items, whether in these databases or others used by the Master series of APIs.</p>
 +
<table><tr><td><b>Type</b></td><td>is the type of the weapon, often the same as the ability macro name without magical plusses.</td></tr>
 +
<tr><td><b>Class</b></td><td>is one of Melee, Ranged, or Ammo.</td></tr>
 +
<tr><td><b>Handedness</b></td><td>is #H, where # is the number of hands needed to wield the weapon.</td></tr>
 +
<tr><td><b>Weapon Group</b></td><td>is the group of related weapons that the weapon belongs to.</td></tr></table>
 +
<pre>ToHitData = [w:Longsword, sb:1, +:0, n:1, ch:20, cm:1, sz:M, ty:S, r:5, sp:5]</pre>
 +
<p>The ToHitData section specifies the data relating to an attack with the weapon.  These fields can be in any order.</p>
 +
<table><tr><td><b>w:</b></td><td>&lt;text&gt; the name to display for attacks with this weapon</td></tr>
 +
<tr><td><b>sb:</b></td><td><0/1> strength bonus flag - specifies if the strength bonus is applicable to the To-Hit roll</td></tr>
 +
<tr><td><b>+:</b></td><td><[+/-]#> the magical attack bonus/penalty - an integer of any size</td></tr>
 +
<tr><td><b>n:</b></td><td><#[/#]> the basic number of attacks per round: the API will modify to account for specialisation and level</td></tr>
 +
<tr><td><b>ch:</b></td><td><1-20> the roll for a Critical Hit, shown in the API with a green border to the attack AC achieved</td></tr>
 +
<tr><td><b>cm:</b></td><td><1-20> the roll for a Critical Miss, shown in the API with a red border to the attack AC achieved</td></tr>
 +
<tr><td><b>sz:</b></td><td><T/S/M/L/H/G> the size of the weapon</td></tr>
 +
<tr><td><b>ty:</b></td><td><SPB> the type of damage done by the weapon - Slashing, Piercing and/or Bludgeoning</td></tr>
 +
<tr><td><b>sp:</b></td><td><#> the speed of the weapon in segments</td></tr>
 +
<tr><td><b>r:</b></td><td><[+/-/=]# [/#/#/#] > the range or range modifier of the weapon.  Ranged weapons use PB / S / M / L</td></tr></table>
 +
<p>The number of attacks per round, <b>n:</b>, can be an integer or a fraction such as 3/2 meaning 3 attacks every 2 rounds.  If using the InitMaster API the Tracker will have the correct number of entries for the Character relating to the number of attacks in the current round.</p>
 +
<p>The range for the weapon, <b>r:</b>, can be a single integer (representing the range of a melee weapon or simple ranged weapon) or a range modifier, starting with +, -, or =.  The range modifier will amend the range of the ammo for a ranged weapon - ranged weapons vary their range with the ammo used.  The weapon can use that range or modify itRanged weapon range modifiers can be of the form [[+/-]#/][+/-]#/[+/-]#/[+/-]# which will add or subtract a different modifier for each range ([Point Blank] / Short / Medium / Long - Point Blank range is optional)</p>
 +
<pre>DmgData = [w:Longsword, sb:1, +:0, SM:1d8, L:1d12]</pre>
 +
<p>The DmgData section specifies the data relating to the damage done by the weapon, and relates to melee weapons only (not ranged weapons).  These fields can be in any order.</p>
 +
<table><tr><td><b>w:</b></td><td>&lt;text&gt; the name to display for damage calculations for this weapon</td></tr>
 +
<tr><td><b>sb:</b></td><td><0/1> strength bonus flag - specifies if the strength bonus is applicable to the Damage roll</td></tr>
 +
<tr><td><b>+:</b></td><td><[+/-]#> the magical damage bonus/penalty - an integer of any size</td></tr>
 +
<tr><td><b>sm:</b></td><td><dice roll spec> the base dice roll vs. small/medium creatures excluding any magical bonus</td></tr>
 +
<tr><td><b>l:</b></td><td><dice roll spec> the base dice roll vs. large/huge creatures excluding any magical bonus</td></tr></table>
 
<br>
 
<br>
===Use with various game system character sheets===
+
===Bastardsword+1===
<p>The issued APIs are initially set up to work with the AD&D 2E character sheet (as this is what the author mostly plays). However, it will work with any character sheet, though the values used and altered by the APIs may not be visible or may appear in unexpected placesTo work properly with your choice of Character Sheet, the mapping in the APIs must be altered. In each API code, right at the top, is an object definition called 'fields': see section 3 for details.  This can be altered to get the API to work with other character sheets.</p>
+
<p style="display: inline-block; background-color: lightgrey; border: 1px solid black; padding: 4px; color: dimgrey; font-weight: extra-light;">/w "@{selected|character_name}" &{template:2Edefault}{{name=Bastard Sword+1}}{{subtitle=Magic Sword}}{{Speed=[[5]]}}{{Size=Medium}}{{Weapon=1 or 2-handed melee long blade}}<mark style="color:green">Specs=[Bastard-Sword,Melee,1H,Long-blade],[Bastard-Sword,Melee,2H,Long-blade]</mark>{{To-hit=+1 + Str Bonus}}<mark style="color:blue">ToHitData=[w:Bastard Sword+1, sb:1, +:1, n:1, ch:20, cm:1, sz:M, ty:S, r:5, sp:6,rc:uncharged],[w:Bastard Sword 2H+1, sb:1, +:1, n:1, ch:20, cm:1, sz:M, ty:S, r:5, sp:8,,rc:uncharged]</mark>{{Attacks=1 per round + specialisation & level, Slashing}}{{Damage=+1, 1-handed SM:1d8 L:1d12, 2-handed SM:2d4 L:2d8}}<mark style="color:red">DmgData=[w:Bastard Sword+1,sb:1,+:1,SM:1d8,L:1d12],[w:Bastard Sword 2H+1,sb:1,+:1,SM:2d4,L:2d8]</mark>{{desc=This is a normal magical sword. The blade is sharp and keen, and is a +[[1]] magical weapon at all times.}}</p>
<p>The APIs are designed to use attack calculations, armour class values and saving throw management defined in a number of databases, supplied in the APIs and created in the Campaign as a set of Character Sheets.  If you use another system (e.g. the D&D 5e system), the calculations can be altered by replacing the provided calculations with your own.  Refer to the documentation for each API and database, provided as handouts in the Campaign and as Roll20 Wiki pages, to discover how to do this.  The Author may, over time, issue new sets of databases and mappings to other game systems and Character Sheets.</p>
+
<p>The Bastardsword can be used either single handed or two handed with different to-hit and damage outcomesThis can be represented in the macro as shown here, with multiple specification sections. When using the <b>AttackMaster API !attk --weapon</b> command to take the Bastardsword in hand, choosing 1 hand (either left or right) will use the 1-handed specifications, and choosing to take it in Both Hands will use the 2-handed specifications.</p>
===Matching the API to a type of Character Sheet===
+
<p>All the field definitions are the same as for the Longsword example above, but there are (in this case) two sets of data for each section, the first set for 1-handed, the second set for 2-handed (as defined by the <b>handedness</b> entry in the <b>Specs</b> section data sets.</p>
<p>The API has an object definition called 'fields', which contains items of the form </p>
+
<br>
<pre>Internal_api_name: [sheet_field_name, field_attribute, optional_default_value, optional_set_with_worker_flag]</pre>
+
===Longbow===
<p>A typical example might be:</p>
+
<p style="display: inline-block; background-color: lightgrey; border: 1px solid black; padding: 4px; color: dimgrey; font-weight: extra-light;">/w "@{selected|character_name}" &{template:2Edefault}{{name=Longbow}}{{subtitle=Bow}}{{Speed=[[8]]}}{{Size=Medium}}{{Weapon=Ranged 2-handed Bow}}<mark style="color:green">Specs=[Longbow,Ranged,2H,Bow]</mark>{{To-hit=+0 + Dex Bonus}}<mark style="color:blue">ToHitData=[w:Longbow,sb:0,db:1,+:0,n:2,ch:20,cm:1,sz:L,ty:P,sp:8]</mark>{{Attacks=Piercing, 2 per round}}{{desc=This is a normal longbow. The wood is polished, the string taut, but nothing special.}}</p>
<pre>Fighter_level:['level-class1','current'],
+
<p>A ranged weapon like a Longbow uses the same data section definitions as melee weapons except for the following additions and differences.</p>
Or
+
<pre>ToHitData=[w:Longbow,sb:0,db:1,+:0,n:2,ch:20,cm:1,sz:L,ty:P,sp:8]</pre>
MUSpellNo_memable:['spell-level-castable','current','',true],</pre>
+
<p>The To-Hit section has an extra option:</p>
<p>The <i>internal_api_name</i> <b><u>must not be altered!</u></b> Doing so will cause the system not to work.  However, the <i>sheet_field_name</i> and <i>field_attribute</i> can be altered to match any character sheet.</p>
+
<table><tr><td><b>db:</b></td><td><0/1> dexterity bonus flag - specifies if the dexterity bonus is applicable to the To-Hit roll.</td></tr>
<p>Table names are slightly different: always have an <i>internal_api_name</i> ending in '_table' and their definition specifies the repeating table name and the index of the starting row of the table or -1 for a static field as the 1<sup>st</sup> row.</p>
+
<tr><td><b>r:</b></td><td>the range data is not provided because this weapon does not modify the range of its ammo, but could be provided if required.</td></tr></table>
<p><i>Internal_api_table: [sheet_repeating_table_name,starting_index]</i></p>
+
<p>There is no DmgData section, as damage is defined by the ammo.</p>
<p>An example is:</p>
+
<br>
<pre>MW_table:['repeating_weapons',0],</pre>
+
===Flight-Arrow+2 (Ammunition Database)===
<p>The <i>internal_api_table</i> <b><u>must not be altered!</u></b> Doing so will cause the system not to workHowever, the <i>sheet_repeating_table_name</i> and <i>starting_index</i> can be altered to match any character sheet.</p>
+
<p style="display: inline-block; background-color: lightgrey; border: 1px solid black; padding: 4px; color: dimgrey; font-weight: extra-light;">/w "@{selected|character_name}" &{template:2Edefault}{{name=Flight Arrow+2}}{{subtitle=Magic Weapon}}{{Speed=As per bow}}{{Size=Small}}<mark style="color:green">Specs=[Flight-Arrow,Ammo,1H,Arrow],[Flight-Arrow,Ammo,1H,Arrow]</mark>{{Ammo=+2,<br>
<p>Each character sheet must have repeating tables to hold weapons, ammo and magic items, as well as other data.  By default, melee weapons 'in hand' are held in sections of the repeating_weapons table, melee weapon damage in the repeating_weapons-damage table, ranged weapons in the repeating_weapons2 table, ammo in the repeating_ammo table, and magic items are held in the repeating_potions table. The table management system provided by the API expands and writes to repeating attributes automatically, and the DM & Players do not need to worry about altering or updating any of these tables on the Character Sheet. </p>
+
<b>**Warbow**</b> vs. SM:1d8, L:1d8,<br>
===Character Attributes, Races, Classes and Levels===
+
<b>**Other Bows**</b> vs. SM:1d6, L:1d6, Piercing}}<mark style="color:orange">AmmoData=[w:Flight Arrow+2, st:Bow, sb:1, +:2, SM:1d6, L:1d6],[w:Warbow Flight Arrow+2, t:warbow, sb:1, +:2, SM:1d8,L:1d8]</mark>{{Range=PB:30, others vary by bow<br>
<p>Character Attributes of <i>Strength, Dexterity, Constitution, Intelligence, Wisdom</i> and <i>Charisma</i> are generally not directly important to the RPGMaster Series APIs, but the resulting bonuses and penalties are.  All Attributes and resulting modifiers should be entered into the Character Sheet in the appropriate places (that is in the Character Sheet fields identified in the 'fields' API object as noted in the previous section).</p>
+
<b>**Shortbow:**</b><br>
<p>The Character's race is also important for calculating saves and ability to use certain items.  The race should be set in the appropriate Character Sheet field. Currently, the races <i>'dwarf', 'elf', 'gnome', 'halfelf', 'halfling', 'half-orc'</i> and <i>'human'</i> are implemented (not case sensitive, and spaces, hyphens and underscores are ignored). If not specified, <i>human</i> is assumed. The race impacts saves, some magic items and armour, and bonuses on some attacks.</p>
+
S:50, M:100, L150,<br>
<p>The system supports single-class and multi-class characters. Classes must be entered in the appropriate fields on the Character Sheet, and the best way to do this is to use the functions provided by the <b>[[Script:CommandMaster#Setup_Tokens_.26_Character_Sheets|CommandMaster API !cmd --abilities]]</b> command or DM's [Token Setup] macro bar button, but they can be entered manually: using class names the same as those provided in the <b>Class-DB</b> class database will ensure the APIs use the correct class characteristicsClasses and levels affect spell casting ability, ability to do two-weapon attacks with or without penalty, and the ability to backstab and the related modifiers, among other things.  Class and level also determine valid weapons, armour, shields, some magic items and saves.</p>
+
<b>**Longbow:**</b><br>
<p>At the time of writing this Wiki, the APIs support all the character classes specified in the AD&D 2e Player's Handbook (including specialist Wizards), plus some additional Priest classes specified in the Complete Priest's Handbook.  The Author may add more over time, and Game Creators can always add their own using the help provided in the [[API:RPGMaster-ClassDB|Class Database Help handout and Wiki]].</p>
+
S:60, M:120, L:210,<br>
<p><b>Note:</b> on the Advanced D&D 2e Character Sheet, the APIs are expecting Fighter classes to be in the first class column, Wizard classes in the second column, Priest classes in the third, Rogues in the fourth, and Psions (or any others) in the fifth. If these are not adhered to, the APIs will attempt to merge the definitions in the class database for the specified class with the class capabilities of the column the class name is entered in - thus a Fighter class entered in the Wizard column may get spell casting capabilities if the class definition in the Class-DB class database does not specify otherwise.</p>
+
<b>**Warbow:**</b><br>
<p><b>Note:</b> classes of Fighter and Rogue (such as Rangers and Bards) that can use clerical &/or wizard spells will automatically be allowed to cast spells once they reach the appropriate level by AD&D 2e rules, but not before (this is specified in their Class-DB class database definitions)They <b><u>do not</u></b> need to have levels set in the corresponding spell-caster columns - the casting ability & level is applied appropriately by the system.</p>
+
S90, M:160, L:250,<br>
<p>The level for each class must be entered in the corresponding fieldMultiple classes and levels can be entered, and will be dealt with accordinglyGenerally, the most beneficial outcome for any combination will be used.  </p>
+
<b>**Composite Sbow:**</b><br>
 
+
S:50, M:100, L:180,<br>
===Magic Items and Equipment===
+
<b>**Composite Lbow:**</b><br>
<p>All magic items and standard equipment, including weapons, armour, lanterns etc, are held in the Items table, which by default is set to the potions table, <i>repeating_potions</i>, on the Character Sheet.  As with other fields, this can be changed in the <i>'fields'</i> objectThe best way to put items into this table is by using the [[Script:MagicMaster#Edit_a_Magic_Item_bag|<b>MagicMaster API</b> commands <b>--edit-mi</b>]] or the [[Script:MagicMaster#DM.2FGM_version_of_Magic_Item_management|GM-only command <b>--gm-edit-mi</b>]].  Alternatively, the <b>[[Script:AttackMaster#Adding_.26_removing_weapons_and_ammunition|AttackMaster --edit-weapons]]</b> command can be used to load weapons, ammunition and armour into the Items table. It is generally possible to enter item names and quantities directly into the table and use them within the system, but only items that also exist in the supplied databases will actually work fully with the API (i.e. be recognised by the API as weapons, armour, ammo, etc). Other items can be in the table but will not otherwise be effective.</p>
+
S:70, M:140, L:210}}<mark style="color:purple">RangeData=[t:longbow, +:2, r:3/6/12/21],[t:shortbow, +:2, r:3/5/10/15],[t:warbow, +:2, r:3/9/16/25],[t:compositelongbow, +:2, r:3/7/14/21],[t:compositeshortbow, +:2, r:3/5/10/18]</mark>{{desc=A magical Flight Arrow of very fine quality}}</p>
<p>Items can be added to the databases.  See the Magic Items Database Handouts and Wiki for more information on the databases.</p>
+
<p>Ammo has a different specification, as the To-Hit data sections are obviously part of the ranged weapon data.  Instead it provides data on which weapons this can be ammo for, and what ranges it has for each.  To determine this, it uses the weapon type and group-type set in the weapon <b>Specs</b> section.</p>
 
+
<pre>AmmoData=[w:Flight Arrow+2, st:Bow, sb:1, +:2, SM:1d6, L:1d6],[w:Warbow Flight Arrow+2, t:warbow, sb:1, +:2, SM:1d8,L:1d8]</pre>
===Weapons and Ammo===
+
<p>The AmmoData section has mostly the same as the DmgData sections (order of fields is immaterial and spaces, hyphens and underscores ignored in type and supertype names), but repeated data sets relate to the data for different types of weapon, and in addition:</p>
<p>For the APIs to work fully the melee weapons, damage, ranged weapons and ammo must be selected using the <b>[[Script:AttackMaster#Change_weapons_currently_in_hand|AttackMaster --weapon]]</b> command to take the weapon 'in hand'.  This will display a menu to take weapons and shields from the Items table and take them in hand, ready to use. This automatically fills all the correct fields for the weapons and ammo to make attacks, including many fields that are not displayed. Entering weapon data directly into the melee weapon, damage, ranged weapon and ammo tables will generally work, but will be overwritten if the --weapon command is used. Also, some API functions may not work as well or at all.</p>
+
<table><tr><td><b>t:</b></td><td><weapon-type> the specific type of ranged weapon this data matches - takes priority over <b>st:</b>.  An example is <i>Longbow<i></td></tr>
<p>For the <b>InitiativeMaster API</b> to support weapon attack actions the weapon name, speed and number of attacks are the most important fields.  For the <b>AttackMaster API</b> to support attack rolls, proficiency calculations, ranged attacks, strength and dexterity bonuses, and other aspects of functionality, fill in as many fields as are visible on the character sheet.  When entering data manually, ensure that the row a melee or ranged weapon is in matches the row damage or ammo is entered in the respective tables (there is no need to do this if using AttackMaster functions to take weapons in-hand, as the relevant lines are otherwise linked by fields not seen on the character sheet).</p>
+
<tr><td><b>st:</b></td><td><group-type> the group-type of ranged weapon this data can be used for. An example is <i>Bow</i>, which means all bows</td></tr></table>
 
+
<pre>RangeData=[t:longbow, +:2, r:3/6/12/21],[t:shortbow, +:2, r:3/5/10/15],[t:warbow, +:2, r:3/9/16/25], [t:compositelongbow, +:2, r:3/7/14/21],[t:compositeshortbow, +:2, r:3/5/10/18],[st:bow, +:2, r:3/5/10/15]</pre>
===Weapon Proficiencies===
+
<p>The RangeData section has one or more data sets relating to weapons that result in different ranges. The range specifications can have 3 or 4 parts: if 4, the first is for Point Blank range which is only relevant for specialists; the remaining 3 are always short, medium & long ranges.</p>
<p>Weapon Proficiencies must be set on the Character Sheet.  This is best done by using the [[Script:CommandMaster#Setup_Tokens_.26_Character_Sheets|<b>CommandMaster API</b> character sheet management functions]], but can be done manuallyBoth specific weapons and related weapon groups can be entered in the table, and when a Player changes the character's weapons in-hand the table of proficiencies will be consulted to set the correct bonuses and penaltiesWeapon specialisation and mastery (otherwise known as double specialisation) are supported by the CommandMaster functions, but can also be set by ticking/selecting the relevant fields on the Character Sheet weapon proficiencies table.  If a weapon or its related weapon group does not appear in the list, it will be assumed to be not proficient.</p>
+
===Self-ammoed weapons e.g. Warhammer===
 
+
<p style="display: inline-block; background-color: lightgrey; border: 1px solid black; padding: 4px; color: dimgrey; font-weight: extra-light;">/w "@{selected|character_name}" &{template:2Edefault}{{name=Warhammer}}{{subtitle=Hammer/Club}} {{Speed=[[4]]}}{{Size=Medium}}{{Weapon=1-handed melee or thrown club}}<mark style="color:green">Specs=[Warhammer,Melee,1H,Clubs],[Warhammer,Ranged,1H,Clubs]</mark>{{To-hit=+0 + Str & Dex bonus}}<mark style="color:blue">ToHitData=[w:Warhammer, sb:1, +:0, n:1, ch:20, cm:1, sz:M, ty:B, r:5, sp:4],[ w:Warhammer, sb:1, db:1,  +:0, n:1, ch:20, cm:1, sz:M, ty:B, sp:4]</mark>{{Attacks=1 per round + level & specialisation, Bludgeoning}}{{Damage=+0, vs SM:1d4+1, L:1d4, + Str bonus}}<mark style="color:red">DmgData=[ w:Warhammer, sb:1, +:0, SM:1+1d4, L:1d4][]</mark>{{Ammo=+0, vs SM:1d4+1, L:1d4, + Str bonus}}<mark style="color:orange">AmmoData=[w:Warhammer,t:Warhammer,st:Throwing-club,sb:1,+:0,SM:1+1d4,L:1d4]</mark>{{Range=S:10, M:20, L:30}}<mark style="color:purple">RangeData=[t:Warhammer,+:0,r:1/2/3]</mark>{{desc=This is a normal warhammer. The blade is sharp and keen, but nothing special.}}</p>
===Spell books and memorisable spells===
+
<p>A melee weapon that can also be thrown, and is its own ammunition, is termed a "self-ammoed" weapon.  Its definition combines the data elements of both melee weapons, ranged weapons and ammunition.</p>
<p>The best (and easiest) way to give a Character or NPC spells and powers is to use [[Script:CommandMaster#Add_spells_to_spell_book|<b>CommandMaster API</b> to add spells and powers]] to the Character's spellbooks, and [[Script:MagicMaster#Display_a_menu_to_memorise_spells_from_the_Character.27s_spell_book|<b>MagicMaster API</b> to memorise]] and cast spells and use powers. However, for the purposes of just doing initiative and selecting which spell to cast in the next round, the spells and powers can be entered manually onto the character sheet.  Spells are held in the relevant section of the Spells table, which by default is set to the character sheet spells table, <i>repeating_spells</i>. As with other fields, this can be changed in the <i>'fields'</i> objectNote that on the Advanced D&D 2e character sheet Wizard spells, Priest spells & Powers are all stored in various parts of this one very large table.</p>
+
<pre>Specs=[Warhammer,Melee,1H,Clubs],[Warhammer,Ranged,1H,Clubs]</pre>
<p>If you are just using the character sheet fields to type into, add spells (or powers) to the relevant "Spells Memorised" section (using the [+Add] buttons to add more as required) <b>a complete row at a time</b> (that is add columns before starting the next row).  Enter the spell names into the "Spell Name" field, and "1" into each of the "current" & "maximum" "Cast Today" fields - the API suite <i>counts down</i> to zero on using a spell, so in order for a spell to appear as available (not greyed out) on the initiative menus, the "current" number left must be > 0.  This makes spells consistent with other tables in the system (e.g. potion dose quantities also count down as they are consumed, etc).</p>
+
<p>Has two data sets, one as a melee weapon and one as a ranged weapon.</p>
<p>Then, you need to set the "Spell Slots" values on each level of spell to be correct for the level of caster.  Just enter numbers into each of the "Level", "Misc." and "Wisdom" (for Priests) fields, and/or tick "Specialist" for the Wizard levels as relevant.  This will determine the maximum number of spells memorised each day, that will appear in the spells Initiative Menu.  Do the same for Powers using the "Powers Available" field.  As with other fields on the character sheet, each of these fields can be re-mapped by altering the <i>'fields'</i> object in the APIs.</p>
+
<pre>ToHitData=[w:Warhammer, sb:1, +:0, n:1, ch:20, cm:1, sz:M, ty:B, r:5, sp:4],[ w:Warhammer, sb:1, db:1,  +:0, n:1, ch:20, cm:1, sz:M, ty:B, sp:4]</pre>
<p>Spells can only be cast if they have macros defined in the spell databases (see Spell Database Handout).  If the <b>CommandMaster API</b> is loaded, the DM can use the tools provided there to manage Character, NPC & creature spell books and granted powers from the provided spell & power databases.</p>
+
<p>Also has two sets of data, each of which relates to the corresponding Specs set.</p>
<p>The spells a spell caster can memorise (what they have in their spell books, or what their god has granted to them) is held as a list of spell names separated by vertical bars '|' in the character sheet attribute defined in <i>fields.Spellbook</i> (on the AD&D2E character sheet 'spellmem') of each level of spell.  On the AD&D2E sheet, the spell books are the large Spell Book text fields at the bottom of each spell level tab. The spell names used must be identical (though not case sensitive) to the spell ability macro names in the spell databases (hence the hyphens in the names).   So, for example, a 1<sup>st</sup> level Wizard might have the following in their large Wizard Level 1 spell book field:</p>
+
<pre>DmgData=[ w:Warhammer, sb:1, +:0, SM:1+1d4, L:1d4],[]</pre>
<pre>Armour|Burning-Hands|Charm-Person|Comprehend-Languages|Detect-Magic|Feather-fall|Grease|Identify|Light|Magic-Missile|Read-Magic|Sleep</pre>
+
<p>Does have two data sets, but the one corresponding to the ranged data is empty, as this data is in the Ammo data set.</p>
<p>Only these spells will be listed as ones they can memorise at level 1.  When they learn new spells and put them in their spell book, this string can be added to just by typing into it. When they reach 3<sup>rd</sup> level and can have 2<sup>nd</sup> level spells, the following string might be put in the spell book on the Level 2 Wizard spells tab:</p>
+
<pre>AmmoData=[w:Warhammer,t:Warhammer,st:Throwing-club,sb:1,+:0,SM:1+1d4,L:1d4]</pre>
<pre>Alter-Self|Invisibility|Melfs-Acid-Arrow|Mirror-Image|Ray-of-Enfeeblement</pre>
+
<p>There is only 1 Ammo data set, as it only relates to the one weapon, itself.</p>
<p>Again, as they learn more spells and put them in their spell book, just edit the text to add the spells.</p>
+
<pre>RangeData=[t:Warhammer,+:0,r:1/2/3]</pre>
<p>Once these spell books are defined, the DM or Player can use the <b>[[Script:MagicMaster#Display_a_menu_to_memorise_spells_from_the_Character.27s_spell_book|MagicMaster -mem-spell]]</b> command (or an action button and associated ability macro on the Character Sheet) to memorise the correct number of these spells in any combination and store those on the Character Sheet.</p>
+
<p>And only 1 Range data set, as it only relates to itself.</p>
 
+
<br>
===Powers===
+
===Artifact sword===
<p>Powers can only be used if they are defined in the Powers database - see Database handouts.  If the <b>CommandMaster API</b> is also loaded, the DM can use the tools provided there to manage Character, NPC & creature spellbooks and granted powers.</p>
+
<p style="display: inline-block; background-color: lightgrey; border: 1px solid black; padding: 4px; color: dimgrey; font-weight: extra-light;">/w "@{selected|character_name}" &{template:2Edefault}{{name=Jim the Sun Blade<br>
<p>Powers work in an almost identical way to Wizard & Priest spells, except that there is only 1 level of powersPowers that the character has are added to the spell book on the Powers tab in the same way as spells, and then memorised using the <b>--mem-spell</b> command (which also works for powers with the right parameters).</p>
+
Intelligent, Neutral}}{{subtitle=Magic Sword}}{{Speed=[[3]]}}<mark style="color:magenta">WeapData=[w:Jim the Sun Blade,ns:5][cl:PW,w:Jims-Locate-Object,sp:100,lv:6,pd:1],[cl:PW,w:Jims-Find-Traps,sp:5,lv:6,pd:2],[cl:PW,w:Jims-Levitation,sp:2,lv:1,pd:3],[cl:PW,w:Jims-Sunlight,sp:3,lv:6,pd:1],[cl:PW,w:Jims-Fear,sp:4,lv:6,pd:2]</mark>{{Size=Special (feels like a Shortsword)}}{{Weapon=1 or 2 handed melee Long or Short blade}}Specs=[Bastard-sword|Short-sword,Melee,1H,Long-blade|Short-blade],[Bastard-sword|Short-sword,Melee,1H,Long-blade|Short-blade],[Bastard-sword,Melee,2H,Long-blade],[Bastard-sword,Melee,2H,Long-blade]{{To-hit=+2, +4 vs Evil + Str Bonus}}ToHitData=[w:Jim +2,sb:1,+:2,n:1,ch:20,cm:1,sz:M,ty:S,r:5,sp:3],[w:Jim vs Evil+4,sb:1,+:4,n:1,ch:20,cm:1,sz:M,ty:S,r:5,sp:3],[w:Jim 2H +2,sb:1,+:2,n:1,ch:20,cm:1,sz:M,ty:S,r:5,sp:3],[w:Jim 2H vs Evil+4,sb:1,+:4,n:1,ch:20,cm:1,sz:M,ty:S,r:5,sp:3]{{Attacks=1 per round}}{{Damage=+2, +4 vs Evil, + 1-handed SM:1d8 L:1d12, 2-handed SM:2d4 L:2d8}}DmgData=[w:Jim+2,sb:1,+:2,SM:1d8,L:1d12],[w:Jim vs Evil+4,sb:1,+:4,SM:2d4,L:2d8],[w:Jim 2H +2,sb:1,+:2,SM:1d8,L:1d12],[w:Jim 2H vs Evil+4,sb:1,+:4,SM:2d4,L:2d8]{{desc=An intelligent weapon: A Sun Blade called Jim (DMs Guide Page 185). It is Neutral. It needs its owner to be proficient with either a Short or Bastard Sword or promise to get such proficiency as soon as possible. It cannot be used by someone who is not proficient. It requires its owner to be Neutral on at least one of its axis, and may not be Evil. NG LN CN and of cause true N are all ok. Abilities:<br>
 +
<b>**1:**</b> It is +2 normally, or +4 against evil creatures, and does Bastard sword damage.<br>
 +
<b>**2:**</b> It feels and react as if it is a short sword and uses short sword striking time.<br>
 +
<b>**3:**</b> <span style="color:red">[Locate Object](!magic --mi-power @{selected|token_id}|Jims-Locate-Object|Jim-the-Sun-Blade|6)</span> at [[6]]th Level in 120\' radius (1x day).<br>
 +
<b>**4:**</b> <span style="color:red">[Detect traps](!magic --mi-power @{selected|token_id}|Jims-Find-Traps|Jim-the-Sun-Blade|6)</span> of large size in 10\' radius (2xday).<br>
 +
<b>**5:**</b> <span style="color:red">[Levitation](!magic --mi-power @{selected|token_id}|Jims-Levitation|Jim-the-Sun-Blade|1)</span> 3x a day for 1 turn (cast at 1st Level).<br>
 +
<b>**6:**</b> <span style="color:red">[Sunlight](!magic --mi-power @{selected|token_id}|Jims-Sunlight|Jim-the-Sun-Blade|6)</span> Once a day, upon command, the blade can be swung vigorously above the head, and it will shed a bright yellow radiance that is like full daylight. The radiance begins shining in a 10-foot radius around the sword-wielder, spreading outward at 5 feet per round for 10 rounds thereafter, creating a globe of light with a 60-foot radius. When the swinging stops, the radiance fades to a dim glow that persists for another turn before disappearing entirely.<br>
 +
<b>**7:**</b> It has a special purpose namely Defeat Evil. <br>
 +
<b>**8:**</b> On hitting an Evil being it causes [Fear](!magic --mi-power @{selected|token_id}|Jims-Fear|Jim-the-Sun-Blade|6) for 1d4 rounds (unless saving throw is made). It can do this **twice a day** when the wielder desires.<br>
 +
<b>**9:**</b> It speaks Common and its name is Jim. It will talk to the party.<br>
 +
<b>**10:**</b> It has an ego of 16 and is from Yorkshire. <br>
 +
<b>**11:**</b> It will insist on having a Neutral wielder. (See Intelligent weapons on page 187 in DMG).<br>
 +
<b>**12:**</b> If picked by a player, it will be keen to become the players main weapon.<br>
 +
<b>**13:**</b> If picked up by a player who is not Neutral it will do them 16 points of damage}}</p>
 +
<p>An artefact such as an intelligent sword with powers introduces data sets that specify the powers that the artefact has and how often they can be usedThese match the API Buttons with calls to the <b>MagicMaster API</b> to enact the powers.</p>
 +
<p style="display: inline-block; background-color: lightgrey; border: 1px solid black; padding: 4px; color: dimgrey; font-weight: extra-light;">WeapData=[w:Jim the Sun Blade,ns:5][cl:PW,w:Jims-Locate-Object,sp:100,lv:6,pd:1],[cl:PW,w:Jims-Find-Traps,sp:5,lv:6,pd:2],[cl:PW,w:Jims-Levitation,sp:2,lv:1,pd:3],[cl:PW,w:Jims-Sunlight,sp:3,lv:6,pd:1],[cl:PW,w:Jims-Fear,sp:4,lv:6,pd:2]</p>
 +
<p>The WeapData data sets can be used to define the powers that an artefact has (or stored spells - see MagicMaster API for more information on spell storing)</p>
 +
<p>1<sup>st</sup> data set:</p>
 +
<table><tr><td><b>w:</b></td><td>&lt;text&gt;  The name of the weapon (not currently used)</td></tr>
 +
<tr><td><b>ns:</b></td><td><#>  The number of spells or powers for which the specifications follow</td></tr></table>
 +
<p>Subsequent data sets:</p>
 +
<table><tr><td><b>cl:</b></td><td>< MU / PR / PW >  The type of data: MU=Wizard, PR=Priest, PW=Power</td></tr>
 +
<tr><td><b>w:</b></td><td>&lt;text&gt;  Name of the spell or power: must be the same as the corresponding database definition</td></tr>
 +
<tr><td><b>sp:</b></td><td><#> Speed of the spell/power casting in segments (1/10ths of a round)</td></tr>
 +
<tr><td><b>lv:</b></td><td><#>  The level at which the artefact will cast the spell/power (if omitted will use character\'s level)</td></tr>
 +
<tr><td><b>pd:</b></td><td><-1 / #>  Number per day, or -1 for "use at will"  </td></tr></table>
 +
<br>
 +
==3. Armour Databases==
 +
<p>Armour databases are all character sheets that have names that start with MI-DB-Armour (as with weapons, this can be in any database starting with MI-DB- if desired), and can have anything put at the end, though those with version numbers of the form v#.# as part of the name will be ignored.</p>
 +
<p>As previously stated and as per the weapon and ammunition databases, each armour definition has 3 parts in the database (see Section 1): the Ability Macro, the ct- attribute, and the listing (and occasionally attributes for powers and spells). The quickest way to understand these entries is to examine existing entries.  Do go to the root databases and take a look (but be careful not to alter anything unless you know what you\'re doing!)</p>
 +
<p><b>Note:</b>The DM creating new armour entries does not need to worry about anything other than the Ability Macro in the database, as running the <b>!attk --check-db MI-DB-Armour</b> or <b>!magic --check-db MI-DB-Armour</b> command will update all other aspects of the database appropriately for all databases that have a name starting with or including \'MI-DB-Armour\', as long as the Specs and Data fields are correctly definedRunning the command <b>-check-db</b> with no parameters will check and update all databases.</p>
 +
<p>Here are some examples:</p>
 +
===Chain Mail===
 +
<p style="display: inline-block; background-color: lightgrey; border: 1px solid black; padding: 4px; color: dimgrey; font-weight: extra-light;">/w "@{selected|character_name}" &{template:2Edefault}{{name=Chain Mail}}{{subtitle=Armour}}{{Armour=Chain Mail}}<mark style="color:green">Specs=[Chain Mail,Armour,0H,Mail]</mark>{{AC=[[5]] vs all attacks}}<mark style="color:blue">ACData=[a:Chain Mail,st:Mail,+:0,ac:5,sz:L,wt:40]</mark>{{Speed=[[0]]}}{{Size=Large}}{{Immunity=None}}{{Saves=No effect}}{{desc=This armor is made of interlocking metal rings. It is always worn with a layer of quilted fabric padding underneath to prevent painful chafing and to cushion the impact of blows. Several layers of mail are normally hung over vital areas. The links yield easily to blows, absorbing some of the shock. Most of the weight of this armor is carried on the shoulders and it is uncomfortable to wear for long periods of time.}}</p>
 +
<p>The ability specification for this suit of Chain Mail uses a Roll20 Roll Template, in this case defined by the Advanced D&D 2e Character Sheet by Peter BThe entries in the Roll Template itself can be anything you desire, giving as much or as little information as you wantHowever, the important elements for the AttackMaster API are those highlighted.  Each of these elements are inserted between the elements of the Roll Template, meaning they will not be seen by the player when the macro is runGenerally spaces, hyphens and underscores in the data elements are ignored, and case is not significant.  Each element is described below:</p>
 +
<pre>Specs=[Chain Mail,Armour,0H,Mail]</pre>
 +
<p>The Specs section of the specification has exactly the same format as for weapons and ammunition (and indeed all database items).  See section 9 for the definition of the fields.</p>
 +
<p><b>Note:</b>The armour Type (the 1<sup>st</sup> parameter) and Group-Type (the 4<sup>th</sup> parameter) are used to determine if the character is of a class that can use the armour.  Currently implemented types are listed in Section 9.</p>
 +
<p><b>Note:</b> Armour that fits on the body generally does not take any hands to hold, and so the third field, <i>Handedness</i>, is set to \'0H\'.</p>
 +
<pre>ACData=[a:Chain Mail,st:Mail,+:0,ac:5,sz:L,wt:40]</pre>
 +
<p>The Armour Class Data (ACData) section holds data specific to the armour.  As with other data sections, fields can be in any order, and spaces, hyphens, underscores and case are ignored.</p>
 +
<table><tr><td><b>a:</b></td><td>< text > the name of the armour to be displayedOften the same as the Ability.</td></tr>
 +
<tr><td><b>st:</b></td><td>< group-type > the supertype of the armour, often the same as the fourth parameter of the Specs section.</td></tr>
 +
<tr><td><b>+:</b></td><td><[+/-]#> the magical bonus or penalty of the armour (defaults to 0 if not supplied).</td></tr>
 +
<tr><td><b>ac:</b></td><td><[-]#> the base armour class (excluding magical bonuses) for this type of armour.</td></tr>
 +
<tr><td><b>sz:</b></td><td><[T/S/M/L/H]> The size of the item (not necessarily indicating its fit).</td></tr>
 +
<tr><td><b>wt:</b></td><td><#> The weight of the item in lbs (could be considered kg - or any measure - if everything is the same).</td></tr></table>
 +
<p>Other possible fields are:</p>
 +
<table><tr><td><b>t:</b></td><td>< armour-type > The specific armour type, often the same as the first parameter of the Specs section.</td></tr>
 +
<tr><td><b>db:</b></td><td><[-/+]#> The dexterity bonus or penalty that wearing the armour bestowes.</td></tr>
 +
<tr><td><b>+m:</b></td><td><[-/+]#> The adjustment that the armour gives vs. missiles and ammunition of ranged weapons.</td></tr>
 +
<tr><td><b>+s:</b></td><td><[-/+]#> The magical adjustment specifically against slashing damage.</td></tr>
 +
<tr><td><b>+p:</b></td><td><[-/+]#> The magical adjustment specifically against piercing damage.</td></tr>
 +
<tr><td><b>+b:</b></td><td><[-/+]#> The magical adjustment specifically against bludgeoning damage.</td></tr>
 +
<tr><td><b>rc:</b></td><td><recharging/curse type> Armour can be "cursed", but generally does not have charges. Default is "uncharged".  See MagicMaster API documentation for more information on charges and curses.</td></tr></table>
 +
<br>
 +
===Shield+2===
 +
<p style="display: inline-block; background-color: lightgrey; border: 1px solid black; padding: 4px; color: dimgrey; font-weight: extra-light;">/w "@{selected|character_name}" &{template:2Edefault}{{name=Shield+2}}{{subtitle=Shield}}{{Shield=1-handed +2 Medium Shield made of wood & metal}}<mark style="color:green">Specs=[Medium Shield,Shield,1H,Shields]</mark>{{AC=+[[2]] against all attacks from the front}}<mark style="color:blue">ACData=[a:Medium Shield+2, st:Shield, +:2,sz:M, wt:10]</mark> {{Speed=[[0]]}} {{Size=M}} {{Immunity=None}} {{Saves=No effect}} {{desc=All shields improve a character\'s Armor Class by 1 or more against a specified number of attacks. A shield is useful only to protect the front and flanks of the user. Attacks from the rear or rear flanks cannot be blocked by a shield (exception: a shield slung across the back does help defend against rear attacks). The reference to the size of the shield is relative to the size of the character. Thus, a human\'s small shield would have all the effects of a medium shield when used by a gnome.<br>
 +
*The medium shield* is carried on the forearm and gripped with the hand. Its weight prevents the character from using his shield hand for other purposes. With a medium shield, a character can protect against any frontal or flank attacks.}}</p>
 +
<p>As can be seen here, the specification for a Shield is almost identical in structure to that of any other armour, the major difference being in the Specs section type field.</p>
 +
<p><b>Note:</b> The <b>ac:</b> field in the data section for a shield is always assumed to be \'+1\', meaning a shield adds 1 to the base AC before magical adjustments are taken into account.  However, it can be specified as a different value, if desired.</p>
 +
<p><b>Note:</b> All shields except a <i>Buckler</i> must be taken in hand using the <b>!attk --weapon</b> command before the Armour Class system of the AttackMaster API adds it to the AC for the character.  A <i>buckler</i> is a special type of very small shield that is strapped to the arm and can counter only 1 blow per melee round, but allows both (all) hands to be freeIn fact, any shield can have this functionality if desired, by setting the handedness field of the Specs section to be \'0H\', meaning it take no hands to hold it.</p>
 +
<br>
 +
===Armour-of-Vulnerability+-3===
 +
<p style="display: inline-block; background-color: lightgrey; border: 1px solid black; padding: 4px; color: dimgrey; font-weight: extra-light;">/w "@{selected|character_name}" &{template:2Edefault}{{name=Field Plate Armour of Vulnerability+/-3}}{{subtitle=Cursed Armour}}{{Armour=+/-3 selectively magical Field Plate}}<mark style="color:green">Specs=[Armour-of-Vulnerability|Armour-of-Resistance,Armour,0H,Plate]</mark>{{AC=[[2]][[0-3]] better AC against Slashing damage
 +
+[[3]] worse AC against any other type}}<mark style="color:blue">ACData=[a:Armour-of-Vulnerability+-3,st:Mail,+S:3,+P:-3,+B:-3,ac:2,sz:L,wt:60,sp:0,rc:cursed]</mark>{{Speed=0}}{{Size=Large}}{{Immunity=None}}{{Saves=No effect}}{{desc=***Curse.*** This armor is cursed, a fact that is revealed only when an identify spell is cast on the armor or you attune to it. Attuning to the armor curses you until you are targeted by the remove curse spell or similar magic; removing the armor fails to end the curse. While cursed, you have vulnerability to two of the three damage types associated with the armor (not the one to which it grants resistance).}}{{desc1=This armour provides resistance to Slashing damage only, but vulnerability to Piercing and Bludgeoning damage.<br>
 +
This armor is a combination of chain or brigandine with metal plates (cuirass, epaulettes, elbow guards, gauntlets, tasets, and greaves) covering vital areas. The weight is distributed over the whole body and the whole thing is held together by buckles and straps. This is the most common form of heavy armor.<br>
 +
For each +1 bonus to armor, regardless of the type of armor, the wearer\'s Armor Class moves downward (toward AC 2 . . . to 1 . . . to 0, -1, -2, and so on). Note, however, that Armor Class can never be improved beyond -10}}</p>
 +
<p>This is a slightly more complex type of armour.  It is a cursed item, and generally appears initially as <i>Armour-of-Resistance+3</i>, hence the <b>Specs</b> first parameter of armour type having two possible values, separated by \'|\'.</p>
 +
<p>The use of the damage type specific magical adjustment fields can be seen in the data section, along with the use of the <b>rc:</b> field tag with the value <i>\'cursed\'</i>.  See section 9 for a complete list of <b>rc:</b> field values.</p>
 +
<br>
 +
==4. Specs & Data field values==
 +
<p>Below are lists of the current possible values for the item database Ability macro sections.</p>
 +
===4.1 Specs sections===
 +
<pre>Specs=[Type, Item-Class, Handedness, Group-Type]</pre>
 +
====4.1(a) Weapon Types====
 +
<p>There is an infinite list of weapon types: generally the type is the weapon name without any reference to magical plusses, so the Type of a Longsword+2 is Longsword.  This Type is used to check for Proficiency.</p>
 +
====4.1(b) Weapon Item-Classes====
 +
<table><tr><td>Melee</td><td>Melee weapon which strikes while in hand</td></tr>
 +
<tr><td>Ranged</td><td>Weapon that causes damage when thrown or with ammunition</td></tr>
 +
<tr><td>Ammo</td><td>Ammunition for a ranged weapon of a specific Type or Group-Type</td></tr></table>
 +
====4.1(c) Weapon Handedness====
 +
<table><tr><td> 0H</td><td>A weapon that does not take a hand (e.g. spike on helm)</td></tr>
 +
<tr><td> 1H</td><td>A weapon that is 1-handed, such as a short sword</td></tr>
 +
<tr><td> 2H</td><td>A weapon that takes 2 hands to wield, such as a longbow</td></tr>
 +
<tr><td> 3H</td><td>A weapon that takes 3 hands...</td></tr>
 +
<tr><td> 4H</td><td>Etc (e.g. a siege weapon that needs 2 people to operate it)</td></tr>
 +
<tr><td> ...</td><td>...</td></tr></table>
 +
<br>
 +
====4.1(d) Weapon Group-Types====
 +
<p>Weapon Group-Types determine related weapons for weapon proficiency, and whether it can be used by a Character of a specific classThe APIs use the definitions in the AD&D2e Fighter\'s Handbook section on \'Tight Groups\', extended to cover certain additional weapons and weapon types.  Those implemented so far for the Weapon databases are:</p>
 +
<table><tr><td>Arrow</td><td>Club</td><td>Great-Blade</td><td>Long-Blade</td><td>Short-Blade</td><td>Whip</td></tr>
 +
<tr><td>Axe</td><td>Crossbow</td><td>Hook</td><td>Medium-Blade</td><td>Sling</td></tr>
 +
<tr><td>Blowgun</td><td>Dart</td><td>Horeshoes</td><td>Pick</td><td>Spear</td></tr>
 +
<tr><td>Bow</td><td>Fencing-Blade</td><td>Innate</td><td>Polearm</td><td>Staff</td></tr>
 +
<tr><td>Bullet</td><td>Flail</td><td>Lance</td><td>Quarrel</td><td>Throwing-Blade</td></tr></table>
 +
<p>Types and Group-Types that can be used by various Character Classes are:</p>
 +
<table><tr><td>Warrior</td><td>Any</td></tr>
 +
<tr><td>Fighter</td><td>Any</td></tr>
 +
<tr><td>Ranger</td><td>Any</td></tr>
 +
<tr><td>Paladin</td><td>Any</td></tr>
 +
<tr><td>Beastmaster</td><td>Any</td></tr>
 +
<tr><td>Barbarian</td><td>Any</td></tr>
 +
<tr><td>Defender</td><td>"axe", "club", "flail", "long-blade", "fencing-blade", "medium-blade", "short-blade", "polearm"</td></tr>
 +
<tr><td>Wizard</td><td>(all types) "dagger", "staff", "dart", "knife", "sling"</td></tr>
 +
<tr><td>Priest / Cleric</td><td>"club", "mace", "hammer", "staff"</td></tr>
 +
<tr><td>Druid</td><td>"club", "sickle", "dart", "spear", "dagger", "scimitar", "sling", "staff"</td></tr>
 +
<tr><td>Healer</td><td>"club", "quarterstaff", "mancatcher", "sling"</td></tr>
 +
<tr><td>Priest of Life</td><td>"club", "quarterstaff", "mancatcher", "sling"</td></tr>
 +
<tr><td>Priest of War</td><td>Any</td></tr>
 +
<tr><td>Priest of Light</td><td>"dart", "javelin", "spear"</td></tr>
 +
<tr><td>Priest of Knowledge</td><td>"sling", "quarterstaff"</td></tr>
 +
<tr><td>Shaman</td><td>"long-blade", "medium-blade", "short--blade", "blowgun", "club", "staff", "shortbow", "horsebow", "hand-xbow"</td></tr>
 +
<tr><td>Rogue / Thief</td><td>"club", "short-blade", "dart", "hand-xbow", "lasso", "shortbow", "sling", "broadsword", "longsword", "staff"</td></tr>
 +
<tr><td>Bard</td><td>Any</td></tr>
 +
<tr><td>Assassin</td><td>Any</td></tr></table>
 +
<br>
 +
====4.1(e) Armour Types====
 +
<p>There is an infinite list of armour types: generally the type is the armour name without any reference to magical plusses, so the Type of Plate-Mail+2 is Plate-Mail.  This Type is used to check for Proficiency.</p>
 +
<br>
 +
====4.1(f) Armour Item-Classes====
 +
<p> Armour Any type of armour that does not need to be held to work
 +
Shield A barrier that is held in hand(s) and defends against one or more attacks from the front</p>
 +
<br>
 +
====4.1(g) Armour Handedness====
 +
<p> 0H Armour and Shields that are not held in the hand (e.g. a Buckler or a Helm)<br>
 +
1H Generally a type of Shield that must be held in a hand<br>
 +
2H Armour and Shields that use two hands, and/or prevent use of those hands for other things<br>
 +
3H Generally siege engines that shield against attacks... (not yet implemented)<br>
 +
... etc.</p>
 +
<br>
 +
====4.1(h) Armour Group-Types====
 +
<p>Armour Types and Group Types determine whether the armour can be used by various Character Classes. Here are the currently implemented restrictions:</p>
 +
<table><tr><td>Warrior Any</td></tr>
 +
<tr><td>Fighter</td><td>Any</td></tr>
 +
<tr><td>Ranger</td><td>Any</td></tr>
 +
<tr><td>Paladin</td><td>Any</td></tr>
 +
<tr><td>Beastmaster</td><td>Any</td></tr>
 +
<tr><td>Barbarian</td><td>"padded", "leather", "hide", "brigandine", "ring-mail", "scale-mail", "chain-mail", "shield", "ring",  "magic-item","cloak"</td></tr>
 +
<tr><td>Defender</td><td>Any</td></tr>
 +
<tr><td>Wizard (all types)</td><td>"magic-item", "ring", "cloak"</td></tr>
 +
<tr><td>Priest / Cleric</td><td>Any</td></tr>
 +
<tr><td>Druid</td><td>"leather", "padded", "hide", "wooden-shield", "magic-item", "ring", "cloak"</td></tr>
 +
<tr><td>Healer</td><td>Any</td></tr>
 +
<tr><td>Priest of Life</td><td>Any</td></tr>
 +
<tr><td>Priest of War</td><td>Any</td></tr>
 +
<tr><td>Priest of Light</td><td>"studded-leather", "ring-mail", "chain-mail", "shield", "ring", "magic-item", "cloak"</td></tr>
 +
<tr><td>Priest of Knowledge</td><td>"magic-item", "ring", "cloak"</td></tr>
 +
<tr><td>Shaman</td><td>"padded", "leather", "hide", "brigandine", "ring-mail", "scale-mail", "chain-mail", "splint-mail", "banded-mail", "shield", "ring", "magic-item", "cloak"</td></tr>
 +
<tr><td>Rogue / Thief</td><td>Any</td></tr>
 +
<tr><td>Bard</td><td>"padded", "leather", "hide", "brigandine", "ring-mail", "scale-mail", "chain-mail", "ring", "magic-item", "cloak"</td></tr>
 +
<tr><td>Assassin</td><td>Any</td></tr></table>
 +
<br>
 +
===4.2 Data Sections===
 +
<table>
 +
<thead>
 +
<tr>
 +
<th scope="col" rowspan="2">Field</th>
 +
<th scope="col" rowspan="2">Format</th>
 +
<th scope="col" rowspan="2">Default Value</th>
 +
<th scope="col" rowspan="2">Description</th>
 +
<th scope="col" colspan="6">Can be used in</th>
 +
</tr>
 +
<tr>
 +
<th scope="col">ToHit<br>Data</th>
 +
<th scope="col">Dmg<br>Data</th>
 +
<th scope="col">Ammo<br>Data</th>
 +
<th scope="col">Range<br>Data</th>
 +
<th scope="col">Weapon<br>Data</th>
 +
<th scope="col">AC<br>Data</th>
 +
</tr>
 +
</thead>
 +
<tr><td>w:</td><td>< text ></td><td>\'-\'</td><td>Name to be displayed</td> <td>X</td><td>X</td><td>X</td><td> </td><td> </td><td> </td></tr>
 +
<tr><td>w:</td><td>< text ></td><td>\'-\'</td><td>Name of spell or power</td> <td> </td><td> </td><td> </td><td> </td><td>X</td><td> </td></tr>
 +
<tr><td>a:</td><td>< text ></td><td>\'-\'</td><td>Name to be displayed</td> <td> </td><td> </td><td> </td><td> </td><td> </td><td>X</td></tr>
 +
<tr><td>t:</td><td>< text ></td><td>\'\'</td><td>Type</td> <td> </td><td> </td><td>X</td><td>X</td><td> </td><td>X</td></tr>
 +
<tr><td>st:</td><td>< text ></td><td>\'\'</td><td>Group Type (aka Tight-Group)</td> <td> </td><td> </td><td>X</td><td>X</td><td> </td><td>X</td></tr>
 +
<tr><td>sb:</td><td>0 / 1</td><td>0</td><td>Strength Bonus</td> <td>X</td><td>X</td><td>X</td><td> </td><td> </td><td> </td></tr>
 +
<tr><td>db:</td><td>0 / 1</td><td>1</td><td>Dexterity Bonus</td> <td>X</td><td> </td><td> </td><td> </td><td> </td><td>X</td></tr>
 +
<tr><td>+:</td><td>[ + / - ] #</td><td>0</td><td>Magical adjustment</td> <td>X</td><td>X</td><td>X</td><td>X</td><td> </td><td>X</td></tr>
 +
<tr><td>+m:</td><td>[ + / - ] #</td><td>0</td><td>Missile attack adjustment</td> <td> </td><td> </td><td> </td><td> </td><td> </td><td>X</td></tr>
 +
<tr><td>+s:</td><td>[ + / - ] #</td><td>0</td><td>Slashing damage adjustment</td> <td> </td><td> </td><td> </td><td> </td><td> </td><td>X</td></tr>
 +
<tr><td>+p:</td><td>[ + / - ] #</td><td>0</td><td>Piercing damage adjustment </td> <td> </td><td> </td><td> </td><td> </td><td> </td><td>X </td></tr>
 +
<tr><td>+b:</td><td>[ + / - ] #</td><td>0</td><td>Bludgeoning damage adjustment</td> <td> </td><td> </td><td> </td><td> </td><td> </td><td>X</td></tr>
 +
<tr><td>n:</td><td># [ / # ]</td><td>1</td><td>Attacks per round</td> <td>X</td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
 +
<tr><td>dp:</td><td>#</td><td>0</td><td>Dancing proficiency adjustment</td> <td>X</td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
 +
<tr><td>ch:</td><td>1 - 20</td><td>20</td><td>Critical Hit roll value</td> <td>X</td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
 +
<tr><td>cm:</td><td>1 - 20</td><td>1</td><td>Critical Miss roll value</td> <td>X</td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
 +
<tr><td>sz:</td><td>[ t / s / m / l / h ]</td><td>\'\'</td><td>Size of item</td> <td>X</td><td> </td><td>X</td><td> </td><td> </td><td>X</td></tr>
 +
<tr><td>r:</td><td>[# /] # / # / #</td><td>\'\'</td><td>Range</td> <td>X</td><td> </td><td> </td><td>X</td><td> </td><td> </td></tr>
 +
<tr><td>r:</td><td>[+/-]# [ / [+/-]# / [+/-]# / [+/-]# ]</td><td>0</td><td>Range Modifier</td><td>X</td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
 +
<tr><td>ty:</td><td>SPB any combination</td><td>\'\'</td><td>Type of damage</td> <td>X</td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
 +
<tr><td>sp:</td><td>[-]#</td><td>0</td><td>Speed in segments (1/10 round)</td> <td>X</td><td> </td><td> </td><td> </td><td>X</td><td> </td></tr>
 +
<tr><td>sm:</td><td>dice roll format</td><td>0</td><td>Damage roll for Small & Medium opponents</td><td> </td><td>X</td><td>X</td><td> </td><td> </td><td> </td></tr>
 +
<tr><td>l:</td><td>dice roll format</td><td>0</td><td>Damage roll for Large & Huge opponents</td><td> </td><td>X</td><td>X</td><td> </td><td> </td><td> </td></tr>
 +
<tr><td>ac:</td><td>[-]#</td><td>\'\'</td><td>Armour class</td> <td> </td><td> </td><td> </td><td> </td><td> </td><td>X</td></tr>
 +
<tr><td>wt:</td><td>#</td><td>1</td><td>Weight of item in lbs</td> <td>X</td><td> </td><td> </td><td> </td><td> </td><td>X</td></tr>
 +
<tr><td>ns:</td><td>#</td><td>0</td><td>Number of spells & powers defined for item</td><td> </td><td> </td><td> </td><td> </td><td>X</td><td>X</td></tr>
 +
<tr><td>cl:</td><td>MU / PR / PW</td><td>\'\'</td><td>Type of spell or power</td> <td> </td><td> </td><td> </td><td> </td><td>X</td><td> </td></tr>
 +
<tr><td>lv:</td><td>#</td><td>1</td><td>Level at which spell/power is cast</td> <td> </td><td> </td><td> </td><td> </td><td>X</td><td> </td></tr>
 +
<tr><td>pd:</td><td>-1 / #</td><td>1</td><td>Number per day (power only)</td> <td> </td><td> </td><td> </td><td> </td><td>X</td><td> </td></tr>
 +
<tr><td>rc:</td><td>Charged /<br>Uncharged /<br> Rechargeable /<br>Recharging /<br>Self-charging /<br>Cursed /<br>Charged-Cursed /<br>Recharging-Cursed /<br>Self-charging-Cursed</td><td>Uncharged</td><td>Initial charged and Cursed status of item when found</td><td>X</td><td> </td><td> </td><td> </td><td> </td><td>X</td></tr>
 +
</table>
 +
<br>
 +
===4.3 Character Sheet data fields===
 +
<p>As stated in section 7, the Character Sheet field mapping to the API script can be altered using the definition of the fields objectYou can find the complete mapping for all APIs in the RPGMaster series, with an explanation of each, in a separate document.</p>

Revision as of 10:35, 1 April 2022

Contents

Weapon and Armour Databases

for AttackMaster v'+version+'

1. General Database information

The RPGMaster APIs use a number of Character Sheets as databases to hold Ability Macros defining weapons, ammo, and items of armour and their specifications. The API is distributed with many weapon, ammo and armour definitions and it also checks for, creates and updates these Character Sheet databases on start-up. DMs can add their own weapons, ammo and armour to additional databases, but the databases provided are totally rewritten when new updates are released so the DM must add their own database sheets. If the provided databases are accidentally deleted, they will be automatically recreated the next time the Campaign is opened. Additional databases should be named as follows:

Weapons:additional databases: MI-DB-Weapons-[added name] where [added name] can be replaced with anything you want.
Ammo:additional databases: MI-DB-Ammo-[added name] where [added name] can be replaced with anything you want.
Armour:additional databases: MI-DB-Armour-[added name] where [added name] can be replaced with anything you want.

However: the system will ignore any database with a name that includes a version number of the form "v#.#" where # can be any number or group of numbers e.g. MI-DB v2.13 will be ignored. This is so that the DM can version control their databases, with only the current one (without a version number) being live.

There can be as many additional databases as you want. Other Master series APIs come with additional databases, some of which overlap - this does not cause a problem as version control and merging unique macros is managed by the APIs.

Important Note: all Character Sheet databases must have their \'ControlledBy\' value (found under the [Edit] button at the top right of each sheet) set to \'All Players\'. This must be for all databases, both those provided (set by the API) and any user-defined ones. Otherwise, Players will not be able to run the macros contained in them.

Each database has a similar structure, with:

  • Ability Macros named as the weapon, ammo or armour specified, and used to describe and provide specifications for using the commands with the AttackMaster API;
  • Custom Attributes with the attribute name "ct-ability-macro-name", one per Ability Macro, which defines the speed and type for each item;
  • An entry in a list on the character sheet in the spell book of the relevant Character Sheet tab (various spell books for different items - see entry below);
  • Optionally, some entries come also with attributes that define Powers and Spells delivered by or stored on the item.

Note: a DM only needs to program the Ability Macro using the formats shown in the next section, and then run the !attk --check-db or !magic --check-db command, which will correctly parse the ability macro and set the rest of the database entries as needed.

Ability Macros can be whatever the DM wants and can be as simple or as complex as desired. Roll Templates are very useful when defining ability macros. When a Player or an NPC or Monster views the specifications of a weapon, ammunition or piece of armour, the APIs run the relevant Ability Macro from the databases as if it had been run by the Player from the chat window. All Roll20 functions for macros are available.

1.1 Replacing Provided Weapons

If you want to replace any item provided in any of the databases, you can do so simply by creating an Ability Macro in one of your own databases with exactly the same name as the provided item to be replaced. The API gives preference to Ability Macros in user-defined databases, so yours will be selected in preference to the one provided with the APIs.

2. Weapon & Ammunition Databases

Weapon databases are all character sheets that have names that start with MI-DB-Weapon (though in fact, weapons can be in any database starting with MI-DB- if desired), and can have anything put at the end, though those with version numbers of the form v#.# as part of the name will be ignored. Ammunition databases are similar, with the root database MI-DB-Ammo.

As previously stated, each weapon definition has 3 parts in the database (see Section 1): an Ability Macro with a name that is unique and matches the weapon, an Attribute with the name of the Ability Macro preceded by "ct-", and a listing in the database character sheet of the ability macro name separated by \'|\' along with other weapons. The quickest way to understand these entries is to examine existing entries. Do go to the root databases and take a look (but be careful not to alter anything unless you know what you\'re doing!)

Note: The DM creating new weapons does not need to worry about anything other than the Ability Macro in the database, as running the AttackMaster or MagicMaster -check-db MI-DB-Weapons command will update all other aspects of the database appropriately for all databases that have a name starting with or including \'MI-DB-Weapons\', as long as the Specs and Data fields are correctly defined. Use the parameter \'MI-DB-Ammo\' to check and update the ammunition databases. Running the command -check-db with no parameters will check and update all databases.

Ability macros can be added to a database just by using the [+Add] button at the top of the Abilities column in the Attributes and Abilities tab of the Database Character Sheet, and then using the edit "pencil" icon on the new entry to open it for editing. Ability macros are standard Roll20 functionality and not dependent on the API. Refer to the Roll20 Help Centre for more information.

Here are some examples:

Longsword

/w "@{selected|character_name}" &{template:2Edefault}Template:Name=Longsword Template:Subtitle=Sword{{Speed=5}} Template:Size=MediumTemplate:Weapon=1-handed melee long-blade<mark style="color:green">Specs=[Longsword,Melee,1H,Long-blade]</mark>Template:To-hit=+0 + Str bonus<mark style="color:blue">ToHitData=[w:Longsword, sb:1, +:0, n:1, ch:20, cm:1, sz:M, ty:S, r:5, sp:5]</mark>Template:Attacks=1 per round + level & specialisation, SlashingTemplate:Damage=+0, vs SM:1d8, L:1d12, + Str bonus<mark style="color:red">DmgData=[w:Longsword, sb:1, +:0, SM:1d8, L:1d12]</mark>Template:Desc=This is a normal sword. The blade is sharp and keen, but nothing special.

The ability specification for this Longsword uses a Roll20 Roll Template, in this case defined by the Advanced D&D 2e Character Sheet by Peter B (see the documentation for the Character Sheet on Roll20 for specifications of this Roll Template), but any Roll Template you desire can be used. The entries in the Roll Template itself can be anything you desire, giving as much or as little information as you want. However, the important elements for the APIs are those highlighted. Each of these elements are inserted between the elements of the Roll Template, meaning they will not be seen by the player when the macro is run. Generally spaces, hyphens and underscores in the data elements are ignored, and case is not significant. Each element is described below:

Specs = [Type, Class, Handedness, Weapon Group]

The Specs section describes what weapon type and proficiency groups this weapon belongs to. These fields must be in this order. This format is identical for all database items, whether in these databases or others used by the Master series of APIs.

Typeis the type of the weapon, often the same as the ability macro name without magical plusses.
Classis one of Melee, Ranged, or Ammo.
Handednessis #H, where # is the number of hands needed to wield the weapon.
Weapon Groupis the group of related weapons that the weapon belongs to.
ToHitData = [w:Longsword, sb:1, +:0, n:1, ch:20, cm:1, sz:M, ty:S, r:5, sp:5]

The ToHitData section specifies the data relating to an attack with the weapon. These fields can be in any order.

w:<text> the name to display for attacks with this weapon
sb:<0/1> strength bonus flag - specifies if the strength bonus is applicable to the To-Hit roll
+:<[+/-]#> the magical attack bonus/penalty - an integer of any size
n:<#[/#]> the basic number of attacks per round: the API will modify to account for specialisation and level
ch:<1-20> the roll for a Critical Hit, shown in the API with a green border to the attack AC achieved
cm:<1-20> the roll for a Critical Miss, shown in the API with a red border to the attack AC achieved
sz:<T/S/M/L/H/G> the size of the weapon
ty:<SPB> the type of damage done by the weapon - Slashing, Piercing and/or Bludgeoning
sp:<#> the speed of the weapon in segments
r:<[+/-/=]# [/#/#/#] > the range or range modifier of the weapon. Ranged weapons use PB / S / M / L

The number of attacks per round, n:, can be an integer or a fraction such as 3/2 meaning 3 attacks every 2 rounds. If using the InitMaster API the Tracker will have the correct number of entries for the Character relating to the number of attacks in the current round.

The range for the weapon, r:, can be a single integer (representing the range of a melee weapon or simple ranged weapon) or a range modifier, starting with +, -, or =. The range modifier will amend the range of the ammo for a ranged weapon - ranged weapons vary their range with the ammo used. The weapon can use that range or modify it. Ranged weapon range modifiers can be of the form [[+/-]#/][+/-]#/[+/-]#/[+/-]# which will add or subtract a different modifier for each range ([Point Blank] / Short / Medium / Long - Point Blank range is optional)

DmgData = [w:Longsword, sb:1, +:0, SM:1d8, L:1d12]

The DmgData section specifies the data relating to the damage done by the weapon, and relates to melee weapons only (not ranged weapons). These fields can be in any order.

w:<text> the name to display for damage calculations for this weapon
sb:<0/1> strength bonus flag - specifies if the strength bonus is applicable to the Damage roll
+:<[+/-]#> the magical damage bonus/penalty - an integer of any size
sm:<dice roll spec> the base dice roll vs. small/medium creatures excluding any magical bonus
l:<dice roll spec> the base dice roll vs. large/huge creatures excluding any magical bonus


Bastardsword+1

/w "@{selected|character_name}" &{template:2Edefault}Template:Name=Bastard Sword+1Template:Subtitle=Magic Sword{{Speed=5}}Template:Size=MediumTemplate:Weapon=1 or 2-handed melee long blade<mark style="color:green">Specs=[Bastard-Sword,Melee,1H,Long-blade],[Bastard-Sword,Melee,2H,Long-blade]</mark>Template:To-hit=+1 + Str Bonus<mark style="color:blue">ToHitData=[w:Bastard Sword+1, sb:1, +:1, n:1, ch:20, cm:1, sz:M, ty:S, r:5, sp:6,rc:uncharged],[w:Bastard Sword 2H+1, sb:1, +:1, n:1, ch:20, cm:1, sz:M, ty:S, r:5, sp:8,,rc:uncharged]</mark>Template:Attacks=1 per round + specialisation & level, SlashingTemplate:Damage=+1, 1-handed SM:1d8 L:1d12, 2-handed SM:2d4 L:2d8<mark style="color:red">DmgData=[w:Bastard Sword+1,sb:1,+:1,SM:1d8,L:1d12],[w:Bastard Sword 2H+1,sb:1,+:1,SM:2d4,L:2d8]</mark>{{desc=This is a normal magical sword. The blade is sharp and keen, and is a +1 magical weapon at all times.}}

The Bastardsword can be used either single handed or two handed with different to-hit and damage outcomes. This can be represented in the macro as shown here, with multiple specification sections. When using the AttackMaster API !attk --weapon command to take the Bastardsword in hand, choosing 1 hand (either left or right) will use the 1-handed specifications, and choosing to take it in Both Hands will use the 2-handed specifications.

All the field definitions are the same as for the Longsword example above, but there are (in this case) two sets of data for each section, the first set for 1-handed, the second set for 2-handed (as defined by the handedness entry in the Specs section data sets.


Longbow

/w "@{selected|character_name}" &{template:2Edefault}Template:Name=LongbowTemplate:Subtitle=Bow{{Speed=8}}Template:Size=MediumTemplate:Weapon=Ranged 2-handed Bow<mark style="color:green">Specs=[Longbow,Ranged,2H,Bow]</mark>Template:To-hit=+0 + Dex Bonus<mark style="color:blue">ToHitData=[w:Longbow,sb:0,db:1,+:0,n:2,ch:20,cm:1,sz:L,ty:P,sp:8]</mark>Template:Attacks=Piercing, 2 per roundTemplate:Desc=This is a normal longbow. The wood is polished, the string taut, but nothing special.

A ranged weapon like a Longbow uses the same data section definitions as melee weapons except for the following additions and differences.

ToHitData=[w:Longbow,sb:0,db:1,+:0,n:2,ch:20,cm:1,sz:L,ty:P,sp:8]

The To-Hit section has an extra option:

db:<0/1> dexterity bonus flag - specifies if the dexterity bonus is applicable to the To-Hit roll.
r:the range data is not provided because this weapon does not modify the range of its ammo, but could be provided if required.

There is no DmgData section, as damage is defined by the ammo.


Flight-Arrow+2 (Ammunition Database)

/w "@{selected|character_name}" &{template:2Edefault}Template:Name=Flight Arrow+2Template:Subtitle=Magic WeaponTemplate:Speed=As per bowTemplate:Size=Small<mark style="color:green">Specs=[Flight-Arrow,Ammo,1H,Arrow],[Flight-Arrow,Ammo,1H,Arrow]</mark>{{Ammo=+2,
**Warbow** vs. SM:1d8, L:1d8,
**Other Bows** vs. SM:1d6, L:1d6, Piercing}}<mark style="color:orange">AmmoData=[w:Flight Arrow+2, st:Bow, sb:1, +:2, SM:1d6, L:1d6],[w:Warbow Flight Arrow+2, t:warbow, sb:1, +:2, SM:1d8,L:1d8]</mark>{{Range=PB:30, others vary by bow
**Shortbow:**
S:50, M:100, L150,
**Longbow:**
S:60, M:120, L:210,
**Warbow:**
S90, M:160, L:250,
**Composite Sbow:**
S:50, M:100, L:180,
**Composite Lbow:**
S:70, M:140, L:210}}<mark style="color:purple">RangeData=[t:longbow, +:2, r:3/6/12/21],[t:shortbow, +:2, r:3/5/10/15],[t:warbow, +:2, r:3/9/16/25],[t:compositelongbow, +:2, r:3/7/14/21],[t:compositeshortbow, +:2, r:3/5/10/18]</mark>Template:Desc=A magical Flight Arrow of very fine quality

Ammo has a different specification, as the To-Hit data sections are obviously part of the ranged weapon data. Instead it provides data on which weapons this can be ammo for, and what ranges it has for each. To determine this, it uses the weapon type and group-type set in the weapon Specs section.

AmmoData=[w:Flight Arrow+2, st:Bow, sb:1, +:2, SM:1d6, L:1d6],[w:Warbow Flight Arrow+2, t:warbow, sb:1, +:2, SM:1d8,L:1d8]

The AmmoData section has mostly the same as the DmgData sections (order of fields is immaterial and spaces, hyphens and underscores ignored in type and supertype names), but repeated data sets relate to the data for different types of weapon, and in addition:

t:<weapon-type> the specific type of ranged weapon this data matches - takes priority over st:. An example is Longbow<i></td></tr>
st:</td><group-type> the group-type of ranged weapon this data can be used for. An example is <i>Bow, which means all bows
RangeData=[t:longbow, +:2, r:3/6/12/21],[t:shortbow, +:2, r:3/5/10/15],[t:warbow, +:2, r:3/9/16/25], [t:compositelongbow, +:2, r:3/7/14/21],[t:compositeshortbow, +:2, r:3/5/10/18],[st:bow, +:2, r:3/5/10/15]

The RangeData section has one or more data sets relating to weapons that result in different ranges. The range specifications can have 3 or 4 parts: if 4, the first is for Point Blank range which is only relevant for specialists; the remaining 3 are always short, medium & long ranges.

Self-ammoed weapons e.g. Warhammer

/w "@{selected|character_name}" &{template:2Edefault}Template:Name=WarhammerTemplate:Subtitle=Hammer/Club {{Speed=4}}Template:Size=MediumTemplate:Weapon=1-handed melee or thrown club<mark style="color:green">Specs=[Warhammer,Melee,1H,Clubs],[Warhammer,Ranged,1H,Clubs]</mark>Template:To-hit=+0 + Str & Dex bonus<mark style="color:blue">ToHitData=[w:Warhammer, sb:1, +:0, n:1, ch:20, cm:1, sz:M, ty:B, r:5, sp:4],[ w:Warhammer, sb:1, db:1, +:0, n:1, ch:20, cm:1, sz:M, ty:B, sp:4]</mark>Template:Attacks=1 per round + level & specialisation, BludgeoningTemplate:Damage=+0, vs SM:1d4+1, L:1d4, + Str bonus<mark style="color:red">DmgData=[ w:Warhammer, sb:1, +:0, SM:1+1d4, L:1d4][]</mark>Template:Ammo=+0, vs SM:1d4+1, L:1d4, + Str bonus<mark style="color:orange">AmmoData=[w:Warhammer,t:Warhammer,st:Throwing-club,sb:1,+:0,SM:1+1d4,L:1d4]</mark>Template:Range=S:10, M:20, L:30<mark style="color:purple">RangeData=[t:Warhammer,+:0,r:1/2/3]</mark>Template:Desc=This is a normal warhammer. The blade is sharp and keen, but nothing special.

A melee weapon that can also be thrown, and is its own ammunition, is termed a "self-ammoed" weapon. Its definition combines the data elements of both melee weapons, ranged weapons and ammunition.

Specs=[Warhammer,Melee,1H,Clubs],[Warhammer,Ranged,1H,Clubs]

Has two data sets, one as a melee weapon and one as a ranged weapon.

ToHitData=[w:Warhammer, sb:1, +:0, n:1, ch:20, cm:1, sz:M, ty:B, r:5, sp:4],[ w:Warhammer, sb:1, db:1,  +:0, n:1, ch:20, cm:1, sz:M, ty:B, sp:4]

Also has two sets of data, each of which relates to the corresponding Specs set.

DmgData=[ w:Warhammer, sb:1, +:0, SM:1+1d4, L:1d4],[]

Does have two data sets, but the one corresponding to the ranged data is empty, as this data is in the Ammo data set.

AmmoData=[w:Warhammer,t:Warhammer,st:Throwing-club,sb:1,+:0,SM:1+1d4,L:1d4]

There is only 1 Ammo data set, as it only relates to the one weapon, itself.

RangeData=[t:Warhammer,+:0,r:1/2/3]

And only 1 Range data set, as it only relates to itself.


Artifact sword

/w "@{selected|character_name}" &{template:2Edefault}{{name=Jim the Sun Blade
Intelligent, Neutral}}Template:Subtitle=Magic Sword{{Speed=3}}<mark style="color:magenta">WeapData=[w:Jim the Sun Blade,ns:5][cl:PW,w:Jims-Locate-Object,sp:100,lv:6,pd:1],[cl:PW,w:Jims-Find-Traps,sp:5,lv:6,pd:2],[cl:PW,w:Jims-Levitation,sp:2,lv:1,pd:3],[cl:PW,w:Jims-Sunlight,sp:3,lv:6,pd:1],[cl:PW,w:Jims-Fear,sp:4,lv:6,pd:2]</mark>Template:Size=Special (feels like a Shortsword)Template:Weapon=1 or 2 handed melee Long or Short bladeSpecs=[Bastard-sword|Short-sword,Melee,1H,Long-blade|Short-blade],[Bastard-sword|Short-sword,Melee,1H,Long-blade|Short-blade],[Bastard-sword,Melee,2H,Long-blade],[Bastard-sword,Melee,2H,Long-blade]Template:To-hit=+2, +4 vs Evil + Str BonusToHitData=[w:Jim +2,sb:1,+:2,n:1,ch:20,cm:1,sz:M,ty:S,r:5,sp:3],[w:Jim vs Evil+4,sb:1,+:4,n:1,ch:20,cm:1,sz:M,ty:S,r:5,sp:3],[w:Jim 2H +2,sb:1,+:2,n:1,ch:20,cm:1,sz:M,ty:S,r:5,sp:3],[w:Jim 2H vs Evil+4,sb:1,+:4,n:1,ch:20,cm:1,sz:M,ty:S,r:5,sp:3]Template:Attacks=1 per roundTemplate:Damage=+2, +4 vs Evil, + 1-handed SM:1d8 L:1d12, 2-handed SM:2d4 L:2d8DmgData=[w:Jim+2,sb:1,+:2,SM:1d8,L:1d12],[w:Jim vs Evil+4,sb:1,+:4,SM:2d4,L:2d8],[w:Jim 2H +2,sb:1,+:2,SM:1d8,L:1d12],[w:Jim 2H vs Evil+4,sb:1,+:4,SM:2d4,L:2d8]{{desc=An intelligent weapon: A Sun Blade called Jim (DMs Guide Page 185). It is Neutral. It needs its owner to be proficient with either a Short or Bastard Sword or promise to get such proficiency as soon as possible. It cannot be used by someone who is not proficient. It requires its owner to be Neutral on at least one of its axis, and may not be Evil. NG LN CN and of cause true N are all ok. Abilities:
**1:** It is +2 normally, or +4 against evil creatures, and does Bastard sword damage.
**2:** It feels and react as if it is a short sword and uses short sword striking time.
**3:** [Locate Object](!magic --mi-power @{selected|token_id}|Jims-Locate-Object|Jim-the-Sun-Blade|6) at 6th Level in 120\' radius (1x day).
**4:** [Detect traps](!magic --mi-power @{selected|token_id}|Jims-Find-Traps|Jim-the-Sun-Blade|6) of large size in 10\' radius (2xday).
**5:** [Levitation](!magic --mi-power @{selected|token_id}|Jims-Levitation|Jim-the-Sun-Blade|1) 3x a day for 1 turn (cast at 1st Level).
**6:** [Sunlight](!magic --mi-power @{selected|token_id}|Jims-Sunlight|Jim-the-Sun-Blade|6) Once a day, upon command, the blade can be swung vigorously above the head, and it will shed a bright yellow radiance that is like full daylight. The radiance begins shining in a 10-foot radius around the sword-wielder, spreading outward at 5 feet per round for 10 rounds thereafter, creating a globe of light with a 60-foot radius. When the swinging stops, the radiance fades to a dim glow that persists for another turn before disappearing entirely.
**7:** It has a special purpose namely Defeat Evil.
**8:** On hitting an Evil being it causes [Fear](!magic --mi-power @{selected|token_id}|Jims-Fear|Jim-the-Sun-Blade|6) for 1d4 rounds (unless saving throw is made). It can do this **twice a day** when the wielder desires.
**9:** It speaks Common and its name is Jim. It will talk to the party.
**10:** It has an ego of 16 and is from Yorkshire.
**11:** It will insist on having a Neutral wielder. (See Intelligent weapons on page 187 in DMG).
**12:** If picked by a player, it will be keen to become the players main weapon.
**13:** If picked up by a player who is not Neutral it will do them 16 points of damage}}

An artefact such as an intelligent sword with powers introduces data sets that specify the powers that the artefact has and how often they can be used. These match the API Buttons with calls to the MagicMaster API to enact the powers.

WeapData=[w:Jim the Sun Blade,ns:5][cl:PW,w:Jims-Locate-Object,sp:100,lv:6,pd:1],[cl:PW,w:Jims-Find-Traps,sp:5,lv:6,pd:2],[cl:PW,w:Jims-Levitation,sp:2,lv:1,pd:3],[cl:PW,w:Jims-Sunlight,sp:3,lv:6,pd:1],[cl:PW,w:Jims-Fear,sp:4,lv:6,pd:2]

The WeapData data sets can be used to define the powers that an artefact has (or stored spells - see MagicMaster API for more information on spell storing)

1st data set:

w:<text> The name of the weapon (not currently used)
ns:<#> The number of spells or powers for which the specifications follow

Subsequent data sets:

cl:< MU / PR / PW > The type of data: MU=Wizard, PR=Priest, PW=Power
w:<text> Name of the spell or power: must be the same as the corresponding database definition
sp:<#> Speed of the spell/power casting in segments (1/10ths of a round)
lv:<#> The level at which the artefact will cast the spell/power (if omitted will use character\'s level)
pd:<-1 / #> Number per day, or -1 for "use at will"


3. Armour Databases

Armour databases are all character sheets that have names that start with MI-DB-Armour (as with weapons, this can be in any database starting with MI-DB- if desired), and can have anything put at the end, though those with version numbers of the form v#.# as part of the name will be ignored.

As previously stated and as per the weapon and ammunition databases, each armour definition has 3 parts in the database (see Section 1): the Ability Macro, the ct- attribute, and the listing (and occasionally attributes for powers and spells). The quickest way to understand these entries is to examine existing entries. Do go to the root databases and take a look (but be careful not to alter anything unless you know what you\'re doing!)

Note:The DM creating new armour entries does not need to worry about anything other than the Ability Macro in the database, as running the !attk --check-db MI-DB-Armour or !magic --check-db MI-DB-Armour command will update all other aspects of the database appropriately for all databases that have a name starting with or including \'MI-DB-Armour\', as long as the Specs and Data fields are correctly defined. Running the command -check-db with no parameters will check and update all databases.

Here are some examples:

Chain Mail

/w "@{selected|character_name}" &{template:2Edefault}Template:Name=Chain MailTemplate:Subtitle=ArmourTemplate:Armour=Chain Mail<mark style="color:green">Specs=[Chain Mail,Armour,0H,Mail]</mark>{{AC=5 vs all attacks}}<mark style="color:blue">ACData=[a:Chain Mail,st:Mail,+:0,ac:5,sz:L,wt:40]</mark>{{Speed=0}}Template:Size=LargeTemplate:Immunity=NoneTemplate:Saves=No effect{{desc=This armor is made of interlocking metal rings. It is always worn with a layer of quilted fabric padding underneath to prevent painful chafing and to cushion the impact of blows. Several layers of mail are normally hung over vital areas. The links yield easily to blows, absorbing some of the shock. Most of the weight of this armor is carried on the shoulders and it is uncomfortable to wear for long periods of time.}}

The ability specification for this suit of Chain Mail uses a Roll20 Roll Template, in this case defined by the Advanced D&D 2e Character Sheet by Peter B. The entries in the Roll Template itself can be anything you desire, giving as much or as little information as you want. However, the important elements for the AttackMaster API are those highlighted. Each of these elements are inserted between the elements of the Roll Template, meaning they will not be seen by the player when the macro is run. Generally spaces, hyphens and underscores in the data elements are ignored, and case is not significant. Each element is described below:

Specs=[Chain Mail,Armour,0H,Mail]

The Specs section of the specification has exactly the same format as for weapons and ammunition (and indeed all database items). See section 9 for the definition of the fields.

Note:The armour Type (the 1st parameter) and Group-Type (the 4th parameter) are used to determine if the character is of a class that can use the armour. Currently implemented types are listed in Section 9.

Note: Armour that fits on the body generally does not take any hands to hold, and so the third field, Handedness, is set to \'0H\'.

ACData=[a:Chain Mail,st:Mail,+:0,ac:5,sz:L,wt:40]

The Armour Class Data (ACData) section holds data specific to the armour. As with other data sections, fields can be in any order, and spaces, hyphens, underscores and case are ignored.

a:< text > the name of the armour to be displayed. Often the same as the Ability.
st:< group-type > the supertype of the armour, often the same as the fourth parameter of the Specs section.
+:<[+/-]#> the magical bonus or penalty of the armour (defaults to 0 if not supplied).
ac:<[-]#> the base armour class (excluding magical bonuses) for this type of armour.
sz:<[T/S/M/L/H]> The size of the item (not necessarily indicating its fit).
wt:<#> The weight of the item in lbs (could be considered kg - or any measure - if everything is the same).

Other possible fields are:

t:< armour-type > The specific armour type, often the same as the first parameter of the Specs section.
db:<[-/+]#> The dexterity bonus or penalty that wearing the armour bestowes.
+m:<[-/+]#> The adjustment that the armour gives vs. missiles and ammunition of ranged weapons.
+s:<[-/+]#> The magical adjustment specifically against slashing damage.
+p:<[-/+]#> The magical adjustment specifically against piercing damage.
+b:<[-/+]#> The magical adjustment specifically against bludgeoning damage.
rc:<recharging/curse type> Armour can be "cursed", but generally does not have charges. Default is "uncharged". See MagicMaster API documentation for more information on charges and curses.


Shield+2

/w "@{selected|character_name}" &{template:2Edefault}Template:Name=Shield+2Template:Subtitle=ShieldTemplate:Shield=1-handed +2 Medium Shield made of wood & metal<mark style="color:green">Specs=[Medium Shield,Shield,1H,Shields]</mark>{{AC=+2 against all attacks from the front}}<mark style="color:blue">ACData=[a:Medium Shield+2, st:Shield, +:2,sz:M, wt:10]</mark> {{Speed=0}} Template:Size=M Template:Immunity=None Template:Saves=No effect {{desc=All shields improve a character\'s Armor Class by 1 or more against a specified number of attacks. A shield is useful only to protect the front and flanks of the user. Attacks from the rear or rear flanks cannot be blocked by a shield (exception: a shield slung across the back does help defend against rear attacks). The reference to the size of the shield is relative to the size of the character. Thus, a human\'s small shield would have all the effects of a medium shield when used by a gnome.

  • The medium shield* is carried on the forearm and gripped with the hand. Its weight prevents the character from using his shield hand for other purposes. With a medium shield, a character can protect against any frontal or flank attacks.}}

As can be seen here, the specification for a Shield is almost identical in structure to that of any other armour, the major difference being in the Specs section type field.

Note: The ac: field in the data section for a shield is always assumed to be \'+1\', meaning a shield adds 1 to the base AC before magical adjustments are taken into account. However, it can be specified as a different value, if desired.

Note: All shields except a Buckler must be taken in hand using the !attk --weapon command before the Armour Class system of the AttackMaster API adds it to the AC for the character. A buckler is a special type of very small shield that is strapped to the arm and can counter only 1 blow per melee round, but allows both (all) hands to be free. In fact, any shield can have this functionality if desired, by setting the handedness field of the Specs section to be \'0H\', meaning it take no hands to hold it.


Armour-of-Vulnerability+-3

/w "@{selected|character_name}" &{template:2Edefault}Template:Name=Field Plate Armour of Vulnerability+/-3Template:Subtitle=Cursed ArmourTemplate:Armour=+/-3 selectively magical Field Plate<mark style="color:green">Specs=[Armour-of-Vulnerability|Armour-of-Resistance,Armour,0H,Plate]</mark>{{AC=20-3 better AC against Slashing damage +3 worse AC against any other type}}<mark style="color:blue">ACData=[a:Armour-of-Vulnerability+-3,st:Mail,+S:3,+P:-3,+B:-3,ac:2,sz:L,wt:60,sp:0,rc:cursed]</mark>Template:Speed=0Template:Size=LargeTemplate:Immunity=NoneTemplate:Saves=No effect{{desc=***Curse.*** This armor is cursed, a fact that is revealed only when an identify spell is cast on the armor or you attune to it. Attuning to the armor curses you until you are targeted by the remove curse spell or similar magic; removing the armor fails to end the curse. While cursed, you have vulnerability to two of the three damage types associated with the armor (not the one to which it grants resistance).}}{{desc1=This armour provides resistance to Slashing damage only, but vulnerability to Piercing and Bludgeoning damage.
This armor is a combination of chain or brigandine with metal plates (cuirass, epaulettes, elbow guards, gauntlets, tasets, and greaves) covering vital areas. The weight is distributed over the whole body and the whole thing is held together by buckles and straps. This is the most common form of heavy armor.
For each +1 bonus to armor, regardless of the type of armor, the wearer\'s Armor Class moves downward (toward AC 2 . . . to 1 . . . to 0, -1, -2, and so on). Note, however, that Armor Class can never be improved beyond -10}}

This is a slightly more complex type of armour. It is a cursed item, and generally appears initially as Armour-of-Resistance+3, hence the Specs first parameter of armour type having two possible values, separated by \'|\'.

The use of the damage type specific magical adjustment fields can be seen in the data section, along with the use of the rc: field tag with the value \'cursed\'. See section 9 for a complete list of rc: field values.


4. Specs & Data field values

Below are lists of the current possible values for the item database Ability macro sections.

4.1 Specs sections

Specs=[Type, Item-Class, Handedness, Group-Type]

4.1(a) Weapon Types

There is an infinite list of weapon types: generally the type is the weapon name without any reference to magical plusses, so the Type of a Longsword+2 is Longsword. This Type is used to check for Proficiency.

4.1(b) Weapon Item-Classes

MeleeMelee weapon which strikes while in hand
RangedWeapon that causes damage when thrown or with ammunition
AmmoAmmunition for a ranged weapon of a specific Type or Group-Type

4.1(c) Weapon Handedness

0HA weapon that does not take a hand (e.g. spike on helm)
1HA weapon that is 1-handed, such as a short sword
2HA weapon that takes 2 hands to wield, such as a longbow
3HA weapon that takes 3 hands...
4HEtc (e.g. a siege weapon that needs 2 people to operate it)
......


4.1(d) Weapon Group-Types

Weapon Group-Types determine related weapons for weapon proficiency, and whether it can be used by a Character of a specific class. The APIs use the definitions in the AD&D2e Fighter\'s Handbook section on \'Tight Groups\', extended to cover certain additional weapons and weapon types. Those implemented so far for the Weapon databases are:

ArrowClubGreat-BladeLong-BladeShort-BladeWhip
AxeCrossbowHookMedium-BladeSling
BlowgunDartHoreshoesPickSpear
BowFencing-BladeInnatePolearmStaff
BulletFlailLanceQuarrelThrowing-Blade

Types and Group-Types that can be used by various Character Classes are:

WarriorAny
FighterAny
RangerAny
PaladinAny
BeastmasterAny
BarbarianAny
Defender"axe", "club", "flail", "long-blade", "fencing-blade", "medium-blade", "short-blade", "polearm"
Wizard(all types) "dagger", "staff", "dart", "knife", "sling"
Priest / Cleric"club", "mace", "hammer", "staff"
Druid"club", "sickle", "dart", "spear", "dagger", "scimitar", "sling", "staff"
Healer"club", "quarterstaff", "mancatcher", "sling"
Priest of Life"club", "quarterstaff", "mancatcher", "sling"
Priest of WarAny
Priest of Light"dart", "javelin", "spear"
Priest of Knowledge"sling", "quarterstaff"
Shaman"long-blade", "medium-blade", "short--blade", "blowgun", "club", "staff", "shortbow", "horsebow", "hand-xbow"
Rogue / Thief"club", "short-blade", "dart", "hand-xbow", "lasso", "shortbow", "sling", "broadsword", "longsword", "staff"
BardAny
AssassinAny


4.1(e) Armour Types

There is an infinite list of armour types: generally the type is the armour name without any reference to magical plusses, so the Type of Plate-Mail+2 is Plate-Mail. This Type is used to check for Proficiency.


4.1(f) Armour Item-Classes

Armour Any type of armour that does not need to be held to work Shield A barrier that is held in hand(s) and defends against one or more attacks from the front


4.1(g) Armour Handedness

0H Armour and Shields that are not held in the hand (e.g. a Buckler or a Helm)
1H Generally a type of Shield that must be held in a hand
2H Armour and Shields that use two hands, and/or prevent use of those hands for other things
3H Generally siege engines that shield against attacks... (not yet implemented)
... etc.


4.1(h) Armour Group-Types

Armour Types and Group Types determine whether the armour can be used by various Character Classes. Here are the currently implemented restrictions:

Warrior Any
FighterAny
RangerAny
PaladinAny
BeastmasterAny
Barbarian"padded", "leather", "hide", "brigandine", "ring-mail", "scale-mail", "chain-mail", "shield", "ring", "magic-item","cloak"
DefenderAny
Wizard (all types)"magic-item", "ring", "cloak"
Priest / ClericAny
Druid"leather", "padded", "hide", "wooden-shield", "magic-item", "ring", "cloak"
HealerAny
Priest of LifeAny
Priest of WarAny
Priest of Light"studded-leather", "ring-mail", "chain-mail", "shield", "ring", "magic-item", "cloak"
Priest of Knowledge"magic-item", "ring", "cloak"
Shaman"padded", "leather", "hide", "brigandine", "ring-mail", "scale-mail", "chain-mail", "splint-mail", "banded-mail", "shield", "ring", "magic-item", "cloak"
Rogue / ThiefAny
Bard"padded", "leather", "hide", "brigandine", "ring-mail", "scale-mail", "chain-mail", "ring", "magic-item", "cloak"
AssassinAny


4.2 Data Sections

<thead> </thead>
Field Format Default Value Description Can be used in
ToHit
Data
Dmg
Data
Ammo
Data
Range
Data
Weapon
Data
AC
Data
w:< text >\'-\'Name to be displayed XXX
w:< text >\'-\'Name of spell or power X
a:< text >\'-\'Name to be displayed X
t:< text >\'\'Type XX X
st:< text >\'\'Group Type (aka Tight-Group) XX X
sb:0 / 10Strength Bonus XXX
db:0 / 11Dexterity Bonus X X
+:[ + / - ] #0Magical adjustment XXXX X
+m:[ + / - ] #0Missile attack adjustment X
+s:[ + / - ] #0Slashing damage adjustment X
+p:[ + / - ] #0Piercing damage adjustment X
+b:[ + / - ] #0Bludgeoning damage adjustment X
n:# [ / # ]1Attacks per round X
dp:#0Dancing proficiency adjustment X
ch:1 - 2020Critical Hit roll value X
cm:1 - 201Critical Miss roll value X
sz:[ t / s / m / l / h ]\'\'Size of item X X X
r:[# /] # / # / #\'\'Range X X
r:[+/-]# [ / [+/-]# / [+/-]# / [+/-]# ]0Range ModifierX
ty:SPB any combination\'\'Type of damage X
sp:[-]#0Speed in segments (1/10 round) X X
sm:dice roll format0Damage roll for Small & Medium opponents XX
l:dice roll format0Damage roll for Large & Huge opponents XX
ac:[-]#\'\'Armour class X
wt:#1Weight of item in lbs X X
ns:#0Number of spells & powers defined for item XX
cl:MU / PR / PW\'\'Type of spell or power X
lv:#1Level at which spell/power is cast X
pd:-1 / #1Number per day (power only) X
rc:Charged /
Uncharged /
Rechargeable /
Recharging /
Self-charging /
Cursed /
Charged-Cursed /
Recharging-Cursed /
Self-charging-Cursed
UnchargedInitial charged and Cursed status of item when foundX X


4.3 Character Sheet data fields

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