Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[Script] RPGMaster APIs for AD&D 2E

Richard @ Damery said: Lucas the Upright said: I have installed InitMaster and RoundMaster. In the early stages of trying to understand and configure but keep getting this error:   (From RPGMaster):   RPGMaster Library JavaScript TypeError: Cannot read property 'playerConfig' of undefined Oh! Sorry to see that.  Yes I've reproduced this. Thanks for reporting it. Error:  I seem to have introduced a dependency between the RPGMaster Library and the MagicMaster & AttackMaster APIs that both support the --config command.  --config  allows the DM to set the default display properties for dialogues & menus in the Chat Window, and this flag is queried by the RPGMaster Library without trapping an error if AttackMaster & MagicMaster are not loaded. Temporary Workaround: Load all RPGMaster APIs even if only using the commands of 1 or 2 of them.  Use 1-click install to load CommandMaster, and this will automatically load all APIs required. Once the permanent fix is released, the APIs you don't need will be able to be removed.  If wanted, this will also allow DMs to use !attk --config  or !magic --config  to set the default chat dialogue and menu formats, or use the cog shown top right of any displayed RPGMaster API dialogue or menu to set the format (excludes RoundMaster dialogues). Final Fix ETA:  I will make a release early next week that will remove this dependency. Much appreciated. These are great scripts and will give that a shot.
1677960723

Edited 1678180005
Richard @ Damery
Pro
API Scripter
Bug found: Targeted attacks vs. -ve ACs Now fixed in release 1.4.05 Bug: Sometimes, if not always, if a Targeted Attack is undertaken against an opponent with an AC better than 0 (i.e. a negative AC), the targeting prompt appears but selecting the target with the negative AC does nothing, with the prompt not going away and no attack result dialogue appearing in the chat window. Temp workaround:  If a Targeted Attack fails, remove the Targeting Prompt using the usual x in the top right of the prompt, then redo the attack but select either [PC Rolls] or [You Roll] on the Attack dialogue. This avoids the calculation line that is going wrong. Permanent Fix ETA: I have already found and fixed the issue, and the fix will be in the release next week.
1678179955

Edited 1678218601
Richard @ Damery
Pro
API Scripter
Release v1.4.05 now live   7th March 2023 Rods, Staves & Wands All Rods, Staves & Wands from the Dungeon Master's Guide (June 1989) have been coded into the databases. A new means of using the magical attacks and powers of each item has also been implemented: Rods, Staves & Wands now need to be taken "in-hand" using the  Change Weapon dialogue in order to use their powers and functions via the Attack action. The Initiative action selection (for Group or Individual initiative) also allows selection of individual item powers & functions for items held "in-hand", thus allowing the correct initiative modifier to be chosen for each action (previously the initiative modifier for the whole item was applied to every one of its functions). Character Attribute Checks A menu option has been added to the "Other" action menu to undertake Character  Attribute Checks  in a similar fashion to Saving Throws: indeed, the dialogue displayed is very similar to that for saving throws and uses much of the same functionality. If the character possesses any magic items that will impact on the checks, or there is any magic operating that will have an impact, the  Attribute Check  dialogue will take this into account (although use of the [Auto-check Saving Throws] function may be needed first). Item Charges on Successful Hit Some magic items only expend a charge if a function that requires a melee touch succeeds. This can now be achieved, even for  Targeted Attacks, by placing the field tag c:# in the DmgData section of the item specification, rather than in the ToHitData  section. If it is placed in the ToHitData section, it will still expend # charges every time it is attacked with, rather than on a successful hit. Executable Commands based on Result As stated in the RPGMaster Library documentation, a RPGMaster Roll Template field tag of  {{Result=...}} can be used to compare any two other Roll Template field values and declare a "Success" or a "Failure" based on a comparison of the two (only valid in RPGMattack and RPGMdefault templates, and other templates based on them). It is now also possible to add executable commands in either or both of {{SuccessCmd=...command to be executed on success...}} and {{FailCmd=...command to be executed on failure...}}. The commands are often API commands, but need not be. If there is no {{Result=...}}  field tag in the Roll Template, neither SuccessCmd or FailCmd will execute. GM Roll Query extension RPGMaster API commands can now use a special version of the Roll Query as an RPGMaster API command parameter to request the GM to respond to the Roll Query, whomever triggered the command or controls the relevant character. Instead of the usual format of  ?{Query prompt|Option1|Option2|...} , the syntax  gm{Query prompt/Option1/Option2/...}  can be used - note the use of '/' instead of vertical bar (sorry, this does not yet work with any other API calls other than RPGMaster ones) . This will force the Query Prompt to be displayed to the GM, who then enters a value, which is then used as the parameter for the API command. The result of the API command is then applied as normal to the respective character. Merged Version of AoE and Target Commands There are some circumstances where it is useful to be able to both display an area of effect and also initiate a targeting command in a one line command. The following command structure seems like it should work, but it will not do so sensibly, because of the asyncronous nature of command processing: !rounds --aoe @{selected|token_id}|bolt|feet|0|40|10|magic --target area|@{selected|token_id}|@{target|Who is slept?|token_id}|Sleep|30|-1|Fast asleep|sleepy The --target command will ask for its first area target before the --aoe command displays the area, because the @{target...} gets parsed by Roll20 first - escaping the @ also does not always work due to escape resolution order. Thus a new extended version of the --aoe command syntax has been introduced which allows for a target command to be triggered only after the area of effect is displayed. See the  RoundMaster API Help  handout for the full syntax. Fixes A large number of fixes to the code and to database entries have been enacted, including the decoupling of AttackMaster & MagicMaster APIs from the Library, so RoundMaster/InitMaster APIs can be used in isolation; the issue with targeted attacks against opponents with negative Armour Classes, reported over the weekend which hopefully will make everything even more useful to you!
DAMN! Been running a 1/2E AD&D Campaign for eight months and FINALLY I find THIS!! I think I have a LOT of catching up to do... Any advice on where to start, specifically for an old man (who has NO understanding of coding,) would be greatly appreciated. I have a tendency to just dive in, install everything and then end up using only the 5 or 10% that makes immediate sense. This stuff looks too god for me to bollocks it up!
1680442085

Edited 1680442296
Richard @ Damery
Pro
API Scripter
Tommy said: DAMN! Been running a 1/2E AD&D Campaign for eight months and FINALLY I find THIS!! I think I have a LOT of catching up to do... Any advice on where to start, specifically for an old man (who has NO understanding of coding,) would be greatly appreciated. I have a tendency to just dive in, install everything and then end up using only the 5 or 10% that makes immediate sense. This stuff looks too god for me to bollocks it up! Tommy - welcome! No need to have an understanding of coding - there is quite a lot to play with out of the box, and if you do want to add stuff it's all just text and roll templates on character sheets. For full details of usage, there is noting better than spending a few hours reading the extensive help handouts that are automatically added to your campaign when the RPGMaster APIs are added. I recommend you play with the APIs in a test game you set up for the purpose, before unleashing them on your players! First of all, add "CommandMaster" API from the Mods Library (let me know if you need advice on that but, since you're here, I assume you've used other Mods/APIs) - loading CommandMaster will automatically load all the other related APIs in the RPGMaster Suite (just accept the prompts to load them when asked). Next, use the command "!cmd --initialise" and follow the instructions that appear in the Chat Window. Next, select any token representing a Character Sheet or Creature Sheet on your map area (drag one on if none are there). Then select the "Token-Setup" button that should be at the bottom of the map (if you followed the instructions above for "!cmd --initiaise") If you have existing Character Sheets (e.g. using the Transmogrifier to bring them in from a current Campaign to your test game), you can convert them to recommended RPGMaster set-up using the "Convert Items" and "Convert Spells" buttons on the Token-Setup dialogue, and you can use the other buttons shown to do everything you need to set up existing or new characters. It is important to add the appropriate Ability Action Buttons to the characters - this makes it much easier to use the APIs (rather than everyone typing Chat window API commands). If you want to add creatures to your campaign, add a new, blank sheet to the Journal, drag it onto the map, ensure it is selected (you may have to click the token just dropped to select it), and scroll to the bottom of the Chat Window where a dialogue has automatically appeared where you can use the "Creature" button to select a creature from the database (only a proportion of the Monsterous Compendium so far). This will fully setup the Creature's Character Sheet  without you needing to do anything else! I hope this helps.  If you have any questions, feel free to post here (there are other users who may have solved your issues) or PM me.
Is there anyone interested in another on-line training / Q&A session for the RPGMaster suite?  I'd be happy to run one to explain all the most recent changes and help with any issues people are having.  Reply below if interested, and I'll sort a mutually convenient time for 1:1 or 1:many sessions.
As soon as the football is over and the kids are fed and watered I'm sitting down with those Youtube videos and a glass of something peaty. Is everything still up to date on those with regards to how to get the basics loaded, up and running?
I will also probably be interested in some tutelage, but I think I best learn exactly how much I don't know before booking a session.
Richard, I believe my first problem has just been encountered. I followed the instructions as per video one in the tutorial, on a brand new game and everything went swimmingly till I went to the journal and saw all the Handouts, but no Characters with the DB material. I closed everything down, deleted the game, went through the process again - paying close attention and again the same outcome. Am I missing something?
1680497921

