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

Difference between revisions of "API:RPGMaster-ClassDB"

From Roll20 Wiki

Jump to: navigation, search
m
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
 
{{revdate}}{{main|API:RPGMaster}}
 
{{revdate}}{{main|API:RPGMaster}}
 
==General Database information==
 
==General Database information==
<p>The '''RPGMaster APIs''' use a number of Character Sheets as databases to hold Ability Macros defining character classes, spells, powers and magic items and their effects. The API is distributed with many class, 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, 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 these 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>
+
<p>The RPGMaster APIs use a number of databases to hold Macros defining character classes, spells, powers and magic items and their effects. Previous versions of the RPGMaster series of APIs held their databases all externally as character sheets: from this version onwards this is not the case for databases supplied with the APIs, which are now held internally to the APIs. However, the AttackMaster or MagicMaster API command <b>--extract-db</b> can be used to extract any or all standard databases to Character Sheets for examination and update. The APIs are distributed with many class, spell, power & magic item definitions, and DMs can add their own character classes, spells, items, weapons, ammo and armour to additional databases in their own database character sheets, with new definitions for database items held in Ability Macros. Additional database character sheets should be named as follows:</p>
 
<table>
 
<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">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>
Line 8: Line 8:
 
<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">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">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">Character Races:</th><td>additional databases: Race-DB-<i>[added name]</i> where <i>[added name]</i> can be replaced with anything you want.</td></tr>
 
<tr><th scope="row">Attack Calculations:</th><td>additional databases: Attacks-DB-<i>[added name]</i> where <i>[added name]</i> can be replaced with anything you want.</td></tr>
 
<tr><th scope="row">Attack Calculations:</th><td>additional databases: Attacks-DB-<i>[added name]</i> where <i>[added name]</i> can be replaced with anything you want.</td></tr>
 +
<tr><th scope="row">Fighting Styles:</th><td>additional databases: Styles-DB-<i>[added name]</i> where <i>[added name]</i> can be replaced with anything you want.</td></tr>
 
</table>
 
</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 added database has a similar structure, with:</p>
 
<ul>
 
<ul>
 
<li>Ability Macros named as the class, spell, power or magic item specified, and used to describe and provide effects for classes, spells, powers and magic items using the commands in the RPGMaster APIs;</li>
 
<li>Ability Macros named as the class, spell, power or magic item specified, and used to describe and provide effects for classes, spells, powers and magic items using the commands in the RPGMaster APIs;</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 definitions);</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);</li>
 
<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 - see Class entry below).</li>
 
<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 - see Class entry below).</li>
 
</ul>
 
</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 class, spell, power and magic item ability macros.  When a Player or an NPC or Monster views or casts a spell, power or uses a magic item the Magic Master 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>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>[[Script:MagicMaster|MagicMaster API]]</b> command <b>!magic --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>
<h3>Replacing Classes, Spells & Items</h3>
+
<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 Ability Macro 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>
+
===Replacing Database Items===
 +
<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>
  
 
==Character Class Database==
 
==Character Class Database==
<p>Character Class databases are all character sheets that have names that start with Class-DB</p>
+
<p>The DM can add Character Class databases as character sheets that have names that start with Class-DB. The Class definitions that come with the installed game-version-specific <b>[[Script:RPGMaster Library|RPGMaster Library]]</b> can be extracted to a character sheet and viewed by using the <i><b>!magic --extract-db Class-DB</b> or <b>!attk --extract-db Class-DB</b></i> commands.  <b>Note:</b> it is best to delete the extracted Class-DB database character sheet after viewing/using, so that the system uses the much faster internal database version. After deleting or changing any character sheet database, always run the <i><b>!magic --check-db</b> or <b>!attk --check-db</b></i> command to re-index the databases.</p>
<p> <b>Classes:</b> Class-DB-<i>[added name]</i></p>
+
<p><b>Classes:</b> Class-DB-<i>[added name]</i></p>
 
<p>Those with version numbers of the form v#.# as part of the name will be ignored.</p>
 
<p>Those with version numbers of the form v#.# as part of the name will be ignored.</p>
<p>As previously stated, each class definition has 3 parts in the database (see Section 1): an Ability Macro with a name that is unique and matches the Class being defined, 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 base class: the base classes being "Warrior", "Wizard", "Priest", "Rogue", and "Psion".  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>As previously stated, each class definition has 3 parts in the database (see Section 1): an Ability Macro with a name that is unique and matches the Class being defined, 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 base class: the base classes being "Warrior", "Wizard", "Priest", "Rogue", and "Psion".  The quickest way to understand these entries is to examine existing entries.  Do extract the root database using the <b><i>--extract-db</i></b> command and take a look (remember to delete it after viewing - see above)</p>
 
<p><b>Note:</b> The DM creating new classes does not need to worry about anything other than the Ability Macro in the database, as running the command <b><i>--check-db</i></b> will update all other aspects of the database appropriately for all databases, as long as the Specs and Data fields in the Ability Macros 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><b>Note:</b> The DM creating new classes does not need to worry about anything other than the Ability Macro in the database, as running the command <b><i>--check-db</i></b> will update all other aspects of the database appropriately for all databases, as long as the Specs and Data fields in the Ability Macros 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>
 
===Standard / Simple Class definitions===
 
===Standard / Simple Class definitions===
 
<p><b>The Ability Macro</b> for a Class may look something like this:</p>
 
