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

Importing external stats into 5e NPC sheet

Hi, I wrote a tool for generating random NPC statblocks for 5e D&D. I would like to be able to export these into Roll20 somehow, so that going from generating a new monster on my site to rolling initiative on its token is as quick and painless as possible. A previous program I wrote generated random battle maps. I had an API script that would parse chat inputs and place tokens accordingly, so you could paste the output of my program into chat to create the map. I believe I could do something similar for this new tool, but I would rather have something usable by free users. Could anyone point me in the right direction? Thank you very much.
1549446312
GiGs
Pro
Sheet Author
API Scripter
You could use Jacob's script chatSetAttr, if there's some way of converting your stat bloc into a format suitable. I have used programs like excel to achieve that in the past. I think one of the D&D sheets might have a native parser built in (shaped?), or maybe that's just pathfinder?
1549464746

Edited 1549464830
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
The Shaped Script can parse from a properly formatted stat block inserted into the GM Notes field. It does require the API, of course. For the Roll20 sheet, there is an API script that can import the JSON file created by DnDBeyond, but the latter goes beyond a mere stat block, importing fully-realized character sheets.
Thanks for your replies! It looks like I'll have to use the API, but that's not the end of the world. I appreciate your suggestions and will dig into them.
I think you can import characters via <a href="https://ssstormy.github.io/roll20-enhancement-suite/features.html" rel="nofollow">https://ssstormy.github.io/roll20-enhancement-suite/features.html</a> &nbsp;without a Pro subscription. &nbsp; Their JSON format is basically just all the Roll20 attributes written out (I used it before to create a debugging tool for BeyondImporter.) &nbsp; &nbsp; So try if you can export/import without Pro using that, and then just write your code to spit out compatible JSON (which is really just flat attributes anyway.) &nbsp; &nbsp;