Edited 1680497997
Richard @ Damery
Pro
API Scripter
Tommy said: As soon as the football is over and the kids are fed and watered I'm sitting down with those Youtube videos and a glass of something peaty. Is everything still up to date on those with regards to how to get the basics loaded, up and running? The videos are somewhat out of date - made over a year ago and much has moved on.  My current task, before any more releases, is to remake them all. Sorry about that! Tommy said: Richard, I believe my first problem has just been encountered. I followed the instructions as per video one in the tutorial, on a brand new game and everything went swimmingly till I went to the journal and saw all the Handouts, but no Characters with the DB material. I closed everything down, deleted the game, went through the process again - paying close attention and again the same outcome. Am I missing something? The databases are now held in memory, so you will not see them created in the journal by default. This is explained in the help handouts.  You can extract each individual database if you wish to alter what is in them or use them as examples to add your own entries.  How to do that is also explained in the handouts, using the !magic --extract-db db-name  command.
  Excellent, I'll get stuck into the handouts. Thanks a lot
Richard, I'm experiencing a few... issues. I'm probably going to need some help with this, is it OK if I push several questions through at the same time, or would you rather I ask them one at a time?? There is a good chance some or all may be as a result of switching Character Sheets (we have been using the simplified version so far.) I'll start with... My Attack rolls seem to be returning the dice number rolled in the template rather than the AC hit. 
Tommy said: Richard, I'm experiencing a few... issues. I'm probably going to need some help with this, is it OK if I push several questions through at the same time, or would you rather I ask them one at a time?? There is a good chance some or all may be as a result of switching Character Sheets (we have been using the simplified version so far.) I'll start with... My Attack rolls seem to be returning the dice number rolled in the template rather than the AC hit.  Perhaps best if you are going to ask several questions if you PM me? Go to my profile and send a Personal Message from there - that way, we can focus on what you are finding without cluttering up this thread. On the Character Sheet - yes it is important to use the full Advanced D&D2e sheet by Peter B. I can't guarantee results with the simple sheet as I've not tested it.  That may well be why you have the issues you are getting.  I suggest the following: Make a copy of your campaign Change the Character Sheet on the copied campaign to Peter B.'s more complex AD&D2e sheet  Review the sheets in the copied campaign and correct any obvious issues Use the RPGMaster Token-Setup menu "Convert Items" and "Convert Spells" buttons, plus the other buttons on the Token-Setup menu as required to get the sheets set up Try the things that are going wrong agan, and see if you still have issues. We may need a Skype desktop sharing session for me to see what is happening for you, but try the above first and see what happens
1680856066

Edited 1681373936
Richard @ Damery
Pro
API Scripter
Bugs found: Manual Update Saving Throws, & changing Rings on fingers Fixed 13th April 2023 Bug: Under the Other Actions menu, Saving Throws dialogue, the [Update Saving Throw Table] button led to a dialogue that should have allowed the Player/DM to manually change the selected Character's or Creature's saving throws and saving throw mods. While the buttons to do so are selectable, they achieve nothing, meaning manual changes are not possible. However, the [Auto-check Saving Throws] button does work, automatically setting saving throws based on class, level, race, and magic items. Temp work-around: it is still possible to go directly to the Saving Throw table on the character sheet and update it manually. Note that Creature saving throws must be updated in both  the Character Sheet saving throw table and the Monster Sheet saving throw table to work properly. Bug: The Change Weapon dialogue under the Attack Menu allows the Player/DM to change the weapons a creature has in hand, and also the rings worn on each hand. Magic rings will not function unless worn. However, changing the ring on the Left hand seems to alter the ring on the Right hand, and visa versa, making usage very confusing. Temp work-around: As long as the names of the rings you want to have the Character wearing appear in the dialogue, regardless of which hand they are on, the rings will work. Use the opposite list to the one you are expecting to change the ring on a hand. Final fix: The fixes to these bugs have already been coded and tested, and will be in the next release (est. 11 April).
1680957316

Edited 1681374222
Richard @ Damery
Pro
API Scripter
Bug found: Searching, looting and storing items & equipment Fixed 13th April 2023 Bug: The V1.4.05 release introduced a bug that caused any search or storage of items & equipment on another token to display the item bag of the character doing the searching, rather than the character or container being searched. Temp work-around: Use the Change MIs  menu on the character where an item wants to end up, and add the item using this dialogue, then use the Change MIs  menu on the character from which the item is taken (or, if the menu is not available from the action buttons, either use the !magic --edit-mi command from the chat window or get the GM to use the [Add Item] GM menu) to remove the MI from it. Final Fix: The fix to this bug has already been found, coded and tested, and will be in the next release (est. 11 April)
1681374811

Edited 1682059025
Richard @ Damery
Pro
API Scripter
The latest release (13th April 2023) has fixed the issues previously notified above (manual saving throw updates, changing rings on hands, and searching, looting & storing items & equipment).  However, it has introduced a new bug: Bug found: Creating / Updating a Character's Spellbooks Fixed 17th April 2023, v1.4.07, live 21st April 2023 Bug: The Add to Spellbook button on the GM's  Token Setup  menu does not work, returning an immediate error. Temp work-around:  Edit the spellbooks manually on the Character Sheet for the Character, using the instructions in the RPGMaster CharSheet Setup help handout, section 8: Spellbooks and Memorisable Spells. Final Fix:  The fix to this bug is already found, fixed and tested, and will be in the next release (est. 18th April).
1681733005

Edited 1682059001
Richard @ Damery
Pro
API Scripter
Bug found: Areas of Effect don't appear if the map Grid is "off" Fixed 17th April 2023, v1.4.07, live 21st April 2023 Bug:  If the settings for a map page have the Grid turned off on the Page Settings tab, then any Area of Effect set using the !rounds --aoe  command does not appear, as the scaling is incorrectly calculated. Temp work-around:  Turn the Grid on for the map page you are wanting to display Areas of Effect on. Final Fix:  Hopefully, I've just been able to make this week's release, and it should go live with the final fix by 18th April. Once fixed, Areas of Effect will assume a grid scaling of 1 (i.e. 70 pixels to the unit) if the Grid is switched off.
1681797318

