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

5e Shaped Companion Database Writer

1490893797

Edited 1490894387
I recently wrote a quick hack-job program in Java to quickly write and produce monsters in the current format that the API uses. Basically, it goes through one by one each possible part of a monster so that I can quickly type the information. Like this: Then, it will output something like this in the console automatically: {"name": "Aarakocra", "size": "medium", "type": "humanoid (aarakocra)", "alignment": "neutral good", "AC": "12", "HP": "13 (3d8)", "speed": "20 ft., fly 50 ft.", "strength": 10, "dexterity": 14, "constitution": 10, "intelligence": 11, "wisdom": 12, "charisma": 11, "skills": "Perception +5", "passivePerception": 15, "languages": "Auran, Aarakocra", "challenge": "1/4", "traits": [{"name": "Dive Attack", "text": "If the aarakocra is flying and dives at least 30 feet straight toward a target and then hits it with a melee weapon attack, the attack deals an extra 3 (1d6) damage to the target."}, {"name": "Summoning Air Elementals", "recharge": "Short Rest", "text": "Five aarakocra within 30 feet of each other can magically summon an air elemental. Each of the five must use its action and movement on three consecutive turns to perform an aerial dance and must maintain concentration while doing so (as if concentrating on a spell). When all five have finished their third turn of the dance, the elemental appears in an unoccupied space within 60 feet of them. It is friendly toward them and obeys their spoken commands. It remains for 1 hour, until it or all its summoners die, or until any of its summoners dismisses it as a bonus action. A summoner can't perform the dance again until it finishes a short rest. When the elemental returns to the Elemental Plane of Air, any aarakocra within 5 feet of it can return with it."}], "actions": [{"name": "Talon", "text": "Melee Weapon Attack: +4 to hit, reach 5 ft., one target. Hit: 4 (1d4 + 2) slashing damage."}, {"name": "Javelin", "text": "Melee or Ranged Weapon Attack: +4 to hit, reach 5 ft. or range 30/120 ft., one target. Hit: 5 (1d6 + 2) piercing damage."} The problem is that I am VERY NEW to programming. I have just barely started scratching the surface on how Java works. As such, I don't know how to make this run in a pleasing GUI interface or anything like that. As far as I know, it needs to be run in an IDE like Eclipse through the console. I'm just wondering if anyone would be interested in the JAR file of this. You can do whatever you want with it, maybe even improve it so it works better than what I've done (may be difficult because my code is a nightmare). I can also write a Readme file for instructions and answer any questions afterward. **Update**: Oops, apparently passive perception isn't supposed to be entered as its own property. Removing that real quick.
1490906023
Kryx
Pro
Sheet Author
API Scripter
I don't mean this negatively, but it seems a bit unnecessary to add a layer of abstraction when the layer of abstraction is nearly identical to the JSON output. The JSON format is incredibly simple. Goblin for example: { "name": "Goblin", "size": "Small", "type": "Humanoid (goblinoid)", "alignment": "neutral evil", "AC": "15 (leather armor, shield)", "HP": "7 (2d6)", "speed": "30 ft.", "strength": 8, "dexterity": 14, "constitution": 10, "intelligence": 10, "wisdom": 8, "charisma": 8, "skills": "Stealth +6", "senses": "darkvision 60 ft.", "languages": "Common, Goblin", "challenge": "1/4", "traits": [ { "name": "Nimble Escape", "text": "The goblin can take the Disengage or Hide action as a bonus action on each of its turns." } ], "actions": [ { "name": "Scimitar", "text": "Melee Weapon Attack: +4 to hit, reach 5 ft., one target. Hit: 5 (1d6 + 2) slashing damage." }, { "name": "Shortbow", "text": "Ranged Weapon Attack: +4 to hit, range 80/320 ft., one target. Hit: 5 (1d6 + 2) piercing damage." } ] } It's quite readable to the plain eyes beyond traits and actions. If anything I think the value would be in converting a statblock to the JSON format. It would be rather simple to write.
Do you happen to have a blank template for a spell Kryx?. Having trouble figuring out what needs tweaking on my homebrew spells. 
Gary the actual spells are in the companion script so easy enough to create a blank template from there [on my to-do list]
Maybe what you should do is create a very simple database manager that lets you input monsters and spells.  It would be awesome if it output an entire js  database 
1491791911

Edited 1491856106
<a href="https://drive.google.com/open?id=0BzZ2o6uO0jwJZnI0RlAwYTRkd2c" rel="nofollow">https://drive.google.com/open?id=0BzZ2o6uO0jwJZnI0RlAwYTRkd2c</a> I decided to move from Java and build this thing in Visual Basic as a form. It's much more user friendly than before.
1491856318

Edited 1491934359
**Update** I improved the functionality by making it so that you can hit TAB to navigate through the entire form without ever having to click on anything. I also have redundant fields disabled by default until you edit the previous ones. For example, you need to enter something in Trait Name 1 before Trait Recharge 1, Trait Text 1, and Trait Name 2 are unlocked, and so on. This allows you to rapidly Tab past the traits/actions/legendary/lair/region fields if the monster doesn't have them. I also added a little Read Me. **Update x2** Actions weren't being outputted correctly. **Update x3** I just created a second program for building spells which is now in the folder. **Update x4** Removed herbalism as a monster skill and fixed an issue with traits after the first printing as "text": "example", "text": "example" instead of&nbsp;"name": "example", "text": "example" <a href="https://drive.google.com/open?id=0BzZ2o6uO0jwJR0l5bUFoRTJZX1U" rel="nofollow">https://drive.google.com/open?id=0BzZ2o6uO0jwJR0l5bUFoRTJZX1U</a>
1493299788
Zym
Sheet Author
Well I think its a good idea. I was looking for something similar for a little while. I have used the database but from the angle of formatting this makes it a little bit easier on the eyes from a designer context. Thanks for the hard work !
Makes life easier for the non programmer- thanks
1493815061

Edited 1494258092
I just finished my Java class in college, so I was able to make this in a Java GUI. It was some good practice and a few people said that the other version didn't work for their OS. The main downside with this version is that it doesn't automatically scroll around the window when space/enter/tab is hit. I'm not sure how to make that work in Java. If you have a second monitor or are using a book/writing to make entries, it shouldn't be much of problem though. **Update** The majority of the fields are now hidden until necessary to avoid user error and for easier accessibility. Arrow keys can now be used to navigate combo boxes, and they also expand automatically upon reaching them. The form self-navigates "somewhat" as the form is filled out. This is a real pain that I can't get working 100% perfectly, but it is effective most of the time as it stands. If the form is not maximized in its own window, you may need to scroll a bit at times (remember Shift+Mouse Wheel can be used for horizontal scrolling if a vertical scroll bar is also present). **Update 2** The spells field automatically sorts itself alphabetically upon hitting enter. The output text is automatically copied to clipboard upon hitting Calculate (to avoid accidentally hitting Clear right after finishing everything and losing work/time). <a href="https://drive.google.com/open?id=0BzZ2o6uO0jwJR0l5bUFoRTJZX1U" rel="nofollow">https://drive.google.com/open?id=0BzZ2o6uO0jwJR0l5bUFoRTJZX1U</a>
1494610781

Edited 1494610810
Keep getting an error, saying there is an unexpected character. I don't see any extras. He's anybody used this to make a database for shaped yet? (Spells database) Ss
1494618194

Edited 1494618266
Gary W. said: Keep getting an error, saying there is an unexpected character. I don't see any extras. He's anybody used this to make a database for shaped yet? (Spells database) Ss Currently trying to update the spells part; I've been mostly focusing on the monsters until now. I accidentally left out "components": &nbsp;before the components block, such as&nbsp; {"verbal": true, "somatic": true, "material": true} A manual fix, for now, would be to copy and paste it so it reads (for example)&nbsp; "components":&nbsp; {"verbal": true, "somatic": true, "material": true} . The format for spells seems much more complicated than monsters. I'll post here again when I figure it out.
Thank you for the work you are doing on this!
Just a reminder, in the new spell format the database has a separate section that lists out the class spell names. So the user needs to makes sure they make that section as well
These are the changes that need to be made to make the database writer work for spells. Place the&nbsp;"components": in front of&nbsp;{"verbal": true, "material": true, "materialMaterial": "a weapon" }, Change the order they are listed to&nbsp;name, level, school, casting time, range, components, duration, description. I didn't seem to need to change the damage or save sections.&nbsp;
Seems that target and aoe are no longer valid fields in the shaped database. It does need an other damage to handle spells that don't require an attack or save. Order is name, level, school, casting time, range, components, duration, description, attack, save, other, heal
1494947868

Edited 1494947894
<a href="https://drive.google.com/open?id=0BzZ2o6uO0jwJR0l5" rel="nofollow">https://drive.google.com/open?id=0BzZ2o6uO0jwJR0l5</a>... I rewrote the program in Java because the visual basic one became corrupted somehow for me. It should be working fine, but I haven't tested any outputs in Roll20 itself yet. That being said, anyone using it should make sure what it puts out actually works in the Shaped API before they make a hundred spells just to find out something is wrong with them all. Let me know if you find any errors. Gary W. said: Just a reminder, in the new spell format the database has a separate section that lists out the class spell names. So the user needs to makes sure they make that section as well Do you mean the part with a class with all the spells listed along with archetypes like this? "classes": [ {"name": "Bard", "spells": ["Animal Handling", "Animal Messenger", "Animate Objects", "Awaken", "Bane", "Bestow Curse", "Blade Ward", "Blindness/Deafness", "Calm Emotions", "Charm Pe . . . . ]}, Gary W. said: Seems that target and aoe are no longer valid fields in the shaped database. It does need an other damage to handle spells that don't require an attack or save. Order is name, level, school, casting time, range, components, duration, description, attack, save, other, heal I commented out the target and aoe for now then. As for "Other", what spells exist that would fall into this? The only one I can think of is magic missile. If this would only represent one or two spells out of hundreds, then it would be better to just type it out by hand in a text editor rather than using a program like this. I'm saying this mainly because it would make the layout of the GUI even more janky than it currently is and would be somewhat difficult to put in.
Yes to the class section- otherwise the spell will potentially be in the database but wont display. If the other is a hassle don't worry about it. If you comment out the parts that no longer need to be there, switch the order they are strung together in, and add the "components": then the program should work!
Two fixes: Changed "size" to "school". Added a check box for rituals.
Is the "effects" field even used? I see it used in some databases I've found but not in others. Was it from a previous version of the script or something?
I tend not to use it. But not sure
I tend not to use it. But not sure Repeat would be a nice option
Just realized the Concentration check box wasn't working. I just fixed it, but if you used this for any spells involving concentration, copy and paste&nbsp; "concentration": true, &nbsp;before "duration"
1495232704

Edited 1495232979
I'm not sure if spells that aren't instantaneous &nbsp;don't have their effects happen immediately after casting should have saves and damage attached outside the description. For example with most smites, it's an extended duration with effects that trigger later on rather than immediately. The damage roll is pretty much useless because it shouldn't be known before the attack is even made.
That is where the repeat function is so key
I removed all the "HigherDie" fields because they apparently don't exist in the current script. I also added "saveSuccess" as a field. How does the repeat function work exactly? I'll try implementing it if I get an idea of how it's used or what the fields for it would look like in the script.
In the shaped sheet there is a field that you click when you add the spell. Let's you call it in a macro as repeatable.&nbsp;
Is there a way to have the initial casting have no/different emote or effects while hitting repeat does? For example, using Blinding Smite without an emote or the damage listed, but hitting repeat will show the damage and emote. The reason being is that you cast the spell, and the effects of the spell may not happen until 3 turns later. Would that be possible by using the Freetext or Freeform fields?
I don't believe that would work&nbsp;