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 .
×

Python NPC generator and import functionality into roll20

Hello everyone, I'm very new to DnD and I've decided to make my own campaign for my players and I have decided to put my python scripting skills to use to automate the generation of assets for my game. This is the plan at the moment: I've downloaded a character sheet of one of the characters and I want to edit it using beautifulsoup with parameters generated using RNGs.  You give a bunch of basic information such as: - Class - Level - "Strenght Average" => Overall sum of primary attribute points. "Average" would be 55-65, while "Legendary" would be 100-110 or something. - "Class archetype" => Let's say you one of those were "stealth ranger" and he would have proficiency in stealth, perception and sleight of hand etc. and the script automatically rolls a half-finished NPC template you can then manually edit to completion.  Then you could simply upload the character sheet to your campaign and use it to roll it's attacks and saves or whatever without having to track everything in notepad. The problems with this are twofold: A) Is this even useful if it were to work as I imagine it or is it complete overkill to have a full character sheet for some NPC? B) Even if I have fully finished html file for a character, I cannot upload it to troll20. Could such an import function be implemented/added in the future? I guess I could use requests in order to make my own bare bones API, but that would be a nightmare and a half to create. What would be really neat is if there was a web API for roll20 or just a specialised import function that accepts a plaintext .csv that roll20 can receive and automatically create the character sheet I want. What do you think about this idea? PS: I'll probably just create a plaintext attribute generator first and think about the html editor later, if it comes to that.
1643557476
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
This is something that is probably not going to happen on Roll20, especially not the html file upload as character sheets have special requirements for the html used to generate them. But with Python, you could probably use Beautiful Soup to directly interact with the Roll20 character sheet.