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

Distributable libraries of spells & magic items for API use

I have built a suite of APIs for D&D use (initially for AD&D2E, but written in such a way as to be able to automatically switch rulesets and character sheet designs for other game systems) that manage weapon and magic item use in a similar but more functionally rich way to 5e Compendiums.  They allow any token/character sheet to become containers for weapons and magic items with full specs held in libraries, that can be "picked up" or "looted" (or pick-pocketed, or stored (e.g. in backpack "containers") or given away, or swapped with other characters) live in-game and immediately used with full effects on to-hit and damage; and magical effects on all character sheet and token attributes; timing, with effects on attributes at start, each turn and end of magic effect duration; containers can be trapped with visible effects; group, individual or cycling continuous initiative management; money management for treasure, spell material costs, costs for training and leveling-up; costs for shopping for goods and magic items, or services from temples and guilds, etc, etc. If the Roll20 gods (i.e. the development team) OK my APIs for release once I have fully documented them, others will I hope find them as useful as the (very patient) DMs I've been testing them with for the last 9 months. However  (there's always a but), the APIs rely on data libraries of Magic Items, Spells, Weapons, costs for services and the like which, for ease of DMs accessing & updating for themselves, I have created as Ability Macros in Character Sheets used as libraries.  The idea is for the APIs to do all the complex bit, and for the DMs to change or add the (mostly) simple data in the libraries to customise weapons, magic items, costs & services for their campaigns.  These libraries are not as easy to distribute as Character Sheets alongside the APIs through the Roll20 Script Library or on GitHub, and yet that is what I want to do (over 1,000 spells, Magic Items, Weapons and services defined to date).  How do I distribute these to be both easy to distribute and also easy for non-Java savvy DMs who just want to make a great dungeon to amend for themselves? I'd like advice as to how this might be done.  If there are other example APIs that do a similar thing around, point me in their direction and I'll look at what they do that works with Roll20. Thanks in advance. Richard @ Damery
1620311389
The Aaron
Roll20 Production Team
API Scripter
If they contain copyrighted material, you don't distribute them unless you have written permission from the copyright holders.  If they're all original content that you have created which don't make use of copyrighted or trademarked information, you check them in with the scripts. In all likelihood, you would publish what the format of those data files are and provided SRD content (if there is any), or personally created examples, and allow users to create their own files.
You're absolutely right on the copyright front - I'd not want to do something wrong there.  There is plenty of SRD stuff - especially all our bespoke magic items, and also the training service costs etc (though not those for standard equipment) which are independently invented, and all the bespoke magic weapons (though not any standard ones from any manual). How do I "check them in" with the scripts - I've stored my scripts in my copy of the GitHub repository, ready to do a pull request, and I can create the JSON script file OK, and all the documentation (which is mostly pdf slides with graphical explanations).  But while I can store Character Sheet HTML/CSS, I don't think I can "store" Character Sheet data on GitHub?  Or is there a way to extract a JSON string of a Character Sheet to a file to store there?  I could write something, of course...
1620320567
timmaugh
Pro
API Scripter
The wiki has information on using Git with Roll20 ... though that page is character sheet specific. Basically, you need to merge your changes into the roll20 repo, have a properly formatted script.json, and flag in your pull request that you want your script to go into the one-click. And then do that again the next week. Maybe one more. =D Eventually, they get it in there. As for getting your libraries distributed, you'll have to abstract your own process for getting the data across... meaning how will it be stored and how will it be installed? If the place where you want to store it is a character sheet, then you can write your own scraper to write the JSON (probably Base64 encoded) out of your local/dev copy, then package a decoder with your script to create and populate that sheet in the destination game. I would expose a registration function out of your main script that would let these libraries notify your script of their presence. Then you could have a chat menu in the destination game that would display the libraries you had available and allow you to begin the import/build of the data. That way, you could publish other modules (libraries) and let people implement multiple libraries. All the user has to do is get the new library installed, then run the configuration for your script to import the data to a character. Your script (importer, character creator, config, exposed registration, and whatever else you have to manage the function of the library items in game) gets submitted to the one-click, but the library itself is separate (also submitted to one-click). You could add a dependency for this library to your main script, so that it will at least install with one library. But then you could offer other properly encoded libraries for people directly from your own repo (they don't have to go through one-click to utilize the exposed registration function) or you could also submit them to the one-click. As for example scripts... my ZeroFrame, Plugger, and InsertArg scripts all use an exposed registration function to hook exo-script functions into what those scripts do... And as for what it might look like to have extra libraries available on the one-click, there are a couple of scripts out there that are listed as "such-and-such theme" which I believe are optional components to extend an existing one-click script.
Great idea to do registration of the libraries - all my APIs already register with my CommandMaster API, which uses this to enable various DM and Player functions, so easy to add the libraries to this registration process.  CommandMaster will also detect the type and version of the Character Sheet configured for the campaign and adjust the rulesets accordingly.  The GM  can create their own libraries following the documentation to create their own MIs, spells & weapons, and change the costs of things, and implement magic, trap & spell effects using the exposed commands. I'll also document the exposed registration process so that others can extend the functionality. However, this is going to take a while to finalise, run through my two testbed suites, and then play test with at least 2 D&D campaign groups with my tame GMs!  I think it will be worthwhile when its released, though.  I hope others will find it useful as an extension to game play. My goal with this suite is to allow GM & Players to concentrate on the story and the imagination, and reduce the focus on game mechanics - AD&D2E especially can be somewhat complex (something later releases simplified somewhat).
1620413484
Gold
Forum Champion
I would like to learn how to do the implementation for AD&D 2E. Cuz that's what I run and play on Roll20 the most anyway 8-)