Edited 1682059128
Richard @ Damery
Pro
API Scripter
RPGMaster Release Notes for version 1.4.07 & v1.4.06 Propogated to live 21st April 2023 Spells as Powers in  Powerful  items It has been possible to store Spells as Powers for a character (via the   Token Setup / Add to Spellbook   dialogue) for a little while. It is now also possible to do this for items that can store powers. The GM can add powers to any item that has an API button that calls the command   !magic --cast-spell MI-POWERS|@{selected|token_id}   using the   Add Item / Store Spells/Powers in MI   button, and the dialogue presented will now allow spells (both Wizard & Priest) to be stored as powers in the item to be cast at a specified level and a specified number of times per day by the character, recharging after a long rest. Note that in order to implement this, if powerful items like this are stored, picked up, or transfered to another character using   MI menu / Search   or   MI menu / Store   the powers will be restored to full charges as if a long rest had occurred (I've used the field that passed the current charges left to transfer the level of casting instead). Arced Areas of Effect It is now possible to specify areas of effect that are arcs of 90 or 180 degrees. Just use the 'ARC90' or 'ARC180' area definition when calling the  !rounds --aoe  command. Drag & Drop  Creatures for Bags of Tricks I have added  Drag & Drop  creature definitions for all the creatures that can be summoned by all three types of the standard Bags of Tricks defined in the DMG (all of which are non-magical mammals). When a character uses a Bag of Tricks, a dice can be rolled to determine which creature appears of those that are possible for that type of bag, and the GM can then create a new character sheet in the Journal, give it an appropriate avatar image from their loaded art, and  Drag & Drop  the creature onto the map, using the presented dialogue to choose the appropriate creature. Macro-accessible Item Quantity The character sheet now has an attribute which holds the current number of charges left of the currently selected magic item, held in the attribute MIct|max. To see an example of how this is used, see the definition for the  Boots-Winged  item in the MI-DB database (and the associated  Boots-of-Flying-turn  effect in the Effects-DB database) which can fly for 120 minutes per day but which can be in several sessions. This sets a status round counter to the value of MIct|max, then counts down from this deducting 1 charge per round. If the character stops flying, the GM ends the status and the charges stop deducting. If there are charges left, the character can fly again for up to that duration. The charges then recharge over a long rest (rather than 24 hours, which it should be). New Effect ^^Duration^^ attribute tag In support of the Macro-accessible Item Quantity introduced above, the Effect attribute tag ^^Duration^^ has also been added. ^^Duration^^ specified as a tag in a "-turn" Effect macro will resolve to the number of rounds that have passed since the last "-turn" call, which is normally 1 round. However, if the GM uses the Maintenance Menu to set a new Round number in the Turn Tracker, ^^Duration^^ in any running Effect will resolve to the number of rounds that have passed (the difference between the previous and new round numbers, positive only). This allows the "-turn" Effect to, for instance in the Winged Boots example used above, reduce the remaining charges of the boots by the number of rounds passed. This allows the GM to skip over the rounds it takes for the character using the boots to fly somewhere, without having to go through each round individually (which would be boring for everyone). For Effect types "-start", "-end", "-add", "-dancing", "-inhand", and "-sheath", ^^Duration^^ always resolves to zero. Non-divisable Charged & Uncharged items Items that are Recharging, Rechargeable, Absorbing etc are always picked up or stored as a complete, singular item with all their charges intact which cannot be divided. However, Charged and Uncharged items (and Cursed, which is equivalent to Uncharged) with more than one charge present a menu on Searching or Storing allowing the character to pick or put one, all, or a specified number of the "charges" - which assumes the item can logically be divided. This is deemed sensible for potions and scrolls but, for instance, for a non-rechargeable wand with several charges it would be impossible to "snap the wand in two" and pick up or store only some of the charges, leaving the rest behind. So I've added two new types of item:  "Discharging"  (which is a non-divisable Charged item) and  "Cursed-Uncharged"  (an Uncharged item that is Cursed such that it cannot be divided or is otherwise not sensible to divide). It is also the case that only divisable items (i.e. Charged, Uncharged & Cursed - but not Cursed-Uncharged) can stack in the character's item bag, as others will not be able to be un-stacked as they are not divisable. Uncharged items (such as weapons, ammo and armour) and Charged items (such as potions and scrolls) remain both divisable and stackable. Magic Item Bags Some magic items are in fact bags that hold other magic items: e.g. a Bag of Holding, or a Bag of Beans. An item specification can now be written to automatically create a "magic item character sheet" which can hold other items, and even be specified with a starting set of items such as the beans in the bag. The character sheet so created will be controlled by and in the journal of the character that has the magic item bag, and if looted or given away, the ownership moves with it (requires the new owner to  view  or  use  the magic item bag first. See the Magic Database Help handout for more details. DM Info in Roll Templates Any Roll Template based on any RPGM template (except RPGMattack and RPGMmessage) can now have a line tag of "GM Info=" included, the contents of which will only be displayed if the GM is one of the recipients for the message: e.g. {{GM Info=This will be displayed if the GM is a recipient of this Roll Template message}}. This can be useful to include information you only want the GM to see, for instance about how to play a spell or how to tailor a magic item. Bug Fixes Fixes to issues with manual updates to saving throws, changing the rings on each hand using the  Change Weapon  dialogue and searching, looting and storing items and equipment, and the Token Setup / Add to Spellbook  menu.
1684596086

Edited 1685443833
Richard @ Damery
Pro
API Scripter
Intermittent token-drop bug Fixed: v1.5.01 released 20th May 2023, promoted to live 30th May 2023 Bug:  If an existing character sheet, which has a character level defined on the AD&D2e character sheet, but on which the Race field has never been touched  (i.e. the Race field will be totally undefined), is then dragged onto the map window to drop a token, the RPGMaster APIs will crash with a Firebase error. Temporary Workaround:  Make sure all Character Sheets have a Race defined in the Race field on the Character Sheet, even if it is a Space or hyphen. Best of all, put in any text you want in the Race field, then drop a token for the character, select it and use the Class / Race dialog under the GM's Token-Setup  menu to set the Race or Creature Type of the character from those available in the databases. Final Fix:  Fixed in the v1.5.01 release, 30th May 2023.
A Tip for Improving Performance Over a year ago, in March 2022, I moved all database definitions for items, weapons, spells, classes, races etc out of Character Sheets databases to data held in the code, with the ability to extract these databases to Character Sheets so that GMs could examine them and copy ideas for coding their own items for use with the RPGMaster suite.  The reason I moved the databases into the code was speed: it was much faster for my APIs to seach the internal databases than it was to use Roll20 functions to search the Character Sheets.  However, in order for GMs to overwrite definitions for existing items with their own, the APIs give priority to any database objects they find in Character Sheets, even though these are slower to access. So here is a tip:  If you are getting poor performance when running the system, ensure that as few database objects are held in Character Sheet databases,  outside the API data,  as possible. If you extract databases into Character Sheets to examine them, delete the Character Sheet once you have finished your examination. Only keep database objects outside of the APIs that you have created or altered from the standard ones. Hold these in Character Sheets that follow the naming standards outlined in the database help handouts (these are created in your campaign by the APIs). If you want to keep the Character Sheet databases for reference, rename the Character Sheet they are in to something that does not follow the naming convention (e.g. "My-MI-DB-Potions") which will then be ignored by the APIs. However, this will still mean that there are hundreds of additional objects Roll20 has to deal with in your campaign which might affect performance (though Roll20 is quite good at not loading them if they are not referenced during game play). I hope that helps you and your players have the best and smoothest campaign possible. The upcoming release has additional performance improvements to the Initiative process, the most multi-user intensive part of the system - look out for that this week.
I'm probably misunderstanding how the databases are read, but... if I have, for example, a Weapons Database to which I have added a bunch of unique items, and added the distinct suffix to the character sheet so that it is different to the dbase held in memory, if I removed everything OTHER than the items I have created from that unique database, would the API go read the original dbase held in memory if it wanted to find, say, a "Longsword +1" that no longer existed in my new one?
1684769028

Edited 1684769772
Richard @ Damery
Pro
API Scripter
Tommy said: I'm probably misunderstanding how the databases are read, but... if I have, for example, a Weapons Database to which I have added a bunch of unique items, and added the distinct suffix to the character sheet so that it is different to the dbase held in memory, if I removed everything OTHER than the items I have created from that unique database, would the API go read the original dbase held in memory if it wanted to find, say, a "Longsword +1" that no longer existed in my new one? Yes, absolutely correct. The APIs hold an index of everywhere items with a unique class and name can be found - this is rebuilt every time you start a new session, every time you use --extract-db, and also every time you run the --check-db command. So here is an example of a valid sequence: Start a session in your campaign with no extracted databases and no user databases - the APIs build an internal index with all database items held in data. Use the !magic --extract-db MI-DB  command to extract all objects in the MI-DB database - the API index now points all internal indexes of those items in the MI-DB database to the character sheet database holding them Rename the MI-DB Character Sheet to be MI-DB-Added - the APIs don't know about this database yet and none of its objects appear in the index. Change, delete and add items to the MI-DB-Added database. Run the !magic --check-db MI-DB-Added  command - the APIs now know about MI-DB-Added. The index is rebuilt from scratch. Items in MI-DB-Added are found: if they have the same names and are of the same item class as items in the internal databases, the ones in MI-DB-Added will be used. Those items that are found in the internal databases, including the internal MI-DB database, and are not in the MI-DB-Added database, will point to the internal definitions. Do more edits on MI-DB-Added - the APIs won't know about these new changes until you run a --check-db again. Run the  !magic --check-db MI-DB-Added  command again - now the indexes are rebuilt with these new changes to MI-DB-Added. etc, etc So in your example, the Longsword+1 would be found in the internal database as soon as you ran the --check-db command on your external database. Note that Roll20 oftn holds a ghost  of an object even after it is deleted from a character sheet database - thus even after you delete the "Longsword+1" from your external database its ghost might still be found there until  you run --check-db.  Once --check-db is run it will definately come from the internal database. I hope that clarifies things?
Richard @ Damery said: Tommy said: I'm probably misunderstanding how the databases are read, but... if I have, for example, a Weapons Database to which I have added a bunch of unique items, and added the distinct suffix to the character sheet so that it is different to the dbase held in memory, if I removed everything OTHER than the items I have created from that unique database, would the API go read the original dbase held in memory if it wanted to find, say, a "Longsword +1" that no longer existed in my new one? Yes, absolutely correct. The APIs hold an index of everywhere items with a unique class and name can be found - this is rebuilt every time you start a new session, every time you use --extract-db, and also every time you run the --check-db command. So here is an example of a valid sequence: Start a session in your campaign with no extracted databases and no user databases - the APIs build an internal index with all database items held in data. Use the !magic --extract-db MI-DB  command to extract all objects in the MI-DB database - the API index now points all internal indexes of those items in the MI-DB database to the character sheet database holding them Rename the MI-DB Character Sheet to be MI-DB-Added - the APIs don't know about this database yet and none of its objects appear in the index. Change, delete and add items to the MI-DB-Added database. Run the !magic --check-db MI-DB-Added  command - the APIs now know about MI-DB-Added. The index is rebuilt from scratch. Items in MI-DB-Added are found: if they have the same names and are of the same item class as items in the internal databases, the ones in MI-DB-Added will be used. Those items that are found in the internal databases, including the internal MI-DB database, and are not in the MI-DB-Added database, will point to the internal definitions. Do more edits on MI-DB-Added - the APIs won't know about these new changes until you run a --check-db again. Run the  !magic --check-db MI-DB-Added  command again - now the indexes are rebuilt with these new changes to MI-DB-Added. etc, etc So in your example, the Longsword+1 would be found in the internal database as soon as you ran the --check-db command on your external database. I hope that clarifies things? I think it does, but just to be sure... ...in order to avoid some of the Performance Issues you mentioned above, I could basically keep a small dbase of MY home home made macros, having deleted all the originals from my (for instance) character sheet "db  MI-DB-Tommy" while the original "Richard-Made" dbase character sheet sits behind the scenes doing the heavy lifting with its " db MI-DB"?
Tommy said: I think it does, but just to be sure... ...in order to avoid some of the Performance Issues you mentioned above, I could basically keep a small dbase of MY home home made macros, having deleted all the originals from my (for instance) character sheet "db  MI-DB-Tommy" while the original "Richard-Made" dbase character sheet sits behind the scenes doing the heavy lifting with its " db MI-DB"? Not sure what you mean here? Are you suggesting to keep a copy of MI-DB as an external Character Sheet database? Do not leave an un-touched MI-DB character sheet database in your campaign, especially if you then have items of the same name in another Character Sheet database. If the item with the same name and db type exists in two different character sheet databases (e.g. Longsword-Tommy exists in both MI-DB-Tommy1 and MI-DB-Tommy2) the system will find one of them, but I cannot guarantee which. If you want to leave MI-DB around for reference purposes, rename it to something like Tommy-MI-DB. This breaks the naming convention of the databases (which always must start with the name of a valid database type, such as MI-DB-Tommy, MU-Spells-DB-Tommy, or Powers-DB-Tommy etc). Naming it that way means the APIs will ignore it, and it will not affect performance (as the internal database items will be used). The "heavy lifting" should always be done by the internal databases, not any character sheet database.
Sorry, I think I've made this needlessly complicated by foolishly referring to ALL the dbases as being in "characters sheets", when obviously the ones running in the background aren't. What I meant was, if I take the dbase that I have amended by creating new items/spells/etc and renamed, and delete everything that I HAVEN'T made myself or altered in some way, (in essence... everything that was originally in there when I extracted it initially) the dbase in the background will function as the source for the items I deleted. So, as long as I keep prompting the system to check,  the only additional strain on performance should come from those few items/spells held in my own dbase Example. I rename the weapons dbase (by renaming the character sheet) "MI-DB-Weapons-Tommy" and create 3 new macros, "Big sword of doom" "Terry's axe of chopping" and "Sue's mace of intrigue...". I then delete EVERYTHING else from that dbase. I refresh the system by running the check command through chat. And the system will run both dbases and find all items (inc my three) and this will greatly reduce the potential strain on the Performance? That way I only need to keep my own items in my campaign, and leave everything else to run in the background. I'm pretty sure from what you have said that that is what happens. If this was really, really obvious to everyone else, I'm sorry... you must be reading this thinking "The man's a simpleton..." 
1684780862

Edited 1684780934
Richard @ Damery
Pro
API Scripter
What I meant was, if I take the dbase that I have amended by creating new items/spells/etc and renamed, and delete everything that I HAVEN'T made myself or altered in some way, (in essence... everything that was originally in there when I extracted it initially) the dbase in the background will function as the source for the items I deleted. You are correct in what you suggest - the items you delete will, after the use of --check-db, be picked up correctly from the internal databases. My suggestion is to extract the database you want (e.g. MI-DB-Weapons) to add items to, but don't rename it then add your own items. Instead use the [+Add] button on the Journal to add a new character sheet, then change the name of that character sheet to be 'MI-DB-Weapons-Tommy'. Then just copy the text of weapons in the MI-DB-Weapons database that you want to change or use as inspiration and paste them into new macros in your MI-DB-Weapons-Tommy database. Then just delete the whole of the MI-DB-Weapons Character Sheet, as nothing in there is created or altered by you. Once you have deleted that character sheet, remember to run the --check-db MI-DB-Weapons-Tommy command so the APIs reindex the databases and recognise that the MI-DB-Weapons database is now back internal to the code. It's up to you which way round you do this - I just find it quicker to delete the whole Character Sheet rather than go through deleting every individual macro object you've not touched (assuming you can remember which those are!). 
RPGMaster Release Notes for version 1.5.01 Promoted to live 30th May 2023 Improved Initiative multi-tasking When using "Group" or "Individual" initiative types, and multiple players and the GM are all in the process of specifying what they are going to do in the next round to set the correct Turn Order priorities, the system now responds much more quickly to the user's button selection, returning a "Please Wait" message when necessary, and pushing back non-critical processing until after players have completed action selection. This means that Turn Order entries for each character / NPC / Creature may be delayed for a few seconds after the final button press occurs. Turn tracker rotation on/off A new command has been added to RoundMaster v4.043 to stop and start the rotation of the arrow circle around the token that is at the top of the Turn Tracker. The command  !rounds --rotatetracker [ON/OFF]  takes one optional parameter of 'on' or 'off'. If no parameter is specified, rotation is toggled between the two possible states. This command has been provided after performance issues were found with the rotating graphics on some computers. "Looks Like" template tag A new field tag  {{Looks Like=...}}  has been added for the RPGMaster templates  RPGMspell  and  RPGMdefault , and all templates based on these (i.e. all tempates except  RPGMmessage  and  RPGMattack  templates). This field can be used to describe what a magic item looks like when it is first found. If the item is  hidden  as a different item using the GM's  Add Items  dialog and the template includes a "Looks Like" field tag with text, only the text in the Looks Like field will be shown to the player when viewed or used, up until the hidden item is revealed. The GM will always see the full item description whenever the GM views or uses an item, hidden or not. Auto-hiding of items A configuration flag can now be set by the GM using the  !magic --config  or  !attk --config  commands for "Auto-hiding Items". When set, and the GM adds an item to an container using the GM's  Add Items  dialog, and that item has a "Looks Like" field tag defined with text describing what the item looks like when first found (see previous note), the item will automatically be hidden as an item reflecting its generic item type (or supertype), or whatever has been set as its type using the "st:" data tag in the item definition. The GM can then specify when its true nature will be revealed (on viewing, on use, or manually by GM) using the other functions on the  Add Items  dialog. GM easy manual reveal for hidden items When a player character uses a hidden item, the GM is already passed a message in the Chat Window saying which item has been used, with a button to display the details of the item. If the item being used is actually a hidden item, when the GM displays the item description a button will appear for the GM to manually reveal the hidden item, if they so desire. This saves the GM having to use the  Add Items  dialog to manually reveal items. Default item class to "Miscellaneous" If the GM created new magic items in their own database, the class was restricted to those defined in the  Spells & Magic Items Database Help  handout. It is now possible to invent totally new item classes - all item classes not defined in the APIs will now default to working the same way as the "Miscelaneous" item class - that is they will appear in Miscellaneous menu lists, and can be used by any character class or creature that is defined in the databases as being able to use magic items. Alphabeticised item lists By default, all lists of magic items given on the GM's  Add Items  dialog and on the Player's  Edit Weapons & Armour  and  Edit Magic Items  dialogs are now alphabeticised. Select the letter from the first drop down to see a list of all items starting with that letter in a second drop down. The alphabetical lists can be returned to just show all items in one big list by using the  !magic --config  or  !attk --config  dialog, or for the GM using the "alpha true/false" button at the top of the  Add Items  dialog. AC Item combination rule data Data tags to specify which other types of AC item any particular item can be used in combination with, or not, can now be specified in the ACData section of an item definition using the  rules:  data tag. After the tag: preceeding an item  type, supertype,  or  name  with '-' means this item cannot combine with that type of item preceeding an item  type, supertype,  or  name  with '+' means it can always be used with it an item with '-acall' will not combine with any other AC items except those with a '+' an item with '-magic' will not combine with any magical armour an item with '-shield' will not combine with any form of shield See the  Weapons & Armour Database Help  handout for more information and examples. Improved Check AC dialog The Check AC dialog now explains the effect on AC of each item, even if the magical bonus or penalty is not displayed as part of the item name. Tidying Character Sheets Improved the function that examines Character Sheets in a campaign and removes any spurious objects created by the RPGMaster APIs so as to speed up processing. Custom Items database All custom magic items, ones that do not appear in any of the AD&D2e manuals, have been split out of the current databases and stored in a new database  MI-DB-Custom . These can be viewed by extracting the custom item database using the  !magic --extract-db MI-DB-Custom  command. However, in this release all custom items are indistinguishable from other items in the campaign. A future release will include a configuration flag to exclude or include the custom database from use. All GM-created databases will be unaffected. Bug Fixes A number of bug fixes have been applied, including: fixed handing an undefined Race character sheet field; fixed magic helm ac modifiers; fixed --mod-weap selection using a named item; fixed GM display of a spell or a used item to whisper to the GM only rather than display to all players.
1685442968

Edited 1686128148
Richard @ Damery
Pro
API Scripter
Bug Found: GM Add Items menu alphabetical lists Fixed in v1.5.02 release 6/6/2023 Bug description:  All the item lists on the GM's Add Items  dialog are permanently in alphabetical mode and cannot be switched to full list mode, even if the --config is changed or the [Alpha True] button is clicked to change it to [Alpha false]. Workaround:  If full (non-alphabetical) lists are needed, use the Attk Menu / Edit Weapons & Armour  dialog to add weapons, ammo & armour to a character, or the MI menu / Change MIs  dialog for all other items. On these dialogs, the buttons toggling the lists between alphabetic and full work (stored by UID). Once items have been added to a character, the GM can then use the Add Items  dialog to hide, rename, change quantites and costs, and store spells / powers in spell storing items etc. Of couse, the alphabetic lists work, and all items are there - if you are happy to use alphabetic lists the Add Items  dialog works just fine. Estimated fix date:  This fix was released to live in the merge made on 6th June.
1685549905

Edited 1686128207
Richard @ Damery
Pro
API Scripter
Bug found: Magic hit adjustment Fixed v1.5.02 release 6/6/2023 Bug description:  If a spell or magic item adjusts the attack of a creature by adjusting the Magic Hit Adjustment value (stored in strengthhit|max  on the character sheet), the magic hit adjustment would be severely mis-calculated and the AC hit randomly wrong. Temporary workaround: Hover the mouse over the AC Hit  value on the attack result dialog, and use the values shown to calculate the AC hit. Sorry, but this one does not have an easy workaround. Estimated fix date:  This fix was released to live in the merge made on 6th June.
1686203106

Edited 1689320171
Richard @ Damery
Pro
API Scripter
Bug found: Self-hidden Magic Items Fixed in MagicMaster v1.5.03, released 11th July Bug description:  If the --config option "Auto-Hide Items if possible" is set and a self-hiding item (one with a Looks Like  template tag in its database definition) is saved to a container or character sheet using the GM's Add Items  dialog or the Player's Change MIs  or Edit Weapons & Armour  dialogs, then the item will be incorrectly displayed and errors will occur when displaying it. Temporary workaround:  Turn off auto-hiding of items by using the !magic --config  command and selecting GM Hide Manually  for the Auto-Hide Items  configuration. If you want to hide items in a container as a different item, use the item hiding facilities of the GM's Add Items dialog instead. Estimated fix date [Update 13/06/23]:  The fix is already coded and tested, and will be in v1.5.03 of the RPGMaster Library expected 27th June.
1686218832

Edited 1686639122
Richard @ Damery
Pro
API Scripter
Bug found: Spurious error when checking/writing weaponised spells Fixed in 13th June release Bug description:  If the --check-db command is used on a Character Sheet database that contains weaponised spells or powers (spells/powers that are cast by taking them in-hand as a weapon, requiring an attack and "to hit" roll to succeed - e.g. Spiritual Hammer  or Spit Poison ), a spurious error message appears:     "[Spell/Power name] is of undefined type [melee | innatemelee | ranged | innateranged]. Please correct this item definition." The error message is wrong, and in fact no error has occurred. The spell/power will work as intended and can be taken in-hand and cast normally. Temporary workaround:  Just ignore the error message and carry on as normal. Fix date:  The fix was released in the 13th June merge.
1686294042

Edited 1689320041
Richard @ Damery
Pro
API Scripter
Roll20 Issue found: more than 1 target command fails Fixed by Roll20 in the new UI Roll20 issue description:   In the new UI  If a @{target|Select Character 1|token_id} chat window command is typed into the chat box, the player is prompted to select a token, and then the token's token_id is displayed in the chat window.  However, if two or more target commands with different targets is entered this does not work. E.g. the following command does not work: @{target|Select Character 1|token_id} and @{target|Select Character 2|token_id} It should ask for "Select Character 1" then ask for "Select Character 2" and then print "[token_id1] and [token_id2]" in the Chat window. Instead it asks for "Select Character 1", the player selects a token, and then does nothing more - noting in the chat window and Roll20 does not ask for the second target. This Roll20 bug has appeared in the last 2 weeks, and occurs in games with no APIs loaded  (none of mine and none of anyone elses). This bug will impact on some functions in the RPGMaster Suite (not many, but I may have missed some), and will definately affect chained API calls e.g. the following does not work (FYI this command is useful to set up a standard marching order for your party in the Turn Order) : !rounds --clear --clearonround off --addtotracker @{target|Select Guerk|token_name}|@{target|Select Guerk|token_id}|1||Leading the party --addtotracker @{target|Select Thorg|token_name}|@{target|Select Thorg|token_id}|2||Tracking second --addtotracker @{target|Select Sox|token_name}|@{target|Select Sox|token_id}|3||In third place --addtotracker @{target|Select Hekura|token_name}|@{target|Select Hekura|token_id}|4||Brining up fourth --addtotracker @{target|Select Oceanus|token_name}|@{target|Select Oceanus|token_id}|5||Near the back --addtotracker @{target|Select Rudolph|token_name}|@{target|Select Rudolph|token_id}|6||Guarding the back  Temporary workaround:  Revert back to the old UI, as it seems to work OK. Estimated fix date:  This is a Roll20 issue, not an API one, so I have no idea of timescales.  The Roll20 Devs are aware and are working on it. For the time being stick with the old UI.
1687811932

Edited 1689320259
Richard @ Damery
Pro
API Scripter
Major Bug Found - Adding Items to Characters Fixed in RPGMaster Library v1.5.04, released 11th July Bug description: For some reason, a piece of code that has worked for many months (admittedly lazily coded and poorly trapping errors on my part) has decided to not work any more. The result is that as of 27/06/2023 the GM's [Add Items] menu, accessed with the !magic --gm-edit-mi token_id command, throws an error whenever an attempt is made to add an item to a character. Temporary workaround:  Not an easy one - you can go to the GitHub repository and get the code for RPGMaster Library v1.5.02. To do this: Open the GitHub repository for RPGMaster Library by following this link . Copy the code displayed to the clipboard using Ctrl-A Ctrl-C Open the Mods / API page for your campaign Select the RPGMaster Library AD+D2e page and then disable it using the [Disable Script] button (don't delete it). Ignore the error messages you get in the Output Console and the Campaign Chat Window. Create a new page using the [New Script] tab and name it RPGMlibrary.js Paste the code you copied to the clipboard (using Ctrl-V) Click the [Save Script] button to save the code you have just pasted in. This has reverted you to the previous version of the RPGMaster Library, which is what is causing the issue. Once the fix is live, you will need to reverse this by Disabling it and then Enabling the One Click version disabled above, so that Roll20 loads the replacement version. Estimated fix date: The fix is coded and tested, and I've searched all other code for possible knock-ons. I've put in an urgent Pull Request to the devs to see if they can release it early.
Note that I have created a workaround for the Major Bug described above .  Follow this to get things working again (though the auto-hiding bug remains).
1689320919

