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
(Flight-Arrow+2 (Ammunition Database))
 
(64 intermediate revisions by one user not shown)
Line 1: Line 1:
=Weapon, Ammo and Armour Databases=
+
<h1>Spell, Power & Magic Item Databases</h1>
==1. General Database information==
+
<h2>General Database information</h2>
<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>
+
{| role="presentation" class="wikitable mw-collapsible mw-collapsed"
<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>
+
|
<tr><td>Ammo:</td><td>additional databases: MI-DB-Ammo-[added name] where [added name] can be replaced with anything you want.</td></tr>
+
|-
<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>
+
|<p>The RPGMaster APIs use a number of Character Sheets as databases to hold Ability Macros defining character classes, attack templates, spells, powers and magic items and their effects.  The API is distributed with many class, attack, spell, power & magic item definitions, and checks for, creates and updates these Character Sheet databases on start-up.  DMs can add their own character classes, attack templates, spells, items, 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:</p>
 +
<table>
 +
<tr><th scope="row">Wizard Spells:</th><td>additional databases: MU-Spells-DB-<i>[added name]</i> where <i>[added name]</i> can be replaced with anything you want.</td></tr>
 +
<tr><th scope="row">Priest Spells:</th><td>additional databases: PR-Spells-DB-<i>[added name]</i> where <i>[added name]</i> can be replaced with anything you want.</td></tr>
 +
<tr><th scope="row">Powers:</th><td>additional databases: Powers-DB-<i>[added name]</i> where <i>[added name]</i> can be replaced with anything you want.</td></tr>
 +
<tr><th scope="row">Magic Items:</th><td>additional databases: MI-DB-<i>[added name]</i> where <i>[added name]</i> can be replaced with anything you want.</td></tr>
 +
<tr><th scope="row">Character Classes:</th><td>additional databases: Class-DB-<i>[added name]</i> where <i>[added name]</i> can be replaced with anything you want.</td></tr>
 +
<tr><th scope="row">Attack Templates:</th><td>additional databases: Attacks-DB-<i>[added name]</i> where <i>[added name]</i> can be replaced with anything you want.</td></tr>
 +
</table>
 
<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>
 
<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>
<p>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.</p>
+
<p>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.</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><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>Each database has a similar structure, with:</p>
 
<p>Each database has a similar structure, with:</p>
<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>
+
<ul>
<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>
+
<li>Ability Macros named as the class, attack type, spell, power or magic item specified, and used to describe and provide effects for classes, attacks, spells, powers and magic items using the commands in the RPGMaster APIs;</li>
<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>
+
<li>Custom Attributes with the attribute name "ct-ability-macro-name", one per Ability Macro, which defines the casting time and casting cost for spells & powers, and speed and MI type for magic items (not currently used for Class or Attack definitions, but they still have to exist);</li>
<li>Optionally, some entries come also with attributes that define Powers and Spells delivered by or stored on the item.</li></ul>
+
<li>An entry in a list on the character sheet in the spell book of the relevant Character Sheet tab (Spell Level of the spell defined, Powers tab, or various spell books for different Classes & Magic Items).</li>
<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>[[Script:AttackMaster#Check_database_completeness_.26_integrity|!attk --check-db]]</b> or <b>[[Script:MagicMaster#Check_database_completeness_.26_integrity_.28GM_only.29|!magic --check-db]]</b> command, which will correctly parse the ability macro and set the rest of the database entries as needed.</p>
+
</ul>
<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>However, as with all other Databases in the RPGMaster Suite of APIs, if the <i>Ability Macros</i> are correctly set up using the formats detailed in the Help Documentation, the <b>AttackMaster API</b> command <b>!attk --check-db database-name</b> will check the database and set up all other aspects for you, including the correct Custom Attributes and List entries.</p>
===1.1 Replacing Provided Weapons===
+
<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 class, spell, power and magic item ability macros, and are an essential part of Attack Templates.  When a Player or an NPC or Monster makes an attack, the AttackMaster API runs 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>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>
+
<h3>Replacing Classes, Attacks, Spells & Items</h3>
 +
<p>If you want to replace any Ability Macro provided in any of the databases, you can do so simply by creating an Ability Macro in one of your own databases (a database with the same root name) with the Ability Macro you create having 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>
 
<br>
 
<br>
 
+
|}
==2. Weapon & Ammunition Databases==
+
<h2>Spells and Powers Databases</h2>
<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>Spells/Powers databases are all character sheets that have names that start with</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>Wizard Spells:</b> MU-Spells-DB-[added name]<br>
<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>[[Script:AttackMaster#Check_database_completeness_.26_integrity|AttackMaster]]</b> or <b>[[Script:MagicMaster#Check_database_completeness_.26_integrity_.28GM_only.29|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 in the macro. 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>
+
<b>Priest Spells:</b> PR-Spells-DB-[added name]<br>
 +
<b>Powers:</b> Powers-DB-[added name]</p>
 +
<p>Those with version numbers of the form v#.# as part of the name will be ignored.</p>
 +
<p>As previously stated in the General Database Information section, each spell or power definition has 3 parts in the database: an Ability Macro with a name that is unique and matches the spell or power, 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 others of the same level in the spell book of the level of the spell or power. 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 spells and powers does not need to worry about anything other than the Ability Macro in the database, as running the command <b><i>[[Script:MagicMaster#Check_database_completeness_.26_integrity_.28GM_only.29|--check-db]]</i></b> will update all other aspects of the database appropriately for all databases, as long as the Specs and Data fields are correctly defined. Use the name of the particular database as a parameter to check and update just that database.  Running the command <b><i>--check-db</i></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 editing.  Ability macros are standard Roll20 functionality and not dependent on the API.  Refer to the Roll20 Help Centre for more information.</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 editing.  Ability 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>
+
<p><b>The Ability Macro</b> for a spell may look something like this:</p>
===Longsword===
+
<h3>Sleep</h3>
<p style="display: inline-block; background-color: lightgrey; border: 1px solid black; padding: 4px; color: dimgrey; font-weight: extra-light;">/w "@{selected|character_name}" <nowiki>&{template:2Edefault}{{name=Longsword}} {{subtitle=Sword}}{{Speed=[[5]]}} {{Size=Medium}}{{Weapon=1-handed melee long-blade}}</nowiki><span style="color:green">Specs=[Longsword,Melee,1H,Long-blade]</span><nowiki>{{To-hit=+0 + Str bonus}}</nowiki><span style="color:blue">ToHitData=[w:Longsword, sb:1, +:0, n:1, ch:20, cm:1, sz:M, ty:S, r:5, sp:5]</span><nowiki>{{Attacks=1 per round + level & specialisation, Slashing}}{{Damage=+0, vs SM:1d8, L:1d12, + Str bonus}}</nowiki><span style="color:red">DmgData=[w:Longsword, sb:1, +:0, SM:1d8, L:1d12]</span><nowiki>{{desc=This is a normal sword. The blade is sharp and keen, but nothing special.}}</nowiki></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}" <nowiki>&{template:2Espell}{{title=@{selected|casting-name} casts Sleep as a level @{selected|casting-level} caster}}{{splevel=Level 1 Wizard}}{{school=Enchantment/Charm}}</nowiki><span style="color:green">Specs=[Sleep,MUspellL1,1H,Enchantment-Charm]</span><nowiki>{{range=90 ft}}{{components=V, S, M}}{{duration=[[5*({10,@{selected|casting-level}}kl1)]] Rounds}}{{time=1}}{{aoe=[30ft Cube](</nowiki><span style="color:red">!rounds --aoe @{selected|token_id}|square|feet|90|30||dark</span><nowiki>)}}{{save=None}}{{damage=[Sleep them](</nowiki><span style="color:red">!rounds --target area|@{selected|token_id}|&#64;{target|Select who to sleep|token_id}|Sleep|[[5*({10,@{selected|casting-level}}kl1)]]|-1|Snoring away, shake to awaken|sleepy</span>)}}<span style="color:blue">SpellData=[w:Sleep,lv:1,sp:1,gp:0.01,cs:VSM]</span><nowiki>{{effects=Up to [2d4](!\&#13;\&#47;r 2d4) Hit Dice of creatures with 4 HD or less are put to sleep beginning with the lowest HD creatures in the Area of Effect.}}{{materials=a pinch of fine sand, rose petals, or a live cricket.}}</nowiki></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>
+
<p>The ability specification for this Sleep spell 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 MagicMaster API are those highlighted.  In red, two API buttons grant the player access to run RoundMaster API commands to show the Area of Effect of the spell, and then to mark affected tokens with a "Sleepy" status.  Each of the elements important to the database 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:</p>
<pre>Specs = [Type, Class, Handedness, Weapon Group]</pre>
+
<pre>Specs = [Type, Class, Handedness, Spell School]</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>
+
<p>The Specs section describes what spell type and school this spell 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. Where there are multiple answers for a field, separate each by '|'. <b>Note:</b>Only A-Z, a-z, 0-9, hyphen/minus(-), plus(+), equals(=) point(.) and vertical bar(|) are allowed.  Replace any forward slash with hyphen.</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>
+
<table>
<tr><td><b>Class</b></td><td>is one of Melee, Ranged, or Ammo.</td></tr>
+
<tr><th scope="row">Type</th><td>the type of the spell, often the same as the ability macro name.</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><th scope="row">Class</th><td>one of MUSpellL#, PRSpellL#, or Power, where # is replaced by the spell level number.</td></tr>
<tr><td><b>Weapon Group</b></td><td>is the group of related weapons that the weapon belongs to.</td></tr></table>
+
<tr><th scope="row">Handedness</th><td>#H, where # is the number of hands needed to cast the spell - i.e. does it have a somatic component.</td></tr>
<pre>ToHitData = [w:Longsword, sb:1, +:0, n:1, ch:20, cm:1, sz:M, ty:S, r:5, sp:5]</pre>
+
<tr><th scope="row">Spell School</th><td>the group of related spells that the spell belongs to.</td></tr>
<p>The ToHitData section specifies the data relating to an attack with the weapon.  These fields can be in any order.</p>
+
</table>
<table><tr><td><b>w:</b></td><td>&lt;text&gt; the name to display for attacks with this weapon</td></tr>
+
<pre>SpellData=[w:Sleep,lv:1,sp:1,gp:1,cs:VSM]</pre>
<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>
+
<p>The SpellData section specifies the data relating to the use of the spell.  These fields can be in any order.</p>
<tr><td><b>+:</b></td><td><[+/-]#> the magical attack bonus/penalty - an integer of any size</td></tr>
+
<table>
<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><th scope="row">w:</th><td>&lt;text&gt;</td><td>the name of the spell</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><th scope="row">sph:</th><td>&lt;text&gt;</td><td>the sphere of a priest spell (not used for wizard spells)</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><th scope="row">lv:</th><td>&lt;#&gt;</td><td>the level of the spell</td></tr>
<tr><td><b>sz:</b></td><td><T/S/M/L/H/G> the size of the weapon</td></tr>
+
<tr><th scope="row">sp:</th><td>&lt;[-]# or dice roll spec&gt;</td><td>the casting time in segments for the spell.  Can be >10 e.g. 20 for 2 rounds, or negative, or even a dice roll</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><th scope="row">gp:</th><td>&lt;#[.#]&gt;</td><td>the cost of the material components of the spell in GP: fractions converted to SP & CP</td></tr>
<tr><td><b>sp:</b></td><td><#> the speed of the weapon in segments</td></tr>
+
<tr><th scope="row">cs:</th><td>&lt;VSM&gt;</td><td>the component of the spell (Verbal, Somatic, Material) - can be any combination</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>
+
</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 casting time (or speed) <b>sp:</b> can be negative, meaning it gives a negative modifier to individual initiative (if <b>InitMaster API</b> is being used).  It can also be greater than 10 segments, meaning it takes longer than 1 Round to cast.  Multiply the number of Rounds it will take to cast by 10, or the number of Turns it will take to cast by 100 (if using the <b>InitMaster API</b> the rounds will be automatically counted down and the spell actually cast in the appropriate round, unless the casting is interrupted).  It can also be a dice roll specification, which will be rolled at the point that a character selects the spell, power or item to use in a particular round, which means the speed can vary from round to round.  Potions are always of this nature (see the AD&D2e DMG p141).</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 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)</p>
+
<p>The cost of material components, <b>gp:</b>, is deducted from the Caster's money on their Character Sheet each time the spell is cast.  The GM is informed of the spell being cast, by whom, and how much money it cost and how much money the Caster has left for each casting.</p>
<pre>DmgData = [w:Longsword, sb:1, +:0, SM:1d8, L:1d12]</pre>
+
<p>The components of the spell, <b>cs:</b>, is currently not used and is for future expansion capabilities.</p>
<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>
+
<p><b>The Ability Macro</b> for a Power may look something like this:</p>
<table><tr><td><b>w:</b></td><td>&lt;text&gt; the name to display for damage calculations for this weapon</td></tr>
+
<h3>Turn Undead</h3>
<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>
+
<p style="display: inline-block; background-color: lightgrey; border: 1px solid black; padding: 4px; color: dimgrey; font-weight: extra-light;">/w "@{selected|character_name}" <nowiki>&{template:2Espell}{{title=@{selected|token_name} attempts to Turn Undead as a level @{selected|pr-casting-level} @{selected|class3}}} {{splevel=Power}} {{school=Necromancy}}</nowiki><span style="color:green">Specs=[Turn-Undead,Power,1H,Necromancy]</span><nowiki>{{components=V,S}}{{time=[[10]]}}{{range=0}}{{duration=Until broken}}{{aoe=Undead within line of sight}}{{save=See turning table}}{{reference=PHB p103}}{{damage=[Roll 1d20](</nowiki><span style="color:red">!&#13;&#47;r 1d20 check vs. your turning table</span><nowiki>) then if successful [Turn Them](</nowiki><span style="color:red">!rounds --target area|@{selected|token_id}|&#64;{target|Select undead|token_id}|Turned|99|0|Turned undead, flee if free-willed, stand aside if controlled|screaming</span>)}}<span style="color:blue">SpellData=[w:Turn Undead, sp:10, cs:VS]</span><nowiki>{{effects=**Remember that Paladins turn as a Priest of 2 levels lower.**<br>
<tr><td><b>+:</b></td><td><[+/-]#> the magical damage bonus/penalty - an integer of any size</td></tr>
+
Attempting to turn counts as an action, requiring one round and occurring during the character's turn in the initiative order (thus, the undead may get to act before the character can turn them). The mere presence of the character is not enough--a touch of drama from the character is important. Speech and gestures are important, so the character must have his hands free and be in a position to speak. However, turning is not like spellcasting and is not interrupted if the character is attacked during the attempt.<br>
<tr><td><b>sm:</b></td><td><dice roll spec> the base dice roll vs. small/medium creatures excluding any magical bonus</td></tr>
+
To resolve a turning attempt, look on Table 61. Cross-index the Hit Dice or type of the undead with the level of the character (two levels lower for a paladin). If there is a number listed, roll 1d20. If the number rolled is equal to or greater than that listed, the attempt is successful. If the letter "T" (for "turned") appears, the attempt is automatically successful without a die roll. If the letter "D" (for "dispel") is given, the turning utterly destroys the undead. A dash (--) means that a priest or paladin of that level cannot turn that type of undead. A successful turn or dispel affects 2d6 undead. If the undead are a mixed group, the lowest Hit Dice creatures are turned first.<br>
<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>
+
Only one die is rolled regardless of the number of undead the character is attempting to turn in a given round. The result is read individually for each type of undead.}}{{material=The Priest's holy symbol}}</nowiki></p>
 +
<p>Essentially, Powers are just Spells by another name, that can be cast multiple times per day, and are innate to the Character's class, or to a creature.  The specification is, therefore, almost identical to a spell.  In the author's campaigns, Powers do not consume material components and therefore do not cost money to use (except in rare circumstances) hence there being no <b>gp:</b> specification (it defaults to 0gp), but other DMs can add material costs for Powers if desired. Powers are all 1 level, hence no <b>lv:</b> specification.</p>
 
<br>
 
<br>
 
+
<h2>Magic Item Databases</h2>
===Bastardsword+1===
+
<p>Magic Item databases are all character sheets that have names such as</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}" <nowiki>&{template:2Edefault}{{name=Bastard Sword+1}}{{subtitle=Magic Sword}}{{Speed=[[5]]}}{{Size=Medium}}{{Weapon=1 or 2-handed melee long blade}}</nowiki><span style="color:green">Specs=[Bastard-Sword,Melee,1H,Long-blade],[Bastard-Sword,Melee,2H,Long-blade]</span><nowiki>{{To-hit=+1 + Str Bonus}}</nowiki><span 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]</span><nowiki>{{Attacks=1 per round + specialisation & level, Slashing}}{{Damage=+1, 1-handed SM:1d8 L:1d12, 2-handed SM:2d4 L:2d8}}</nowiki><span 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]</span><nowiki>{{desc=This is a normal magical sword. The blade is sharp and keen, and is a +[[1]] magical weapon at all times.}}</nowiki></p>
+
<p> <b>Magic Items:</b> MI-DB-[added name]</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>[[Script:AttackMaster#Change_weapons_currently_in_hand|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>
+
<p>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>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>As previously stated and as for other magic, each magic item definition has 3 parts in the database (see Section 1): an Ability Macro with a name that is unique and identifies the magic item, 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 others of the same magic item type, which is one of: Potion, Scroll, Rod/Stave/Wand, Weapon & Ammo, Armour, Ring, Miscellaneous, and also DM Only magic items.  The quickest way to understand these entries is to examine existing entries.  Do go to the root database 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 magic items does not need to worry about anything other than the Ability Macro in the database, as running the command <b><i>[[Script:MagicMaster#Check_database_completeness_.26_integrity_.28GM_only.29|--check-db]]</i></b> will update all other aspects of the database appropriately for all databases, as long as the Specs and Data fields are correctly defined. Use the name of the particular database as a parameter to check and update just that database.</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 editing.  Ability macros are standard Roll20 functionality and not dependent on the API.  Refer to the Roll20 Help Centre for more information.</p>
 +
<p><b>The Ability Macro</b> may look something like this:</p>
 +
<h3>Oil-of-Etherealness</h3>
 +
<p style="display: inline-block; background-color: lightgrey; border: 1px solid black; padding: 4px; color: dimgrey; font-weight: extra-light;">/w "@{selected|character_name}" <nowiki>&{template:2Espell}{{title=Oil of Etherealness}} {{splevel=Oil}} {{school=Alteration}}</nowiki><span style="color:green">Specs=[Oil of Etherealness,Potion,1H,Alteration]</span><nowiki>{{components=M}}{{time=[[3]] rounds after application}} </nowiki><span style="color:blue">PotionData=[sp:30,rc:charged]</span><nowiki>{{range=User}}{{duration=4+1d4 turns}} {{aoe=User}} {{save=None}} {{healing=[Become Ethereal](</nowiki><span style="color:red">!rounds --target single|@{selected|token_id}|&#64;{target|Select a target|token_id}|Oil-of-Etherealness|&#91;[10*(4+1d4)]&#93;|-1|Ethereal|Ninja-mask</span><nowiki>)}}{{effects=This potion is actually a light oil that is applied externally to clothes and exposed flesh, conferring etherealness. In the ethereal state, the individual can pass through solid objects in any direction - sideways, upward, downward - or to different planes. The individual cannot touch non-ethereal objects.<br>
 +
The oil takes effect three rounds after application, and it lasts for 4+1d4 turns unless removed with a weak acidic solution prior to the expiration of its normal effective duration. It can be applied to objects as well as creatures. One potion is sufficient to anoint a normal human and such gear as he typically carries (two or three weapons, garments, armor, shield, and miscellaneous gear). Ethereal individuals are invisible.}}{{materials=Oil}}</nowiki></p>
 +
<p>You might notice that the structure of this macro is extremely similar to that of a spell: indeed, it uses the same Roll TemplateAs this is an Oil that achieves the same effect as a spell, this is not surprising.</p>
 +
<p>However, there is one new field in the data section (in this case called the PotionData section):</p>
 +
<table>
 +
<tr><th scope="row">rc:</th><td>&lt;MI-type&gt;</td><td>the recharging/curse type of the magic item.</td></tr>
 +
</table>
 +
<p>All magic items have a recharging/curse type: for details, see the <b>[[Script:MagicMaster#DM.2FGM_version_of_Magic_Item_management|--gm-edit-mi]]</b> command in the MagicMaster API help documentation.  If not supplied for a magic item definition, it defaults to uncharged.  Generally, items in the database are not cursed-, but can have their type changed to cursed or some recharging cursed type when the DM stores them in a container or gives them to a Character using the <b>--gm-edit-mi</b> command.</p>
 +
<p>Other magic items might use different structures, and be more complex:</p>
 +
<h3>Bead-of-Force</h3>
 +
<p style="display: inline-block; background-color: lightgrey; border: 1px solid black; padding: 4px; color: dimgrey; font-weight: extra-light;">/w "@{selected|character_name}" <nowiki>&{template:'+fields.defaultTemplate+'}{{name=Bead of Force}}{{subtitle=Magic Item}}</nowiki><span style="color:green">Specs=[Bead of Force,Miscellaneous,1H,Evocation]</span><nowiki>{{Speed=[[0]]}}</nowiki><span style="color:blue">MiscData=[w:Bead of Force,sp:0,rc:charged]</span><nowiki>{{Size=Tiny}}{{Range=[Up to 30yds](</nowiki><span style="color:red">!rounds --aoe @{selected|token_id}|circle|yards|0|60||dark|true</span><nowiki>)}}{{damage=[5d4](!&#13;&#47;gmroll 5d4 damage from Bead of Force in 10ft redius) damage in 10ft radius}}{{duration=3d4 rounds}}{{Save=[To escape sphere](!&#13;&#47;gmroll 1d20 Save vs. spell or captured in *Sphere of Force*)}}{{Effect=[Trapped in Sphere](</nowiki><span style="color:red">!rounds --target area|@{selected|token_id}|Bead-of-Force|8|-1|'Held in Sphere of Force'|fishing-net</span><nowiki>)}}{{desc=These small, black spheres might be mistaken for common beads, marbles, or unusually black but lusterless pearls. From 5-8 of these beads are usually found at one time. Each is about three-quarters of an inch in diameter and quite heavy, weighing almost an ounce. One can be hurled up to 30 yards.<br>
 +
Upon impact, the bead sends forth a burst of force that inflicts 5d4 points of damage upon all creatures within a 10-foot radius of its center. Each victim is allowed a saving throw vs. spell. Those who save will be thrown out of the blast area, but those who fail to save will be encapsulated by a sphere of force after taking damage.<br>
 +
The sphere will form around any and all such creatures in the 10-foot-radius area, even those of large size, and will persist for 3d4 rounds. Victims will be unable to escape except by the same means and used to bring down a wall of force spell.}}</nowiki></p>
 +
<p>The Bead of Force ability macro uses a Default Roll Template, which means the only mandatory field is the {{name=}} field, and the DM can define any other fields they want to describe and enact the magic item.  Here, an API button exists to do a saving throw with documented outcomes, and another API button can target an area with multiple tokens in to entrap them (if the DM rejects or confirms as they make or fail each saving throw).</p>
 
<br>
 
<br>
 
+
<h2>Magic Items with Powers or Spell-Storing</h2>
===Longbow===
+
<p>Some magic items, especially artefacts and sentient items, can store spells and/or have powers similar to characters.  MagicMaster supports magic items of this type to a degree, although there are inevitably exceptions that the DM will have to get creative in their development!  These items use API buttons that call various MagicMaster commands to deliver their capabilities.</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}" <nowiki>&{template:2Edefault}{{name=Longbow}}{{subtitle=Bow}}{{Speed=[[8]]}}{{Size=Medium}}{{Weapon=Ranged 2-handed Bow}}</nowiki><span style="color:green">Specs=[Longbow,Ranged,2H,Bow]</span><nowiki>{{To-hit=+0 + Dex Bonus}}</nowiki><span style="color:blue">ToHitData=[w:Longbow,sb:0,db:1,+:0,n:2,ch:20,cm:1,sz:L,ty:P,sp:8]</span><nowiki>{{Attacks=Piercing, 2 per round}}{{desc=This is a normal longbow. The wood is polished, the string taut, but nothing special.}}</nowiki></p>
+
<p>First to note is that <b>items that have powers and spells use spell slots in the owning character's character sheet</b>.  These spell slots should not be used by characters in your campaign.  If they are, errors might occur.  By default, on the AD&D2E character sheet the system uses Wizard Level 14 spell slots for magic item powers, and Wizard Level 15 spell slots for spell-storing magic items.  As standard AD&D2E only has spells up to level 9 this generally works without causing problems.</p>
<p>A ranged weapon like a Longbow uses the same data section definitions as melee weapons except for the following additions and differences.</p>
+
<p>Next, in addition to the three standard elements of the Ability Macro, the 'ct-' attribute and the listing, these items require a 4th element which specifies their powers and spells.  These are:</p>
<pre>ToHitData=[w:Longbow,sb:0,db:1,+:0,n:2,ch:20,cm:1,sz:L,ty:P,sp:8]</pre>
+
<table>
<p>The To-Hit section has an extra option:</p>
+
<tr><th scope="row">mi-muspells-[item-name]:</th><td>Wizard spells able to be stored in the magic item</td></tr>
<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>
+
<tr><th scope="row">mi-prspells-[item-name]:</th><td>Priest spells able to be stored in the magic item</td></tr>
<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>
+
<tr><th scope="row">mi-powers-[item-name]:</th><td>Powers able to be used by the magic item</td></tr>
<p>There is no DmgData section, as damage is defined by the ammo.</p>
+
</table>
 +
<p>In each case the <i>[item-name]</i> is replaced by the Ability macro name (which is not case sensitive).</p>
 +
<p><b>Note:</b> The DM creating new spell storing or power wielding magic items does not need to worry about anything other than the Ability Macro in the database, as running the command <b><i>[[Script:MagicMaster#Check_database_completeness_.26_integrity_.28GM_only.29|--check-db]]</i></b> will update all other aspects of the database appropriately for all databases, as long as the Specs and Data fields are correctly defined. Use the name of the particular database as a parameter to check and update just that database.  Running the command <b><i>--check-db</i></b> with no parameters will check and update all databases.</p>
 +
<p>When a spell-storing or power wielding magic item is added to a magic item bag or container using [[Script:MagicMaster#Edit_a_Magic_Item_bag|!magic --edit-mi]] or [[Script:MagicMaster#DM.2FGM_version_of_Magic_Item_management|!magic --gm-edit-mi]], these attributes are added to the character sheet and also they are parsed by the system and the spells and/or powers are created in the relevant spell books automatically.  When such an item is found in a container by a character, or passed from character to character, all of the stored spells & powers are deleted from the old character and created in the new character.  A character gaining such an item can use its spells and powers immediately.</p>
 +
<p>Here is an example of a power wielding magic item:</p>
 +
<h3>Ring-of-Shooting-Stars</h3>
 +
<p style="display: inline-block; background-color: lightgrey; border: 1px solid black; padding: 4px; color: dimgrey; font-weight: extra-light;"><span style="color:red">!setattr --silent --sel --casting-level|1 --casting-name|@{selected|token_name}'s Ring of Shooting Stars</span><br>
 +
/w "@{selected|character_name}" <nowiki>&{template:'+fields.defaultTemplate+'}{{name=Ring of Shooting Stars}}{{subtitle=Ring}}</nowiki><span style="color:green">Specs=[Ring of Shooting Stars,Ring,1H,Evocation]</span><nowiki>{{Speed=[[5]]}}</nowiki><span style="color:blue">RingData=[w:Ring of Shooting Stars,sp:5,rc:charged,ns:6], [cl:PW,w:RoSS-Dancing-Lights,sp:5,pd:12], [cl:PW,w:RoSS-Light,sp:5,pd:2], [cl:PW,w:RoSS-Ball-Lightning,sp:5,pd:1], [cl:PW,w:RoSS-Shooting-Stars,sp:5,pd:3], [cl:PW,w:RoSS-Faerie-Fire,sp:5,pd:2], [cl:PW,w:RoSS-Spark-Shower,sp:5,pd:1]</span><nowiki> {{Size=Tiny}} {{Immunity=None}} {{Resistance=None}} {{Saves=None}} {{desc=This ring has two modes of operation - at night and underground - both of which work only in relative darkness.<br>
 +
***During night hours, under the open sky***, the shooting stars ring will perform the following functions:<br>
 +
- [*Dancing lights*](</nowiki><span style="color:red">!magic --mi-power @{selected|token_id}|RoSS-Dancing-Lights|Ring-of-Shooting-Stars|1</span><nowiki>) as spell (once per hour).<br>
 +
- [*Light*](</nowiki><span style="color:red">!magic --mi-power @{selected|token_id}|RoSS-Light|Ring-of-Shooting-Stars|1</span><nowiki>), as spell (twice per night), 120-foot range.<br>
 +
- [*Ball lightning*](</nowiki><span style="color:red">!magic --mi-power @{selected|token_id}|RoSS-Ball-Lightning|Ring-of-Shooting-Stars|1</span><nowiki>), as power (once per night).<br>
 +
- [*Shooting stars*](</nowiki><span style="color:red">!magic --mi-power @{selected|token_id}|RoSS-Shooting-Stars|Ring-of-Shooting-Stars|1</span><nowiki>), as power (special).<br>
 +
***Indoors at night, or underground***, the ring of shooting stars has the following properties:<br>
 +
[*Faerie fire*](</nowiki><span style="color:red">!magic --mi-power @{selected|token_id}|RoSS-Faerie-Fire|Ring-of-Shooting-Stars|1</span><nowiki>) (twice per day) as spell<br>
 +
[*Spark shower*](</nowiki><span style="color:red">!magic --mi-power @{selected|token_id}|RoSS-Spark-Shower|Ring-of-Shooting-Stars|1</span><nowiki>) (once per day) as power<br>
 +
Range, duration, and area of effect of functions are the minimum for the comparable spell unless otherwise stated. Casting time is 5}}</nowiki></p>
 +
<p>Note that the ability macro starts with a call to the <b>ChatSetAttr API</b> to set the <i>casting-level</i> to 1 and the name of the caster to be <i><Character-name>'s Ring of Shooting Stars</i>.  Not strictly necessary, but a nice cosmetic.</p>
 +
<p>The data section now includes repeating data sets, one for each of the powers that the item has:</p>
 +
<pre>RingData=[w:Ring of Shooting Stars,sp:5,rc:charged,ns:6], [cl:PW,w:RoSS-Dancing-Lights,sp:5,pd:12], … </pre>
 +
<p>The first data set is very similar to the standard magic item data, with the addition of the <b>ns:</b> field, and is then followed by a number of repeated data sets specifying each of the powers:</p>
 +
<table>
 +
<tr><th scope="row">ns:</th><td>&lt;#&gt;</td><td>The number of powers (or spells) that the item can wield or store</td></tr>
 +
<tr><th scope="row">cl:</th><td>&lt;MU/PR/PW&gt;</td><td>The type of the power/spell specification: PW=power, MU=wizard spell, PR=priest spell</td></tr>
 +
<tr><th scope="row">w:</th><td>&lt;text&gt;</td><td>The name of the power/spell - must be exactly the same as the database name (case ignored)</td></tr>
 +
<tr><th scope="row">sp:</th><td>&lt;[-/+]# / dice roll spec&gt;</td><td>The speed or casting time of the power/spell in segments</td></tr>
 +
<tr><th scope="row">pd:</th><td>&lt;-1/#&gt;</td><td>The available casts per day, or -1 for <i>'at will'</i></td></tr>
 +
</table>
 +
<p>By running the <b>--check-db</b> command (see the note above) these data sets are used to correctly set up the database with the powers wielded, so that when a Character receives this item, the Character also gains the powers to use through the item.</p>
 +
<p><b>Note:</b> if a Character picks up two Power-wielding items with exactly the same item name (i.e. two copies of the same item) the results are unpredictable.  This is best avoided.</p>
 +
<p>Feel free to just copy the specification for a Ring-of-Shooting-Stars in the Rings database and save it to a new Ability Macro with a different name, and then alter the power names, speeds, and uses per day, as well as the API Button <b>--mi-power</b> commands and the other text, to form new power-wielding magic items.  Also, the Ring does not have to have 6 powers - just remove or add one or more repeating data sets to reduce or increase the number of powers.</p>
 +
<p>Here is an example of a spell-storing magic item:</p>
 +
<h3>Ring-of-Spell-Storing-HHSLS</h3>
 +
<p style="display: inline-block; background-color: lightgrey; border: 1px solid black; padding: 4px; color: dimgrey; font-weight: extra-light;">/w "@{selected|character_name}" <nowiki>&{template:'+fields.defaultTemplate+'}{{name=Ring of Spell Storing with Haste x2, Slow, Light & Sleep}}{{subtitle=Ring}}</nowiki><span style="color:green">Specs=[Ring of Spell Storing,Ring,1H,Conjuration-Summoning]</span><nowiki>{{Speed=[[5]] regardless of spell}}</nowiki><span style="color:blue">RingData=[w:Ring of Spell Storing HHSLS,sp:5,rc:uncharged,ns:5], [cl:MU,w:Haste,sp:5,lv:6], [cl:MU,w:Haste,sp:5,lv:6], [cl:MU,w:Slow,sp:5,lv:7], [cl:MU,w:Light,sp:5,lv:3], [cl:MU,w:Sleep,sp:5,lv:3]</span><nowiki> {{Size=Tiny}}{{Store spell=[Store Priest Spell](</nowiki><span style="color:red">!magic --mem-spell MI-PR|@{selected|token_id}</span><nowiki>)<br>
 +
[Store Wizard Spell](</nowiki><span style="color:red">!magic --mem-spell MI-MU|@{selected|token_id}</span><nowiki>)}}{{Cast spell=[View](</nowiki><span style="color:red">!magic --view-spell mi-muspells|@{selected|token_id}</span><nowiki>) or [Cast](</nowiki><span style="color:red">!magic --cast-spell MI|@{selected|token_id}</span><nowiki>) spells}}{{desc=A ring of spell storing contains 1d4+1 spells which the wearer can employ as if he were a spellcaster of the level required to use the stored spells. The class of spells contained within the ring is determined in the same fashion as the spells on scrolls (see "Scrolls"). The level of each spell is determined by rolling 1d6 (for priests) or 1d8 (for wizards). The number rolled is the level of the spell, as follows:<br>
 +
Priest: 1d6, if 6 is rolled, roll 1d4 instead.<br>
 +
Wizard: 1d8, if 8 is rolled, roll 1d6 instead.<br>
 +
Which spell type of any given level is contained by the ring is also randomly determined.<br>
 +
The ring empathically imparts to the wearer the names of its spells. Once spell class, level, and type are determined, the properties of the ring are fixed and unchangeable. Once a spell is cast from the ring, it can be restored only by a character of appropriate class and level of experience (i.e., a 12th-level wizard is needed to restore a 6th-level magical spell to the ring). Stored spells have a casting time of [[5]].}}</nowiki></p>
 +
<p>This is a specific version of a Ring of Spell Storing.  As the spells stored are specified in the macro, if you want there to be multiple rings of spell storing in your campaign they each need to be individually programmed (easy cut & paste job) & named differently.</p>
 +
<p>The only new field in these data sets is:</p>
 +
<table>
 +
<tr><th scope="row">lv:</th><td>&lt;#&gt;</td><td>The level of the caster who cast the spell into the ring.  The spell will have effects as if cast at this level when cast from the ring.</td></tr>
 +
</table>
 +
<p>The <b>lv:</b> field only specifies the level of the initial spell caster when the item is first found.  Once owned and used, the level of the spell caster is recorded each time a spell is refreshed by casting into the item.  As the item is then passed from one Character to another, or stored in a container and recovered later, the levels at which the spells were cast is retained.  However, if the item is reloaded from the databases, or a duplicate of the item is placed by the DM and found by another character, that version of the item will have the spell caster levels from the database definitions.  Note that if a single Character picks up two versions of exactly the same spell storing item (i.e. with the same item name) the results are unpredicable...</p>
 +
<p>Feel free to just copy the specification for a Ring-of-Spell-Storing in the Rings database and save it to a new Ability Macro with a different name, and then alter the spell names and casting levels as desired, to form new Rings of Spell Storing or other magic items.  Also, the Ring does not have to have 5 spells - just remove or add one or more repeating data sets to reduce or increase the number of stored spells (though the official definition of a Ring of Spell Storing states a maximum of 5 spells).</p>
 +
<p>The key command in the Spell-Storing item that supports it casting the defined spells is <b>!magic --cast-spell MI</b>, called in this case via an API button.  Any item specified with this command somewhere in the definition can store spells which can be specified, added or changed by the DM/Game Creator using the <b>[[Script:MagicMaster#Define_the_spells_a_spell-storing_Item_can_store|!magic --store-spell]]</b> command.</p>
 
<br>
 
<br>
 
+
<h2>Weapons (if using AttackMaster API)</h2>
===Flight-Arrow+2 (Ammunition Database)===
+
<p>Weapons, magical or not, are special types of items in the Magic Items databasesIf coded properly (in the same way as those in the MI-DB-Weapons database), they can be used with the <b>[[Script:AttackMaster|AttackMaster API]]</b> to implement fully automatic weapon management, the ability to hold weapons "in-hand" or sheathed, to have automatic ammo and range management for ranged weapons, automatic entry of weapons into the melee and/or ranged weapons tables, ready to make attacks with magical plusses and other specifications all set up, and support for dancing weapons (ones that can attack without being held by the Character), creatures with more than 2 hands, and 1-handed weapons, 2-handed weapons, and even weapons that need more than 2 hands!</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}" <nowiki>&{template:2Edefault}{{name=Flight Arrow+2}}{{subtitle=Magic Weapon}}{{Speed=As per bow}}{{Size=Small}}</nowiki><span style="color:green">Specs=[Flight-Arrow,Ammo,1H,Arrow],[Flight-Arrow,Ammo,1H,Arrow]</span><nowiki>{{Ammo=+2,<br>
+
<p>See the <b>[[API:RPGMaster-WeaponsArmorDB|Weapon & Armour Database Help]]</b> handout and wiki for how Weapon definitions should be structured for use with the <b>AttackMaster API</b>, which are just a few additions to the standard definition of an item.</p>
<b>**Warbow**</b> vs. SM:1d8, L:1d8,<br>
+
<b>**Other Bows**</b> vs. SM:1d6, L:1d6, Piercing}}</nowiki><span 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]</span><nowiki>{{Range=PB:30, others vary by bow<br>
+
<b>**Shortbow:**</b><br>
+
S:50, M:100, L150,<br>
+
<b>**Longbow:**</b><br>
+
S:60, M:120, L:210,<br>
+
<b>**Warbow:**</b><br>
+
S90, M:160, L:250,<br>
+
<b>**Composite Sbow:**</b><br>
+
S:50, M:100, L:180,<br>
+
<b>**Composite Lbow:**</b><br>
+
S:70, M:140, L:210}}</nowiki><span 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]</span><nowiki>{{desc=A magical Flight Arrow of very fine quality}}</nowiki></p>
+
<p>Ammo has a different specification, as the To-Hit data sections are obviously part of the ranged weapon dataInstead 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>
+
<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>
+
<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>
+
<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>
+
<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>
+
 
+
===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>
+
<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>
+
<pre>Specs=[Warhammer,Melee,1H,Clubs],[Warhammer,Ranged,1H,Clubs]</pre>
+
<p>Has two data sets, one as a melee weapon and one as a ranged weapon.</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>Also has two sets of data, each of which relates to the corresponding Specs set.</p>
+
<pre>DmgData=[ w:Warhammer, sb:1, +:0, SM:1+1d4, L:1d4],[]</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>
+
<pre>AmmoData=[w:Warhammer,t:Warhammer,st:Throwing-club,sb:1,+:0,SM:1+1d4,L:1d4]</pre>
+
<p>There is only 1 Ammo data set, as it only relates to the one weapon, itself.</p>
+
<pre>RangeData=[t:Warhammer,+:0,r:1/2/3]</pre>
+
<p>And only 1 Range data set, as it only relates to itself.</p>
+
 
<br>
 
<br>
===Artifact sword===
+
<h2>Armour & Shields</h2>
<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>Like weapons, armour and shields of all types (including magical armour like magical Bracers and Rings of Protection) can be coded to be used with the <b>[[Script:AttackMaster|AttackMaster API]]</b> to automatically calculate the appropriate AC for various scenarios (such as with & without Shield, from the back, if surprised, etc).  This will take into account if the armour is valid for the character class, determine which is the best armour combination that the character has, if various armour elements can or can't work together, and add in Dexterity bonuses or impairments. It will also allow magical effects cast on the character to take effect or be adjusted via the token "circles" and highlight when such an effect is in place by showing the relevant token bar (only when there is a difference between the token AC and calculated AC).</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>
+
<p>See the <b>[[API:RPGMaster-WeaponsArmorDB|Weapon & Armour Database Help]]</b> handout and wiki page for how Armour & Shield definitions should be structured for use with the <b>AttackMaster API</b>, which are just a few additions to the standard definition of an item.</p>
<b>**1:**</b> It is +2 normally, or +4 against evil creatures, and does Bastard sword damage.<br>
+
<p>Also, see the <b>RoundMaster API</b> documentation for how magical effects can be placed on and affect tokens and characters.</p>
<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 used.  These 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>
 
<br>
 
+
<h2>Specs & Data field values</h2>
==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 defined.  Running 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 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:</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 displayed.  Often 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 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.</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>
 
<p>Below are lists of the current possible values for the item database Ability macro sections.</p>
===4.1 Specs sections===
+
<h3>Specs sections</h3>
 
<pre>Specs=[Type, Item-Class, Handedness, Group-Type]</pre>
 
<pre>Specs=[Type, Item-Class, Handedness, Group-Type]</pre>
====4.1(a) Weapon Types====
+
<p>There are no default settings for any of the Specs data fields.  All must be explicitly specified.</p>
<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>
+
<h4>Spell Types</h4>
====4.1(b) Weapon Item-Classes====
+
<p>There is an infinite list of spell types: generally the type is the spell name.</p>
<table><tr><td>Melee</td><td>Melee weapon which strikes while in hand</td></tr>
+
<h4>Spell Item-Classes</h4>
<tr><td>Ranged</td><td>Weapon that causes damage when thrown or with ammunition</td></tr>
+
<table>
<tr><td>Ammo</td><td>Ammunition for a ranged weapon of a specific Type or Group-Type</td></tr></table>
+
<tr><th scope="row">MUSpellL\<1-9\></th><td>A Wizard spell with the Level specified as a number from 1 to 9</td></tr>
====4.1(c) Weapon Handedness====
+
<tr><th scope="row">PRSpellL\<1-9\></th><td>A Priest spell with the Level specified as a number from 1 to 9</td></tr>
<table><tr><td> 0H</td><td>A weapon that does not take a hand (e.g. spike on helm)</td></tr>
+
<tr><th scope="row">Power</th><td>A Power</td></tr>
<tr><td> 1H</td><td>A weapon that is 1-handed, such as a short sword</td></tr>
+
</table>
<tr><td> 2H</td><td>A weapon that takes 2 hands to wield, such as a longbow</td></tr>
+
<h4>Spell Handedness</h4>
<tr><td> 3H</td><td>A weapon that takes 3 hands...</td></tr>
+
<p><b>0H</b> A spell/power that does not take a hand (there is no Somatic component)<br>
<tr><td> 4H</td><td>Etc (e.g. a siege weapon that needs 2 people to operate it)</td></tr>
+
<b>1H</b> A spell/power that requires only 1 hand to cast (most spells are like this)<br>
<tr><td> ...</td><td>...</td></tr></table>
+
<b>2H</b> A spell/power that requires 2 hands to cast (perhaps a scroll must be held)<br>
<br>
+
<b>3H</b> A spell/power that takes 3 hands... perhaps more than 1 caster together?<br>
====4.1(d) Weapon Group-Types====
+
<b>4H</b> Etc No currently programmed spells use more than 2 hands<br>
<p>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:</p>
+
<b>...</b> ...</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>
+
<h4>Spell/Power Schools</h4>
<tr><td>Axe</td><td>Crossbow</td><td>Hook</td><td>Medium-Blade</td><td>Sling</td></tr>
+
<p>From MagicMaster v2.048 onwards, Spell Schools are specified by Class in the Class-DB definitions and, depending on the API configuration set with the <b>--config</b> command, will be checked by the system or otherwise.  Those implemented so far for the Spells databases are:</p>
<tr><td>Blowgun</td><td>Dart</td><td>Horeshoes</td><td>Pick</td><td>Spear</td></tr>
+
<p><i>Abjuration, Alteration, Conjuration-Summoning, Enchantment-Charm, Divination, Illusion-Phantasm, Invocation-Evocation, Necromancy.</i></p>
<tr><td>Bow</td><td>Fencing-Blade</td><td>Innate</td><td>Polearm</td><td>Staff</td></tr>
+
<p>Note that the '/' in School names in the AD&D2e PHB have been replaced by hyphensIt is also allowed to use just one half of any hyphenated school name where appropriate. If a spell or power is of more than one school, separate each with a vertical bar character '|'</p>
<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-MailThis Type is used to check for Proficiency.</p>
+
 
<br>
 
<br>
====4.1(f) Armour Item-Classes====
+
<h4>Magic Item Types</h4>
<p> Armour Any type of armour that does not need to be held to work
+
<p>There is an infinite list of magic item types: generally the type is the magic item name.  A magic item can have more than one type, with each separated by a vertical bar character '|'</p>
Shield A barrier that is held in hand(s) and defends against one or more attacks from the front</p>
+
<h4>Magic Item Classes</h4>
<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>
 
<table>
<thead>
+
<tr><th scope="row">Weapon</th><td>Weapons that are not Melee or Ranged weapons or any other class</td></tr>
<tr>
+
<tr><th scope="row">Melee</th><td>Melee weapons that are used in hand-to-hand combat</td></tr>
 +
<tr><th scope="row">Ranged</th><td>Ranged weapons that are either thrown or fire ammunition</td></tr>
 +
<tr><th scope="row">Ammo</th><td>All types of ammunition that is used by Ranged weapons</td></tr>
 +
<tr><th scope="row">Armour</th><td>Any type of armour that does not need to be held to work</td></tr>
 +
<tr><th scope="row">Shield</th><td>A barrier that is held in hand(s) and defends against one or more attacks from the front</td></tr>
 +
<tr><th scope="row">Potion</th><td>Any type of potion, oil, pill or similar that is consumed or rubbed on</td></tr>
 +
<tr><th scope="row">Scroll</th><td>Scrolls and spell books, that contain one or multiple spells</td></tr>
 +
<tr><th scope="row">Wand</th><td>Wands that cast spells or spell-like effects when wielded in the hand</td></tr>
 +
<tr><th scope="row">Staff</th><td>Quarterstaffs and similar large bludgeoning items that can also have spell-like abilities</td></tr>
 +
<tr><th scope="row">Rod</th><td>Walking-stick sized rods that can do spell-like effects, especially when used to attack</td></tr>
 +
<tr><th scope="row">Ring</th><td>Rings that are worn on a finger, one to each hand, that protect, have powers or spells</td></tr>
 +
<tr><th scope="row">Light</th><td>All types of lantern, torch, and other illumination</td></tr>
 +
<tr><th scope="row">Miscellaneous</th><td>Anything that does not fit in one of the other categories</td></tr>
 +
<tr><th scope="row"><i>Unspecified</i></th><td>Items without any Specs section or an empty Class definition are listed under DM-Only</td></tr>
 +
</table>
 +
<h4>Armour Handedness</h4>
 +
<p><b>0H</b> Items that do not require to be held to work (e.g. a Ring, Buckler or a Helm)<br>
 +
<b>1H</b> An item that must be held in one hand to work, such as a Wand<br>
 +
<b>2H</b> Items that need two hands to wield, like a Staff<br>
 +
<b>3H</b> Items that need three hands to use, perhaps by two characters... (not yet implemented)<br>
 +
<b>...</b> etc.</p>
 +
<h4>Item Schools</h4>
 +
<p>Currently, all Magic Items other than Weapons and Armour use the same set of magical schools as for Spells & Powers, as they mostly perform spell-like effects.  See section 7.1(d) for the list.</p>
 +
<h4>Data Sections</h4>
 +
<p>Definitions for Data Section field types for Weapons & Armour can be found in the [[API:RPGMaster-WeaponsArmorDB#Specs_.26_Data_field_values|Weapons & Armour Database help]] handout & wiki page.  Below are the definitions for Spell, Power & other Magical Item types.</p>
 +
<p><b>Note:</b> Always refer to the database specification definitions in other sections above for detailed information on the use of these Field specifiers.  Not all specifiers have an obvious use.</p>
 +
<table>
 +
                <tr>
 
<th scope="col" rowspan="2">Field</th>
 
<th scope="col" rowspan="2">Field</th>
 
<th scope="col" rowspan="2">Format</th>
 
<th scope="col" rowspan="2">Format</th>
 
<th scope="col" rowspan="2">Default Value</th>
 
<th scope="col" rowspan="2">Default Value</th>
 
<th scope="col" rowspan="2">Description</th>
 
<th scope="col" rowspan="2">Description</th>
<th scope="col" colspan="6">Can be used in</th>
+
<th scope="col" colspan="8">Can be used in</th>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<th scope="col">ToHit<br>Data</th>
+
<th scope="col">Spell<br>Data</th>
<th scope="col">Dmg<br>Data</th>
+
<th scope="col">Potion<br>Data</th>
<th scope="col">Ammo<br>Data</th>
+
<th scope="col">Scroll<br>Data</th>
<th scope="col">Range<br>Data</th>
+
<th scope="col">Wand<br>Data</th>
<th scope="col">Weapon<br>Data</th>
+
<th scope="col">Staff<br>Data</th>
<th scope="col">AC<br>Data</th>
+
<th scope="col">Rod<br>Data</th>
 +
<th scope="col">Ring<br>Data</th>
 +
<th scope="col">Misc<br>Data</th>
 
</tr>
 
</tr>
</thead>
+
<tr><th scope="row">w:</th><td>< text ></td><td>'-'</td><td>Name to be displayed</td><td> </td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td></tr>
<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><th scope="row">w:</th><td>< text ></td><td>''</td><td>Name of spell or power (Not case sensitive)</td><td>X</td><td> </td><td> </td><td> </td><td> </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><th scope="row">+:</th><td>[ + / - ] #</td><td>0</td><td>Magical adjustment</td><td> </td><td> </td><td> </td><td>X</td><td>X</td><td>X</td><td>X</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><th scope="row">n:</th><td># [ / # ]</td><td>1</td><td>Attacks per round</td><td> </td><td> </td><td> </td><td>X</td><td>X</td><td>X</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><th scope="row">sz:</th><td>[ t / s / m / l / h ]</td><td>''</td><td>Size of item</td><td> </td><td> </td><td> </td><td>X</td><td>X</td><td>X</td><td>X</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><th scope="row">sp:</th><td>[-]# or Dice Roll spec</td><td>0</td><td>Speed in segments (1/10 round)</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</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><th scope="row">wt:</th><td>#</td><td>1</td><td>Weight of item in lbs</td><td> </td><td>X</td><td> </td><td>X</td><td>X</td><td>X</td><td> </td><td>X</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><th scope="row">ns:</th><td>#</td><td>0</td><td>Number of stored spells & powers defined for item</td><td> </td><td> </td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</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><th scope="row">w:</th><td>< text ></td><td>'-'</td><td>Name of stored spell or power (Not case sensitive)</td><td>X</td><td> </td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</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><th scope="row">cl:</th><td>MU / PR / PW</td><td>''</td><td>Type of stored spell or power</td><td> </td><td> </td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</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><th scope="row">lv:</th><td>#</td><td>1</td><td>Level at which spell/power is cast</td><td> </td><td> </td><td> </td><td>X</td><td>X</td><td>X</td><td>X</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><th scope="row">pd:</th><td>-1 / #</td><td>1</td><td>Number per day (power only)</td><td> </td><td> </td><td> </td><td>X</td><td>X</td><td>X</td><td>X</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><th scope="row">rc:</th><td>Charged / Uncharged / Rechargeable / Recharging / Self-chargeable / Cursed / Charged-Cursed / Recharging-Cursed / Self-chargeable-Cursed</td><td>Uncharged</td><td>Initial charged and Cursed status of item when found (Can be changed by DM using -gm-only-mi command once added to Character Sheet) Not case sensitive</td><td> </td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</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>
 
</table>
 
<br>
 
<br>
===4.3 Character Sheet data fields===
+
<h3>Character Sheet data fields</h3>
<p>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.</p>
+
<p>The Character Sheet field mapping to the API script can be altered using the definition of the fields object, the definition for which can be found at the top of each API.  You can find the complete mapping for all APIs in the RPGMaster series, with an explanation of each, in a separate document - as the Author for a copy.</p>

Latest revision as of 11:03, 5 April 2022

Contents

Spell, Power & Magic Item Databases

General Database information

The RPGMaster APIs use a number of Character Sheets as databases to hold Ability Macros defining character classes, attack templates, spells, powers and magic items and their effects. The API is distributed with many class, attack, spell, power & magic item definitions, and checks for, creates and updates these Character Sheet databases on start-up. DMs can add their own character classes, attack templates, spells, items, 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:

Wizard Spells:additional databases: MU-Spells-DB-[added name] where [added name] can be replaced with anything you want.
Priest Spells:additional databases: PR-Spells-DB-[added name] where [added name] can be replaced with anything you want.
Powers:additional databases: Powers-DB-[added name] where [added name] can be replaced with anything you want.
Magic Items:additional databases: MI-DB-[added name] where [added name] can be replaced with anything you want.
Character Classes:additional databases: Class-DB-[added name] where [added name] can be replaced with anything you want.
Attack Templates:additional databases: Attacks-DB-[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 class, attack type, spell, power or magic item specified, and used to describe and provide effects for classes, attacks, spells, powers and magic items using the commands in the RPGMaster APIs;
  • Custom Attributes with the attribute name "ct-ability-macro-name", one per Ability Macro, which defines the casting time and casting cost for spells & powers, and speed and MI type for magic items (not currently used for Class or Attack definitions, but they still have to exist);
  • An entry in a list on the character sheet in the spell book of the relevant Character Sheet tab (Spell Level of the spell defined, Powers tab, or various spell books for different Classes & Magic Items).

However, as with all other Databases in the RPGMaster Suite of APIs, if the Ability Macros are correctly set up using the formats detailed in the Help Documentation, the AttackMaster API command !attk --check-db database-name will check the database and set up all other aspects for you, including the correct Custom Attributes and List entries.

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 class, spell, power and magic item ability macros, and are an essential part of Attack Templates. When a Player or an NPC or Monster makes an attack, the AttackMaster API runs 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.

Replacing Classes, Attacks, Spells & Items

If you want to replace any Ability Macro provided in any of the databases, you can do so simply by creating an Ability Macro in one of your own databases (a database with the same root name) with the Ability Macro you create having 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.


Spells and Powers Databases

Spells/Powers databases are all character sheets that have names that start with

Wizard Spells: MU-Spells-DB-[added name]
Priest Spells: PR-Spells-DB-[added name]
Powers: Powers-DB-[added name]

Those with version numbers of the form v#.# as part of the name will be ignored.

As previously stated in the General Database Information section, each spell or power definition has 3 parts in the database: an Ability Macro with a name that is unique and matches the spell or power, 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 others of the same level in the spell book of the level of the spell or power. 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 spells and powers does not need to worry about anything other than the Ability Macro in the database, as running the command --check-db will update all other aspects of the database appropriately for all databases, as long as the Specs and Data fields are correctly defined. Use the name of the particular database as a parameter to check and update just that database. 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.

The Ability Macro for a spell may look something like this:

Sleep

/w "@{selected|character_name}" &{template:2Espell}{{title=@{selected|casting-name} casts Sleep as a level @{selected|casting-level} caster}}{{splevel=Level 1 Wizard}}{{school=Enchantment/Charm}}Specs=[Sleep,MUspellL1,1H,Enchantment-Charm]{{range=90 ft}}{{components=V, S, M}}{{duration=[[5*({10,@{selected|casting-level}}kl1)]] Rounds}}{{time=1}}{{aoe=[30ft Cube](!rounds --aoe @{selected|token_id}|square|feet|90|30||dark)}}{{save=None}}{{damage=[Sleep them](!rounds --target area|@{selected|token_id}|@{target|Select who to sleep|token_id}|Sleep|[[5*({10,@{selected|casting-level}}kl1)]]|-1|Snoring away, shake to awaken|sleepy)}}SpellData=[w:Sleep,lv:1,sp:1,gp:0.01,cs:VSM]{{effects=Up to [2d4](!\ \/r 2d4) Hit Dice of creatures with 4 HD or less are put to sleep beginning with the lowest HD creatures in the Area of Effect.}}{{materials=a pinch of fine sand, rose petals, or a live cricket.}}

The ability specification for this Sleep spell 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 MagicMaster API are those highlighted. In red, two API buttons grant the player access to run RoundMaster API commands to show the Area of Effect of the spell, and then to mark affected tokens with a "Sleepy" status. Each of the elements important to the database 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, Spell School]

The Specs section describes what spell type and school this spell 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. Where there are multiple answers for a field, separate each by '|'. Note:Only A-Z, a-z, 0-9, hyphen/minus(-), plus(+), equals(=) point(.) and vertical bar(|) are allowed. Replace any forward slash with hyphen.

Typethe type of the spell, often the same as the ability macro name.
Classone of MUSpellL#, PRSpellL#, or Power, where # is replaced by the spell level number.
Handedness#H, where # is the number of hands needed to cast the spell - i.e. does it have a somatic component.
Spell Schoolthe group of related spells that the spell belongs to.
SpellData=[w:Sleep,lv:1,sp:1,gp:1,cs:VSM]

The SpellData section specifies the data relating to the use of the spell. These fields can be in any order.

w:<text>the name of the spell
sph:<text>the sphere of a priest spell (not used for wizard spells)
lv:<#>the level of the spell
sp:<[-]# or dice roll spec>the casting time in segments for the spell. Can be >10 e.g. 20 for 2 rounds, or negative, or even a dice roll
gp:<#[.#]>the cost of the material components of the spell in GP: fractions converted to SP & CP
cs:<VSM>the component of the spell (Verbal, Somatic, Material) - can be any combination

The casting time (or speed) sp: can be negative, meaning it gives a negative modifier to individual initiative (if InitMaster API is being used). It can also be greater than 10 segments, meaning it takes longer than 1 Round to cast. Multiply the number of Rounds it will take to cast by 10, or the number of Turns it will take to cast by 100 (if using the InitMaster API the rounds will be automatically counted down and the spell actually cast in the appropriate round, unless the casting is interrupted). It can also be a dice roll specification, which will be rolled at the point that a character selects the spell, power or item to use in a particular round, which means the speed can vary from round to round. Potions are always of this nature (see the AD&D2e DMG p141).

The cost of material components, gp:, is deducted from the Caster's money on their Character Sheet each time the spell is cast. The GM is informed of the spell being cast, by whom, and how much money it cost and how much money the Caster has left for each casting.

The components of the spell, cs:, is currently not used and is for future expansion capabilities.

The Ability Macro for a Power may look something like this:

Turn Undead

/w "@{selected|character_name}" &{template:2Espell}{{title=@{selected|token_name} attempts to Turn Undead as a level @{selected|pr-casting-level} @{selected|class3}}} {{splevel=Power}} {{school=Necromancy}}Specs=[Turn-Undead,Power,1H,Necromancy]{{components=V,S}}{{time=[[10]]}}{{range=0}}{{duration=Until broken}}{{aoe=Undead within line of sight}}{{save=See turning table}}{{reference=PHB p103}}{{damage=[Roll 1d20](! /r 1d20 check vs. your turning table) then if successful [Turn Them](!rounds --target area|@{selected|token_id}|@{target|Select undead|token_id}|Turned|99|0|Turned undead, flee if free-willed, stand aside if controlled|screaming)}}SpellData=[w:Turn Undead, sp:10, cs:VS]{{effects=**Remember that Paladins turn as a Priest of 2 levels lower.**<br> Attempting to turn counts as an action, requiring one round and occurring during the character's turn in the initiative order (thus, the undead may get to act before the character can turn them). The mere presence of the character is not enough--a touch of drama from the character is important. Speech and gestures are important, so the character must have his hands free and be in a position to speak. However, turning is not like spellcasting and is not interrupted if the character is attacked during the attempt.<br> To resolve a turning attempt, look on Table 61. Cross-index the Hit Dice or type of the undead with the level of the character (two levels lower for a paladin). If there is a number listed, roll 1d20. If the number rolled is equal to or greater than that listed, the attempt is successful. If the letter "T" (for "turned") appears, the attempt is automatically successful without a die roll. If the letter "D" (for "dispel") is given, the turning utterly destroys the undead. A dash (--) means that a priest or paladin of that level cannot turn that type of undead. A successful turn or dispel affects 2d6 undead. If the undead are a mixed group, the lowest Hit Dice creatures are turned first.<br> Only one die is rolled regardless of the number of undead the character is attempting to turn in a given round. The result is read individually for each type of undead.}}{{material=The Priest's holy symbol}}

Essentially, Powers are just Spells by another name, that can be cast multiple times per day, and are innate to the Character's class, or to a creature. The specification is, therefore, almost identical to a spell. In the author's campaigns, Powers do not consume material components and therefore do not cost money to use (except in rare circumstances) hence there being no gp: specification (it defaults to 0gp), but other DMs can add material costs for Powers if desired. Powers are all 1 level, hence no lv: specification.


Magic Item Databases

Magic Item databases are all character sheets that have names such as

Magic Items: MI-DB-[added name]

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 for other magic, each magic item definition has 3 parts in the database (see Section 1): an Ability Macro with a name that is unique and identifies the magic item, 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 others of the same magic item type, which is one of: Potion, Scroll, Rod/Stave/Wand, Weapon & Ammo, Armour, Ring, Miscellaneous, and also DM Only magic items. The quickest way to understand these entries is to examine existing entries. Do go to the root database and take a look (but be careful not to alter anything unless you know what you're doing!)

Note: The DM creating new magic items does not need to worry about anything other than the Ability Macro in the database, as running the command --check-db will update all other aspects of the database appropriately for all databases, as long as the Specs and Data fields are correctly defined. Use the name of the particular database as a parameter to check and update just that database.

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.

The Ability Macro may look something like this:

Oil-of-Etherealness

/w "@{selected|character_name}" &{template:2Espell}{{title=Oil of Etherealness}} {{splevel=Oil}} {{school=Alteration}}Specs=[Oil of Etherealness,Potion,1H,Alteration]{{components=M}}{{time=[[3]] rounds after application}} PotionData=[sp:30,rc:charged]{{range=User}}{{duration=4+1d4 turns}} {{aoe=User}} {{save=None}} {{healing=[Become Ethereal](!rounds --target single|@{selected|token_id}|@{target|Select a target|token_id}|Oil-of-Etherealness|[[10*(4+1d4)]]|-1|Ethereal|Ninja-mask)}}{{effects=This potion is actually a light oil that is applied externally to clothes and exposed flesh, conferring etherealness. In the ethereal state, the individual can pass through solid objects in any direction - sideways, upward, downward - or to different planes. The individual cannot touch non-ethereal objects.<br> The oil takes effect three rounds after application, and it lasts for 4+1d4 turns unless removed with a weak acidic solution prior to the expiration of its normal effective duration. It can be applied to objects as well as creatures. One potion is sufficient to anoint a normal human and such gear as he typically carries (two or three weapons, garments, armor, shield, and miscellaneous gear). Ethereal individuals are invisible.}}{{materials=Oil}}

You might notice that the structure of this macro is extremely similar to that of a spell: indeed, it uses the same Roll Template. As this is an Oil that achieves the same effect as a spell, this is not surprising.

However, there is one new field in the data section (in this case called the PotionData section):

rc:<MI-type>the recharging/curse type of the magic item.

All magic items have a recharging/curse type: for details, see the --gm-edit-mi command in the MagicMaster API help documentation. If not supplied for a magic item definition, it defaults to uncharged. Generally, items in the database are not cursed-, but can have their type changed to cursed or some recharging cursed type when the DM stores them in a container or gives them to a Character using the --gm-edit-mi command.

Other magic items might use different structures, and be more complex:

Bead-of-Force

/w "@{selected|character_name}" &{template:'+fields.defaultTemplate+'}{{name=Bead of Force}}{{subtitle=Magic Item}}Specs=[Bead of Force,Miscellaneous,1H,Evocation]{{Speed=[[0]]}}MiscData=[w:Bead of Force,sp:0,rc:charged]{{Size=Tiny}}{{Range=[Up to 30yds](!rounds --aoe @{selected|token_id}|circle|yards|0|60||dark|true)}}{{damage=[5d4](! /gmroll 5d4 damage from Bead of Force in 10ft redius) damage in 10ft radius}}{{duration=3d4 rounds}}{{Save=[To escape sphere](! /gmroll 1d20 Save vs. spell or captured in *Sphere of Force*)}}{{Effect=[Trapped in Sphere](!rounds --target area|@{selected|token_id}|Bead-of-Force|8|-1|'Held in Sphere of Force'|fishing-net)}}{{desc=These small, black spheres might be mistaken for common beads, marbles, or unusually black but lusterless pearls. From 5-8 of these beads are usually found at one time. Each is about three-quarters of an inch in diameter and quite heavy, weighing almost an ounce. One can be hurled up to 30 yards.<br> Upon impact, the bead sends forth a burst of force that inflicts 5d4 points of damage upon all creatures within a 10-foot radius of its center. Each victim is allowed a saving throw vs. spell. Those who save will be thrown out of the blast area, but those who fail to save will be encapsulated by a sphere of force after taking damage.<br> The sphere will form around any and all such creatures in the 10-foot-radius area, even those of large size, and will persist for 3d4 rounds. Victims will be unable to escape except by the same means and used to bring down a wall of force spell.}}

The Bead of Force ability macro uses a Default Roll Template, which means the only mandatory field is the Template:Name= field, and the DM can define any other fields they want to describe and enact the magic item. Here, an API button exists to do a saving throw with documented outcomes, and another API button can target an area with multiple tokens in to entrap them (if the DM rejects or confirms as they make or fail each saving throw).


Magic Items with Powers or Spell-Storing

Some magic items, especially artefacts and sentient items, can store spells and/or have powers similar to characters. MagicMaster supports magic items of this type to a degree, although there are inevitably exceptions that the DM will have to get creative in their development! These items use API buttons that call various MagicMaster commands to deliver their capabilities.

First to note is that items that have powers and spells use spell slots in the owning character's character sheet. These spell slots should not be used by characters in your campaign. If they are, errors might occur. By default, on the AD&D2E character sheet the system uses Wizard Level 14 spell slots for magic item powers, and Wizard Level 15 spell slots for spell-storing magic items. As standard AD&D2E only has spells up to level 9 this generally works without causing problems.

Next, in addition to the three standard elements of the Ability Macro, the 'ct-' attribute and the listing, these items require a 4th element which specifies their powers and spells. These are:

mi-muspells-[item-name]:Wizard spells able to be stored in the magic item
mi-prspells-[item-name]:Priest spells able to be stored in the magic item
mi-powers-[item-name]:Powers able to be used by the magic item

In each case the [item-name] is replaced by the Ability macro name (which is not case sensitive).

Note: The DM creating new spell storing or power wielding magic items does not need to worry about anything other than the Ability Macro in the database, as running the command --check-db will update all other aspects of the database appropriately for all databases, as long as the Specs and Data fields are correctly defined. Use the name of the particular database as a parameter to check and update just that database. Running the command --check-db with no parameters will check and update all databases.

When a spell-storing or power wielding magic item is added to a magic item bag or container using !magic --edit-mi or !magic --gm-edit-mi, these attributes are added to the character sheet and also they are parsed by the system and the spells and/or powers are created in the relevant spell books automatically. When such an item is found in a container by a character, or passed from character to character, all of the stored spells & powers are deleted from the old character and created in the new character. A character gaining such an item can use its spells and powers immediately.

Here is an example of a power wielding magic item:

Ring-of-Shooting-Stars

!setattr --silent --sel --casting-level|1 --casting-name|@{selected|token_name}'s Ring of Shooting Stars
/w "@{selected|character_name}" &{template:'+fields.defaultTemplate+'}{{name=Ring of Shooting Stars}}{{subtitle=Ring}}Specs=[Ring of Shooting Stars,Ring,1H,Evocation]{{Speed=[[5]]}}RingData=[w:Ring of Shooting Stars,sp:5,rc:charged,ns:6], [cl:PW,w:RoSS-Dancing-Lights,sp:5,pd:12], [cl:PW,w:RoSS-Light,sp:5,pd:2], [cl:PW,w:RoSS-Ball-Lightning,sp:5,pd:1], [cl:PW,w:RoSS-Shooting-Stars,sp:5,pd:3], [cl:PW,w:RoSS-Faerie-Fire,sp:5,pd:2], [cl:PW,w:RoSS-Spark-Shower,sp:5,pd:1] {{Size=Tiny}} {{Immunity=None}} {{Resistance=None}} {{Saves=None}} {{desc=This ring has two modes of operation - at night and underground - both of which work only in relative darkness.<br> ***During night hours, under the open sky***, the shooting stars ring will perform the following functions:<br> - [*Dancing lights*](!magic --mi-power @{selected|token_id}|RoSS-Dancing-Lights|Ring-of-Shooting-Stars|1) as spell (once per hour).<br> - [*Light*](!magic --mi-power @{selected|token_id}|RoSS-Light|Ring-of-Shooting-Stars|1), as spell (twice per night), 120-foot range.<br> - [*Ball lightning*](!magic --mi-power @{selected|token_id}|RoSS-Ball-Lightning|Ring-of-Shooting-Stars|1), as power (once per night).<br> - [*Shooting stars*](!magic --mi-power @{selected|token_id}|RoSS-Shooting-Stars|Ring-of-Shooting-Stars|1), as power (special).<br> ***Indoors at night, or underground***, the ring of shooting stars has the following properties:<br> [*Faerie fire*](!magic --mi-power @{selected|token_id}|RoSS-Faerie-Fire|Ring-of-Shooting-Stars|1) (twice per day) as spell<br> [*Spark shower*](!magic --mi-power @{selected|token_id}|RoSS-Spark-Shower|Ring-of-Shooting-Stars|1) (once per day) as power<br> Range, duration, and area of effect of functions are the minimum for the comparable spell unless otherwise stated. Casting time is 5}}

Note that the ability macro starts with a call to the ChatSetAttr API to set the casting-level to 1 and the name of the caster to be <Character-name>'s Ring of Shooting Stars. Not strictly necessary, but a nice cosmetic.

The data section now includes repeating data sets, one for each of the powers that the item has:

RingData=[w:Ring of Shooting Stars,sp:5,rc:charged,ns:6], [cl:PW,w:RoSS-Dancing-Lights,sp:5,pd:12], … 

The first data set is very similar to the standard magic item data, with the addition of the ns: field, and is then followed by a number of repeated data sets specifying each of the powers:

ns:<#>The number of powers (or spells) that the item can wield or store
cl:<MU/PR/PW>The type of the power/spell specification: PW=power, MU=wizard spell, PR=priest spell
w:<text>The name of the power/spell - must be exactly the same as the database name (case ignored)
sp:<[-/+]# / dice roll spec>The speed or casting time of the power/spell in segments
pd:<-1/#>The available casts per day, or -1 for 'at will'

By running the --check-db command (see the note above) these data sets are used to correctly set up the database with the powers wielded, so that when a Character receives this item, the Character also gains the powers to use through the item.

Note: if a Character picks up two Power-wielding items with exactly the same item name (i.e. two copies of the same item) the results are unpredictable. This is best avoided.

Feel free to just copy the specification for a Ring-of-Shooting-Stars in the Rings database and save it to a new Ability Macro with a different name, and then alter the power names, speeds, and uses per day, as well as the API Button --mi-power commands and the other text, to form new power-wielding magic items. Also, the Ring does not have to have 6 powers - just remove or add one or more repeating data sets to reduce or increase the number of powers.

Here is an example of a spell-storing magic item:

Ring-of-Spell-Storing-HHSLS

/w "@{selected|character_name}" &{template:'+fields.defaultTemplate+'}{{name=Ring of Spell Storing with Haste x2, Slow, Light & Sleep}}{{subtitle=Ring}}Specs=[Ring of Spell Storing,Ring,1H,Conjuration-Summoning]{{Speed=[[5]] regardless of spell}}RingData=[w:Ring of Spell Storing HHSLS,sp:5,rc:uncharged,ns:5], [cl:MU,w:Haste,sp:5,lv:6], [cl:MU,w:Haste,sp:5,lv:6], [cl:MU,w:Slow,sp:5,lv:7], [cl:MU,w:Light,sp:5,lv:3], [cl:MU,w:Sleep,sp:5,lv:3] {{Size=Tiny}}{{Store spell=[Store Priest Spell](!magic --mem-spell MI-PR|@{selected|token_id})<br> [Store Wizard Spell](!magic --mem-spell MI-MU|@{selected|token_id})}}{{Cast spell=[View](!magic --view-spell mi-muspells|@{selected|token_id}) or [Cast](!magic --cast-spell MI|@{selected|token_id}) spells}}{{desc=A ring of spell storing contains 1d4+1 spells which the wearer can employ as if he were a spellcaster of the level required to use the stored spells. The class of spells contained within the ring is determined in the same fashion as the spells on scrolls (see "Scrolls"). The level of each spell is determined by rolling 1d6 (for priests) or 1d8 (for wizards). The number rolled is the level of the spell, as follows:<br> Priest: 1d6, if 6 is rolled, roll 1d4 instead.<br> Wizard: 1d8, if 8 is rolled, roll 1d6 instead.<br> Which spell type of any given level is contained by the ring is also randomly determined.<br> The ring empathically imparts to the wearer the names of its spells. Once spell class, level, and type are determined, the properties of the ring are fixed and unchangeable. Once a spell is cast from the ring, it can be restored only by a character of appropriate class and level of experience (i.e., a 12th-level wizard is needed to restore a 6th-level magical spell to the ring). Stored spells have a casting time of [[5]].}}

This is a specific version of a Ring of Spell Storing. As the spells stored are specified in the macro, if you want there to be multiple rings of spell storing in your campaign they each need to be individually programmed (easy cut & paste job) & named differently.

The only new field in these data sets is:

lv:<#>The level of the caster who cast the spell into the ring. The spell will have effects as if cast at this level when cast from the ring.

The lv: field only specifies the level of the initial spell caster when the item is first found. Once owned and used, the level of the spell caster is recorded each time a spell is refreshed by casting into the item. As the item is then passed from one Character to another, or stored in a container and recovered later, the levels at which the spells were cast is retained. However, if the item is reloaded from the databases, or a duplicate of the item is placed by the DM and found by another character, that version of the item will have the spell caster levels from the database definitions. Note that if a single Character picks up two versions of exactly the same spell storing item (i.e. with the same item name) the results are unpredicable...

Feel free to just copy the specification for a Ring-of-Spell-Storing in the Rings database and save it to a new Ability Macro with a different name, and then alter the spell names and casting levels as desired, to form new Rings of Spell Storing or other magic items. Also, the Ring does not have to have 5 spells - just remove or add one or more repeating data sets to reduce or increase the number of stored spells (though the official definition of a Ring of Spell Storing states a maximum of 5 spells).

The key command in the Spell-Storing item that supports it casting the defined spells is !magic --cast-spell MI, called in this case via an API button. Any item specified with this command somewhere in the definition can store spells which can be specified, added or changed by the DM/Game Creator using the !magic --store-spell command.


Weapons (if using AttackMaster API)

Weapons, magical or not, are special types of items in the Magic Items databases. If coded properly (in the same way as those in the MI-DB-Weapons database), they can be used with the AttackMaster API to implement fully automatic weapon management, the ability to hold weapons "in-hand" or sheathed, to have automatic ammo and range management for ranged weapons, automatic entry of weapons into the melee and/or ranged weapons tables, ready to make attacks with magical plusses and other specifications all set up, and support for dancing weapons (ones that can attack without being held by the Character), creatures with more than 2 hands, and 1-handed weapons, 2-handed weapons, and even weapons that need more than 2 hands!

See the Weapon & Armour Database Help handout and wiki for how Weapon definitions should be structured for use with the AttackMaster API, which are just a few additions to the standard definition of an item.


Armour & Shields

Like weapons, armour and shields of all types (including magical armour like magical Bracers and Rings of Protection) can be coded to be used with the AttackMaster API to automatically calculate the appropriate AC for various scenarios (such as with & without Shield, from the back, if surprised, etc). This will take into account if the armour is valid for the character class, determine which is the best armour combination that the character has, if various armour elements can or can't work together, and add in Dexterity bonuses or impairments. It will also allow magical effects cast on the character to take effect or be adjusted via the token "circles" and highlight when such an effect is in place by showing the relevant token bar (only when there is a difference between the token AC and calculated AC).

See the Weapon & Armour Database Help handout and wiki page for how Armour & Shield definitions should be structured for use with the AttackMaster API, which are just a few additions to the standard definition of an item.

Also, see the RoundMaster API documentation for how magical effects can be placed on and affect tokens and characters.


Specs & Data field values

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

Specs sections

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

There are no default settings for any of the Specs data fields. All must be explicitly specified.

Spell Types

There is an infinite list of spell types: generally the type is the spell name.

Spell Item-Classes

MUSpellL\<1-9\>A Wizard spell with the Level specified as a number from 1 to 9
PRSpellL\<1-9\>A Priest spell with the Level specified as a number from 1 to 9
PowerA Power

Spell Handedness

0H A spell/power that does not take a hand (there is no Somatic component)
1H A spell/power that requires only 1 hand to cast (most spells are like this)
2H A spell/power that requires 2 hands to cast (perhaps a scroll must be held)
3H A spell/power that takes 3 hands... perhaps more than 1 caster together?
4H Etc No currently programmed spells use more than 2 hands
... ...

Spell/Power Schools

From MagicMaster v2.048 onwards, Spell Schools are specified by Class in the Class-DB definitions and, depending on the API configuration set with the --config command, will be checked by the system or otherwise. Those implemented so far for the Spells databases are:

Abjuration, Alteration, Conjuration-Summoning, Enchantment-Charm, Divination, Illusion-Phantasm, Invocation-Evocation, Necromancy.

Note that the '/' in School names in the AD&D2e PHB have been replaced by hyphens. It is also allowed to use just one half of any hyphenated school name where appropriate. If a spell or power is of more than one school, separate each with a vertical bar character '|'


Magic Item Types

There is an infinite list of magic item types: generally the type is the magic item name. A magic item can have more than one type, with each separated by a vertical bar character '|'

Magic Item Classes

WeaponWeapons that are not Melee or Ranged weapons or any other class
MeleeMelee weapons that are used in hand-to-hand combat
RangedRanged weapons that are either thrown or fire ammunition
AmmoAll types of ammunition that is used by Ranged weapons
ArmourAny type of armour that does not need to be held to work
ShieldA barrier that is held in hand(s) and defends against one or more attacks from the front
PotionAny type of potion, oil, pill or similar that is consumed or rubbed on
ScrollScrolls and spell books, that contain one or multiple spells
WandWands that cast spells or spell-like effects when wielded in the hand
StaffQuarterstaffs and similar large bludgeoning items that can also have spell-like abilities
RodWalking-stick sized rods that can do spell-like effects, especially when used to attack
RingRings that are worn on a finger, one to each hand, that protect, have powers or spells
LightAll types of lantern, torch, and other illumination
MiscellaneousAnything that does not fit in one of the other categories
UnspecifiedItems without any Specs section or an empty Class definition are listed under DM-Only

Armour Handedness

0H Items that do not require to be held to work (e.g. a Ring, Buckler or a Helm)
1H An item that must be held in one hand to work, such as a Wand
2H Items that need two hands to wield, like a Staff
3H Items that need three hands to use, perhaps by two characters... (not yet implemented)
... etc.

Item Schools

Currently, all Magic Items other than Weapons and Armour use the same set of magical schools as for Spells & Powers, as they mostly perform spell-like effects. See section 7.1(d) for the list.

Data Sections

Definitions for Data Section field types for Weapons & Armour can be found in the Weapons & Armour Database help handout & wiki page. Below are the definitions for Spell, Power & other Magical Item types.

Note: Always refer to the database specification definitions in other sections above for detailed information on the use of these Field specifiers. Not all specifiers have an obvious use.

Field Format Default Value Description Can be used in
Spell
Data
Potion
Data
Scroll
Data
Wand
Data
Staff
Data
Rod
Data
Ring
Data
Misc
Data
w:< text >'-'Name to be displayed XXXXXXX
w:< text >Name of spell or power (Not case sensitive)X
+:[ + / - ] #0Magical adjustment XXXX
n:# [ / # ]1Attacks per round XXX X
sz:[ t / s / m / l / h ]Size of item XXXXX
sp:[-]# or Dice Roll spec0Speed in segments (1/10 round)XXXXXXXX
wt:#1Weight of item in lbs X XXX X
ns:#0Number of stored spells & powers defined for item XXXXXX
w:< text >'-'Name of stored spell or power (Not case sensitive)X XXXXXX
cl:MU / PR / PWType of stored spell or power XXXXXX
lv:#1Level at which spell/power is cast XXXXX
pd:-1 / #1Number per day (power only) XXXXX
rc:Charged / Uncharged / Rechargeable / Recharging / Self-chargeable / Cursed / Charged-Cursed / Recharging-Cursed / Self-chargeable-CursedUnchargedInitial charged and Cursed status of item when found (Can be changed by DM using -gm-only-mi command once added to Character Sheet) Not case sensitive XXXXXXX


Character Sheet data fields

The Character Sheet field mapping to the API script can be altered using the definition of the fields object, the definition for which can be found at the top of each API. You can find the complete mapping for all APIs in the RPGMaster series, with an explanation of each, in a separate document - as the Author for a copy.