What your NPCs do in their bedroom
Disclaimer: This article is about a medieval fantasy world, and that’s why it filled with gender stereotypes and offending simplifications. And because all developers are lazy.
Sometimes, during pen and paper RPG session or while you are struggling with side-quest’s story of your game, you need a random female guardsman or a young smuggler. Of course, you can make up a shallow dummy with a name from yesterday’s episode of your favorite Netflix show. And it works pretty nice in some cases. On the other hand, I’m very excited by small local stories with a profound elaboration of details. Be honest, can you still act like chaotic evil if you know the names of each town guards and their children? When you are spending a whole game session to help an orphan girl who is utterly unrelated to the main story, IMHO it’s a huge victory for a game designer or dungeon master.
So, let’s create some characters. First, you need a name. And it can be a little tricky. Everyone knows many names. It can be names of real people, of book or TV characters, etc. But when you are trying to write some list, it’s nearly impossible to remember more than a dozen names. We need much more. There is the same trouble for surnames.
Another problem is the nationality of these names. Yeah, it’s an odd question for a fantasy world but still. Do you want to invent a custom naming convention for your world? It’s a fascinating idea, but I’m too lazy for it. So we can use a list of real last names. And maybe it’s not historically accurate, but I prefer a multicultural set of names. It’s more narrative, isn’t it? As a man living in a non-native country and writing in the non-native language, I am a big fan of globalization.
Long story short, I found the gigantic list of surnames (~90k entities) and fetched 200 first names per gender from the public database with American names. It’s not very diverse, but there are two reasons: it’s easier to found and more comfortable to remember. I think you’re familiar with “western” names because you are reading this text=)
In addition, this set of last names is the same for both genders. For example, in some Slavic countries (like Russia or the Czech Republic), women have transformed surnames. Just forget it.
The next mandatory trait of human-like beings is age. I am using the calendar from our world with a modern lifespan. It’s just more comfortable. But do we really need the exact age? Often “child/young/adult/elder” is enough. I have implemented something like the “theory of generations.” We don’t know the exact date of our story, so let’s start our generations from zero. For example, we need a ragamuffin for our alley.
When we are setting a generation, it chooses a random number from 0 to 20. The actual formula is something like randomInt(generation*20+1, (generation+1)*20). Twenty years range is a compromise. It’s still too big for some purposes but suitable for others. If we need parents for this kid, we can create two more persons with generation+1. And the same generation can be used for siblings, friends, or spouses…
…until we get some weird results like twenty years old child with twenty-one years old parents. Or a bunch of toddler friends for a teenager. Randomness is a bitch. But it’s usable with some tweaks.
Hand to hand with the age we have an “isAlive” property. Unfortunately, you can toggle this field at any age, so I use random affected with age number. Something like randomInt(0, 100) > 0.8*age. It’s a simplification but good enough for the first iteration.
Now we’re ready to create an individual person. Take as a basis that your last name always depends on your family. If you’re male or single, of course. Therefore I start with creating a new family. It’s easy: just random surname and the empty list of members. Families are the basic unit of our “fantasy population”. Further, I create an “anchor” person:
- 5th generation -> age 81–100 and still can be alive
- Male. Because in our target society surname (family) is inheriting through male kinship.
- Random male name and last name from the family.
And it’s Henry Tenenbaum. Sadly, he is dead. Also lonely in this cruel world. Let’s find his soulmate.
There are two possible approaches: to find a suitable existing person or create a new one. Do you know how the matching algorithms in dating apps work? I don’t. But I deem it’s something like:
- Same generation (arguably, I know)
- Opposite gender (the church insists)
- Not married (polygamy system should be drastically more complex)
- Not from your family. I also exclude cousins (from your mother’s original family). It’s slightly lazy, but I believe there are much bigger reality violations =)
But Henry is our Adam, and we can pretend that there is no Eve or Lilith. God’s work is simple: create a new female (also with a new family) and set the same generation. Boom, there are two persons intended for each other.
We need some magic here. As I said, this civilization is brutal and straightforward. Women are still in their original families after marriage, but also they are in the husband’s, and it’s their primary family. So, when I “set” spouse:
- Mutually set “spouse” property for each partner.
- Add wife to the husband’s family.
- Keep the wife’s family as “original.”
Now Henry can start thinking about children. Yeah, I know he is dead now. But we are out of the time. Creating children is even easier than creating spouses. Just set the father’s family and generation reduced by one. Okay, there is one complication. We should correct the parent-child’s age difference to at least 16 years. It might be less than the church prefers, but it seems realistic. Then just add parents to the child’s “parents” list and child to “children” for both parents.
And the combination of all these actions, parents addition:
I know it’s not a very exciting article. But I’m going to continue this series with one about the generator. I want to create a whole town with farmers, merchants, criminals… It’s quite fascinating. I hope you’ll see it =)
A little spoiler: