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

Hey Richard, thanks so much for the prompt response,  I have indeed all the aforementioned libraries, and also the macros on my lower screen. 1. I have clicked the Wizard drop down menu and picked the Transmuter for my player. So i see currently Transmu (it cuts out due to limited size of the box). I did try another specialist as a test, the invoker whom I saw on your video you used on tour tutorials, still not working.  2. Allow Any Specialist is chosen with red text on white bg.  ( I changed it to Specified in Rules and I do see the +1 Specialist now! It calculated it just right )  3. Picked from the drop down the transmuter too and  I see Transmuter Level 1 as intended.  4. Correct that was the problem before I changed the config to the other option.   So we successfully managed to solve it with the change in the config for the specialist but what those two do differently?   Huge thanks again first for your time to make this amazing api and second for the help here. 
1715875078

Edited 1715875226
(Just realised you are dealing with something else, so don't worry... this can wait...) Hi Richard, experiencing a few issues with magic items.  Every item that "does something" is hitting a  "Gathering Data" phase and nothing happens. It then shows a "Return to Menu" button and pressing that goes back to the characters inventory with the item greyed out and unusable, but not reduced in number. Tried with Potions, scrolls, and wands and all are hitting the same issue. The items aren't being removed from the inventory, but not sure if it is my connection or something else. We've not been playing for a few weeks, and 4 out of the past 5 sessions have involved no combat, so we haven't really been using items. So I don't know if I missed an update and have something set up wrong? Spells and powers seem fine. Sorry to be a pain...  Just wondered if there have been any changes to item databses that wouldn't have updated on the Players' character sheets?
1715877683

Edited 1715877840
Richard @ Damery
Pro
API Scripter
Tommy said: (Just realised you are dealing with something else, so don't worry... this can wait...) Hi Richard, experiencing a few issues with magic items.  Every item that "does something" is hitting a  "Gathering Data" phase and nothing happens. It then shows a "Return to Menu" button and pressing that goes back to the characters inventory with the item greyed out and unusable, but not reduced in number. Tried with Potions, scrolls, and wands and all are hitting the same issue. The items aren't being removed from the inventory, but not sure if it is my connection or something else. We've not been playing for a few weeks, and 4 out of the past 5 sessions have involved no combat, so we haven't really been using items. So I don't know if I missed an update and have something set up wrong? Spells and powers seem fine. Sorry to be a pain...  Just wondered if there have been any changes to item databses that wouldn't have updated on the Players' character sheets? Tommy, Sorry to hear you're having issues. I'm out tonight, so the earliest I can look at this is tomorrow (Friday) afternoon. The current version has been used by our group for a few weeks, but perhaps we didn't hit the specific issue you mention for some reason.  I'll give it a thorough review and get back to you asap.
Nick M. said: Hey Richard, thanks so much for the prompt response,  I have indeed all the aforementioned libraries, and also the macros on my lower screen. 1. I have clicked the Wizard drop down menu and picked the Transmuter for my player. So i see currently Transmu (it cuts out due to limited size of the box). I did try another specialist as a test, the invoker whom I saw on your video you used on tour tutorials, still not working.  2. Allow Any Specialist is chosen with red text on white bg.  ( I changed it to Specified in Rules and I do see the +1 Specialist now! It calculated it just right )  3. Picked from the drop down the transmuter too and  I see Transmuter Level 1 as intended.  4. Correct that was the problem before I changed the config to the other option.   So we successfully managed to solve it with the change in the config for the specialist but what those two do differently?   Huge thanks again first for your time to make this amazing api and second for the help here.  Nick, Glad that the problem has been solved by selecting a different configuration. However  the point still exists that "Allow Any Specialist" was not granting a +1 spell to those wizards that were not Wizard, Magic User, or  Mage.  I'll check that out.
1715936202

Edited 1715943174
Richard @ Damery
Pro
API Scripter
Richard @ Damery said: Nick M. said: Hey Richard, thanks so much for the prompt response,  I have indeed all the aforementioned libraries, and also the macros on my lower screen. 1. I have clicked the Wizard drop down menu and picked the Transmuter for my player. So i see currently Transmu (it cuts out due to limited size of the box). I did try another specialist as a test, the invoker whom I saw on your video you used on tour tutorials, still not working.  2. Allow Any Specialist is chosen with red text on white bg.  ( I changed it to Specified in Rules and I do see the +1 Specialist now! It calculated it just right )  3. Picked from the drop down the transmuter too and  I see Transmuter Level 1 as intended.  4. Correct that was the problem before I changed the config to the other option.   So we successfully managed to solve it with the change in the config for the specialist but what those two do differently?   Huge thanks again first for your time to make this amazing api and second for the help here.  Nick, Glad that the problem has been solved by selecting a different configuration. However  the point still exists that "Allow Any Specialist" was not granting a +1 spell to those wizards that were not Wizard, Magic User, or  Mage.  I'll check that out. Nick, I've found the issue with specialist mages when the configuration option "Allow Any Specialist" is selected - a database error in the Class-DB database did not set the specmu:   data attribute to 1 for the standard specialist mages, so the system did not recognise them as specialist when that config option is selected. I'll correct this in the next release, but you can use the work-around for now.  If you have the "Allow Any Specialist" config option selected and for the wizard class choose "Other" then type in any non-standard specialist class name (e.g. Transmutist - i.e. different from Transmuter) then it would see it as a specialist (though I found a little bug here when testing - this currently throws an error). Of course, it would not know which spell schools would be illegal for "Transmutists", whereas with the "Specified in Rules" option will deny illegal spell schools to standard specialists (unless the config option for Spell Schools is set to "All can use Any"). If you want to define your own wizard specialist classes, take a look at the Class & Race Database Help  handout regarding defining your own classes.
Bug found: Config "Allow Any Specialist" not working correctly Description of bug:  If the RPGM configuration option "Allow Any Specialist" is selected for "Specialist Wizards" then the extra +1 spell per level will not automatically be added for specialists. Further, on the "Review & Set Race & Classes" dialog (otherwise known as the Drag & Drop dialog ) selecting "Other" for the Wizard class and typing in a custom wizard class currently throws a non-fatal error when it should use default Wizard specifications but mark the wizard as a specialist. Temporary fix:  If using only the standard specialist wizards as defined in the AD&D Player's Handbook, select the RPGM configuration option "Specified in Rules" for "Specialist Wizards". Alternatively, in the Spells-Menu > Memorise MU Spells  dialog, click on the number of spells (the white number on a red background in the sentence (" wizard name  can memorise [#] spells at level n") then click on the [# misc] button in the dialog that appears and enter 1, which will add 1 extra spell slot at that spell level.   If wanting to use a custom specialist, extract the Class-DB database, cut and paste the database macro for "Wizard" into a new ability macro, and give it the new custom specialist name - this will allow the "Other" option to find it in the databases. (Find more info on creating a specialist wizard database entry in the Class & Race Database Help  handout). Permanent fix ETA:  Fixes to both issues have been coded, and just need a little testing to make sure they work under all circumstances. Likely release (assuming no problems) will be week of 27 May.
1718724342

Edited 1718724396
Richard @ Damery
Pro
API Scripter
RPGM Release Notes v3.500 RPGMaster Release Notes for version 3.5.0 Going live this week, 19/06/2024 v3.5 Release Notes Saving Throw Mods Table Many spells and powers as well as magic items have an effect on saving throws and attribute checks. To date, all such effects have been lumped into a single "effect of magic" number with no further explanation when reviewing how saves and checks are calculated. Now, a (hidden) table is held on each character sheet which holds saving throw and attribute check modifiers currently in force, with a name and a source, and optional durations in number of saves to which the mod applies and/or the number of rounds duration of the mod. The mods can apply to one type of save/check, more than one, or all. The mods are specific to the character represented by the sheet. Commands exist (documented in the  AttackMaster Help Handout ) to add, modify, and delete the mods. This new system can also be used to create totally new, bespoke saving throws based on any existing saving throw, which can be modified. For instance, the spell  Bless  only affects saves against  Fear  effects. Using the new mod commands a new "save vs. Fear" button can be added to the Saving Throw table for the duration of the  Bless  only for those characters who are blessed, which is based on a save vs. spell but with a +1 bonus. At any time, the player can review the way their character's saving throws and ability checks are calculated by selecting the [Auto-check Saving Throws] button on the Saving Throw dialog, or equivalent button on the Attribute Check dialog. Status Targeting with Saving Throws The RoundMaster --target command (and associated other token status management commands) can now take a saving throw specification as the last argument, defining the type of save required and any bonus or penalty to the save. This only works if RoundMaster is being used with AttackMaster. The effect of adding this optional parameter is that the player issuing the command will be prompted to ask the player controlling the target token to make the appropriate saving throw and, if that saving throw is made using the AttackMaster saving throw dialog (which will apply the bonus or penalty as specified in the new parameter), a failure will automatically apply the status and any associated effects to the token. If the save is made the status is not applied. Multi Mode for Status Targeting Multi  has been added as a command mode for the RoundMaster --target command, alongside the existing  caster, single,  and  area  modes. Multi mode is similar to area, but allows the player to shift-select multiple tokens at the same time, and then click one button to apply the status to all those tokens. If the new saving throw parameter (see above) is included, the player will be prompted to ask for saving throws to be made for all the selected tokens - which can all happen simultaneously with the outcomes described above. For the multi command, RPGM maths for the duration, direction and/or saving throw mods can include the symbol '#' which will be replaced with the number of tokens selected and allow these numbers to vary by the number of tokens targeted. This is useful where saving throw bonuses or penalties vary by numbers of targets, or the duration is divided across the targets, for instance. Important Note:  When this new multi mode is used for a --target command, at the point the command is entered  all tokens  on the same Roll20 page as the caster token temporarily become controllable (and thus selectable) by the player controlling the caster token. Also,  all tokens without controllers (or otherwise controlled by the GM)  that have sight under Dynamic Lighting will be temporarily "blinded" - this is so that the player controlling the casting token is not suddenly able to see the whole map, and the dynamic lighting Explorer Mode is not compromised. The temporary blinding and control are automatically removed as soon as the casting player clicks the button to apply the statuses  or issues any other API command (RPGM or otherwise) . Simplified Status Targeting Confirmation Options have been provided for better control over the requirement for the GM to confirm all targeted token status changes made by a player using RoundMaster --target command. Two new qualifying command modifiers now exist: --target-nosave and --target-save. The first will not prompt the GM for a confirmation when applying a status to a token (though this behaviour can be altered using the --nosave command), whereas the second will  always  prompt for confirmation even if the command is issued by the GM. --target-nosave is useful when casting a spell or an item power that has no saving throw e.g. where applied to the caster themselves. --target-save can be useful to remind the GM to prompt for or make saving throws. The --nosave command will turn off or on the --target-nosave behaviour. Action Buttons Disabled on View When spell and item descriptions are viewed (rather than cast or used) all action buttons in the spell or item macro are now "greyed out" and not selectable, so that effects are not inadvertently applied and charges aren't accidentally used due to the player selecting an action button. The one exception is for any action buttons that start with "View" in the button text - this allows, for instance, players to still view the spells contained in a spell-storing magic item. Renaming of Non-Stackable Loot Some items are not stackable in containers or character's backpacks, such as wands with charges or spell-storing items. However, it is also the case that items in containers should have unique names to identify them, so if two of the same non-stackable items are found, one of them needs to be renamed. This is now automatically detected and the player prompted to enter a new name for the second (or subsequent) items picked up. The renamed item retains all its properties, powers, stored-spells, etc. Configurable Automatic Hits & Misses To date, automatic hits on a natural 20, or automatic miss on a natural 1, have had to be applied manually on targeted attacks. By default, automatic hits and misses will now be applied for targeted attacks but with an RPGM Configuration option to turn this off. Similarly, Critical Hits and Misses (which need not be equivalent to natural rolls of 20 & 1) now also automatically hit or miss on targeted attacks and also have a separate RPGM configuration option to turn this off. Updated Database Items to Latest Features Now all magic items defined in the AD&D2e Dungeon Master's Guide have been defined in the RPGM databases, the on-going task of updating and refining them has started. Potions, scrolls, and rings have been reviewed and updated - though the impact will seem very limited to those using them. All spells, both Clerical and Wizard, and all Powers, have also been updated. Spell Databases Split by Level In order to make spell databases more manageable, they have been split by level, with Wizard spell databases now being MU-Spells-DB-L# and Clerical spell databases being PR-Spells-DB-L#. This will not affect any currently extracted spell databases or DM's custom spell databases, which will continue to function as before. The only visible impact is on extracting databases where a choice of databases will now be offered when extracting spell databases. Added Ceiling & Floor to RPGM Maths The RPGM alternative to Roll20 maths for numeric values now includes ceiling and floor operators.  c(...)  will return the value in the brackets rounded up and  f(...)  will return it rounded down. Fixes While I am sure everything worked when first coded, subsequent changes have had unexpected consequences and players have also done things I didn't expect (is that not the story for all GMs?). Hence fix lists continue... Fixed magic item rev: (reveal hidden item trigger) database attribute Fixed --display-attribute to properly support %{...|...} and database item variables Fixed ^^duration^^ tag in effect macros to insert the current remaining duration of the status Fixed use of '=#' when setting override initiative modifiers and for --mi-charges Fixed default ToHit dice specification in getToHitRoll() if ToHit dice are not specified in the Attack macro Replaced MIrowref lookup when making magic attacks as might not be pointing to correct magic item Fixed errors in renaming magic items when new name includes all or part of the old name Fixed spell-storing items with the -ADD command qualifier to correctly allow the character/player to add new spells
1718973640

Edited 1718973660
Richard @ Damery
Pro
API Scripter
Moving Token States to a Copied Campaign To support the JumpGate  release to all Roll20 users, I am finalising a small extension to RoundMaster   to support exporting Token Statuses  from a campaign to a copy of that campaign created using the Roll20 campaign copying function. The Need:  In order to migrate an existing game from the current Roll20 platform to the new JumpGate  version, the GM must use the Roll20 Campaign Copying function, selecting the new JumpGate Beta Platform  during the process of making the copy. However,  this function does not copy the APIs or the all-important Roll20 state variable that holds the RPGM configuration and RoundMaster token status and effect tables. The RPGM APIs can easily be loaded from the Roll20 One-Click library. However, doing this creates a new, blank, state variable. The Solution:  I will release as soon as possible a version of RoundMaster  that has two new commands: --state-extract and --state-load API-name . Running the !rounds --state-extract command will create a "StateMule" character sheet that contains a JSON stringified version of the complete state object of the campaign in which the command is run.  This character sheet can then be "Transmogrified" (standard Roll20 function) to the copy campaign (for instance, one running on  JumpGate ) and then the !rounds --state-load RPGM command run in the copy campaign, which will restore the Roll20 state variable to the same state as the original campaign.  Note:  the RPGM  is actually unnecessary, as the load will default to loading all RPGM API states and nothing else. !rounds --state-load all will load the complete extracted state variable, including for non-RPGM APIs.  I cannot guarantee this will not cause issues. !rounds --state-load API-name  (e.g. API-name could be RoundMaster) would load the state for just the named API. Other than for RPGM APIs, case is significant to the individual API: it is suggested the case of the JSON text in the "state" ability on the StatusMule character sheet is examined for the correct case. !rounds --state-load API-name1 | API-name2 | API-name3 | ...  will load the states of each of the named APIs. The same case rles as above apply for non-RPGM APIs. As this is a RoundMaster command, only the RoundMaster API need be loaded and in use.  The rest of the RPGMaster suite is optional. Hopefully this capability will be in the next merge, to allow you all to enjoy  RPGMaster with JumpGate.  I'll post here when it goes live. If there are any other features you'd like for this, let me know.
1723151013

Edited 1723790491
Richard @ Damery
Pro
API Scripter
A Few Fixes These fixes went live on Wednesday, 14th August 2024 In the MOD merge the following fixes were released: Containers dropped to a map will correctly scale with the map settings - i.e. if the scale is 35 pixels is 5ft (instead of the standard 70), the container will scale appropriately. Characters / Creatures of type "Forced Sentient" (see GM Add Items) can now have items stored to them by characters (previously this was blocked in error) If the configuration flag for skills checks is set to "GM Rolls", the result of thieves rolling to detecting noise will only be revealed to the GM so that the player does not know if there is no noise to be heard or if they have failed to detect any noise, and/or the GM can take into account other factors in their response to the player's action.
Hullo,   I followed the steps to add the APIs;  I seem to get an infinite loop error in the mod screen.  I cannot seem to locate any of the RPG master macros;  however the chat window does suggest they loaded. Any suggestions?  The !cmd --initialise doesn't seem to prompt any response in the chat window. Thank you, harticus
Erik H. said: Hullo,   I followed the steps to add the APIs;  I seem to get an infinite loop error in the mod screen.  I cannot seem to locate any of the RPG master macros;  however the chat window does suggest they loaded. Any suggestions?  The !cmd --initialise doesn't seem to prompt any response in the chat window. Thank you, harticus Erik, thanks for the message and sorry you are experiencing a problem. I have tried to reproduce the issue in a new campaign/game by loading the "RPGMaster Suite" Mod / API from the Roll20 One-Click Mod Library, and I don't get any errors, and I've also used the APIs in an existing campaign without errors.  Can I ask you to check a few things to see what is happening? If following the instructions in the videos, you may have loaded "CommandMaster" from the Roll20 Mod Library. This is fine and works the same as loading "RPGMaster Suite" Are you adding the RPGMaster Suite to an existing campaign, or to a brand new one just created? If loading to an existing campaign, what other Mods / APIs are already loded before you add the RPGMaster Suite? When creating the campaign, or adding the mods to an existing campaign, have you selected the "Advanced 2nd Edition" character sheet? When loading the RPGMaster API suite, are you selecting "RPGMaster Suite" Mod from the Roll20 One-Click Mod Library drop-down (or "CommandMaster" which works the same), and then selecting [ OK ] button on the pop-up that appears to load the other scripts linked to the suite? On the "Mods for [your campaign name] " tab do all the following scripts then get loaded: RoundMaster, RPGMaster Library AD+D2e, InitMaster, AttackMaster, MagicMaster, CommandMaster, LibTokenMarkers, ChatSetAttr, TokenMod, as well as the original RPGMaster Suite (RPGMaster Suite will not appear if you used "CommandMaster" to load the APIs)? The RPGMaster Suite does not use macros, and no character sheet "mules" are created to hold macros.  All processing is done in JavaScript code which extends the Roll20 core functionality. However, the RPGMaster Suite does create 17 Help Handouts which you should see in the "Journals" tab of your campaign once you open it: if these are not there the RPGMaster Suite has not loaded correctly. Are they there? The !cmd --initialise  command is actually no longer necessary, as when correctly loaded the suite will now detect a new install and initialise automatically. Go to the "Collections" tab of your campaign and as GM you should see a number of Macros in there - tick all the "In Bar" tick boxes and the "Show Macro quick bar" tick box. Open the "Mod Output Console" on the "Mods for [your campaign name] " tab (same page where you loaded the Roll20 Mod library) and do a print screen of it just after starting the campaign in another tab and send it to me (you can PM me if that is easier). That way I can see any error messages. I hope this might provide a few pointers to what is happening. Do get back in touch with me, either here or via a PM.
1726402986

Edited 1727368148
Richard @ Damery
Pro
API Scripter
Bugs Fixed: L8 Wizard Spells & RPGMaster Maths Description of Bug 1:   Level 8 Wizard spell definitions have been overwritten by Level 7 spells in the distributed databases, and will cause an error if a player or GM tries to view their descriptions, memorise or cast them. Temporary fix:  While it would be possible for a GM to write a complete new MU-Spells-DB-L8 database, using the information provided in the Spells Database Help  handout, this would be tedious. Alternatively, the fix is applied and has been released for next week's merge, and in the mean time use the Player's Handbook and apply 8th level Wizard spell effects manually. Unfortunately, there is no other temporary workaround that I can think of. Description of Bug 2:  The RPGMaster Maths processor, used for calculating certain value ranges e.g. for Drag & Drop  character attributes, does not support in-line attribute descriptions properly: an example is ac = 1d6+1 [AC varies from 2 to 7 by individual]   which should result in returning a value between 2 and 7 (i.e. 1d6+1)  with the descriptor given between the square brackets displayed under certain circumstances.  This was not happening and instead an error was being returned by the maths processor on encountering any attribute definition with a square bracket descriptor. Temporary Fix:  In many cases, the error being reported does not cause an immediate issue - the system carries on processing, though the value being evaluated by the RPGMaster Maths system may not be set correctly and can be manually corrected. However, if the error is causing an issue, find the relevant attribute definition in an extracted database, and remove the square brackets and all text in between from the attribute definition in any database entry (see the relevant database help handouts for information on how to do this). Permanent Fix ETA:  The fix has been done for both bugs and has been released for automatic One-Click Mod update, which should go live next week (18/09/2024 onwards). [Edit update 21/09/2024]: Didn't go live last week as a merge was not completed. Hopefully the fixes will release this week (25/09/2024 onwards) [Edit update 26/09/2024]: Gone live and all seems to be working fine now.
1726914052

Edited 1727368375
Richard @ Damery
Pro
API Scripter
Bug Fixed: Slow & other Area Effect spells with saving throws Bug Description:  When a player character casts a spell that has an area of effect that can effect multiple tokens who can then have a saving throw, an error may be reported and the spell effects may not be applied. An example of this is the Slow  spell. This bug only affects spell casting of a very specific type, where it generates a Player (not a GM) call to the RoundMaster !rounds --addStatus command with a saving throw extension in the 6th parameter. Temporary Fix: If the Player gets an error when trying to apply the effects of a spell (e.g. pressing the [Slow Them] button in the Slow  spell description) the GM can cast the spell for the Player, by selecting the Player Character's token and using the [Cast Spell] action button in the same way the player would (the GM may need to re-memorise the spell for the Player Character first as it might already have been marked as already cast). The GM is not affected by this bug, and so the spell will work for them.  Once the permanent fix is released, the Player will again be able to cast the spell as normal. Permanent Fix ETA:  The fix has been done and has been released for automatic One-Click Mod update, which should go live next week (25/09/2024 onwards). The RoundMaster v5.057 code is available on GitHub if you can't wait. [Edit 26/09/2024]: Permanent fix released and all seems to be working fine now.
The three bugs detailed above (posts here and here ) have now been fixed, the fix released, and the release tested (at least, tested that these bugs are fixed!).  Do let me know if you find any other issues. Richard