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 .
×
Advertisement Create a free account

Non-coder building an NPC-generator: Help, thoughts, ideas, feedback.

1626895229
<a href="https://github.com/tbouchelle/Roll20-NPCMaker.git" rel="nofollow">https://github.com/tbouchelle/Roll20-NPCMaker.git</a> &nbsp; I have just begun learning any form of coding at all, so this is going to be very clunky, I'm sure. After watching a couple videos by&nbsp; Nick Olivo &nbsp;I felt inspired to try to make a script that could generate an NPC and a character sheet with a little more depth than the the basic "add character" function built into Roll20. I made some rollable tables with names from 5e sources (didn't want to include in code in case of Intellectual Property violations) and some possible occupations an NPC might have. At the moment I just have a few options (Male/Female) (Dwarf/Elf) and in theory I could just flesh out the rest of the 5e races in a similar fashion. It works atm, but before going further, I thought I'd see if any folks had any feedback. I'd very much like to consider this just an open-source idea; if someone better wants to take it and run, by all means. Else, I'll chug along and try to make something useful for myself and maybe a few others. Thanks in advance
1626897486
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
This was written for the Shaped Sheet, but you might be able to adapt some of its principles.
1626939934

Edited 1626940104
Setup steps: Upload tons of generic npc portraits, grab all of their in-quota url's and make a rollable table for each of them.&nbsp;&nbsp; Make a table for female and male first names and last names Make a table for voice details and/or popculture character voices for references Make a ton of tables for personality quirks and random story hooks Install Token-mod, GM-note, Recursive tables, Table export.&nbsp;&nbsp; Here is my Female npc: !token-mod --set imgsrc|[[1t[NPCFemaleImage]]] name|"[[1t[NPCFemaleFirstName]]] [[1t[NPCLastName]]]" !set-gmnote {{Voice=[[1t[NPCVoice]]] | Quirks = [[1t[NPCVoiceQuirk]]], [[1t[NPCTrait]]], [[1t[NPCTrait]]], [[1t[NPCTrait]]]}} My key mods the token of the commoner token with a new image and the DM notes have details.&nbsp; If I need to save said npcs for call-backs in campaign I save the tokens in a graveyard page to call back to.&nbsp; Obviously the male version is similar to the above.&nbsp;&nbsp; I dunno how anyone can host a live session with many npc sheets in the journal.&nbsp; This platform does not do well that way, it'd be a bad idea to make random npc's character sheets, just use the commoner for useless npcs, if you need a smart npc use the Mage statblock too, if you need a strong character use the berserker sheet.&nbsp;&nbsp; Oh also one more thing, in your default settings:&nbsp; Turn off show name in templates for all npc sheets so that your rolls don't say the wrong thing.&nbsp;&nbsp;
1627502963
So I have a partial, but still functioning version of this script up. It seems to be doing what I need for. I'm hoping next to write a function that can access a rollable table as well the weights and roll from it the same way it would happen in game. Since certain races will be prevalent and others quite rare, I would like that to be reflected when randomly building an NPC. The alternative I suppose would be to just make a rollable table and include the more common races multiple times, and the rarer ones once or twice. If anyone has any thoughts there or on how I can improve the formatting when putting that info into the character sheet, I'd love to hear it. Otherwise, I'll just keep on fumbling around trying to make this better.