Okay, I can write all about this system that will generate NPCs, but how exactly will that be done?
I plan to use what I call
This will all be driven by the concept of jobs. What jobs are needed in the world? If a human has created a bar, does it have a bartender? An NPC generator will check the world for available jobs, and create NPCs to fill those jobs.
However — and this is important — the system will also generate reports on the NPCs that exist in the world, so that humans can check the NPC generator’s work. A human can spot inconsistencies that weren’t programmed into the NPC generator, such as having way too many rich people for the economy to support (or no rich people at all).
But people don’t always live where they work; they’ll live in an apartment, for example. So, each NPC will have both a workplace and a residence, and will commute back and forth between those two (plus, perhaps, a bar in the evening). The NPC generator will tie a new NPC to a job and a residence. The NPC generation is based on the availability of a job, so that’s guaranteed. Availability of a residence is not, so we’ll have to make sure there are plenty of residences. A
How do we go about creating realistic
Here’s how I’m approaching the situation. For each NPC, you must define the following four things:
- Actions (common to all NPCs)
First, it’s very important to delineate exactly how big an NPC’s world is, so to speak. Can an NPC engage in sex? Probably not. So, what can an NPC do? That can be a surprisingly small list. The first stage involves figuring out exactly what actions an NPC can take, especially those actions that are visible to players.
Each character is defined by a set of attributes which defines how that character is different from other characters. How old is the NPC? What gender? Is he or she wealthy? Is he or she charismatic? These attributes can be generated by a program pretty easily, and that program can have some common sense about different combinations of attributes (such as making sure that a
Now things get interesting. We’ve defined the actions that all our NPCs can take, and we’ve defined physical and psychological attributes of each NPC. How do we make them dramatically interesting? We do that by defining goals for each NPC.
The scale of the goals is important. Very big goals — “Take over the world,” “Get rich,” “Achieve spiritual enlightenment,” etc. — are difficult to translate into simple, concrete actions, and are often practically impossible for NPCs to accomplish. Very small goals — “Walk home,” “Eat a meal” — will be accomplished very quickly, and will be dramatically uninteresting. We have to strike a balance: Goals that will take some time to complete, but won’t take a lifetime. So, we have goals such as “Make $1,000,” “Rescue my kidnapped brother,” or “Find the Mystic Book of
Once we’ve defined these goals for an NPC — and an NPC can have multiple goals at once — the NPC must then have some way of achieving these goals. I define this with what I call behaviors, which are
All right, so here’s how it works in overview: First off, we define all the actions that NPCs can take. For each NPC we create, we define the attributes that make that NPC unique, we assign goals to that NPC, and we pick an appropriate behavior for each of those goals and assign that behavior to the NPC. The NPC will follow those behaviors in his or her everyday life.