Population Generator 2.0: Now Online!

A few years back, I created a Python script that generated the population of a town, complete with family groups, jobs, wealth levels, and personalities. In the back of my head (and in that post, if we’re being honest), I needed to convert it to something that could run on a webpage. Well, here we are, a brief four and a half years later, and I finally finished it!

I’m somewhat competent in JavaScript, but I’m an expert at procrastinating writing it.

What it does!

The script was borne of the desire to have a town of people who already had names and stuff going on. There are a million town map generators out there, but I really wanted the people because my players always insisted on knowing the shopkeep’s name, ancestry, age, favorite soup, etc. I was tired of making it up on the fly. (Note: I did not add favorite soup to the script.)

The generated town is made up of families (a family is anywhere between a single adult to two adults and five children). Each family has a residence (ranging from ‘the street’ to a private estate), and every adult has a job. Every adult is given a random ancestry, a job, three personality traits, and a socioeconomic status (e.g., poor, struggling, middle-class, etc). If the residence is a shop, it’s given a name (easily my favorite part of the script). Then, we place the family in a ‘sector’ that usually matches their wealth level.

The tool lets you generate one family (displayed on the page) or a whole town’s worth, which you can download as a CSV (basically, text-based spreadsheet, which you can open in Excel / Google Sheets / Numbers / etc).

The Nitty Gritty

What’s the maximum size for a town? Bruh, that depends on your computer. This computation is happening on your end, not mine, so you can make some huge cities if you have a beast. My machine didn’t blink at a city of one million, but that may cause other browsers to crash.

Genders are male, female, and gender-neutral. The latter is a broad category and is up to the GM how they want to interpret it for an NPC. It might be someone who’s gender-fluid, doesn’t identify with any gender, is androgynous, etc. In the same vein, adult couples can be any combination of same-gender / opposite-gender, and pairings don’t affect whether they have children. The Serum of Sex Shift exists, after all.

Children’s ancestries are based on their parents, though I’ve decided not to get any more exotic than half-elves and half-orcs. If the parents’ ancestries match, the children match them. If they’re a human + orc/elf pairing, the children are half-orc/elf. Anything else, the children get a random ancestry from one of their parents.

The names are pulled from all over… and I wish I’d thought to keep the original sources. Some appear to have disappeared, and I have no record of others.

Traits are pulled from a random page from MIT, and I wish I had more context for it because it’s an awesome list.

Population percentages are pulled from an awesome Reddit post. u/VestOfHolding, wherever you are, whoever you are, you are awesome.

Find an issue? Have an idea?

Have a form. I make no promises about how quickly I’ll address bugs and suggestions because I plan on shifting to other projects. Still, I’m always open to expanding the script!

Leave a comment