Edited 1689320959
Richard @ Damery
Pro
API Scripter
Major Bug Fixes Released The latest release of RPGMaster APIs, which was made on 11th July, fixes all bugs listed above, including the major MagicMaster bug with !magic --gm-edit-mi  and the GM's Add-Items  dialog.  Please revert any API code of previous versions downloaded from GitHub to the latest One-Click versions by following the following actions (or however you find best): Open the Mods/APIs page of your campaign Choose the tab with the API code you wish to revert to the One-Click version Use the [Disable Script] button (or delete it using the [Delete Script] button) and ignore any error messages thrown up in the console Switch to the tab with the previously disabled One-Click version of the API and use the [Enable Script] button to re-enable it Alternatively, if you actually deleted the One-Click version previously, then search for the relevant One-Click API using the drop-down list on the Mods Library tab and install it. If not already running, open your campaign and check that the GM's Add-Items  dialog works and that Auto-hide options are now working. Let me know here if there are any residual issues.
1689322102

Edited 1690352967
Richard @ Damery
Pro
API Scripter
Major New Version 2.1.0 due before end of July Released to live 26th July 2023 The next major update of the RPGMaster suite of APIs is nearly ready for release, and it includes the following enhancements.  Please read through these and let me know in this forum if you have any questions or points you would like to raise, especially if you think the release will impact anything you are doing in your campaign. RPGMaster Release Notes v2.100 RPGMaster Release Notes for version 2.1.0 More multi-threading to improve performance Made many more functions asynchronous to multi-thread, meaning that multi-player operation feels smoother, especially on rolling Initiative which is the function that has most players interacting with the APIs concurrently, especially if doing  Group  or  Individual  initiative. Support for AD&D2e Character Sheet v4.18.0 Added support for the changes to the Rogue tab on AD&D2e Character Sheet v4.18, by ensuring the armour type gets copied to the correct data field. Added support for all spell tables, linking active spell database entries to Character Sheet memorised spell entries. Drag & Drop  Creatures gain Character Sheet Bios Creatures created using the  Drag & Drop  RPGMaster API method now get their full description inserted into the Bio tab of the Character Sheet, giving the controlling Players (usually only the GM) easy access to the same information they would find in the Monster Manual. Remember, the  Drag & Drop  method is to add an empty new Character Sheet to the journal (giving it only a meaningful name and icon), and then drag it onto the map to drop a token: when the dialog pops up in the chat window, ensure the token just dropped is selected and use the [Creature] drop-down list to choose the type of creature this token/character sheet represents. Extended Attribute Checks menu Added checks for Open Doors, Bend Bars, System Shock Survival, Resurrection Survival, Learning Spell Percentage, and Spell Failure to Attribute checks. Extended the syntax of Class & Race definitions in the databases so that Attribute & these other checks can be influenced (+/-) by race & class. Multi-token Initiative for GM Added ability for GM to select multiple tokens to specify Initiative actions for when using  Group  or  Individual  initiative. Initiative is done for each token in turn without the GM having to reselect each one. Each token can be given its own individual action.  Standard  initiative still works to roll a single die initiative for each of party and foes without having to select actions. Automatic Turn Order start & display When initiative is done for any token, the Turn Order will now automatically be opened and started without the GM needing to do this manually. The Turn Order window can, of course, still also be opened manually from the Roll20 Toolbar, and the RoundMaster API management of the Turn Order started using the [Start/Pause] button on the Maintenance window accessed by the !init --maint command or GM's macro bar [Maint-Menu] button, if the GM needs to do this for any other reason. Hiding Durations of Time-limited Statuses Some spells and effects (such as Fly) do not have an exact duration - the Character does not know precicely how long they will last - except that the Turn Announcement for the Character used to show the duration and count-down to expiry. From v2.1 status notifications on Turn Announcements have been changed so that if the "direction" value is less than -1 (a typical value is to use -10 and a duration x 10, but -2 and duration x 2 will show last 5 counts, -3 & x3 last 3 counts, -5 & x5 last 2...). This technique hides remaining durations from players if durations can be uncertain. The duration and direction values are still displayed on GM announcements for GM controlled creatures. New  touch:  and  cmd:  Tags for Weapons & Spells Added the touch:[0|1] data tag to weapons and weaponised spells - if touch:1 is added to the ToHitData specification the weapon is sheathed/spell expires on the first attack with it, if touch:1 is in DmgData or AmmoData the weapon is sheathed/spell expires when a successful hit is made. Added the cmd:cmd-string data tag to weapons and weaponised spells - if in the ToHitData the cmd-string executes on every subsequent attack, if in the DmgData or AmmoData the cmd-string only executes when damage is done/a successful hit. Note that only simple, single line commands can be executed this way: if more complex actions are required, use of statuses and effects will be required (see RoundMaster API Help handout). New  rules:  Options for AC & Saving Throw rules Added ACData rule rules:+inhand which, if included in the  rules:  string in an ACdata specification, means the item must be in-hand to have an effect on armour class (e.g. Defender Sword). Extended  rules:  data tag to work for saves as well as AC, so that data-driven rules for when saving throw effects of items apply or not can be included in the ACdata specification of the item definition. Extra Spell-storing Magic Item Support In previous versions, only the GM could add new spells to a spell-storing magic item, using the  Add-Item  dialog. v2.1 extends the --mem-spell command with -ADD and -ANY command qualifiers that give players the ability to add additional spells to a spell storing MI, and/or change the existing spells. This allows support for items like the  vibrant-purple ioun stone . Multiple Bug Fixes Fixed incorrect mapping of token bar values if none of the token bars are linked to any character sheet fields, causing miscalculation of attacks by creature mobs. Fixed issue of trying to display abilities with non-hyphenated names from a character sheet, which was causing display issues. Fixed an issue with spell and item definitions not being available for the GM to display when used by a Player Character. Fixed issue with ru:3 reusable ammo-changing items (e.g. a net), which was not updating the Ammo table correctly on use. Spell-storing MIs now restrict the "Change Weapon" lists to only include weaponised spells when casting from an in-hand spell-storing MI alongside other melee and ranged weapons. Fixed a bug which was setting non-MU and non-PR spell-casters (such as Bards and Paladins) to incorrectly have their spell-casting level set as for Wizard or Priest level (which is probably incorrect) rather than the spell level appropriate for their experience level as their own class. Fixed preserving the rotate-tracker status between game sessions. Fixed an issue preventing character classes from being able to have custom spell casting capabilities that included both Wizard & Priest spells. Database and Handout updates Added more miscellaneous Magic Items to the Magic Items Databases: All types of Horns of Valhalla, Horseshoes of Speed, Horseshoes of the Zephyr, Incense of Meditation, Incense of Obsession, Ioun Stones of all types, Iron Bands of Bilarro, and Iron Flask. Slowly working through adding all Magic Items from the DMG. Added creatures to the drag & drop Creatures database to support the Iron Flask magic item: Djinni, Invisible Stalker, Rakshasa, Salamander, & Wind Walker (from AD&D1e Monster Manual 1). All other necessary creatures are already in the  Drag & Drop  Creature database Added the last few 7th level Priest spells which for some reason had not been programmed in the original release: Regenerate, Wither (reverse Regenerate), Reincarnation, Destruction (reverse Reincarnation), Restoration, Energy-Drain (reverse Restoration), Succor, Reverse-Succor, Sunray, Symbol, Transmute Metal to Wood, Wind Walk Updated help handouts to reflect latest functionality.
1689368968