<p><b>The Ability Macro</b> for a Class may look something like this:</p>
<h4>Thief</h4>
+
====Thief====
<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=Thief}}{{subtitle=Rogue Class}}{{Min Abilities=Dex:[[9]]}}{{Race=Any}}{{Hit Dice=1d6}}{{Alignment=Any not Lawful}}</nowiki><span style="color:green">Specs=[Thief,RogueClass,0H,Rogue]</span><nowiki>{{=**Powers**}}{{1st Level=Thieving Abilities *Pick Pockets, Open Locks, Find/Remove Traps, Move Silently, Hide in Shadows, Detect Noise, Climb Walls,* and *Read Languages* Also, Thieves can *Backstab*}}{{10th Level=Limited ability to use magical & priest scrolls, with 25% chance of backfire}}</nowiki><span style="color:blue">ClassData=[w:Thief, hd:1d6, align:ng|nn|n|ne|cg|cn|ce, npp:-3, weaps:club|shortblade|dart|handxbow|lasso|shortbow|sling|broadsword|longsword|staff, ac:padded|leather|studdedleather|elvenchain|magicitem|ring|cloak]</span><nowiki>{{desc=Thieves come in all sizes and shapes, ready to live off the fat of the land by the easiest means possible. In some ways they are the epitome of roguishness.<br>
+
<p style="display: inline-block; background-color: lightgrey; border: 1px solid black; padding: 4px; color: dimgrey; font-weight: extra-light;"><nowiki>&{template:RPGMclass}{{name=Thief}}{{subtitle=Rogue Class}}{{Min Abilities=Dex:[[9]]}}{{Race=Any}}{{Hit Dice=1d6}}{{Alignment=Any not Lawful}}</nowiki><span style="color:yellow">Specs=[Thief,RogueClass,0H,Rogue]</span><nowiki>{{Section1=**Powers**}}{{1st Level=Thieving Abilities *Pick Pockets, Open Locks, Find/Remove Traps, Move Silently, Hide in Shadows, Detect Noise, Climb Walls,* and *Read Languages* Also, Thieves can *Backstab*}}{{10th Level=Limited ability to use magical & priest scrolls, with 25% chance of backfire}}</nowiki><span style="color:blue">ClassData=[w:Thief, hd:1d6, align:ng|nn|n|ne|cg|cn|ce, npp:-3, weaps:club|shortblade|dart|handxbow|lasso|shortbow|sling|broadsword|longsword|staff, ac:padded|leather|studdedleather|elvenchain|magicitem|ring|cloak]</span><nowiki>{{desc=</nowiki>Thieves come in all sizes and shapes, ready to live off the fat of the land by the easiest means possible. In some ways they are the epitome of roguishness.<br>The profession of thief is not honorable, yet it is not entirely dishonorable, either. Many famous folk heroes have been more than a little larcenous -- Reynard the Fox, Robin Goodfellow, and Ali Baba are but a few. At his best, the thief is a romantic hero fired by noble purpose but a little wanting in strength of character. Such a person may truly strive for good but continually run afoul of temptation.<nowiki>}}</nowiki></p>
The profession of thief is not honorable, yet it is not entirely dishonorable, either. Many famous folk heroes have been more than a little larcenous -- Reynard the Fox, Robin Goodfellow, and Ali Baba are but a few. At his best, the thief is a romantic hero fired by noble purpose but a little wanting in strength of character. Such a person may truly strive for good but continually run afoul of temptation.}}</nowiki></p>
+
<p>The ability specification for this Rogue class uses a Roll20 Roll Template, in this case defined by the <b>[[Script:RPGMaster Library|RPGMaster Library]]</b> (see the documentation for the Library 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 RPGMaster APIs are those highlighted.  Each of the elements important to the database 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 Rogue class 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 RoundMaster APIs are those highlighted.  Each of the elements important to the database are inserted <i>between</i> the elements of the Roll Template, meaning they will not be seen by the player when the macro is run.  Generally spaces, hyphens and underscores in the data elements are ignored, and case is not significant.  Each element is described below:</p>
+
 
<pre>Specs = [Character Class, Macro Type, Handedness, Base Class]</pre>
 
<pre>Specs = [Character Class, Macro Type, Handedness, Base Class]</pre>
 
<p>The Specs section describes what Character Class and Base Class this is (and tells the APIs that this is a macro of type "Class").  These fields must be in this order.  This format is identical for all database items, whether in these databases or others used by the RPGMaster 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>
 
<p>The Specs section describes what Character Class and Base Class this is (and tells the APIs that this is a macro of type "Class").  These fields must be in this order.  This format is identical for all database items, whether in these databases or others used by the RPGMaster 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>
 
<table>
<tr><th scope="row">Character Class</th><td>the Character Class name, often the same as the ability macro name.</td></tr>
+
<tr><th scope="row">Character Class</th><td>the Character Class name, often the same as the ability macro name.</td></tr>
<tr><th scope="row">Macro Type</th><td>the type of the data in this Ability Macro, one of <i>WarriorClass, WizardClass, PriestClass, RogueClass,</i> or <i>PsionClass</i>.</td></tr>
+
<tr><th scope="row">Macro Type</th><td>the type of the data in this Ability Macro, one of <i>WarriorClass, WizardClass, PriestClass, RogueClass,</i> or <i>PsionClass</i>.</td></tr>
<tr><th scope="row">Handedness</th><td>#H, where # is the number of hands needed to be a character of this class (not currently used).</td></tr>
+
<tr><th scope="row">Handedness</th><td>#H, where # is the number of hands needed to be a character of this class (not currently used).</td></tr>
<tr><th scope="row">Base Class</th><td>the base class that this class belongs to, one of <i>Warrior, Wizard, Priest, Rogue,</i> or <i>Psion</i>.</td></tr>
+
<tr><th scope="row">Base Class</th><td>the base class that this class belongs to, one of <i>Warrior, Wizard, Priest, Rogue,</i> or <i>Psion</i>.</td></tr>
 
</table>
 
</table>
<pre>ClassData=[w:Thief, hd:1d6, align:ng|nn|n|ne|cg|cn|ce, weaps:club|shortblade|dart|handxbow|lasso|shortbow|sling|broadsword|longsword|staff, ac:padded|leather|studdedleather|elvenchain|magicitem|ring|cloak]</pre>
+
<pre>ClassData=[w:Thief, hd:1d6, align:ng|nn|n|ne|cg|cn|ce, npp:-3, weaps:club|shortblade|dart|handxbow|lasso|shortbow|sling|broadsword|longsword|staff, ac:padded|leather|studdedleather|elvenchain|magicitem|ring|cloak]</pre>
 
<p>The ClassData section specifies the data relating to the class.  These fields can be in any order.</p>
 
<p>The ClassData section specifies the data relating to the class.  These fields can be in any order.</p>
 
<table>
 
<table>
<tr><th scope="row">w:</th><td>&lt;text&gt;</td><td>the name of the class</td></tr>
+
<tr><th scope="row">w:</th><td>&lt;text&gt;</td><td>the name of the class</td></tr>
<tr><th scope="row">align:</th><td>&lt;lg|ln|le|ng|nn|n|ne|cg|cn|ce&gt; or &lt;any&gt;</td><td>the valid alignments for characters of this class, separated by '|' (not currently restricted)</td></tr>
+
<tr><th scope="row">align:</th><td>&lt;lg|ln|le|ng|nn|n|ne|cg|cn|ce&gt; or &lt;any&gt;</td><td>the valid alignments for characters of this class, separated by '|' (not currently restricted)</td></tr>
<tr><th scope="row">race:</th><td>&lt;list of races&gt; or &lt;any&gt;</td><td>the races that can take this class, separated by '|' (not currently restricted)</td></tr>
+
<tr><th scope="row">attr:</th><td>#[:#]</td><td>minimum and maximum starting attribute values (default is 3:18)</td></tr>
<tr><th scope="row">hd:</th><td>&lt;dice roll spec&gt;</td><td>the dice roll specification for hit points at each level (not currently used, for future expansion)</td></tr>
+
<tr><th scope="row">race:</th><td>&lt;list of races&gt; or &lt;any&gt;</td><td>the races that can take this class, separated by '|' (not currently restricted)</td></tr>
<tr><th scope="row">npp:</th><td>&lt;[-/+]#&gt;</td><td>optional field to set a bespoke non-proficient weapon penalty for the character class.  If not provided defaults to that for the Base Class.</td></tr>
+
<tr><th scope="row">hd:</th><td>&lt;dice roll spec&gt;</td><td>the dice roll specification for hit points at each level (not currently used, for future expansion)</td></tr>
<tr><th scope="row">weaps:</th><td>&lt;list of weapons & weapon types&gt; or &lt;any&gt;</td><td>a vertical bar '|' separated list of weapons and weapon types that are valid for the class</td></tr>
+
<tr><th scope="row">npp:</th><td>&lt;[-/+]#&gt;</td><td>optional field to set a bespoke non-proficient weapon penalty for the character class.  If not provided defaults to that for the Base Class.</td></tr>
<tr><th scope="row">ac:</th><td>&lt;list of armour types&gt; or &lt;any&gt;</td><td>a vertical bar '|' separated list of armour and armour types that are valid for the class</td></tr>
+
<tr><th scope="row">weaps:</th><td>&lt;list of weapons & weapon types&gt; or &lt;any&gt;</td><td>a vertical bar '|' separated list of weapons and weapon types that are valid for the class (see the Weapons database/documentation for types). Preceeding by '!' means 'not this weapon' and with '+' means 'include this whatever'</td></tr>
 +
<tr><th scope="row">ac:</th><td>&lt;list of armour types&gt; or &lt;any&gt;</td><td>a vertical bar '|' separated list of armour and armour types that are valid for the class (see the Weapons database/documentation for types). '!' and '+' work the same as for weapons</td></tr>
 
</table>
 
</table>
 
<p>The list of weapons and weapon types listed after the "weaps:" tag are checked by the system when a character tries to take a weapon in-hand using the "Change Weapons" dialogue or AttackMaster <b>--weapon</b> command, as determined by the API configuration setting, accessed via the MagicMaster or AttackMaster <b>--config</b> command.  This configuration can be to restrict weapons to those listed ("Strict" mode), to give unlisted weapons a penalty of double the non-proficient weapon penalty for the base class ("Lax" mode), or to ignore this list and allow any weapon to be proficient or to just get the standard non-proficient weapon penalty ("Allowed" mode).</p>
 
<p>The list of weapons and weapon types listed after the "weaps:" tag are checked by the system when a character tries to take a weapon in-hand using the "Change Weapons" dialogue or AttackMaster <b>--weapon</b> command, as determined by the API configuration setting, accessed via the MagicMaster or AttackMaster <b>--config</b> command.  This configuration can be to restrict weapons to those listed ("Strict" mode), to give unlisted weapons a penalty of double the non-proficient weapon penalty for the base class ("Lax" mode), or to ignore this list and allow any weapon to be proficient or to just get the standard non-proficient weapon penalty ("Allowed" mode).</p>
 
<p>In exactly the same way as for weapons, armour and armour types listed after the "ac:" tag are checked when calculating the Armour Class of the character using the "Check AC" dialogue or AttackMaster <b>--checkac</b> command, or automatically by the APIs at various points when AC might change, again according to the API configuration settings accessed via the <b>--config</b> command.  This configuration can restrict a class to the armours and armour types listed for the class ("Rules" mode), or not restrict usage at all ("Allowed" mode).</p>
 
<p>In exactly the same way as for weapons, armour and armour types listed after the "ac:" tag are checked when calculating the Armour Class of the character using the "Check AC" dialogue or AttackMaster <b>--checkac</b> command, or automatically by the APIs at various points when AC might change, again according to the API configuration settings accessed via the <b>--config</b> command.  This configuration can restrict a class to the armours and armour types listed for the class ("Rules" mode), or not restrict usage at all ("Allowed" mode).</p>
<p>Three additional field tags are optionally available to allow the default weapon attacks per round progression to be overridden with a bespoke progression.  Any one, two or all three can be specified: if just the progression level sequence is given, these levels will override the default levels, and similarly for the melee and ranged weapon mods, and defaults will be used for those not overridden.  This only works for classes that are types of Warrior.  The defaults are those specified for the Warrior class in the Player's Handbook.</p>
+
<p>Three additional field tags are optionally available to allow the default weapon attacks per round progression to be overridden with a bespoke progression.  Any one, two or all three can be specified: if just the progression level sequence is given, these levels will override the default levels, and similarly for the melee and ranged weapon mods, and defaults will be used or those not overridden.  This only works for classes that are types of Warrior.  The defaults are those specified for the Warrior class in the Player's Handbook.</p>
 
<table>
 
<table>
<tr><th scope="row">attkl:</th><td>&lt;0|#|#|...&gt;</td><td>a vertical bar '|' separated list of levels (the first must be 0) at which the next higher number of attacks per round is achieved.</td></tr>
+
<tr><th scope="row">attkl:</th><td>&lt;0|#|#|...&gt;</td><td>a vertical bar '|' separated list of levels (the first must be 0) at which the next higher number of attacks per round is achieved.</td></tr>
<tr><th scope="row">attkm:</th><td>&lt;#|#|#|...&gt;</td><td>a vertical bar '|' separated list of modifications to the standard number of attacks per round for any melee weapon used.  Each can be an integer, a decimal float (# . #) or a fraction (# / #)</td></tr>
+
<tr><th scope="row">attkm:</th><td>&lt;#|#|#|...&gt;</td><td>a vertical bar '|' separated list of modifications to the standard number of attacks per round for any melee weapon used.  Each can be an integer, a decimal float (# . #) or a fraction (# / #)</td></tr>
<tr><th scope="row">attkr:</th><td>&lt;#|#|#|...&gt;</td><td>a vertical bar '|' separated list of modifications to the standard number of attacks per round for any ranged weapon used.  Each can be an integer, a decimal float (# . #) or a fraction (# / #)</td></tr>
+
<tr><th scope="row">attkr:</th><td>&lt;#|#|#|...&gt;</td><td>a vertical bar '|' separated list of modifications to the standard number of attacks per round for any ranged weapon used.  Each can be an integer, a decimal float (# . #) or a fraction (# / #)</td></tr>
 
</table>
 
</table>
 
 
===Changing the Default Saving Throws===
 
===Changing the Default Saving Throws===
 
<p>The default Saving Throw table from the Player's Handbook can be overridden for any class definition. A new set of base saving throws by experience level can be defined.</p>
 
<p>The default Saving Throw table from the Player's Handbook can be overridden for any class definition. A new set of base saving throws by experience level can be defined.</p>
<h4>Dwarven Defender</h4>
+
====Dwarven Defender====
<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=Dwarven Defender}}{{subtitle=Warrior Class}}{{Min Abilities=Str:[[12]], Con:[[15]]}}{{Race=Dwarf only}}{{Alignment=Any}}</nowiki><span style="color:green">Specs=[Dwarven Defender,WarriorHRClass,0H,Warrior]</span><nowiki>{{Hit Dice=1d12}}{{=**Powers**}}{{1st Level=*Defensive Stance* (1/4 levels per day}}</nowiki><span style="color:blue">ClassData=[w:Fighter, align:any, hd:1d12, race:dwarf, weaps:axe|club|flail|longblade|fencingblade|mediumblade|shortblade|polearm, ac:any, svl0:16|18|17|20|19, svl1:12|17|15|16|15, svl3:11|16|14|15|14, svl5:10|14|12|12|12, svl7:9|13|11|11|11, svl10:7|11|9|8|9, svl13:4|9|6|5|7, svl16:2|7|4|3|4, ns:1][cl:PW, w:Defensive-Stance, lv:1, pd:1l4]</span><nowiki>{{desc=</nowiki>The Dwarven defender is a formidable warrior. They are trained in the art of defence from a young age and make a defensive line nearly unbreakable.<br>
+
<p style="display: inline-block; background-color: lightgrey; border: 1px solid black; padding: 4px; color: dimgrey; font-weight: extra-light;"><nowiki>&{template:RPGMclass}{{name=Dwarven Defender}}{{subtitle=Warrior Class}}{{Min Abilities=Str:[[12]], Con:[[15]]}}{{Race=Dwarf only}}{{Alignment=Any}}</nowiki><span style="color:yellow">Specs=[Dwarven Defender,WarriorHRClass,0H,Warrior]</span><nowiki>{{Hit Dice=1d12}}{{Section=**Powers**}}{{1st Level=Defensive Stance (1/4 levels per day}}</nowiki><span style="color:blue">ClassData=[w:Fighter, align:any, hd:1d12, race:dwarf, weaps:axe|club|flail|longblade|fencingblade|mediumblade|shortblade|polearm, ac:any, svl0:16|18|17|20|19, svl1:12|17|15|16|15, svl3:11|16|14|15|14, svl5:10|14|12|12|12, svl7:9|13|11|11|11, svl10:7|11|9|8|9, svl13:4|9|6|5|7, sv16:2|7|4|3|4, ns:1][cl:PW, w:Defensive-Stance, lv:1, pd:1l4]</span><nowiki>{{desc=</nowiki>The Dwarven defender is a formidable warrior. They are trained in the art of defence from a young age and make a defensive line nearly unbreakable.<br>The class is limited to Dwarves.<br>They can wear any armour but tend to go with the heaviest and toughest they can afford. They always use a shield, whenever possible a special Dwarven Tower shields (+1 in melee but +3 vs missiles when braced and in position). To use a Tower Shield requires a weapon proficiency slot. The dwarven Tower Shield has to be acquired in the campaign, it isn’t just granted to the character on creation (it’s a bit like a Paladins Warhorse).  It may take many levels before they get a quest to acquire one.<br>They can only become proficient, specialise and double specialise in axes (not great axes) or hammers. They can never use missile weapons like a bow or crossbow but can throw hammers or axes.<br>They get bonus non weapon proficiency slots in Armourer, Blacksmithing and Mining.<nowiki>}}</nowiki></p>
The class is limited to Dwarves.<br>
+
They can wear any armour but tend to go with the heaviest and toughest they can afford. They always use a shield, whenever possible a special Dwarven Tower shields (+1 in melee but +3 vs missiles when braced and in position). To use a Tower Shield requires a weapon proficiency slot. The dwarven Tower Shield has to be acquired in the campaign, it isn’t just granted to the character on creation (it’s a bit like a Paladins Warhorse).  It may take many levels before they get a quest to acquire one.<br>
+
They can only become proficient, specialise and double specialise in axes (not great axes) or hammers. They can never use missile weapons like a bow or crossbow but can throw hammers or axes.<br>
+
They get bonus non weapon proficiency slots in Armourer, Blacksmithing and Mining.<nowiki>}}</nowiki></p>
+
 
<p>In addition to the elements described previously, the ClassData section specifies new elements regarding saving throws (ignore the ns: and everything beyond for now):</p>
 
<p>In addition to the elements described previously, the ClassData section specifies new elements regarding saving throws (ignore the ns: and everything beyond for now):</p>
<pre>ClassData=[w:Fighter, align:any, hd:1d12, race:dwarf, weaps:axe|club|flail|longblade|fencingblade|mediumblade|shortblade|polearm, ac:any, svl0:16|18|17|20|19, svl1:12|17|15|16|15, svl3:11|16|14|15|14, svl5:10|14|12|12|12, svl7:9|13|11|11|11, svl10:7|11|9|8|9, svl13:4|9|6|5|7, sv16:2|7|4|3|4, ns:1]</pre>
+
<pre>ClassData=[w:Fighter, align:any, hd:1d12, race:dwarf, weaps:axe|club|flail|longblade|fencingblade|mediumblade|shortblade|polearm, ac:any, svl0:16|18|17|20|19, svl1:12|17|15|16|15, svl3:11|16|14|15|14, svl5:10|14|12|12|12, svl7:9|13|11|11|11, svl10:7|11|9|8|9, svl13:4|9|6|5|7, svl16:2|7|4|3|4, ns:1]</pre>
<p>Each <i>svl#</i> element specifies the base saves at and above experience level "#", for the five standard base save types, <i>Paralysation, Poison & Death | Rod, Staff & Wand | Petrification & Polymorph | Breath Weapon | Spells</i>.  The highest specification element applies to all higher experience levels.</p>
+
<p>Each <i>svl# element specifies the base saves at and above experience level "#", for the five standard base save types, <i>Paralysation, Poison & Death | Rod, Staff & Wand | Petrification & Polymorph | Breath Weapon | Spells.  The highest specification element applies to all higher experience levels.</p>
<p>Magic Items, Race definitions, and other database elements that affect a character can specify modifications to the base Saving Throws (whether using the defaults or custom Class specifications) by using the data element <b>svXXX:[+-=]#,</b>, where "XXX" is one of <i>par, poi, dea, rod, sta, wan, pet, pol, bre, spe</i> or <i>all</i>, followed by a colon, then <i>a plus (+), a minus (-), an equals (=),</i> and a number, or just a number with nothing before it.  Each of the three-letter qualifiers refers to the relevant save, except "all" which applies the modifier to all saves.  Preceeding the modifier amount by plus (+) or nothing <i><b>improves</b></i> the save by the modifier, preceeding by minus (-) <i><b>worsens</b></i> the save by the modifier, and by equals (=) overrides any other modifier being applied and applies <i>only</i> the modifier preceeded by the equals.  Obviously, racial mods apply at all times (unless overridden by a magic item using the "=" modifier), and magic item mods only apply if the character has the magic item in their held items.</p>
+
<p>Magic Items, Race definitions, and other database elements that affect a character can specify modifications to the base Saving Throws (whether using the defaults or custom Class specifications) by using the data element <b>svXXX:[+-=]#,</b>, where "XXX" is one of <i>par, poi, dea, rod, sta, wan, pet, pol, bre, spe or <i>all</i>, followed by a colon, then <i>a plus (+), a minus (-), an equals (=),</i> and a number, or just a number with nothing before it.  Each of the three-letter qualifiers refers to the relevant save, except "all" which applies the modifier to all saves.  Preceeding the modifier amount by plus (+) or nothing <i><b>improves</b></i> the save by the modifier, preceeding by minus (-) <i><b>worsens</b></i> the save by the modifier, and by equals (=) overrides any other modifier being applied and applies <i>only</i> the modifier preceeded by the equals.  Obviously, racial mods apply at all times (unless overridden by a magic item using the "=" modifier), and magic item mods only apply if the character has the magic item in their held items.</p>
 
+
 
===Restricting the Schools and Spheres of Spells available===
 
===Restricting the Schools and Spheres of Spells available===
 
<p>While standard Wizards and Priests are very similar to the standard specification above, the definitions of specialist spellcaster classes is slightly more complex.</p>
 
<p>While standard Wizards and Priests are very similar to the standard specification above, the definitions of specialist spellcaster classes is slightly more complex.</p>
<h4>Conjurer</h4>
+
====Conjurer====
<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=Conjurer}}{{subtitle=Wizard Class}}{{Min Abilities=Int:[[9]], Con:[[15]]}}{{Alignment=Any}}{{Race=Human & Half Elf}}{{Hit Dice=1d4}}</nowiki><span style="color:green">Specs=[Conjurer,WizardClass,0H,Wizard]</span><nowiki>{{=**Spells**}}{{Specialist=Conjuration / Summoning}}{{Banned=Greater Divination & Invocation}}</nowiki><span style="color:blue">ClassData=[w:Conjurer, hd:1d4, race:human|halfelf, sps:conjuration|summoning|conjurationsummoning, spb:greaterdivination|invocation, weaps:dagger|staff|dart|knife|sling, ac:magicitem|ring|cloak]</span><nowiki>{{desc=This school includes two different types of magic, though both involve bringing in matter from another place. Conjuration spells produce various forms of nonliving matter. Summoning spells entice or compel creatures to come to the caster, as well as allowing the caster to channel forces from other planes. Since the casting techniques and ability requirements are the same for both types of magic, conjuration and summoning are considered two parts of the same school.}}</nowiki></p>
+
<p style="display: inline-block; background-color: lightgrey; border: 1px solid black; padding: 4px; color: dimgrey; font-weight: extra-light;"><nowiki>&{template:RPGMclass}{{name=Conjurer}}{{subtitle=Wizard Class}}{{Min Abilities=Int:[[9]], Con:[[15]]}}{{Alignment=Any}}{{Race=Human & Half Elf}}{{Hit Dice=1d4}}</nowiki><span style="color:yellow">Specs=[Conjurer,WizardClass,0H,Wizard]</span><nowiki>{{Section1=**Spells**}}{{Specialist=Conjuration / Summoning}}{{Banned=Greater Divination & Invocation}}</nowiki><span style="color:blue">ClassData=[w:Conjurer, hd:1d4, race:human|halfelf, sps:conjuration|summoning|conjurationsummoning, spb:greaterdivination|invocation, weaps:dagger|staff|dart|knife|sling, ac:magicitem|ring|cloak]</span><nowiki>{{desc=This school includes two different types of magic, though both involve bringing in matter from another place. Conjuration spells produce various forms of nonliving matter. Summoning spells entice or compel creatures to come to the caster, as well as allowing the caster to channel forces from other planes. Since the casting techniques and ability requirements are the same for both types of magic, conjuration and summoning are considered two parts of the same school.}}</nowiki></p>
 
<pre>ClassData=[w:Conjurer, hd:1d4, race:human|halfelf, sps:conjuration|summoning|conjurationsummoning, spb:greaterdivination|invocation, weaps:dagger|staff|dart|knife|sling, ac:magicitem|ring|cloak]</pre>
 
<pre>ClassData=[w:Conjurer, hd:1d4, race:human|halfelf, sps:conjuration|summoning|conjurationsummoning, spb:greaterdivination|invocation, weaps:dagger|staff|dart|knife|sling, ac:magicitem|ring|cloak]</pre>
 
<p>The ClassData for specialist casters includes additional tags to specify the schools/spheres of magic that the caster can and cannot use (and for priests major and minor access to spheres).</p>
 
<p>The ClassData for specialist casters includes additional tags to specify the schools/spheres of magic that the caster can and cannot use (and for priests major and minor access to spheres).</p>
 
<table>
 
<table>
<tr><th scope="row">sps:</th><td>&lt;text|text|...&gt; or &lt;any&gt;</td><td>a list of specialist schools or major spheres separated by vertical bars ('|')</td></tr>
+
<tr><th scope="row">sps:</th><td>&lt;text|text|...&gt; or &lt;any&gt;</td><td>a list of specialist schools or major spheres separated by vertical bars ('|')</td></tr>
<tr><th scope="row">spb:</th><td>&lt;text|text|...&gt;</td><td>a list of banned schools/spheres that this class is not allowed to use separated by vertical bars ('|')</td></tr>
+
<tr><th scope="row">spb:</th><td>&lt;text|text|...&gt;</td><td>a list of banned schools/spheres that this class is not allowed to use separated by vertical bars ('|')</td></tr>
<tr><th scope="row">spm:</th><td>&lt;text|text|...&gt;</td><td>a list of minor spheres (only relevant to Priest classes) separated by vertical bars ('|')</td></tr>
+
<tr><th scope="row">spm:</th><td>&lt;text|text|...&gt;</td><td>a list of minor spheres (only relevant to Priest classes) separated by vertical bars ('|')</td></tr>
 
