Hey, I made an online version of this that doesn’t require installing Python! Go check it out!
One of my biggest issues with towns in TTRPGs is that they lack a certain amount of life… literally. I’ve played in huge metropolises and tiny hamlets, and outside of the goods and services available, they’ve felt the same. There’s that one merchant you talk to, that one tavern you know about, and a handful of NPCs that are fairly interchangeable.
As a GM, I’d love to have a town where everyone has a name and a personality. I don’t really have the time to put that together by hand, though. I’m also wary of dumping a huge amount of time into something that my players may simply ignore. I could just make it up as I go along, but I’m terrible about writing down improvised details while in the heat of the moment (this is how a certain shopkeeper in one game ended up with at least four different names).
Ideally, I’d want something to do the work for me, naming my NPCs, giving them personalities and businesses, naming said businesses, and then handing it off to me to use if needed.
Enter the town generator!
Generating random sets of things is something that code is perfect for, so I decided to put together a script that could do it for me. My goals for it:
- Create a town of N size
- Populate it with residents
- Give those residents values to give them some character (age, traits, a wealth level, a job)
- Give some of the residents a family
- Pop residents and their family (if any) into a building of some sort
- Name the taverns and shops
- Print the whole shebang out to a CSV, so the user can open it in Excel / Google Sheets / whatever
I tinkered with it for a few days, putting in work during coffee breaks and when I had a fit of inspiration. I grabbed a few random data sources, like a list of traits from a researcher at MIT and a bunch of medieval names from an online database. I also spent a bit of a time refreshing random word generators to get some data for my building names.
The results
I ended up with a script that did just what I wanted: Creates and populates a town with residents and businesses! You can see the results of one of the towns I made here.
One of the things I’m enjoying the most are the emergent stories. I considered putting in certain requirements (like a town must always have at least one shop or at least one temple, or can’t be made of only children), but decided against it. For one, it started to feel like a bit of a rabbit hole (why not check the types of temples, or traits that don’t go together, or not having any middle class, or…). But it also created some interesting stories when outlier cases popped up.
For example, in one town I generated, there were a TON of temples. Out of some 300 buildings, 100 of them were a temple of some kind (the normal ratio would have been much lower). What’s going on in a town like this?! Maybe there’s a ton of factions. Maybe the residents follow some of the lesser known gods, or have their own totem spirits. Or heck, maybe they’re all charlatans! And what’s going to happen with that single noble lady who has five sons, all with traits that are at odds with each other…?
The traits also create some fun stories. Each resident is given three random traits. This can lead to a person having traits that are at odds (miserly and generous), or traits that seem at odds with their station (a field hand who’s fancy or a noble who’s rustic). Sometimes, you end up with a marriage where you wonder how in the world they make it work. These just make the people in the city feel a bit more unique and alive. Also, since I’m working with traits and not a block of text, it’s easier to take in during an active session and key off of.
Finally: The business names. I adore the business names. Some of my favorites so far:
- The Actually Ass tavern
- The Tripping Chicken
- The Wishing Wyvern
- The Half-Elf’s Half-Elf
And the not-safe-for-younger-players:
- The Wet Wife tavern
Will I use it?
My current campaign takes place in a single city, and my players aren’t in the habit chatting with the locals, so not any time soon. That said, I may go ahead and run it just in case.
My next planned campaign is a West Marches campaign on Roll20, however, so I’ll likely break it out then. It’s set in a small settlement, but there’s still going to be people bumming around.
What’s planned for it?
Some of the things I’d like to add:
- Races. Right now, races aren’t a set thing. I’d like to add them in, though I’d like to only do this once I’ve found enough names to add that are actually easy to pronounce
- A web interface. I’d love for this to not be limited to just people who can run Python.
- A settings file, so people can tweak the percentages without changing the code.
- More data!
- A Python 3 version 😬
Where can I find it?
It’s part of my gamemaster-scripts repo, but if you’re just looking for the files for this script, you can find them here:
https://github.com/kcunning/gamemaster-scripts/tree/master/general/popgen
To run it, you’ll need Python 2.7 installed and the files on your computer, but that’s all. There are no external packages required. If you have an account on Github, feel free to send me a pull request!
Note: Lovely tavern sign created with http://apps.pathstoadventure.com/Tavern-Sign-Crafter/craft.asp