Edited 1689770446
Richard @ Damery
Pro
API Scripter
Bug Found: Tokens with no token bars linked Fixed in RPGMaster Library v1.5.05, released to live 19th July 2023 Bug description: If a token that represents a creature with a character sheet, but does not have any of its bars linked to any character sheet fields (e.g. if used as part of a creature mob), then the APIs (especially AttackMaster) would use an invalid default mapping for bars that have value  and/or  max  numbers entered, meaning incorrect values would be used in, for instance, attack calculations. Temp workaround:  where possible, use the Token-Setup  dialog, Manage Token Bars  function to link token bars to character sheet fields. Final fix date:  already fixed, and released in v1.5.05 of RPGMaster Library, now live. Please feel free to post in this thread if you have any issues with this, or any other bug.
1689838531

Edited 1689840787
Richard @ Damery
Pro
API Scripter
Now in final beta testing, here are some statistics about v2.1.0 of the RPGMaster suite of APIs: 365 Drag & Drop  AD&D 2e creatures available, from Aquatic Ogres  to Ju-Ju Zombies  and lots in-between such as Djinn, Rakshasa, Imp Mephit, Leeches and many more. 82 types of armour, both magical and ordinary, that the APIs recognise and automatically take account of 174 different weapons which can be taken in-hand and used to attack with, plus 30 different types of Ammo for ranged weapons All 108 potions, oils and elixiers defined in the Dungeon Master's Guide (including variants), which have effects on characters (where applicable) 65 different rings which can be worn on left or right fingers and often affect the character sheet as they should when worn, with the effect reversing when taken off. 77 pre-defined scrolls and spell books, but with the ability for the GM to easily create their own scrolls and spell books with any of the spells and powers provided. 68 Wands, Staves & Rods, which can be taken in-hand to wield with magical powers or, sometimes, used as a weapon. Ranged spells with grenade-like properties or spells requiring a melee attack are all catered for. 259 Miscellaneous Magic Items and their veriants from the DMG, including all the amulets, bags, cloaks, dusts, eyes, figurines, girdles, horns, ioun stones, manuals, necklaces, and pearls already programmed and functional (weaponised where appropriate and with effects where possible) - working through getting all the rest finished soon 353 Wizard spells, 231 Clerical spells, and 148 innate powers programmed and ready to memorise and cast, including all those from the Player's Hand Book, and some additional ones from other manuals. 157 API commands across 6 mods with 39,984 lines of javaScript, providing GM and players with countless menus, dialogs, help handouts, effects, tools & techniques to assist in AD&D2e game-play. And don't forget that the RPGMaster databases are totally customisable and expandable by you as a GM, following the detailed help handouts that come with the APIs and are automatically loaded into your campaign.
Hello! I'm a very new user of Roll20 and I wanted to use this API. Unfortunately the API crashes and I'm getting the following error message: Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your script's code and click the "Save Script" button. We will then attempt to start running the scripts again. More info... If this script was installed from the Mod Library, you might find help in the Community API Forum. For reference, the error message generated was: TypeError: Cannot read properties of undefined (reading 'toLowerCase') TypeError: Cannot read properties of undefined (reading 'toLowerCase') at LibFunctions.abilityLookup (apiscript.js:25897:19) at LibFunctions.resolveData (apiscript.js:27246:28) at apiscript.js:27440:64 at Array.map (<anonymous>) at LibFunctions.classObjects (apiscript.js:27440:25) at Object.classObjects (apiscript.js:28227:40) at classObjects (apiscript.js:8909:46) at handleNewToken (apiscript.js:15784:21) at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:168:1), <anonymous>:65:16) at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:168:1), <anonymous>:70:8) I've followed the instructions of the youtube tutorial up to the point where everything is installed, and I'm about to drag a newly made character to the playing field. Suddenly there appears a box with info about AC from AttackMaster which cannot be interacted with. Pressing the token and selecting the Token Setup button can work when restarting the script (sometimes) but also doesn't save any information that is being filled in. At the end it even gave another error in the chat box:
1690011206