</table>
 
</table>
 
<p>The spellcaster will be restricted to memorising only spells from the schools/spheres listed depending on the API configuration using the <b>--config</b> command.  The configuration can be to restrict to the specified schools/spheres ("Strict" mode) or allow all at any level ("Allowed" mode).  The DM will also have a single button to add all valid spells at all levels to a Priest character sheet using the [Token-setup] macro or the <b>!cmd --abilities</b> command, and then using the [Add to Spellbook] / [Priest] dialogue.</p>
 
<p>The spellcaster will be restricted to memorising only spells from the schools/spheres listed depending on the API configuration using the <b>--config</b> command.  The configuration can be to restrict to the specified schools/spheres ("Strict" mode) or allow all at any level ("Allowed" mode).  The DM will also have a single button to add all valid spells at all levels to a Priest character sheet using the [Token-setup] macro or the <b>!cmd --abilities</b> command, and then using the [Add to Spellbook] / [Priest] dialogue.</p>
 
 
===Default spells and spells per level===
 
===Default spells and spells per level===
<p>Using the classes called "Wizard" or "Priest" will always grant the standard Wizard and Priest spells per level respectively as per the Player's Handbook, thus the class specifications are no different from that above.  Also, <i>any</i> class name placed in the <i>Wizard</i> class fields (the second class definition column of the Advanced 2e sheet) will get standard Wizard spell casting capabilities (unless otherwise specified as below), and those in the <i>Priest</i> class fields (the third class definition column of the Advanced 2e sheet) will get standard Priest spell casting capabilities (unless otherwise specified as below).</p>
+
<p>Using the classes called "Wizard" or "Priest" will always grant the standard Wizard and Priest spells per level respectively as per the Player's Handbook, thus the class specifications are no different from that above.  Also, <i>any</i> class name placed in the <i>Wizard</i> class fields (e.g. the second class definition column of the Advanced 2e sheet) will get standard Wizard spell casting capabilities (unless otherwise specified as below), and those in the <i>Priest</i> class fields (e.g. the third class definition column of the Advanced 2e sheet) will get standard Priest spell casting capabilities (unless otherwise specified as below).</p>
<h3>Non-standard spells per level</h3>
+
===Non-standard spells per level===
 
<p>A <b>non-standard</b> spellcaster (such as a Ranger, Paladin or Bard, or any class you wish to specify of a similar nature) can have their spellcasting capabilities specified in the class definition:</p>
 
<p>A <b>non-standard</b> spellcaster (such as a Ranger, Paladin or Bard, or any class you wish to specify of a similar nature) can have their spellcasting capabilities specified in the class definition:</p>
<h4>Priest of Magic</h4>
+
====Priest of Magic====
<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=Priest of Magic}}{{subtitle=Priest Class}}{{Min Abilities=Wis:[[12]], Int:[[13]]}}{{Race=Human or Half Elf}}{{Hit Dice=1d8}}{{Reference=*House Rules v16*}}{{=**Alignment**}}{{Deity=True Neutral}}{{Priests=Any Neutral}}{{Flock=Any Alignment}}{{  =**Spells**}}{{Major Spheres=All, Divination, Protection, Healing, Elemental}}{{Minor Spheres=Sun}}</nowiki><span style="color:green">Specs=[Priest of Magic,PriestClass,0H,Priest]</span><nowiki>{{Powers=None}}</nowiki><span style="color:blue">ClassData=[w:Priest of Magic, hd:1d8, race:human|halfelf, align:ng|nn|n|ne, weaps:dagger|staff|dart|knife|sling, ac:any, sps:any, slv:4|3|12|MU, spl1:1|2|2|3|3|3|4|4|4|4|5|5, spl2:0|0|1|1|2|2|3|3|3|4|4|4, spl3:0|0|0|0|1|1|2|2|3|3|3|3, spl4:0|0|0|0|0|0|1|1|1|2|2|3],[w:Priest of Magic, sps:all|divination|protection|healing|elemental, spm:sun, slv:7|1|100|PR, spl1:1|2|2|3|3|3|3|3|3|3|3|3|3|3|4|4|4|4|4, spl2:0|0|1|1|2|2|3|3|3|3|3|3|3|3|3|4|4|4|4, spl3:0|0|0|0|0|1|1|2|2|3|3|3|3|3|3|3|4|4|4, spl4:0|0|0|0|0|0|0|0|1|1|2|2|3|3|3|3|3|4|4, spl5:0|0|0|0|0|0|0|0|0|0|0|1|1|2|2|3|3|3|4, spl6:0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|2|2|3, spl7:0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|2|2|2]</span><nowiki>{{desc=The Priest of Magic is an optional character class that can be used if your DM allows. It is a curious class in that it is a priest of the god of Magic, who then grants the priest the use of some limited Wizard spells as well as a slightly more restricted range of clerical spells.}}</nowiki></p>
+
<p style="display: inline-block; background-color: lightgrey; border: 1px solid black; padding: 4px; color: dimgrey; font-weight: extra-light;"><nowiki>&{template:RPGMclass}{{name=Priest of Magic}}{{subtitle=Priest Class}}{{Min Abilities=Wis:[[12]], Int:[[13]]}}{{Race=Human or Half Elf}}{{Hit Dice=1d8}}{{Reference=*House Rules v16*}}{{Section1=**Alignment**}}{{Deity=True Neutral}}{{Priests=Any Neutral}}{{Flock=Any Alignment}}{{  Section2=**Spells**}}{{Major Spheres=All, Divination, Protection, Healing, Elemental}}{{Minor Spheres=Sun}}<nowiki><span style="color:yellow">Specs=[Priest of Magic,PriestClass,0H,Priest]</span><nowiki>{{Powers=None}}</nowiki><span style="color:blue">ClassData=[w:Priest of Magic, hd:1d8, race:human|halfelf, align:ng|nn|n|ne, weaps:dagger|staff|dart|knife|sling, ac:any, sps:any, slv:4|3|12|MU, spl1:1|2|2|3|3|3|4|4|4|4|5|5, spl2:0|0|1|1|2|2|3|3|3|4|4|4, spl3:0|0|0|0|1|1|2|2|3|3|3|3, spl4:0|0|0|0|0|0|1|1|1|2|2|3],[w:Priest of Magic, sps:all|divination|protection|healing|elemental, spm:sun, slv:7|1|100|PR, spl1:1|2|2|3|3|3|3|3|3|3|3|3|3|3|4|4|4|4|4, spl2:0|0|1|1|2|2|3|3|3|3|3|3|3|3|3|4|4|4|4, spl3:0|0|0|0|0|1|1|2|2|3|3|3|3|3|3|3|4|4|4, spl4:0|0|0|0|0|0|0|0|1|1|2|2|3|3|3|3|3|4|4, spl5:0|0|0|0|0|0|0|0|0|0|0|1|1|2|2|3|3|3|4, spl6:0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|2|2|3, spl7:0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|2|2|2]</span><nowiki>{{desc=The Priest of Magic is an optional character class that can be used if your DM allows. It is a curious class in that it is a priest of the god of Magic, who then grants the priest the use of some limited Wizard spells as well as a slightly more restricted range of clerical spells.}}</nowiki></p>
 
<p>The <i>Priest of Magic</i> (a "House Rules" class for my group) can cast some Wizard spells at the expense of loosing some Priest spellcasting capability.  Its class definition has ClassData for both "MU" and "PR" spells, in two separate sections (enclosed in each comma-separated '[...]').</p>
 
<p>The <i>Priest of Magic</i> (a "House Rules" class for my group) can cast some Wizard spells at the expense of loosing some Priest spellcasting capability.  Its class definition has ClassData for both "MU" and "PR" spells, in two separate sections (enclosed in each comma-separated '[...]').</p>
 
<table>
 
<table>
<tr><th scope="row">slv:</th><td>&lt;#|#|#|(MU|PR)&gt;</td><td>three numbers followed by <i>either</i> MU <b>or</b> PR (no brackets), separated by vertical bars ('|').  The first number is the highest level of spell that can be cast, the second the first class level at which spells can be cast, and the third the maximum casting level, followed by the class of spells being specified (MU=Wizard, PR=Priest)</td></tr>
+
<tr><th scope="row">slv:</th><td>&lt;#|#|#|(MU/PR)&gt;</td><td>three numbers followed by <i>either</i> MU <b>or</b> PR (no brackets), separated by vertical bars ('|').  The first number is the highest level of spell that can be cast, the second the first class level at which spells can be cast, and the third the maximum casting level, followed by the class of spells being specified (MU=Wizard, PR=Priest)</td></tr>
<tr><th scope="row">spl#:</th><td>&lt;#|#|#|...&gt;</td><td>for spells of level spl#, starting at the class level at which spells can be cast, the numbers of spells that can be cast at that and subsequent levels</td></tr>
+
<tr><th scope="row">spl#:</th><td>&lt;#|#|#|...&gt;</td><td>for spells of level spl#, starting at the class level at which spells can be cast, the numbers of spells that can be cast at that and subsequent levels</td></tr>
 
</table>
 
</table>
 
 
===Classes with Specific Powers===
 
===Classes with Specific Powers===
 
<p>A character class can also be granted powers, and these can be specified in the class definition both as text for the Player to read, and also coded so the APIs can read them.</p>
 