Edited 1690012299
Richard @ Damery
Pro
API Scripter
seodoth said: Hello! I'm a very new user of Roll20 and I wanted to use this API. Unfortunately the API crashes and I'm getting the following error message: Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your script's code and click the "Save Script" button. We will then attempt to start running the scripts again. More info... If this script was installed from the Mod Library, you might find help in the Community API Forum. For reference, the error message generated was: TypeError: Cannot read properties of undefined (reading 'toLowerCase') TypeError: Cannot read properties of undefined (reading 'toLowerCase') at LibFunctions.abilityLookup (apiscript.js:25897:19) at LibFunctions.resolveData (apiscript.js:27246:28) at apiscript.js:27440:64 at Array.map (<anonymous>) at LibFunctions.classObjects (apiscript.js:27440:25) at Object.classObjects (apiscript.js:28227:40) at classObjects (apiscript.js:8909:46) at handleNewToken (apiscript.js:15784:21) at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:168:1), <anonymous>:65:16) at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:168:1), <anonymous>:70:8) I've followed the instructions of the youtube tutorial up to the point where everything is installed, and I'm about to drag a newly made character to the playing field. seodoth, thanks for reporting the bug. It was introduced by a fix for dual- and multi-class characters in the release earlier this week, so I hope it hasn't put you off! The crash occurs if the character does not have any class at all, or if all class levels are zero (or undefined). The workaround is relatively simple: before dragging the character sheet onto the playing surface, open it up and give it a level in any of the classes, e.g. j ust a level number of 1 will do in the Warrior level  (you can change these at will using Token-setup later). Then close the sheet, and drag it onto the playing surface - everything should then be fine, but until the fix goes live next week you'll need to do this for each new character sheet you create. If the APIs do crash again, you can open another tab of your browser and go to the Mods Script page for your campaign (you keep the campaign open just fine in the other tab) and restart the APIs using the [Restart API Sandbox] button, and everything should be working again. I've followed the instructions of the youtube tutorial up to the point where everything is installed, and I'm about to drag a newly made character to the playing field. Suddenly there appears a box with info about AC from AttackMaster which cannot be interacted with. Every time something changes, the APIs check a lot of different things. E.g. when a character sheet is dragged onto the playing surface that the system has not registered an Armour Class for, it checks the character's armour class by scanning the equipment on the character sheet and calculating the resulting armour class. If the calculated armour class is different from that displayed on the token, it pops up the armour class calculations it has done for you to review. In the case of a brand new character sheet with no equipment and a token that is not yet set up, the calculated armour class is 10, and the armour class displayed on the token is NaN (not a number).  Once you set up the token, the token will not show NaN for the displayed armour class, and once you give the character armour, shield, magic items etc, the system will take acount of those. If you think this dialog should not be displayed at this point, I could add a config option to turn it off? seodoth said: Pressing the token and selecting the Token Setup button can work when restarting the script (sometimes) but also doesn't save any information that is being filled in. At the end it even gave another error in the chat box: The error reoccurs if all the class levels are zero in this dialog - i.e. the character does not have a class. As a temporary workaround, always ensure at least one of the classes has a level greater than zero - i.e. always change a Level to 1 or more before selecting the sub-class of a character. I appreciate this makes use of Drag & Drop  creatures inoperable at the moment, though you can always just give them a Warrior level of 1, and their Hit Dice will override that. I hope that helps, and that you get some enjoyment from the use of these APIs, and sorry again that you hit such a bad bug so soon! I keep a very active watch on this forum, so do post any further issues and I'll resolve them as quickly as I can.
1690013642

Edited 1690015735
Richard @ Damery
Pro
API Scripter
Bug found: New characters, Drag & Drop  creatures, and characters of level 0 Thank you to seodoth for finding and reporting this bug Bug description: if a new, blank character sheet is dragged onto the playing surface the RPGMaster APIs crash with the error "Cannot read properties of undefined (reading 'toLowerCase')".  This also happens if using the "Race & Classes" dialog and all class levels are set to zero, unless this is a Monster/Creature with Monster Hit Dice set on the character sheet. This bug was introduced by the release of RPGMaster Library v1.5.05 on Tuesday 18th July. Temporary workaround:  before dragging any character sheet onto the playing surface, make sure at least one class level is set to 1 or more. When using the "Race & Classes" dialog, never let all the class levels be zero and also the Monster Hit Dice to be 0 at the same time. If using a blank character sheet for a Drag & Drop  creature ,  manually set the Warrior level to 1 in the character sheet and drop the character sheet onto the playing surface - the dialog for Creature selection will not appear because the Warror class has a level set. Manually go to the token-setup  dialog and select the [Choose Race/Class] button to open the dialog and select the Creature type - this will set all class levels to zero but, as the Monster Hit Dice are set and not zero it does not cause the crash. Final fix date:  I will load RPGMaster Library v1.5.06 with the fix to my GitHub today, for those who are despirate for the fix.  However, the fix will be included in RPGMaster suite v2.1.0, a major release which is going live (all being well) by Wednesday, 26th July.
It has definitely not put me off at all; it's an amazing project! Thank you for the fast response and work-around. I'm happy to help!
Version 2.1 now live The latest release of the RPGMaster suite, with all of the updates listed in the post above , has gone live via the One-Click Roll20 Mod Library. RPGMaster Suite new library entry The RPGMaster Suite can now be found more easily in the One-Click Mod Library by searching for "RPGMaster" and selecting the RPGMaster Suite entry to load. This will load all of the RPGMaster suite APIs into your campaign. Then use the command !cmd --initialise (or !cmd --initialize) to initialise the suite of APIs and create some useful macros for the GM, and read the Release Notes and other help handouts created for you in the campaign.
1690363136