<p>A character class can also be granted powers, and these can be specified in the class definition both as text for the Player to read, and also coded so the APIs can read them.</p>
<h4>Priest of Light</h4>
+
====Priest of Light====
<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=Priest of Light}}{{subtitle=Priest Class}}{{ =**Alignment**}}{{Deity=Neutral Good}}{{Priests=Any Good}}{{Flock=Any Neutral or Good}}{{Hit Dice=1d8}}</nowiki><span style="color:green">Specs=[Priest of Light,PriesthoodClass,0H,Priest]</span><nowiki>{{ =**Powers**}}{{1st Level=*Infravision, Turn Undead*}}{{3rd Level=*Laying on Hands*}}{{5th Level=*Charm/Fascination*}}{{9th Level=*Prophecy*}}{{ =**Spells**}}{{Major Spheres=All, Charm, Divination, Healing and Sun}}{{Minor Spheres=Animal, Creation, Necromantic and Plant}}</nowiki><span style="color:blue">ClassData=[w:Priest of Light, align:LG|NG|CG, hd:1d8, weaps:bow|crossbow|dagger|dirk|dart|javelin|knife|slings|spear, ac:leather|padded|hide|magicitem|ring|cloak, sps:all|charm|divination|healing|sun, spm:animal|creation|necromantic|plant, ns:5][cl:PW, w:Infravision, lv:1, pd:-1][cl:PW, w:Turn Undead, lv:1, pd:-1][cl:PW, w:Laying on Hands, lv:3, pd:1][cl:PW, w:Charm-Fascination, lv:5, pd:1][cl:PW, w:Prophecy, lv:9, pd:1]</span><nowiki>{{desc=</nowiki>The god of all forms of light: Sunlight, moonlight, firelight, etc. The god is a friend of life, a patron of magic, a proponent of logical thought, and an enemy of the undead.<br>
+
<p style="display: inline-block; background-color: lightgrey; border: 1px solid black; padding: 4px; color: dimgrey; font-weight: extra-light;"><nowiki>&{template:RPGMclass}{{name=Priest of Light}}{{subtitle=Priest Class}}{{Section1=**Alignment**}}{{Deity=Neutral Good}}{{Priests=Any Good}}{{Flock=Any Neutral or Good}}{{Hit Dice=1d8}}</nowiki><span style="color:yellow">Specs=[Priest of Light,PriesthoodClass,0H,Priest]</span><nowiki>{{ Section2=**Powers**}}{{1st Level=*Infravision, Turn Undead*}}{{3rd Level=*Laying on Hands*}}{{5th Level=*Charm/Fascination*}}{{9th Level=*Prophecy*}}{{Section2=**Spells**}}{{Major Spheres=All, Charm, Divination, Healing and Sun}}{{Minor Spheres=Animal, Creation, Necromantic and Plant}}</nowiki><span style="color:blue">ClassData=[w:Priest of Light, align:LG|NG|CG, hd:1d8, weaps:bow|crossbow|dagger|dirk|dart|javelin|knife|slings|spear, ac:leather|padded|hide|magicitem|ring|cloak, sps:all|charm|divination|healing|sun, spm:animal|creation|necromantic|plant, ns:5][cl:PW, w:Infravision, lv:1, pd:-1][cl:PW, w:Turn Undead, lv:1, pd:-1][cl:PW, w:Laying on Hands, lv:3, pd:1][cl:PW, w:Charm-Fascination, lv:5, pd:1][cl:PW, w:Prophecy, lv:9, pd:1]</span><nowiki>{{desc=</nowiki>The god of all forms of light: Sunlight, moonlight, firelight, etc. The god is a friend of life, a patron of magic, a proponent of logical thought, and an enemy of the undead.<br>The priesthood of the god is devoted to celebrating these aspects of the god and to promoting positive forces such as healing.<br>Lesser gods of this attribute would be gods of one aspect of light. One god might be the god of Reason, another the god of Inspiration, etc.<br>This deity is as likely to be male as female.<br>The priests of this god are on good terms with the priests of Arts, Crafts, Darkness/Night, Dawn, Elemental Forces, Fire, Healing, Hunting, Literature/Poetry, Magic, Metalwork, Moon, Music/Dance, Oracles/Prophecy, and Sun.<nowiki>}}{{Reference=*The Complete Priest's Handbook* Sample Priesthoods}}</nowiki></p>
The priesthood of the god is devoted to celebrating these aspects of the god and to promoting positive forces such as healing.<br>
+
Lesser gods of this attribute would be gods of one aspect of light. One god might be the god of Reason, another the god of Inspiration, etc.<br>
+
This deity is as likely to be male as female.<br>
+
The priests of this god are on good terms with the priests of Arts, Crafts, Darkness/Night, Dawn, Elemental Forces, Fire, Healing, Hunting, Literature/Poetry, Magic, Metalwork, Moon, Music/Dance, Oracles/Prophecy, and Sun.}}{{Reference=*The Complete Priest\'s Handbook* Sample Priesthoods<nowiki>}}</nowiki></p>
+
 
<p>The ClassData specification now has a tag of <b>ns:</b> which specifies a following number of sections enclosed in square brackets ('[...]'), each of which defines a single power granted to characters of this class.  These sections include the following fields:</p>
 
<p>The ClassData specification now has a tag of <b>ns:</b> which specifies a following number of sections enclosed in square brackets ('[...]'), each of which defines a single power granted to characters of this class.  These sections include the following fields:</p>
 
<table>
 
<table>
<tr><th scope="row">cl:</th><td>&lt;PW&gt;</td><td>specifies the type of granted capability - for Class definitions, this is always PW (standing for Power)</td></tr>
+
<tr><th scope="row">cl:</th><td>&lt;PW&gt;</td><td>specifies the type of granted capability - for Class definitions, this is always PW (standing for Power)</td></tr>
<tr><th scope="row">w:</th><td>&lt;text&gt;</td><td>the name of the power granted (which should match a definition in the Powers database Powers-DB)</td></tr>
+
<tr><th scope="row">w:</th><td>&lt;text&gt;</td><td>the name of the power granted (which should match a definition in the Powers database Powers-DB)</td></tr>
<tr><th scope="row">lv:</th><td>&lt;#&gt;</td><td>the character level at which they will gain this power</td></tr>
+
<tr><th scope="row">lv:</th><td>&lt;#&gt;</td><td>the character level at which they will gain this power</td></tr>
<tr><th scope="row">pd:</th><td style="width: 100px">&lt;-1 / # / #L#&gt;</td><td>the number of times per day the power can be used. A number, or -1 (meaning <i>"at will"</i>, or #L# which is first number per second number levels per day (e.g. 1L4 means once per day for L1 to L4, twice L5 to L8, etc)</td></tr>
+
<tr><th scope="row">pd:</th><td style="width:100px">&lt; -1 / # / #L# &gt;</td><td>the number of times per day the power can be used. A number, or -1 (meaning <i>"at will"</i>), or #L# which is first number per second number levels per day (e.g. 1L4 means once per day for L1 to L4, twice L5 to L8, etc)</td></tr>
 
</table>
 
</table>
 
<p>This allows the DM to use a single button to add all the specified powers to the Powers list of a specific character sheet using the [Token-Setup] macro or the <b>!cmd --abilities</b> command, and then using the [Add to Spellbook] / [Powers] dialogue.  The Player will then only be able to memorise the appropriate powers for the character's level.</p>
 
<p>This allows the DM to use a single button to add all the specified powers to the Powers list of a specific character sheet using the [Token-Setup] macro or the <b>!cmd --abilities</b> command, and then using the [Add to Spellbook] / [Powers] dialogue.  The Player will then only be able to memorise the appropriate powers for the character's level.</p>
 +
==Race & Creature Databases==
 +
<p>Exactly as with Character Classes, the DM can also add Race databases as character sheets that have names that start with Race-DB. The Race definitions that come with the installed game-version-specific <b>[[Script:RPGMaster Library|RPGMaster Library]]</b> can be extracted to a character sheet and viewed by using the <i><b>!magic --extract-db Race-DB</b> or <b>!attk --extract-db Race-DB</b></i> commands, and Creature definitions can be extracted by replacing "Race-DB" with "Race-DB-Creatures". <b>Note:</b> it is best to delete the extracted database character sheet after viewing/using, so that the system uses the much faster internal database version. After deleting or changing any character sheet database, always run the <i><b>!magic --check-db</b> or <b>!attk --check-db</b></i> command to re-index the databases.</p>
 +
<p><b>Races:</b> Race-DB-<i>[added name]</i><br><b>Creatures:</b>  Race-DB-Creatures-<i>[added name]</i></p>
 +
<p>Those with version numbers of the form v#.# as part of the name will be ignored.</p>
 +
<p>As previously stated, each database definition has 3 parts in the database (see Section 1), the same as for the Class Database explanation above. <b>Note:</b> The DM creating new classes does not need to worry about anything other than the Ability Macro in the database, as running the command <b><i>--check-db</i></b> will update all other aspects of the database appropriately.</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>
 +
===Standard / Simple Race Definitions===
 +
<p>The database definition for a simple, standard Race might look something like this:</p>
 +
====Human====
 +
<p style="display: inline-block; background-color: lightgrey; border: 1px solid black; padding: 4px; color: dimgrey; font-weight: extra-light;"><nowiki>&{template:RPGMdefault}{{name=Human}}{{subtitle=Race}}</nowiki><span style="color:yellow">Specs=[Human,HumanoidRace,0H,Humanoid]</span><nowiki>{{Alignment=Any}}{{Languages=Often *common*}}{{Height=Males [60+2d10](!&#13;&#47;r 60+2d10 ins height)ins, Females [58+2d10](!&#13;&#47;r 58+2d10 ins height)ins}}{{Weight=Males [140+6d10](!&#13;&#47;r 140+6d10 lbs weight)lbs, Females [100+6d10](!&#13;&#47;r 100+6d10 lbs weight)lbs}}{{Life Expectancy=95 years}}{{Section=**Attributes**}}{{Minimum=None}}{{Maximum=None}}{{Adjustment=None}}{{Section1=**Powers**}}{{Section2=None}}{{Section3=**Special Advantages**}}{{Section4=None}}{{Section5=**Special Disadvantages**}}{{Section6=None}}</nowiki><span style="color:blue">RaceData=[w:Human, align:any, weaps:any, ac:any]</span><nowiki>{{desc=</nowiki>Although humans are treated as a single race in the AD&D game, they come in all the varieties we know on Earth. A human PC can have whatever racial characteristics the DM allows.<br>Humans have only one special ability: They can be of any character class and rise to any level in any class. Other PC races have limited choices in these areas.<br>Humans are also more social and tolerant than most other races, accepting the company of elves, dwarves, and the like with noticeably less complaint.<br>Because of these abilities and tendencies, humans have become significant powers within the world and often rule empires that other races (because of their racial tendencies) would find difficult to manage.}}</nowiki></p>
 +
<p>As with Class definitions, and any other RPGMaster database entry, a Roll Template is used for formatting and the text in the template can be whatever you desire to display. The important elements for the RPGMaster APIs are highlighted and, as elsewhere, they are <i>between</i> the elements of the Roll Template to hide them when displayed, case is ignored and spaces, hyphens and underscores can be used but are ignored.  Each element is described below:</p>
 +
<pre>Specs=[Human,HumanoidRace,0H,Humanoid]</pre>
 +
<p>The Specs section for a race describes the Sub-Race and base Race for the entry, and that this is a race definition. The fields must be in this order, identical for all database items.</p>
 +
<table>
 +
<tr><th scope="row">Sub-Race</th><td>the Sub-Race or Race name, often the same as the ability macro name.</td></tr>
 +
<tr><th scope="row">Macro Type</th><td>the type of the data in this Ability Macro, one of <i>HumanoidRace, HumanoidCreature,</i> or <i>CreatureRace</i>.</td></tr>
 +
<tr><th scope="row">Handedness</th><td>#H, where # is the number of hands needed to be a character of this race (not currently used).</td></tr>
 +
<tr><th scope="row">Base Race</th><td>the base race that this sub-race belongs to, and can be any other race in the database. For PCs generally one of <i>Dwarf, Elf, Half-Elf, Halfling, Half-Orc, Human,</i> or <i>Gnome</i>.</td></tr>
 +
</table>
 +
<p>The Sub-Race will "inherit" any data definitions and powers defined for the Base Race unless they are specifically overwritten or excluded by the Sub-Race definition. This reduces inconsistencies and the work of entering multiple duplications.</p>
 +
<pre>RaceData=[w:Human, align:any, weaps:any, ac:any]</pre>
 +
<p>All the same data fields (that are relevant) are available as for a Class definition. Where both the Class and Race of a character have specified restrictions or allowances, both the Class and the Race must allow an item / spell to be used. Whereas two Classes combine permissions as Class A <i>OR</i> Class B, Class and Race are Class <i>AND</i> Race. So a Warrior class can use a Greatsword, but a Warrior Gnome may not be able to use it as it would hit the ground as they wielded it!</p>
 +
===Save and To-Hit Modifiers===
 +
<p>There are a number of additional data fields relevant to Races:</p>
 +
====Halfling====
 +
<p style="display: inline-block; background-color: lightgrey; border: 1px solid black; padding: 4px; color: dimgrey; font-weight: extra-light;"><nowiki>&{template:RPGMdefault}{{name=Halfling}}{{subtitle=Race}}{{Alignment=Any (Usually NG)}}</nowiki><span style="color:yellow">Specs=[Halfling,HumanoidRace,0H,Humanoid]</span><nowiki>{{Languages=Often *common, halfling, dwarf, elf, gnome, goblin,* and *orc*}}{{Height=Males [32+2d8](!&#13;&#47;r 32+2d8 ins height)ins, Females [30+2d8](!&#13;&#47;r 30+2d8 ins height)ins}}{{Weight=Males [52+5d4](!&#13;&#47;r 52+5d4 lbs weight)lbs, Females [48+5d4](!&#13;&#47;r 48+5d4 lbs weight)lbs}}{{Life Expectancy=100 to 150 years}}{{Section=Attributes}}{{Minimum=Str:7, Con:7, Dex:10, Int:6}}{{Maximum=Wis:17}}{{Adjustment=Dex:+1, Str:-1}}{{Section1=Powers}}{{Expert Miners=Stouts can detect slopes, and approximate direction underground}}{{Section2=Special Advantages}}{{Infravision=Any halfling character has a 15% chance to have normal infravision (this means he is pure Stout), out to 60ft; failing that chance, there is a 25% chance that he has limited infravision (mixed Stout/Tallfellow or Stout/Hairfeets lineage), effective out to 30 feet.}}{{Magic Resistance=Magic-resistant, giving a bonus to saving throws against magical wands, staves, rods, and spells of +1 for every 3.5 points of Constitution score.}}{{Poison Resistance=Save vs. poison at +1 for every 3.5 points of Constitution score.}}{{Attack bonus=+1 To Hit with slings and thrown weapons}}{{Surprise=Enemies get a –4 penalty to surprise if the halfling is: 1) moving alone, 2) is 90 feet away from the rest of their party, or 3) is with other elves or halflings and all are in nonmetal armor. If the halfling must open a door or screen to get to the enemy, the penalty is reduced to –2.}}</nowiki><span style="color:blue">RaceData=[w:Halfling, align:any, weaps:any, ac:any, attr:str=7|con=7|dex=10|int=6|wis=1:17, thmod:throwing=1|dart=1|hand-axe=1|magical-stone=1|slings=1, svatt:con, svpoi:3.5 svrod:3.5, svsta:3.5, svwan:3.5, svspe:3.5, ns:2]</span><nowiki>,[cl:PW,w:Detect Slope,lv:0,sp:0,pd:-1],[cl:PW,w:Determine Direction Underground,lv:0,sp:0,pd:-1]{{desc=</nowiki>Halflings are short, generally plump people, very much like small humans. Their faces are round and broad and often quite florid. Their hair is typically curly and the tops of their feet are covered with coarse hair. They prefer not to wear shoes whenever possible. Halflings see wealth only as a means of gaining creature comforts, which they love. Though they are not overly brave or ambitious, they are generally honest and hard working when there is need.<br>Elves generally like them in a patronizing sort of way. Dwarves cheerfully tolerate them, thinking halflings somewhat soft and harmless. Gnomes, although they drink more and eat less, like halflings best, feeling them kindred spirits. Because halflings are more open and outgoing than any of these other three, they get along with other races far better.<br>There are three types of halflings: Hairfeets, Tallfellows, and Stouts. Hairfeets are the most common type, but for player characters, any of the three is acceptable.<nowiki>}}</nowiki></p>
 +
<table>
 +
<tr><th scope="row">attr:</th><td>#[:#]</td><td>minimum and maximum starting attribute values (default is 3:18)</td></tr>
 +
<tr><th scope="row">svXXX[+]:</th><td>[+ - =] #</td><td>saving throw modifiers</td></tr>
 +
<tr><th scope="row">thmod:</th><td>weapon=[+-]# | weapon=[+-]# | ...</td><td>a list of weapon type (or super-type) to-hit modifiers separated by vertical bars ('|')</td></tr>
 +
</table>
 +
<p>The saving throw modifiers are cumulative with those relevant to a Class and/or to worn/held magic items. The XXX can be one of <i>att, par, poi, dea, rod, sta, wan, pet, pol, bre, spe</i> or <i>all</i>, optionally followed by a "+" (see next paragraph), followed by a colon, then <i>a plus (+), a minus (-), an equals (=),</i> and a number, or just a number with nothing before it.  Each of the three-letter qualifiers refers to the relevant save, except "all" which applies the modifier to all saves, and "att" which specifies an attribute by whose value any save may vary.  Preceding the modifier amount by plus (+) or nothing <i><b>improves</b></i> the save by the modifier, preceding by minus (-) <i><b>worsens</b></i> the save by the modifier, and by equals (=) overrides any other modifier being applied and applies <i>only</i> the modifier preceded by the equals.</p>
 +
<p>If the XXX is followed by a "+" (e.g. like svpoi+:3), the save modifier will be a straight addition to (or subtraction from) the saving throw. Otherwise, the value of the attribute defined by the "svatt:" (which can be <i>str, con, dex, int, wis,</i> or <i>chr</i>, defaulting to <i>con</i>) is divided by the modifier provided and rounded down: e.g. if svatt:con and svpoi:3.5, a Constitution of 12 will result in a poison save bonus of 3.</p>
 +
<p>To-Hit modifiers are supplied as a list separated by vertical bars. Each entry is a weapon type or weapon super-type, followed by "=", followed by a number preceded by an optional "+" or "-". A plus (+) improves the chance of hitting, and a minus (-) is a penalty. Any weapon of the specified type or super-type will get the modifier.</p>
 +
===Race Powers===
 +
<p>As with classes, races can have specific powers. If a Sub-Race has a Base Race defined, the powers for both will be used - if you don't want any powers from a Base Race, do not specify one.</p>
 +
====Dwarf====
 +
<p style="display: inline-block; background-color: lightgrey; border: 1px solid black; padding: 4px; color: dimgrey; font-weight: extra-light;"><nowiki>&{template:RPGMdefault}{{name=Dwarf}}{{subtitle=Race}}</nowiki><span style="color:yellow">Specs=[Dwarf,HumanoidRace,0H,Humanoid]</span><nowiki>{{Alignment=Any (Usually LG)}}{{Height=4 to 4.5 ft}}{{Weight=150lbs}}{{Life Expectancy=350 years}}{{Languages=Often *Dwarf, Common, Orc, Kobold, Goblin, Gnome*}}{{Section=**Attributes**}}{{Min Attributes=Str:8, Con:11}}{{Max Attributes=Dex:17, Chr:17}}{{Attribute Adj.=Con:+1, Chr:-1}}{{Section1=**Powers**}}{{Infravision=Infravision to 60ft}}{{Expert Miners=Detect slopes, new tunnel construction, shifting walls, and stonework traps, and determine approximate depth underground}}{{Section2=**Special Advantages**}}{{Small size=Ogres, trolls, ogre magi, giants, and titans suffer a -4 penalty to attack Dwarves.}}{{Magic Resistance=Dwarves are nonmagical, which gives a bonus to dwarves' saving throws against magical wands, staves, rods, and spells, of +1 for every 3.5 points of Constitution score.}}{{Sense Curses=Can sense a cursed item, but only if the device fails to function}}{{Section3=**Special Disadvantages**}}{{Item Failure=Magical items not specifically suited to the character's class have a 20% chance to malfunction when used.}}</nowiki><span style="color:blue">RaceData=[w:Dwarf, align:any, weaps:any, ac:any, attr:str=8|con=11|dex=1:17|chr=1:17, +:1|orc|half-orc|goblin|hobgoblin, -:4|ogre|troll|ogre-magi|oni|giant|titan, svatt:con,svpoi:3.5,svrod:3.5,svsta:3.5,svwan:3.5,svspe:3.5, ns:5],[cl:PW,w:Detect Slope,lv:0,sp:0,pd:-1],[cl:PW,w:Detect New Construction,lv:0,sp:0,pd:-1],[cl:PW,w:Detect Shifting Walls,lv:0,sp:0,pd:-1],[cl:PW,w:Detect Stonework Traps,lv:0,sp:0,pd:-1],[cl:PW,w:Determine Depth Underground,lv:0,sp:0,pd:-1]</span><nowiki>{{desc=</nowiki>Dwarves are short, stocky fellows, easily identified by their size and shape. They have ruddy cheeks, dark eyes, and dark hair. Dwarves tend to be dour and taciturn. They are given to hard work and care little for most humor. They are strong and brave. They enjoy beer, ale, mead, and even stronger drink. Their chief love, however, is precious metal, particularly gold. They prize gems, of course, especially diamonds and opaque gems (except pearls, which they do not like). Dwarves like the earth and dislike the sea. Not overly fond of elves, they have a fierce hatred of orcs and goblins. Their short, stocky builds make them ill-suited for riding horses or other large mounts (although ponies present no difficulty), so they tend to be a trifle dubious and wary of these creatures. They are ill-disposed toward magic and have little talent for it, but revel in fighting, warcraft, and scientific arts such as engineering.<br>Though dwarves are suspicious and avaricious, their courage and tenacity more than compensate for these shortcomings.<br>Dwarves typically dwell in hilly or mountainous regions. They prefer life in the comforting gloom and solidness that is found underground.<nowiki>}}</nowiki></p>
 +
<p>As master miners, Dwarves have a number of powers that they can call on when underground, to assess their situation.  These use the same syntax for specification as for Classes with powers.</p>
 +
<p>Dwarves also have to-hit and AC bonuses when facing various types of creature. These are specified in the race data as follows:</p>
 +
<table>
 +
<tr><th scope="row">+:</th><td> [+-] # | race/creature | race/creature | ...</td><td>a modifier to hit of # when attacking any listed creature (not currently implemented)</td></tr>
 +
<tr><th scope="row">-:</th><td> [+-] # | race/creature | race/creature | ...</td><td>a modifier to AC of # when being attacked by any listed creature (not currently implemented)</td></tr>
 +
</table>
 +
<p>A positive modifier is always a benefit, and a negative one is a penalty. These are not currently implemented as the APIs cannot know what race the opponent is, unless a targeted attack is used (see <b>[[Script:AttackMaster|AttackMaster API]]</b> help handout for information on attacks) and targeted attacks are a DM and Player option which is not mandatory.</p>
 +
===Creatures===
 +
<p>The same specification approach can be used to define creatures other than humanoids, and humanoids other than PCs and NPCs. A number of such definitions are provided in the <i>Race-DB-Creatures</i> database, which can be extracted to a Character Sheet DB using the <b>!magic --extract-db Race-DB-Creatures</b> command. All the same data fields are available as for Race definitions, with some extras.</p>
 +
====Vampire====
 +
<p style="display: inline-block; background-color: lightgrey; border: 1px solid black; padding: 4px; color: dimgrey; font-weight: extra-light;"><nowiki>&{template:RPGMdefault}{{name=Vampire}}{{subtitle=Creature}}{{Alignment=Usually Chaotic Evil}}</nowiki><span style="color:green">Specs=[Vampire,HumanoidCreature,0H,Creature]</span><nowiki>{{Languages=Whatever they knew before they were a vampire, or what their vampire parents taught them.}}{{Height=As per pre-vampire race (usually [65+2d6](!&#13;&#47;r 65+2d6 ins height)ins,}}{{Weight=Their weight before becoming a vampire or [140+6d10](!&#13;&#47;r 140+6d10 lbs weight)lbs}}{{Life(?) Expectancy=Immortal}}{{Section=**Attributes**}}{{Minimum=Str:18(76), Int:15}}{{Maximum=Int:16}}{{Adjustment=None}}{{Section1=**Powers**}}{{Energy Drain=Drains 2 levels from anyone they successfully touch}}{{Charm=Any person who allows the vampire to look into their eyes will be affected as if by a *charm person* spell. Due to the power of this enchantment, a -2 is applied to the victim's saving throw vs. spell}}{{Summon Creatures=Can summon swarms of creatures to their aid}}{{Spell-like powers=*Gaseous Form* and *Spider Climb* at will}}{{Section2=**Special Advantages**}}{{Infravision=60 feet}}{{Shape Change=Can *Shape Change* into a large bat at will}}{{Plus Weapons To Hit=Attackers must use weapons of at least +1 to be able to hit a vampire}}{{Immunities=Immune to *Sleep, Charm,* and *Hold* spells, Paralysis and Poison. Spells based on cold or electricity cause only half damage}}{{Section3=**Special Disadvantages**}}{{Repellants=Odor of Strong Garlic; Mirror or Holy Symbol presented with conviction}}{{Holy Water or Symbol=Burns a vampire for 2-7 (1d6+1) damage with a successful hit}}{{Others=See Monsterous Compendium for other disadvantages}}</nowiki><span style="color:blue">RaceData=[w:Vampire, cattr:int=15:16|ac=1|mov=12|fly=18C|hd=8d8+3|thac0=11|attk1=hand:4+1d6:0:B,spattk:Energy drain,spdef:+1 weapon to hit; immune to *sleep, charm & hold*, ns:5],[cl:PW,w:Charm Person,sp:1,lv:0,pd:-1],[cl:PW,w:Summon Swarm,sp:2,lv:0,pd:-1],[cl:PW,w:Gaseous Form,sp:0,lv:0,pd:-1],[cl:PW,w:MU-Shape-Change,sp:9,lv:0,pd:-1],[cl:PW,w:Spider Climb,sp:1,lv:0,pd:-1]</span><nowiki>{{desc=</nowiki>Of all the chaotic evil undead creatures that stalk the world, none is more dreadful than the vampire. Moving silently through the night, vampires prey upon the living without mercy or compassion. Unless deep underground, they must return to the coffins in which they pass the daylight hours, and even in the former case they must occasionally return to such to rest, for their power is renewed by contact with soil from their graves.<br>One aspect that makes the vampire far more fearful than many of its undead kindred is its appearance. Unlike other undead creatures, the vampire can easily pass among normal men without drawing attention to itself for, although its facial features are sharp and feral, they do not seem inhuman. In many cases, a vampire's true nature is revealed only when it attacks. There are ways in which a vampire may be detected by the careful observer, however. Vampires cast no reflection in a glass, cast no shadows, and move in complete silence.<nowiki>}}</nowiki></p>
 +
<p>Creatures have additional data fields that set up all the important fields for the APIs on the AD&D2e Character Sheet (only when the creature is specified using the Class/Race menu on the "token-setup" menu - just typing the creature type into the Race field on the Character Sheet will not do this).</p>
 +
<table>
 +
<tr><th scope="row">spattk:</th><td>text</td><td>special attacks text to be displayed when the Specials Action Button is used</td></tr>
 +
<tr><th scope="row">spdef:</th><td>text</td><td>special defenses text to be displayed when the Specials Action Button is used</td></tr>
 +
<tr><th scope="row">cattr:</th><td>attr=value | attr=value | ...</td><td>a list of attribute/value pairs, where <i>attr</i> is one of:</td></tr>
 +
<tr><th scope="row">ac</th><td>#[:#]</td><td>creature armour class</td></tr>
 +
<tr><th scope="row">mov</th><td>#</td><td>creature movement on the ground</td></tr>
 +
<tr><th scope="row">fly</th><td>text</td><td>creature movement in the air</td></tr>
 +
<tr><th scope="row">sw</th><td>text</td><td>creature movement when swimming</td></tr>
 +
<tr><th scope="row">hd</th><td>#[d#][+/-#][r#]</td><td>creature hit dice roll spec</td></tr>
 +
<tr><th scope="row">hp</th><td>#[:#]</td><td>creature hit points</td></tr>
 +
<tr><th scope="row">regen</th><td>#</td><td>creature regeneration HP/round</td></tr>
 +
<tr><th scope="row">thac0</th><td>#</td><td>creature Thac0</td></tr>
 +
<tr><th scope="row">tohit</th><td>[+/-]#</td><td>creature to-hit modifier</td></tr>
 +
<tr><th scope="row">dmg</th><td>[+/-]#</td><td>creature damage modifier</td></tr>
 +
<tr><th scope="row">crith</th><td>#</td><td>creature critical hit roll</td></tr>
 +
<tr><th scope="row">critm</th><td>#</td><td>creature critical miss roll</td></tr>
 +
<tr><th scope="row">attk1</th><td>text,roll,speed,type</td><td>specification for creature innate attack 1</td></tr>
 +
<tr><th scope="row">attk2</th><td>text,roll,speed,type</td><td>specification for creature innate attack 2</td></tr>
 +
<tr><th scope="row">attk3</th><td>text,roll,speed,type</td><td>specification for creature innate attack 3</td></tr>
 +
<tr><th scope="row">attkmsg</th><td>text[$$text][$$text]</td><td>message(s) for attacks</td></tr>
 +
<tr><th scope="row">speed</th><td>#</td><td>creature overall attack speed</td></tr>
 +
<tr><th scope="row">cl</th><td>[F/MU/PR/RO/PS]:Class name</td><td>Give creature a NPC class</td></tr>
 +
<tr><th scope="row">lv</th><td>#</td><td>Give crature a NPC level</td></tr>
 +
</table>
 +
<p>When a creature (or race) with these data fields is selected in the Race/Class menu, the <b>[[Script:CommandMaster|CommandMaster API]]</b> automatically sets all of the respective Character Sheet attributes to the specified values. In fact, all of these data fields can be used with a standard race, but are less useful.</p>
 +
===Specifying Creature Weapons & Armour===
 +
<p>Many creatures have attacks using their claws, bites and other "innate" attacks, and have tough natural armoured skin. However, many humanoid creatures can use normal weapons & armour to attack adventurers and defiend themselves. It is possible to specify the possible weapon combinations and available armour for each creature type, and add a randomness to the selection criteria, as this example shows:</p>
  
 +
<p>The additional RaceData datasets highlighted have the following fields:</p>
 +
<table>
 +
+'<tr><th scope="row">cl</th><td>WP / AC</td><td>Type of data in the dataset. WP = weapon, AC = armour</td></tr>
 +
+'<tr><th scope="row">%</th><td>#</td><td>Chance of dataset being used relative to others of same type (does not have to add up to 100)</td></tr>
 +
+'<tr><th scope="row">prime</th><td>weapon : qty</td><td>Name & quantity of weapon to take in Primary hand. Only 1 is taken in-hand, rest of qty held in items</td></tr>
 +
+'<tr><th scope="row">offhand</th><td>weapon : qty</td><td>Name & quantity of weapon to take in Off-hand hand. Only 1 is taken in-hand, rest of qty held in items</td></tr>
 +
+'<tr><th scope="row">both</th><td>weapon : qty</td><td>Name & quantity of two-handed weapon to take in both hands. Only 1 is taken in-hand, rest of qty held in items</td></tr>
 +
+'<tr><th scope="row">items</th><td>weap/armour:qty | weap/armour:qty | ...</td><td>Name & quantity of weapons or armours to store as items of equipment. Armour will automatically contribute to creature armour class</td></tr>
 +
</table>
 
==Specs & Data field values==
 
==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 Class and Race database Ability macro sections.</p>
 
===Specs sections===
 
===Specs sections===
<pre>Specs=[Class Type, Macro Class, Handedness, Class Group-Type]</pre>
+
<pre>Specs=[Class Type, Macro Type, Handedness, Class Group-Type]</pre>
<p>The <i>Specs</i> section is identical in structure to those in other databases. There are no default settings for any of the Specs data fields.  All must be explicitly specified, and must appear in this order.</p>
+
<pre>Specs=[Sub-Race, Macro Type, Handedness, Base-Race]</pre>
<h4>Class Types</h4>
+
<p>There are no default settings for any of the Specs data fields.  All must be explicitly specified.</p>
 +
====Class & Race Types====
 
<p>There is an infinite list of class types: generally the type is the class name.</p>
 
<p>There is an infinite list of class types: generally the type is the class name.</p>
<h4>Macro Class</h4>
+
<p>There is an infinite list of race and creature types: generally the type is the sub-race or creature name.</p>
One of "WarriorClass", "WizardClass", "PriestClass", "RogueClass", "PsionClass", relating to the base class of the character.  This field is used to add the Class name to the right base class list for selection by the Players.
+
====Macro Type====
<h4>Class Handedness</h4>
+
<p>Classes: One of "WarriorClass", "WizardClass", "PriestClass", "RogueClass", "PsionClass", relating to the base class of the character.  This field is used to add the Class name to the right base class list for selection by the Players.</p>
<p><b>0H</b> A Class that can only be taken by characters and creatures that do not have hands (e.g. a fish-type creature)<br>
+
<p>Races: One of "HumanoidRace", "HumanoidCreature", "CreatureRace", relating to the base race of the character.  This field is used to add the Race name to the right race or creature list for selection.</p>
<b>1H</b> A Class that can only be taken by characters or creatures with only one hand (e.g. a snake NPC that can use its prehensile tail to hold weapons)<br>
+
====Handedness====
<b>2H</b> A Class that has two hands - the normal for humanoid PCs and NPCs<br>
+
<p><b>0H</b> A Race, Creature or Class that can only be taken by characters and creatures that do not have hands (e.g. a fish-type creature)<br>
<b>3H</b> A Class that can only be taken by characters or creatures with three or more hands<br>
+
<b>1H</b> A Race, Creature or Class that can only be taken by characters or creatures with only one hand (e.g. a snake NPC that can use its prehensile tail to hold weapons)<br>
 +
<b>2H</b> A Race, Creature or Class that has two hands - the normal for humanoid PCs and NPCs<br>
 +
<b>3H</b> A Race, Creature or Class that can only be taken by characters or creatures with three or more hands<br>
 
<b>4H</b> Etc  <br>
 
<b>4H</b> Etc  <br>
 
<b>...</b> ...</p>
 
<b>...</b> ...</p>
<p><i>(Handedness for Classes are not currently restricted or used by the system.  In future, the number of hands specified on the "Change Weapon" dialogue may be related to the Character Class)</i></p>
+
<p><i>(Handedness for Race and Classes are not currently restricted or used by the system.  In future, the number of hands specified on the "Change Weapon" dialogue may be related to the Character Race & Class)</i></p>
<h4>Base Classes</h4>
+
====Base Classes====
 
<p>The Base Class can currently be one of "Warrior", "Wizard", "Priest", "Rogue" or "Psion". If a character class is allowed to be of more than one base class, separate each with a vertical bar character '|'.  This determines the valid Character Sheet fields that this Class Type can appear in.</p>
 
<p>The Base Class can currently be one of "Warrior", "Wizard", "Priest", "Rogue" or "Psion". If a character class is allowed to be of more than one base class, separate each with a vertical bar character '|'.  This determines the valid Character Sheet fields that this Class Type can appear in.</p>
 +
<p>The Base Race or Creature Type can be for any other Race or Creature definition. Multiples are not allowed (no vertical bars '|'), and the Sub-Race / Creature will inherit the specifications and powers of the Base Race / Creature.</p>
 
<br>
 
<br>
 
+
====Data Sections====
===Data Sections===
+
<p>Below are the definitions for each of the possible ClassData and RaceData fields.</p>
<p>Below are the definitions for each of the possible ClassData fields.</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>
 
<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>
 
<table>
 +
<thead>
 
<tr>
 
<tr>
 
<th scope="col">Field</th>
 
<th scope="col">Field</th>
Line 151: Line 232:
 
<th scope="col">Description</th>
 
<th scope="col">Description</th>
 
</tr>
 
</tr>
<tr><th scope="row">w:</th><td>< text ></td><td>'Fighter'</td><td>Name of the Class</td></tr>
+
</thead>
<tr><th scope="row">hd:</th><td>Dice Roll spec</td><td>0</td><td>Hit dice roll per level</td></tr>
+
<tr><th scope="row">w:</th><td>< text ></td><td>'Fighter'</td><td>Name of the Class</td></tr>
<tr><th scope="row">align:</th><td>[ lg / ng / cg / ln / nn / n / cn / le / ne / ce / any ]</td><td>any</td><td>Allowed alignments</td></tr>
+
<tr><th scope="row">hd:</th><td>Dice Roll spec</td><td>0</td><td>Hit dice roll per level</td></tr>
<tr><th scope="row">race:</th><td>< text | text | ... > or any</td><td>any</td><td>Allowed races</td></tr>
+
<tr><th scope="row">align:</th><td>[ lg / ng / cg / ln / nn / n / cn / le / ne / ce / any ]</td><td>any</td><td>Allowed alignments</td></tr>
<tr><th scope="row">weaps:</th><td>< text | text | ... > or any</td><td>any</td><td>Allowed weapons and weapon types</td></tr>
+
<tr><th scope="row">race:</th><td>< text | text | ... > or any</td><td>any</td><td>Allowed races</td></tr>
<tr><th scope="row">ac:</th><td>< text | text | ... > or any</td><td>any</td><td>Allowed armour types</td></tr>
+
<tr><th scope="row">weaps:</th><td>< text | text | ... > or any</td><td>any</td><td>Allowed weapons and weapon types</td></tr>
<tr><th scope="row">attkl:</th><td>< 0 | # | # | ... ></td><td>' '</td><td>Class level progression for "attacks per round" modifiers</td></tr>
+
<tr><th scope="row">npp:</th><td>[-]#</td><td>''</td><td>The weapon non-proficiency penalty for the class</td></tr>
<tr><th scope="row">attkm:</th><td>< # | # | # | ... ></td><td>' '</td><td>Melee weapon "attacks per round" modifiers by class level progression</td></tr>
+
<tr><th scope="row">twp:</th><td>[-]#.#</td><td>2.4</td><td>The two weapon penalty (primary.secondary) for the class</td></tr>
<tr><th scope="row">attkr:</th><td>< # | # | # | ... ></td><td>' '</td><td>Ranged weapon "attacks per round" modifiers by class level progression</td></tr>
+
<tr><th scope="row">ac:</th><td>< text | text | ... > or any</td><td>any</td><td>Allowed armour types</td></tr>
<tr><th scope="row">ns:</th><td>#</td><td>0</td><td>Number of granted spells/powers defined for item</td></tr>
+
<tr><th scope="row">attkl:</th><td>< 0 | # | # | ... ></td><td>''</td><td>Class level progression for "attacks per round" modifiers</td></tr>
<tr><th scope="row">cl:</th><td>< MU / PR / PW ></td><td>' '</td><td>Type of granted spell/power (always PW=Power)</td></tr>
+
<tr><th scope="row">attkm:</th><td>< # | # | # | ... ></td><td>''</td><td>Melee weapon "attacks per round" modifiers by class level progression</td></tr>
<tr><th scope="row">w:</th><td>< text ></td><td>'-'</td><td>Name of granted spell/power</td></tr>
+
<tr><th scope="row">attkr:</th><td>< # | # | # | ... ></td><td>''</td><td>Ranged weapon "attacks per round" modifiers by class level progression</td></tr>
<tr><th scope="row">lv:</th><td>#</td><td>1</td><td>The character level at which the Power is granted</td></tr>
+
<tr><th scope="row">sps:</th><td>< text | text | ... > or any</td><td>any</td><td>Allowed spell schools or major spheres</td></tr>
<tr><th scope="row">pd:</th><td>[ -1 / # / #L# ]</td><td>1</td><td>No. of times per day power can be used. -1 is <i>"at will"</i>, and #L# is first number per second number levels per day </td></tr>
+
<tr><th scope="row">spm:</th><td>< text | text | ... ></td><td>''</td><td>Allowed minor spheres</td></tr>
<tr><th scope="row">sps:</th><td>< text | text | ... > or any</td><td>any</td><td>Allowed spell schools or major spheres</td></tr>
+
<tr><th scope="row">spb:</th><td>< text | text | ... ></td><td>''</td><td>Banned spell schools</td></tr>
<tr><th scope="row">spm:</th><td>< text | text | ... ></td><td>' '</td><td>Allowed minor spheres</td></tr>
+
<tr><th scope="row">slv:</th><td>< # | # | # | &lt;MU / PR&gt; ></td><td>''</td><td>Non-standard spellcaster level/type specification</td></tr>
<tr><th scope="row">spb:</th><td>< text | text | ... ></td><td>' '</td><td>Banned spell schools</td></tr>
+
<tr><th scope="row">spl#</th><td>< # | # | # | ... ></td><td>''</td><td>No. of spells of level spl# at each character level</td></tr>
<tr><th scope="row">slv:</th><td>< # | # | # | &lt;MU / PR&gt; ></td><td>' '</td><td>Non-standard spellcaster level/type specification</td></tr>
+
<tr><th scope="row">attr:</th><td>#[:#]</td><td>3:18</td><td>minimum and maximum starting attribute values</td></tr>
<tr><th scope="row">spl#</th><td>< # | # | # | ... ></td><td>' '</td><td>No. of spells of level spl# at each character level</td></tr>
+
<tr><th scope="row">svXXX[+]:</th><td>[+ - =] #</td><td>0</td><td>saving throw modifiers</td></tr>
 +
<tr><th scope="row">thmod:</th><td>weapon=[+-]# | weapon=[+-]# | ...</td><td>''</td><td>a list of weapon type (or super-type) to-hit modifiers separated by vertical bars ('|')</td></tr>
 +
<tr><th scope="row">+:</th><td> [+-] # | race/creature | race/creature | ...</td><td>''</td><td>a modifier to hit of # when attacking any listed creature (not currently implemented)</td></tr>
 +
<tr><th scope="row">-:</th><td> [+-] # | race/creature | race/creature | ...</td><td>''</td><td>a modifier to AC of # when being attacked by any listed creature (not currently implemented)</td></tr>
 +
<tr><th scope="row">spattk:</th><td>text</td><td>''</td><td>special attacks text to be displayed when the Specials Action Button is used</td></tr>
 +
<tr><th scope="row">spdef:</th><td>text</td><td>''</td><td>special defenses text to be displayed when the Specials Action Button is used</td></tr>
 +
<tr><th scope="row">cattr:</th><td>attr=value | attr=value | ...</td><td>''</td><td>a list of attribute/value pairs, where <i>attr</i> defines a field on the Character Sheet Monster tab</td></tr>
 +
<tr><th scope="row">ns:</th><td>#</td><td>0</td><td>Number of granted spells/powers defined for item</td></tr>
 +
<tr><th scope="row">cl:</th><td>< MU / PR / PW ></td><td>''</td><td>Type of granted spell/power (always PW=Power)</td></tr>
 +
<tr><th scope="row">w:</th><td>< text ></td><td>'-'</td><td>Name of granted spell/power</td></tr>
 +
<tr><th scope="row">lv:</th><td>#</td><td>1</td><td>The character level at which the Power is granted</td></tr>
 +
<tr><th scope="row">pd:</th><td>[ -1 / # / #L# ]</td><td>1</td><td>No. of times per day power can be used. -1 is <i>"at will"</i>, and #L# is first number per second number levels, per day </td></tr>
 
</table>
 
</table>
 
<br>
 
<br>
 
 
===Character Sheet data fields===
 
===Character Sheet data fields===
<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 - ask the Author for a copy.</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 the relevant <b>[[Script:RPGMaster Library|RPGMaster Library API]]</b>.  You can find the complete mapping for all APIs in the RPGMaster series, with an explanation of each, in a separate document - ask the API Author for a copy.</p>
  
 
[[Category:API:RPGMaster]]
 
[[Category:API:RPGMaster]]

Latest revision as of 19:23, 19 June 2023

Main Page: API:RPGMaster

Contents

[edit] General Database information

The RPGMaster APIs use a number of databases to hold Macros defining character classes, spells, powers and magic items and their effects. Previous versions of the RPGMaster series of APIs held their databases all externally as character sheets: from this version onwards this is not the case for databases supplied with the APIs, which are now held internally to the APIs. However, the AttackMaster or MagicMaster API command --extract-db can be used to extract any or all standard databases to Character Sheets for examination and update. The APIs are distributed with many class, spell, power & magic item definitions, and DMs can add their own character classes, spells, items, weapons, ammo and armour to additional databases in their own database character sheets, with new definitions for database items held in Ability Macros. Additional database character sheets 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.
Character Races:additional databases: Race-DB-[added name] where [added name] can be replaced with anything you want.
Attack Calculations:additional databases: Attacks-DB-[added name] where [added name] can be replaced with anything you want.
Fighting Styles:additional databases: Styles-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 added database has a similar structure, with:

  • Ability Macros named as the class, spell, power or magic item specified, and used to describe and provide effects for classes, 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);
  • 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 - see Class entry below).

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 MagicMaster API command !magic --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.

[edit] Replacing Database 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.


[edit] Character Class Database

The DM can add Character Class databases as character sheets that have names that start with Class-DB. The Class definitions that come with the installed game-version-specific RPGMaster Library can be extracted to a character sheet and viewed by using the !magic --extract-db Class-DB or !attk --extract-db Class-DB commands. Note: it is best to delete the extracted Class-DB database character sheet after viewing/using, so that the system uses the much faster internal database version. After deleting or changing any character sheet database, always run the !magic --check-db or !attk --check-db command to re-index the databases.

Classes: Class-DB-[added name]

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

As previously stated, each class definition has 3 parts in the database (see Section 1): an Ability Macro with a name that is unique and matches the Class being defined, 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 base class: the base classes being "Warrior", "Wizard", "Priest", "Rogue", and "Psion". The quickest way to understand these entries is to examine existing entries. Do extract the root database using the --extract-db command and take a look (remember to delete it after viewing - see above)

Note: The DM creating new classes 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 in the Ability Macros 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.

[edit] Standard / Simple Class definitions

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

[edit] Thief

&{template:RPGMclass}{{name=Thief}}{{subtitle=Rogue Class}}{{Min Abilities=Dex:[[9]]}}{{Race=Any}}{{Hit Dice=1d6}}{{Alignment=Any not Lawful}}Specs=[Thief,RogueClass,0H,Rogue]{{Section1=**Powers**}}{{1st Level=Thieving Abilities *Pick Pockets, Open Locks, Find/Remove Traps, Move Silently, Hide in Shadows, Detect Noise, Climb Walls,* and *Read Languages* Also, Thieves can *Backstab*}}{{10th Level=Limited ability to use magical & priest scrolls, with 25% chance of backfire}}ClassData=[w:Thief, hd:1d6, align:ng|nn|n|ne|cg|cn|ce, npp:-3, weaps:club|shortblade|dart|handxbow|lasso|shortbow|sling|broadsword|longsword|staff, ac:padded|leather|studdedleather|elvenchain|magicitem|ring|cloak]{{desc=Thieves come in all sizes and shapes, ready to live off the fat of the land by the easiest means possible. In some ways they are the epitome of roguishness.
The profession of thief is not honorable, yet it is not entirely dishonorable, either. Many famous folk heroes have been more than a little larcenous -- Reynard the Fox, Robin Goodfellow, and Ali Baba are but a few. At his best, the thief is a romantic hero fired by noble purpose but a little wanting in strength of character. Such a person may truly strive for good but continually run afoul of temptation.}}

The ability specification for this Rogue class uses a Roll20 Roll Template, in this case defined by the RPGMaster Library (see the documentation for the Library 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 RPGMaster APIs are those highlighted. 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 = [Character Class, Macro Type, Handedness, Base Class]

The Specs section describes what Character Class and Base Class this is (and tells the APIs that this is a macro of type "Class"). These fields must be in this order. This format is identical for all database items, whether in these databases or others used by the RPGMaster 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.

Character Classthe Character Class name, often the same as the ability macro name.
Macro Typethe type of the data in this Ability Macro, one of WarriorClass, WizardClass, PriestClass, RogueClass, or PsionClass.
Handedness#H, where # is the number of hands needed to be a character of this class (not currently used).
Base Classthe base class that this class belongs to, one of Warrior, Wizard, Priest, Rogue, or Psion.
ClassData=[w:Thief, hd:1d6, align:ng|nn|n|ne|cg|cn|ce, npp:-3, weaps:club|shortblade|dart|handxbow|lasso|shortbow|sling|broadsword|longsword|staff, ac:padded|leather|studdedleather|elvenchain|magicitem|ring|cloak]

The ClassData section specifies the data relating to the class. These fields can be in any order.

w:<text>the name of the class
align:<lg|ln|le|ng|nn|n|ne|cg|cn|ce> or <any>the valid alignments for characters of this class, separated by '|' (not currently restricted)
attr:#[:#]minimum and maximum starting attribute values (default is 3:18)
race:<list of races> or <any>the races that can take this class, separated by '|' (not currently restricted)
hd:<dice roll spec>the dice roll specification for hit points at each level (not currently used, for future expansion)
npp:<[-/+]#>optional field to set a bespoke non-proficient weapon penalty for the character class. If not provided defaults to that for the Base Class.
weaps:<list of weapons & weapon types> or <any>a vertical bar '|' separated list of weapons and weapon types that are valid for the class (see the Weapons database/documentation for types). Preceeding by '!' means 'not this weapon' and with '+' means 'include this whatever'
ac:<list of armour types> or <any>a vertical bar '|' separated list of armour and armour types that are valid for the class (see the Weapons database/documentation for types). '!' and '+' work the same as for weapons

The list of weapons and weapon types listed after the "weaps:" tag are checked by the system when a character tries to take a weapon in-hand using the "Change Weapons" dialogue or AttackMaster --weapon command, as determined by the API configuration setting, accessed via the MagicMaster or AttackMaster --config command. This configuration can be to restrict weapons to those listed ("Strict" mode), to give unlisted weapons a penalty of double the non-proficient weapon penalty for the base class ("Lax" mode), or to ignore this list and allow any weapon to be proficient or to just get the standard non-proficient weapon penalty ("Allowed" mode).

In exactly the same way as for weapons, armour and armour types listed after the "ac:" tag are checked when calculating the Armour Class of the character using the "Check AC" dialogue or AttackMaster --checkac command, or automatically by the APIs at various points when AC might change, again according to the API configuration settings accessed via the --config command. This configuration can restrict a class to the armours and armour types listed for the class ("Rules" mode), or not restrict usage at all ("Allowed" mode).

Three additional field tags are optionally available to allow the default weapon attacks per round progression to be overridden with a bespoke progression. Any one, two or all three can be specified: if just the progression level sequence is given, these levels will override the default levels, and similarly for the melee and ranged weapon mods, and defaults will be used or those not overridden. This only works for classes that are types of Warrior. The defaults are those specified for the Warrior class in the Player's Handbook.

attkl:<0|#|#|...>a vertical bar '|' separated list of levels (the first must be 0) at which the next higher number of attacks per round is achieved.
attkm:<#|#|#|...>a vertical bar '|' separated list of modifications to the standard number of attacks per round for any melee weapon used. Each can be an integer, a decimal float (# . #) or a fraction (# / #)
attkr:<#|#|#|...>a vertical bar '|' separated list of modifications to the standard number of attacks per round for any ranged weapon used. Each can be an integer, a decimal float (# . #) or a fraction (# / #)

[edit] Changing the Default Saving Throws

The default Saving Throw table from the Player's Handbook can be overridden for any class definition. A new set of base saving throws by experience level can be defined.

[edit] Dwarven Defender

&{template:RPGMclass}{{name=Dwarven Defender}}{{subtitle=Warrior Class}}{{Min Abilities=Str:[[12]], Con:[[15]]}}{{Race=Dwarf only}}{{Alignment=Any}}Specs=[Dwarven Defender,WarriorHRClass,0H,Warrior]{{Hit Dice=1d12}}{{Section=**Powers**}}{{1st Level=Defensive Stance (1/4 levels per day}}ClassData=[w:Fighter, align:any, hd:1d12, race:dwarf, weaps:axe|club|flail|longblade|fencingblade|mediumblade|shortblade|polearm, ac:any, svl0:16|18|17|20|19, svl1:12|17|15|16|15, svl3:11|16|14|15|14, svl5:10|14|12|12|12, svl7:9|13|11|11|11, svl10:7|11|9|8|9, svl13:4|9|6|5|7, sv16:2|7|4|3|4, ns:1][cl:PW, w:Defensive-Stance, lv:1, pd:1l4]{{desc=The Dwarven defender is a formidable warrior. They are trained in the art of defence from a young age and make a defensive line nearly unbreakable.
The class is limited to Dwarves.
They can wear any armour but tend to go with the heaviest and toughest they can afford. They always use a shield, whenever possible a special Dwarven Tower shields (+1 in melee but +3 vs missiles when braced and in position). To use a Tower Shield requires a weapon proficiency slot. The dwarven Tower Shield has to be acquired in the campaign, it isn’t just granted to the character on creation (it’s a bit like a Paladins Warhorse). It may take many levels before they get a quest to acquire one.
They can only become proficient, specialise and double specialise in axes (not great axes) or hammers. They can never use missile weapons like a bow or crossbow but can throw hammers or axes.
They get bonus non weapon proficiency slots in Armourer, Blacksmithing and Mining.}}

In addition to the elements described previously, the ClassData section specifies new elements regarding saving throws (ignore the ns: and everything beyond for now):

ClassData=[w:Fighter, align:any, hd:1d12, race:dwarf, weaps:axe|club|flail|longblade|fencingblade|mediumblade|shortblade|polearm, ac:any, svl0:16|18|17|20|19, svl1:12|17|15|16|15, svl3:11|16|14|15|14, svl5:10|14|12|12|12, svl7:9|13|11|11|11, svl10:7|11|9|8|9, svl13:4|9|6|5|7, svl16:2|7|4|3|4, ns:1]

Each svl# element specifies the base saves at and above experience level "#", for the five standard base save types, <i>Paralysation, Poison & Death | Rod, Staff & Wand | Petrification & Polymorph | Breath Weapon | Spells. The highest specification element applies to all higher experience levels.</p> <p>Magic Items, Race definitions, and other database elements that affect a character can specify modifications to the base Saving Throws (whether using the defaults or custom Class specifications) by using the data element svXXX:[+-=]#,, where "XXX" is one of <i>par, poi, dea, rod, sta, wan, pet, pol, bre, spe or <i>all, followed by a colon, then a plus (+), a minus (-), an equals (=), and a number, or just a number with nothing before it. Each of the three-letter qualifiers refers to the relevant save, except "all" which applies the modifier to all saves. Preceeding the modifier amount by plus (+) or nothing improves the save by the modifier, preceeding by minus (-) worsens the save by the modifier, and by equals (=) overrides any other modifier being applied and applies only the modifier preceeded by the equals. Obviously, racial mods apply at all times (unless overridden by a magic item using the "=" modifier), and magic item mods only apply if the character has the magic item in their held items.

[edit] Restricting the Schools and Spheres of Spells available

While standard Wizards and Priests are very similar to the standard specification above, the definitions of specialist spellcaster classes is slightly more complex.

[edit] Conjurer

&{template:RPGMclass}{{name=Conjurer}}{{subtitle=Wizard Class}}{{Min Abilities=Int:[[9]], Con:[[15]]}}{{Alignment=Any}}{{Race=Human & Half Elf}}{{Hit Dice=1d4}}Specs=[Conjurer,WizardClass,0H,Wizard]{{Section1=**Spells**}}{{Specialist=Conjuration / Summoning}}{{Banned=Greater Divination & Invocation}}ClassData=[w:Conjurer, hd:1d4, race:human|halfelf, sps:conjuration|summoning|conjurationsummoning, spb:greaterdivination|invocation, weaps:dagger|staff|dart|knife|sling, ac:magicitem|ring|cloak]{{desc=This school includes two different types of magic, though both involve bringing in matter from another place. Conjuration spells produce various forms of nonliving matter. Summoning spells entice or compel creatures to come to the caster, as well as allowing the caster to channel forces from other planes. Since the casting techniques and ability requirements are the same for both types of magic, conjuration and summoning are considered two parts of the same school.}}

ClassData=[w:Conjurer, hd:1d4, race:human|halfelf, sps:conjuration|summoning|conjurationsummoning, spb:greaterdivination|invocation, weaps:dagger|staff|dart|knife|sling, ac:magicitem|ring|cloak]

The ClassData for specialist casters includes additional tags to specify the schools/spheres of magic that the caster can and cannot use (and for priests major and minor access to spheres).

sps:<text|text|...> or <any>a list of specialist schools or major spheres separated by vertical bars ('|')
spb:<text|text|...>a list of banned schools/spheres that this class is not allowed to use separated by vertical bars ('|')
spm:<text|text|...>a list of minor spheres (only relevant to Priest classes) separated by vertical bars ('|')

The spellcaster will be restricted to memorising only spells from the schools/spheres listed depending on the API configuration using the --config command. The configuration can be to restrict to the specified schools/spheres ("Strict" mode) or allow all at any level ("Allowed" mode). The DM will also have a single button to add all valid spells at all levels to a Priest character sheet using the [Token-setup] macro or the !cmd --abilities command, and then using the [Add to Spellbook] / [Priest] dialogue.

[edit] Default spells and spells per level

Using the classes called "Wizard" or "Priest" will always grant the standard Wizard and Priest spells per level respectively as per the Player's Handbook, thus the class specifications are no different from that above. Also, any class name placed in the Wizard class fields (e.g. the second class definition column of the Advanced 2e sheet) will get standard Wizard spell casting capabilities (unless otherwise specified as below), and those in the Priest class fields (e.g. the third class definition column of the Advanced 2e sheet) will get standard Priest spell casting capabilities (unless otherwise specified as below).

[edit] Non-standard spells per level

A non-standard spellcaster (such as a Ranger, Paladin or Bard, or any class you wish to specify of a similar nature) can have their spellcasting capabilities specified in the class definition:

[edit] Priest of Magic

&{template:RPGMclass}{{name=Priest of Magic}}{{subtitle=Priest Class}}{{Min Abilities=Wis:[[12]], Int:[[13]]}}{{Race=Human or Half Elf}}{{Hit Dice=1d8}}{{Reference=*House Rules v16*}}{{Section1=**Alignment**}}{{Deity=True Neutral}}{{Priests=Any Neutral}}{{Flock=Any Alignment}}{{ Section2=**Spells**}}{{Major Spheres=All, Divination, Protection, Healing, Elemental}}{{Minor Spheres=Sun}}<nowiki><span style="color:yellow">Specs=[Priest of Magic,PriestClass,0H,Priest]</span><nowiki>{{Powers=None}}ClassData=[w:Priest of Magic, hd:1d8, race:human|halfelf, align:ng|nn|n|ne, weaps:dagger|staff|dart|knife|sling, ac:any, sps:any, slv:4|3|12|MU, spl1:1|2|2|3|3|3|4|4|4|4|5|5, spl2:0|0|1|1|2|2|3|3|3|4|4|4, spl3:0|0|0|0|1|1|2|2|3|3|3|3, spl4:0|0|0|0|0|0|1|1|1|2|2|3],[w:Priest of Magic, sps:all|divination|protection|healing|elemental, spm:sun, slv:7|1|100|PR, spl1:1|2|2|3|3|3|3|3|3|3|3|3|3|3|4|4|4|4|4, spl2:0|0|1|1|2|2|3|3|3|3|3|3|3|3|3|4|4|4|4, spl3:0|0|0|0|0|1|1|2|2|3|3|3|3|3|3|3|4|4|4, spl4:0|0|0|0|0|0|0|0|1|1|2|2|3|3|3|3|3|4|4, spl5:0|0|0|0|0|0|0|0|0|0|0|1|1|2|2|3|3|3|4, spl6:0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|2|2|3, spl7:0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|2|2|2]{{desc=The Priest of Magic is an optional character class that can be used if your DM allows. It is a curious class in that it is a priest of the god of Magic, who then grants the priest the use of some limited Wizard spells as well as a slightly more restricted range of clerical spells.}}

The Priest of Magic (a "House Rules" class for my group) can cast some Wizard spells at the expense of loosing some Priest spellcasting capability. Its class definition has ClassData for both "MU" and "PR" spells, in two separate sections (enclosed in each comma-separated '[...]').

slv:<#|#|#|(MU/PR)>three numbers followed by either MU or PR (no brackets), separated by vertical bars ('|'). The first number is the highest level of spell that can be cast, the second the first class level at which spells can be cast, and the third the maximum casting level, followed by the class of spells being specified (MU=Wizard, PR=Priest)
spl#:<#|#|#|...>for spells of level spl#, starting at the class level at which spells can be cast, the numbers of spells that can be cast at that and subsequent levels

[edit] Classes with Specific Powers

A character class can also be granted powers, and these can be specified in the class definition both as text for the Player to read, and also coded so the APIs can read them.

[edit] Priest of Light

&{template:RPGMclass}{{name=Priest of Light}}{{subtitle=Priest Class}}{{Section1=**Alignment**}}{{Deity=Neutral Good}}{{Priests=Any Good}}{{Flock=Any Neutral or Good}}{{Hit Dice=1d8}}Specs=[Priest of Light,PriesthoodClass,0H,Priest]{{ Section2=**Powers**}}{{1st Level=*Infravision, Turn Undead*}}{{3rd Level=*Laying on Hands*}}{{5th Level=*Charm/Fascination*}}{{9th Level=*Prophecy*}}{{Section2=**Spells**}}{{Major Spheres=All, Charm, Divination, Healing and Sun}}{{Minor Spheres=Animal, Creation, Necromantic and Plant}}ClassData=[w:Priest of Light, align:LG|NG|CG, hd:1d8, weaps:bow|crossbow|dagger|dirk|dart|javelin|knife|slings|spear, ac:leather|padded|hide|magicitem|ring|cloak, sps:all|charm|divination|healing|sun, spm:animal|creation|necromantic|plant, ns:5][cl:PW, w:Infravision, lv:1, pd:-1][cl:PW, w:Turn Undead, lv:1, pd:-1][cl:PW, w:Laying on Hands, lv:3, pd:1][cl:PW, w:Charm-Fascination, lv:5, pd:1][cl:PW, w:Prophecy, lv:9, pd:1]{{desc=The god of all forms of light: Sunlight, moonlight, firelight, etc. The god is a friend of life, a patron of magic, a proponent of logical thought, and an enemy of the undead.
The priesthood of the god is devoted to celebrating these aspects of the god and to promoting positive forces such as healing.
Lesser gods of this attribute would be gods of one aspect of light. One god might be the god of Reason, another the god of Inspiration, etc.
This deity is as likely to be male as female.
The priests of this god are on good terms with the priests of Arts, Crafts, Darkness/Night, Dawn, Elemental Forces, Fire, Healing, Hunting, Literature/Poetry, Magic, Metalwork, Moon, Music/Dance, Oracles/Prophecy, and Sun.}}{{Reference=*The Complete Priest's Handbook* Sample Priesthoods}}

The ClassData specification now has a tag of ns: which specifies a following number of sections enclosed in square brackets ('[...]'), each of which defines a single power granted to characters of this class. These sections include the following fields:

cl:<PW>specifies the type of granted capability - for Class definitions, this is always PW (standing for Power)
w:<text>the name of the power granted (which should match a definition in the Powers database Powers-DB)
lv:<#>the character level at which they will gain this power
pd:< -1 / # / #L# >the number of times per day the power can be used. A number, or -1 (meaning "at will"), or #L# which is first number per second number levels per day (e.g. 1L4 means once per day for L1 to L4, twice L5 to L8, etc)

This allows the DM to use a single button to add all the specified powers to the Powers list of a specific character sheet using the [Token-Setup] macro or the !cmd --abilities command, and then using the [Add to Spellbook] / [Powers] dialogue. The Player will then only be able to memorise the appropriate powers for the character's level.

[edit] Race & Creature Databases

Exactly as with Character Classes, the DM can also add Race databases as character sheets that have names that start with Race-DB. The Race definitions that come with the installed game-version-specific RPGMaster Library can be extracted to a character sheet and viewed by using the !magic --extract-db Race-DB or !attk --extract-db Race-DB commands, and Creature definitions can be extracted by replacing "Race-DB" with "Race-DB-Creatures". Note: it is best to delete the extracted database character sheet after viewing/using, so that the system uses the much faster internal database version. After deleting or changing any character sheet database, always run the !magic --check-db or !attk --check-db command to re-index the databases.

Races: Race-DB-[added name]
Creatures: Race-DB-Creatures-[added name]

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

As previously stated, each database definition has 3 parts in the database (see Section 1), the same as for the Class Database explanation above. Note: The DM creating new classes 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.

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.

[edit] Standard / Simple Race Definitions

The database definition for a simple, standard Race might look something like this:

[edit] Human

&{template:RPGMdefault}{{name=Human}}{{subtitle=Race}}Specs=[Human,HumanoidRace,0H,Humanoid]{{Alignment=Any}}{{Languages=Often *common*}}{{Height=Males [60+2d10](! /r 60+2d10 ins height)ins, Females [58+2d10](! /r 58+2d10 ins height)ins}}{{Weight=Males [140+6d10](! /r 140+6d10 lbs weight)lbs, Females [100+6d10](! /r 100+6d10 lbs weight)lbs}}{{Life Expectancy=95 years}}{{Section=**Attributes**}}{{Minimum=None}}{{Maximum=None}}{{Adjustment=None}}{{Section1=**Powers**}}{{Section2=None}}{{Section3=**Special Advantages**}}{{Section4=None}}{{Section5=**Special Disadvantages**}}{{Section6=None}}RaceData=[w:Human, align:any, weaps:any, ac:any]{{desc=Although humans are treated as a single race in the AD&D game, they come in all the varieties we know on Earth. A human PC can have whatever racial characteristics the DM allows.
Humans have only one special ability: They can be of any character class and rise to any level in any class. Other PC races have limited choices in these areas.
Humans are also more social and tolerant than most other races, accepting the company of elves, dwarves, and the like with noticeably less complaint.
Because of these abilities and tendencies, humans have become significant powers within the world and often rule empires that other races (because of their racial tendencies) would find difficult to manage.}}</nowiki>

As with Class definitions, and any other RPGMaster database entry, a Roll Template is used for formatting and the text in the template can be whatever you desire to display. The important elements for the RPGMaster APIs are highlighted and, as elsewhere, they are between the elements of the Roll Template to hide them when displayed, case is ignored and spaces, hyphens and underscores can be used but are ignored. Each element is described below:

Specs=[Human,HumanoidRace,0H,Humanoid]

The Specs section for a race describes the Sub-Race and base Race for the entry, and that this is a race definition. The fields must be in this order, identical for all database items.

Sub-Racethe Sub-Race or Race name, often the same as the ability macro name.
Macro Typethe type of the data in this Ability Macro, one of HumanoidRace, HumanoidCreature, or CreatureRace.
Handedness#H, where # is the number of hands needed to be a character of this race (not currently used).
Base Racethe base race that this sub-race belongs to, and can be any other race in the database. For PCs generally one of Dwarf, Elf, Half-Elf, Halfling, Half-Orc, Human, or Gnome.

The Sub-Race will "inherit" any data definitions and powers defined for the Base Race unless they are specifically overwritten or excluded by the Sub-Race definition. This reduces inconsistencies and the work of entering multiple duplications.

RaceData=[w:Human, align:any, weaps:any, ac:any]

All the same data fields (that are relevant) are available as for a Class definition. Where both the Class and Race of a character have specified restrictions or allowances, both the Class and the Race must allow an item / spell to be used. Whereas two Classes combine permissions as Class A OR Class B, Class and Race are Class AND Race. So a Warrior class can use a Greatsword, but a Warrior Gnome may not be able to use it as it would hit the ground as they wielded it!

[edit] Save and To-Hit Modifiers

There are a number of additional data fields relevant to Races:

[edit] Halfling

&{template:RPGMdefault}{{name=Halfling}}{{subtitle=Race}}{{Alignment=Any (Usually NG)}}Specs=[Halfling,HumanoidRace,0H,Humanoid]{{Languages=Often *common, halfling, dwarf, elf, gnome, goblin,* and *orc*}}{{Height=Males [32+2d8](! /r 32+2d8 ins height)ins, Females [30+2d8](! /r 30+2d8 ins height)ins}}{{Weight=Males [52+5d4](! /r 52+5d4 lbs weight)lbs, Females [48+5d4](! /r 48+5d4 lbs weight)lbs}}{{Life Expectancy=100 to 150 years}}{{Section=Attributes}}{{Minimum=Str:7, Con:7, Dex:10, Int:6}}{{Maximum=Wis:17}}{{Adjustment=Dex:+1, Str:-1}}{{Section1=Powers}}{{Expert Miners=Stouts can detect slopes, and approximate direction underground}}{{Section2=Special Advantages}}{{Infravision=Any halfling character has a 15% chance to have normal infravision (this means he is pure Stout), out to 60ft; failing that chance, there is a 25% chance that he has limited infravision (mixed Stout/Tallfellow or Stout/Hairfeets lineage), effective out to 30 feet.}}{{Magic Resistance=Magic-resistant, giving a bonus to saving throws against magical wands, staves, rods, and spells of +1 for every 3.5 points of Constitution score.}}{{Poison Resistance=Save vs. poison at +1 for every 3.5 points of Constitution score.}}{{Attack bonus=+1 To Hit with slings and thrown weapons}}{{Surprise=Enemies get a –4 penalty to surprise if the halfling is: 1) moving alone, 2) is 90 feet away from the rest of their party, or 3) is with other elves or halflings and all are in nonmetal armor. If the halfling must open a door or screen to get to the enemy, the penalty is reduced to –2.}}RaceData=[w:Halfling, align:any, weaps:any, ac:any, attr:str=7|con=7|dex=10|int=6|wis=1:17, thmod:throwing=1|dart=1|hand-axe=1|magical-stone=1|slings=1, svatt:con, svpoi:3.5 svrod:3.5, svsta:3.5, svwan:3.5, svspe:3.5, ns:2],[cl:PW,w:Detect Slope,lv:0,sp:0,pd:-1],[cl:PW,w:Determine Direction Underground,lv:0,sp:0,pd:-1]{{desc=Halflings are short, generally plump people, very much like small humans. Their faces are round and broad and often quite florid. Their hair is typically curly and the tops of their feet are covered with coarse hair. They prefer not to wear shoes whenever possible. Halflings see wealth only as a means of gaining creature comforts, which they love. Though they are not overly brave or ambitious, they are generally honest and hard working when there is need.
Elves generally like them in a patronizing sort of way. Dwarves cheerfully tolerate them, thinking halflings somewhat soft and harmless. Gnomes, although they drink more and eat less, like halflings best, feeling them kindred spirits. Because halflings are more open and outgoing than any of these other three, they get along with other races far better.
There are three types of halflings: Hairfeets, Tallfellows, and Stouts. Hairfeets are the most common type, but for player characters, any of the three is acceptable.}}

attr:#[:#]minimum and maximum starting attribute values (default is 3:18)
svXXX[+]:[+ - =] #saving throw modifiers
thmod:weapon=[+-]# | weapon=[+-]# | ...a list of weapon type (or super-type) to-hit modifiers separated by vertical bars ('|')

The saving throw modifiers are cumulative with those relevant to a Class and/or to worn/held magic items. The XXX can be one of att, par, poi, dea, rod, sta, wan, pet, pol, bre, spe or all, optionally followed by a "+" (see next paragraph), followed by a colon, then a plus (+), a minus (-), an equals (=), and a number, or just a number with nothing before it. Each of the three-letter qualifiers refers to the relevant save, except "all" which applies the modifier to all saves, and "att" which specifies an attribute by whose value any save may vary. Preceding the modifier amount by plus (+) or nothing improves the save by the modifier, preceding by minus (-) worsens the save by the modifier, and by equals (=) overrides any other modifier being applied and applies only the modifier preceded by the equals.

If the XXX is followed by a "+" (e.g. like svpoi+:3), the save modifier will be a straight addition to (or subtraction from) the saving throw. Otherwise, the value of the attribute defined by the "svatt:" (which can be str, con, dex, int, wis, or chr, defaulting to con) is divided by the modifier provided and rounded down: e.g. if svatt:con and svpoi:3.5, a Constitution of 12 will result in a poison save bonus of 3.

To-Hit modifiers are supplied as a list separated by vertical bars. Each entry is a weapon type or weapon super-type, followed by "=", followed by a number preceded by an optional "+" or "-". A plus (+) improves the chance of hitting, and a minus (-) is a penalty. Any weapon of the specified type or super-type will get the modifier.

[edit] Race Powers

As with classes, races can have specific powers. If a Sub-Race has a Base Race defined, the powers for both will be used - if you don't want any powers from a Base Race, do not specify one.

[edit] Dwarf

&{template:RPGMdefault}{{name=Dwarf}}{{subtitle=Race}}Specs=[Dwarf,HumanoidRace,0H,Humanoid]{{Alignment=Any (Usually LG)}}{{Height=4 to 4.5 ft}}{{Weight=150lbs}}{{Life Expectancy=350 years}}{{Languages=Often *Dwarf, Common, Orc, Kobold, Goblin, Gnome*}}{{Section=**Attributes**}}{{Min Attributes=Str:8, Con:11}}{{Max Attributes=Dex:17, Chr:17}}{{Attribute Adj.=Con:+1, Chr:-1}}{{Section1=**Powers**}}{{Infravision=Infravision to 60ft}}{{Expert Miners=Detect slopes, new tunnel construction, shifting walls, and stonework traps, and determine approximate depth underground}}{{Section2=**Special Advantages**}}{{Small size=Ogres, trolls, ogre magi, giants, and titans suffer a -4 penalty to attack Dwarves.}}{{Magic Resistance=Dwarves are nonmagical, which gives a bonus to dwarves' saving throws against magical wands, staves, rods, and spells, of +1 for every 3.5 points of Constitution score.}}{{Sense Curses=Can sense a cursed item, but only if the device fails to function}}{{Section3=**Special Disadvantages**}}{{Item Failure=Magical items not specifically suited to the character's class have a 20% chance to malfunction when used.}}RaceData=[w:Dwarf, align:any, weaps:any, ac:any, attr:str=8|con=11|dex=1:17|chr=1:17, +:1|orc|half-orc|goblin|hobgoblin, -:4|ogre|troll|ogre-magi|oni|giant|titan, svatt:con,svpoi:3.5,svrod:3.5,svsta:3.5,svwan:3.5,svspe:3.5, ns:5],[cl:PW,w:Detect Slope,lv:0,sp:0,pd:-1],[cl:PW,w:Detect New Construction,lv:0,sp:0,pd:-1],[cl:PW,w:Detect Shifting Walls,lv:0,sp:0,pd:-1],[cl:PW,w:Detect Stonework Traps,lv:0,sp:0,pd:-1],[cl:PW,w:Determine Depth Underground,lv:0,sp:0,pd:-1]{{desc=Dwarves are short, stocky fellows, easily identified by their size and shape. They have ruddy cheeks, dark eyes, and dark hair. Dwarves tend to be dour and taciturn. They are given to hard work and care little for most humor. They are strong and brave. They enjoy beer, ale, mead, and even stronger drink. Their chief love, however, is precious metal, particularly gold. They prize gems, of course, especially diamonds and opaque gems (except pearls, which they do not like). Dwarves like the earth and dislike the sea. Not overly fond of elves, they have a fierce hatred of orcs and goblins. Their short, stocky builds make them ill-suited for riding horses or other large mounts (although ponies present no difficulty), so they tend to be a trifle dubious and wary of these creatures. They are ill-disposed toward magic and have little talent for it, but revel in fighting, warcraft, and scientific arts such as engineering.
Though dwarves are suspicious and avaricious, their courage and tenacity more than compensate for these shortcomings.
Dwarves typically dwell in hilly or mountainous regions. They prefer life in the comforting gloom and solidness that is found underground.}}

As master miners, Dwarves have a number of powers that they can call on when underground, to assess their situation. These use the same syntax for specification as for Classes with powers.

Dwarves also have to-hit and AC bonuses when facing various types of creature. These are specified in the race data as follows:

+: [+-] # | race/creature | race/creature | ...a modifier to hit of # when attacking any listed creature (not currently implemented)
-: [+-] # | race/creature | race/creature | ...a modifier to AC of # when being attacked by any listed creature (not currently implemented)

A positive modifier is always a benefit, and a negative one is a penalty. These are not currently implemented as the APIs cannot know what race the opponent is, unless a targeted attack is used (see AttackMaster API help handout for information on attacks) and targeted attacks are a DM and Player option which is not mandatory.

[edit] Creatures

The same specification approach can be used to define creatures other than humanoids, and humanoids other than PCs and NPCs. A number of such definitions are provided in the Race-DB-Creatures database, which can be extracted to a Character Sheet DB using the !magic --extract-db Race-DB-Creatures command. All the same data fields are available as for Race definitions, with some extras.

[edit] Vampire

&{template:RPGMdefault}{{name=Vampire}}{{subtitle=Creature}}{{Alignment=Usually Chaotic Evil}}Specs=[Vampire,HumanoidCreature,0H,Creature]{{Languages=Whatever they knew before they were a vampire, or what their vampire parents taught them.}}{{Height=As per pre-vampire race (usually [65+2d6](! /r 65+2d6 ins height)ins,}}{{Weight=Their weight before becoming a vampire or [140+6d10](! /r 140+6d10 lbs weight)lbs}}{{Life(?) Expectancy=Immortal}}{{Section=**Attributes**}}{{Minimum=Str:18(76), Int:15}}{{Maximum=Int:16}}{{Adjustment=None}}{{Section1=**Powers**}}{{Energy Drain=Drains 2 levels from anyone they successfully touch}}{{Charm=Any person who allows the vampire to look into their eyes will be affected as if by a *charm person* spell. Due to the power of this enchantment, a -2 is applied to the victim's saving throw vs. spell}}{{Summon Creatures=Can summon swarms of creatures to their aid}}{{Spell-like powers=*Gaseous Form* and *Spider Climb* at will}}{{Section2=**Special Advantages**}}{{Infravision=60 feet}}{{Shape Change=Can *Shape Change* into a large bat at will}}{{Plus Weapons To Hit=Attackers must use weapons of at least +1 to be able to hit a vampire}}{{Immunities=Immune to *Sleep, Charm,* and *Hold* spells, Paralysis and Poison. Spells based on cold or electricity cause only half damage}}{{Section3=**Special Disadvantages**}}{{Repellants=Odor of Strong Garlic; Mirror or Holy Symbol presented with conviction}}{{Holy Water or Symbol=Burns a vampire for 2-7 (1d6+1) damage with a successful hit}}{{Others=See Monsterous Compendium for other disadvantages}}RaceData=[w:Vampire, cattr:int=15:16|ac=1|mov=12|fly=18C|hd=8d8+3|thac0=11|attk1=hand:4+1d6:0:B,spattk:Energy drain,spdef:+1 weapon to hit; immune to *sleep, charm & hold*, ns:5],[cl:PW,w:Charm Person,sp:1,lv:0,pd:-1],[cl:PW,w:Summon Swarm,sp:2,lv:0,pd:-1],[cl:PW,w:Gaseous Form,sp:0,lv:0,pd:-1],[cl:PW,w:MU-Shape-Change,sp:9,lv:0,pd:-1],[cl:PW,w:Spider Climb,sp:1,lv:0,pd:-1]{{desc=Of all the chaotic evil undead creatures that stalk the world, none is more dreadful than the vampire. Moving silently through the night, vampires prey upon the living without mercy or compassion. Unless deep underground, they must return to the coffins in which they pass the daylight hours, and even in the former case they must occasionally return to such to rest, for their power is renewed by contact with soil from their graves.
One aspect that makes the vampire far more fearful than many of its undead kindred is its appearance. Unlike other undead creatures, the vampire can easily pass among normal men without drawing attention to itself for, although its facial features are sharp and feral, they do not seem inhuman. In many cases, a vampire's true nature is revealed only when it attacks. There are ways in which a vampire may be detected by the careful observer, however. Vampires cast no reflection in a glass, cast no shadows, and move in complete silence.}}

Creatures have additional data fields that set up all the important fields for the APIs on the AD&D2e Character Sheet (only when the creature is specified using the Class/Race menu on the "token-setup" menu - just typing the creature type into the Race field on the Character Sheet will not do this).

spattk:textspecial attacks text to be displayed when the Specials Action Button is used
spdef:textspecial defenses text to be displayed when the Specials Action Button is used
cattr:attr=value | attr=value | ...a list of attribute/value pairs, where attr is one of:
ac#[:#]creature armour class
mov#creature movement on the ground
flytextcreature movement in the air
swtextcreature movement when swimming
hd#[d#][+/-#][r#]creature hit dice roll spec
hp#[:#]creature hit points
regen#creature regeneration HP/round
thac0#creature Thac0
tohit[+/-]#creature to-hit modifier
dmg[+/-]#creature damage modifier
crith#creature critical hit roll
critm#creature critical miss roll
attk1text,roll,speed,typespecification for creature innate attack 1
attk2text,roll,speed,typespecification for creature innate attack 2
attk3text,roll,speed,typespecification for creature innate attack 3
attkmsgtext[$$text][$$text]message(s) for attacks
speed#creature overall attack speed
cl[F/MU/PR/RO/PS]:Class nameGive creature a NPC class
lv#Give crature a NPC level

When a creature (or race) with these data fields is selected in the Race/Class menu, the CommandMaster API automatically sets all of the respective Character Sheet attributes to the specified values. In fact, all of these data fields can be used with a standard race, but are less useful.

[edit] Specifying Creature Weapons & Armour

Many creatures have attacks using their claws, bites and other "innate" attacks, and have tough natural armoured skin. However, many humanoid creatures can use normal weapons & armour to attack adventurers and defiend themselves. It is possible to specify the possible weapon combinations and available armour for each creature type, and add a randomness to the selection criteria, as this example shows:

The additional RaceData datasets highlighted have the following fields:

+' +' +' +' +' +'
clWP / ACType of data in the dataset. WP = weapon, AC = armour
%#Chance of dataset being used relative to others of same type (does not have to add up to 100)
primeweapon : qtyName & quantity of weapon to take in Primary hand. Only 1 is taken in-hand, rest of qty held in items
offhandweapon : qtyName & quantity of weapon to take in Off-hand hand. Only 1 is taken in-hand, rest of qty held in items
bothweapon : qtyName & quantity of two-handed weapon to take in both hands. Only 1 is taken in-hand, rest of qty held in items
itemsweap/armour:qty | weap/armour:qty | ...Name & quantity of weapons or armours to store as items of equipment. Armour will automatically contribute to creature armour class

[edit] Specs & Data field values

Below are lists of the current possible values for the Class and Race database Ability macro sections.

[edit] Specs sections

Specs=[Class Type, Macro Type, Handedness, Class Group-Type]
Specs=[Sub-Race, Macro Type, Handedness, Base-Race]

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

[edit] Class & Race Types

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

There is an infinite list of race and creature types: generally the type is the sub-race or creature name.

[edit] Macro Type

Classes: One of "WarriorClass", "WizardClass", "PriestClass", "RogueClass", "PsionClass", relating to the base class of the character. This field is used to add the Class name to the right base class list for selection by the Players.

Races: One of "HumanoidRace", "HumanoidCreature", "CreatureRace", relating to the base race of the character. This field is used to add the Race name to the right race or creature list for selection.

[edit] Handedness

0H A Race, Creature or Class that can only be taken by characters and creatures that do not have hands (e.g. a fish-type creature)
1H A Race, Creature or Class that can only be taken by characters or creatures with only one hand (e.g. a snake NPC that can use its prehensile tail to hold weapons)
2H A Race, Creature or Class that has two hands - the normal for humanoid PCs and NPCs
3H A Race, Creature or Class that can only be taken by characters or creatures with three or more hands
4H Etc
... ...

(Handedness for Race and Classes are not currently restricted or used by the system. In future, the number of hands specified on the "Change Weapon" dialogue may be related to the Character Race & Class)

[edit] Base Classes

The Base Class can currently be one of "Warrior", "Wizard", "Priest", "Rogue" or "Psion". If a character class is allowed to be of more than one base class, separate each with a vertical bar character '|'. This determines the valid Character Sheet fields that this Class Type can appear in.

The Base Race or Creature Type can be for any other Race or Creature definition. Multiples are not allowed (no vertical bars '|'), and the Sub-Race / Creature will inherit the specifications and powers of the Base Race / Creature.


[edit] Data Sections

Below are the definitions for each of the possible ClassData and RaceData fields.

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.

<thead> </thead>
Field Format Default Value Description
w:< text >'Fighter'Name of the Class
hd:Dice Roll spec0Hit dice roll per level
align:[ lg / ng / cg / ln / nn / n / cn / le / ne / ce / any ]anyAllowed alignments
race:< text | text | ... > or anyanyAllowed races
weaps:< text | text | ... > or anyanyAllowed weapons and weapon types
npp:[-]#The weapon non-proficiency penalty for the class
twp:[-]#.#2.4The two weapon penalty (primary.secondary) for the class
ac:< text | text | ... > or anyanyAllowed armour types
attkl:< 0 | # | # | ... >Class level progression for "attacks per round" modifiers
attkm:< # | # | # | ... >Melee weapon "attacks per round" modifiers by class level progression
attkr:< # | # | # | ... >Ranged weapon "attacks per round" modifiers by class level progression
sps:< text | text | ... > or anyanyAllowed spell schools or major spheres
spm:< text | text | ... >Allowed minor spheres
spb:< text | text | ... >Banned spell schools
slv:< # | # | # | <MU / PR> >Non-standard spellcaster level/type specification
spl#< # | # | # | ... >No. of spells of level spl# at each character level
attr:#[:#]3:18minimum and maximum starting attribute values
svXXX[+]:[+ - =] #0saving throw modifiers
thmod:weapon=[+-]# | weapon=[+-]# | ...a list of weapon type (or super-type) to-hit modifiers separated by vertical bars ('|')
+: [+-] # | race/creature | race/creature | ...a modifier to hit of # when attacking any listed creature (not currently implemented)
-: [+-] # | race/creature | race/creature | ...a modifier to AC of # when being attacked by any listed creature (not currently implemented)
spattk:textspecial attacks text to be displayed when the Specials Action Button is used
spdef:textspecial defenses text to be displayed when the Specials Action Button is used
cattr:attr=value | attr=value | ...a list of attribute/value pairs, where attr defines a field on the Character Sheet Monster tab
ns:#0Number of granted spells/powers defined for item
cl:< MU / PR / PW >Type of granted spell/power (always PW=Power)
w:< text >'-'Name of granted spell/power
lv:#1The character level at which the Power is granted
pd:[ -1 / # / #L# ]1No. of times per day power can be used. -1 is "at will", and #L# is first number per second number levels, per day


[edit] 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 the relevant RPGMaster Library API. You can find the complete mapping for all APIs in the RPGMaster series, with an explanation of each, in a separate document - ask the API Author for a copy.