Edited 1690387270
Richard @ Damery
Pro
API Scripter
Bug found: Character Sheet tidying too agressive Bug description:  This bug has been around for a while, but I've only just realised what was causing it.  Under the following circumstances, the character sheet tidying function is run by the APIs, which removes unused attributes and abilities  from the character sheets identified: When a token representing a character sheet is dropped onto the playing surface; When the Player Page is changed, for all tokens on that page and their represented character sheets; When the GM issues a !magic --tidy command, either specifying a token_id, or with token(s) selected, or without a specification making it run for all tokens. The APIs do this in order to reduce the complexity of character sheets, and reduce the number of discrete objects being stored and managed by Roll20 as having lots of objects in a campaign can have an impact on overall performance. However, the current tidying function is too agressive, removing all ability macros on the character sheet that do not represent spells or magic items that character has memorised or holds, or are in the token action bar. This means that bespoke ability macros added to the sheet by the GM or Player (e.g. to add traps to chests for when searching for magic items) are incorrectly removed by the tidy function. Temporary workaround:  tick the "Token Action" flag on the ability macros you definately want to keep: ignore the action buttons that appear when that token is selected - this will force the tidy function to ignore the ability macros with this flag ticked. Final fix:  is already coded and will be released next week: for those that can't wait, the amended version of the code is here . This will only delete ability macros on character sheets under the following circumstances: The ability macro name starts with "Do-not-use" which means it is considered to be a dynamically built attack macro: these will be rebuilt dynamically as necessary on the next attack; or The ability macro: does not represent a spell, power or magic item the character has in their spellbooks or in their equipment bag; and does not have the "Token Action" flag ticked; and is defined in a database, either in memory or a character sheet database (either extracted or GM-created), which means the ability is easily recreated. If the character regains the use of the items represented by these deleted ability macros, they will be automatically recreated from the databases. This leaves all ability macros on the character sheet that are not named the same as any database item - i.e. those added manually by GMs or Players for their own purposes or to add traps, locks or passwords to containers.
1690465853

Edited 1690467873
Richard @ Damery
Pro
API Scripter
Drag & Drop  Trapped Containers You may be aware (if you've watched my videos) that the RPGMaster APIs support the searching of chests, tables, and dead bodies (among other things) for treasure and magic items that can be taken from the container, placed in a character's equipment bag and used. In a somewhat clunky, mostly manual way the APIs also supported trapping these containers, but you had to know a little about Roll20 macro programming and be confident in what you were doing. Good news GMs! All the hard work is done for you in the next release of RPGMaster! The next version, v2.2, includes Drag & Drop  trapped containers, with many different types included, such as: a chest with a lock requiring a specificly numbered key that shoots poisoned darts out if you don't disarm the trap, a chest that requires the correct password to open it, or it releases a stinking cloud a wizard locked  spellbook containing spells, the spells being added by the GM after the trapped spellbook is dropped on the playing surface. Containers have descriptions that the GM can view in the  Race/Creature/Containers dialog  using the button at the bottom of that dialog that appears when the container (or race or creature or class) is selected. Each Drag & Drop  container is defined in the "Race-DB-Containers" database, and the definition specifies the trap sequence that that particular trapped container type will have. The sequence is drawn from character sheet ability macro definitions held in another database, the "Abilities-DB" database.  Each ability macro is of one of several types: Initial macro called when the container is first searched Lock specification macros, for instance to respond to having the right key Trap finding & removing macros that check a percentile roll vs. a skill The trap trigger, which shows the damage done or kicks off the effect Plus several other types. How to define new ability macros to add to the Abilities-DB , and how to specify new trapped containers and add them to the Race-DB-Containers database, is explained in the new Containers Help handout distributed with the v2.2 APIs. As with any character sheet, be it for a Drag & Drop  container, an NPC, a creature, a token/character sheet pair representing a table, or any other such combination where a token is associated with a character sheet, items of equipment, potions, scrolls, weapons, and other magic items can be added to it with the GM's Add-Items  dialog. If a character performing a search on the container successfully negotiates any traps, the container will eventually open to list its contents and allow the character to loot it. In general, once a container trap has been overcome, the trap is permanently disabled for that container and the container can be used to loot or store items at will without further risk. However, a Reset action button is available (as one of the optional ability macros for a Drag & Drop  container) which will appear for any Player that controls the container, to allow the trap to be reset. Also, the trap does not have to  permanently be disabled - it can be a permanent, recharging trap which has to be overcome each time the container is searched.
Reposted my answer to a question here, as it might be of use to others: Tommy  said: Hi Richard, things have been going along swimmingly with the Mod and my players are getting used to it at a splendid rate. One request I've had from one of my players who is often out of town on game night so can't play from his PC and plays from a small screen/laptop quite a bit is this... Is it possible to, instead of having buttons for some of the API commands, to have the chat text used, so that he can type a shortcut into the window rather than have his screen overloaded with buttons. The way he described what he is after is something akin to typing  /Saves  or  /ChangeW  into the window and the window opening those sub menus. The way to achieve this is for your player to create command macros in their  Collections  that duplicate the action buttons he wants to have access to, and then they can type  #name  to run the macro called  name . The  Collections  are set by going to the tab in the Roll20 Chat which is the three lines: Here's th sequence to do what this player wants: 1. Work out the command you want to use - typically open the Character Sheet of any character and go to the  Attributes & Abilities  tab. Then h over over any of the Abilities that have the  "Show as Token Action"  box ticked - these are the ones that appear as buttons up the top of the screen, the actions the character can take - then click on the "pencil" icon that appears to open the Ability Macro. The command that does that action appears. Alternatively  look in the API Help handouts for the commands you want. 2. Go to the  Collections  described above.  Open this and at the top right is the [+Add] button. Add an entry named with some memorable name, and type the respective command found in 1 into the Actions. If you don't want to take up screen space, don't tick the "Show as Token Action" tick-box. Save the changes. 3. In the Chat Window, you can then type  #name  and run that command. E.g. for  #Saves  use: 4. Either the player can create these for themselves in their own  Collections  or the GM (you) can create them and add the Player's name in the [Visible to Players] field.  Useful macros might be (in each case will only work if a token is selected before running the command): #Initiative or #Init !init --menu #Attack !attk --attk-hit or !attk --attk-roll or !attk --attk-target #Save !attk --save #CheckAttr !attk --attr-check #ChangeW !attk --weapon #AttkMenu !attk --menu #GetAmmo !attk --ammo #Cast !magic --cast-spell MU-PR #Power !magic --cast-spell POWER #UseMI !magic --use-mi #SpellMenu !magic --spellmenu #PowerMenu !magic --spellmenu |POWER #MIMenu !magic --mimenu #Light !magic --lightsources
1693818635

Edited 1693819360
Richard @ Damery
Pro
API Scripter
Next Release & Drag & Drop  Containers Sorry that the next release, including Drag & Drop  containers as promised here , is taking so long to finalise. I have changed my mind several times during the course of development as to how best to make them as flexible as possible for both GMs and Players. I am very close to release - I was hoping to release this week, but I had some last minute tweaks to "Picking Pockets"  and also to managing locks and traps when trying to Store  stuff in a locked/trapped container. This extra time has led to there being much more flexibility. The GM or game creator can now mix and match different containers, locks & traps at will, or have no lock, but just a trap and visa versa, or neither of each. Each provided container has a default closed  and open  token image that the GM/game creator cah easily change if they wish, as well as token images that can be used by the locks & traps to show different states of play. The Containers, Locks and Traps come in separate databases with documentation as to how the GM/game creator can add their own or adapt what is there.  Optional configuration allows GMs to roll for chances of the likes of  Find Traps  or for the player to do so, depending on your group's preference. Locks and traps can trigger effects, spells, areas of effect, etc - in fact anything that the RPGMaster suite of APIs can do, or any other APIs or Roll20 can do.
The Drag & Drop  containers release is live and seems to be working well (at least I've not had any reports otherwise...). I'll post a video of how to use Locks & Traps on Drag & Drop  containers soon, as I am currently working on the most complex of creatures - Drag & Drop   Dragons of every colour & age!
1695809557

Edited 1695809625
Hi Richard, Brilliant news. Thanks again for the hard work you put into all this.  It's been so long since I installed all the RPGM stuff, (and, touch wood, it's been running like an Aston Martin...)  can you just post a refresher on how to find/install the Drag and Drop Containers  without me having to reinstall the whole shebang... I always get hyper nervous about losing/buggering things up when doing something like this. cheers Tommy (Edit to add: "Dummies Guide" level if that's OK...)