Building better NPCs: Agency and virtual life

Uruk 3

Article by James Murff

I'd made a mistake.

In the process of killing an Uruk-Hai captain, I'd attracted the attention of another. This time, it was my archnemesis; a captain whose face was scarred and mauled from all the times I'd defeated him in battle. He let loose a bellow and charged me, and I promptly chopped his head off snicker-snack. He was not to return; it's a little difficult to recover from a decapitation.

Here's the point in the tale where I would normally wax poetic about the loss of such a storied character. Here's the point where I’m supposed to talk about how killing a captain I had such a history with affected me on a personal level. Here's the point where I pretend to care.

Unfortunately, Shadow of Mordor makes it impossible to care.

This is a much larger issue, though. Developers have tried to build believable and autonomous NPCs for years, with only one—Tarn Adams of Dwarf Fortress—actually succeeding. Shadow of Mordor is just the latest in a long line of experiments in AAA titles to create NPCs that feel alive and in control. From the enemy AI of Halo to the data-mined character backstories of Watch Dogs, we are obsessed with building a better NPC. An AI-controlled character with initiative, agency, and life. A genuine foe worthy of fighting.

Maybe we're a little too focused on the fighting part.

Shadow of Mordor is a prime example of how the game's primary mechanical loop—fight Uruk-Hai captains, get loot, repeat—fights against the nature of a believable NPC. In Mordor, Uruk have agency—that is, they make decisions amongst themselves—but no life—that is, all their decisions revolve around the player. Uruk exist to be killed en masse by our hero, and the game makes no pretense of affording them any way out. Even the most peaceful encounters, such as the Feast power struggle, are there to give you an opportunity to kill a captain.

Since these characters have no life outside of their purpose as killers, they feel like actors in a play. After seeing a captain I'd killed four times finally die permanently, I wasn't sad because of the loss of history or the genuine death of a rival. I was sad because he was one of the few characters in my play, and I'd promptly killed him off because I had no other interesting choice. The death was a narrative loss, not a personal one, simply because the Uruk had no actual choice. He existed for my benefit and my benefit alone.

Life without choice

Watch Dogs swings the other way. Where characters in Watch Dogs have very little agency— they mostly just respond to yelling or noises—they at least have the illusion of life, thanks to the hacking mechanic. When you walk down the street, you can see countless people, all with their own mini-biographies and sometimes with an opportunity to interact. Of course, these biographies are just flavor text; there's no actual personality behind these lives. But they feel real, even if just for a moment, because of its novelty.

There's also the interesting notion of recurrence. In any city in real life, you tend to run across the same people in the same area, regardless of population density. You see each other on the street and nod or say hello, despite the hundreds of thousands of other people swirling around you to try and get your attention. In Watch Dogs, there's no such recurrence; visiting a block around the same time on two different days gives you two completely different sets of people. While that's partially a resources problem, there are ways to add that sort of recurrence without bringing a computer to its knees.

Here, the game is dragged down by the lack of character agency. Enemies in Watch Dogs exist to run headfirst into a bullet, not ambush or challenge you. They don't make decisions among themselves, and they certainly don't engage in activities outside of missions. This is in stark contrast to Mordor, where every Uruk has the potential to make game-affecting decisions outside of combat, but all of them revolve around giving you an opportunity to kill them.

So where do we go from here? Two games in a single year dropped "believable NPCs" into our laps as a point of pride, and managed to do worse at creating living, breathing people than a game developed by a single person over the past decade.

The answer is twofold. First, the Nemesis system is one of the best mechanical systems for creating an NPC you feel invested in. The neat little deconstruction of traits, the changing of moods and decisions, and the recurrence of a character—complete with an added or lost weakness—all serve to create an NPC that you know the personality of. We should use that in something besides a game about wanton killing.

Second, the hacking system in Watch Dogs is a great way to disseminate information about an NPC's life. While you don't need to make every NPC unique, you can use one or two lines of text to build a basic personality and life that can then be exploited or observed by the player.

Uruk 2

Combine these two, and you start to approach the sort of NPC that we, as players, deserve in an open-world game. Imagine roaming a street and coming across a crying man, crushed about the loss of his meager savings to thugs. You give him some money, and he thanks you profusely. Eventually, you come across the man—now a genuine NPC generated by a system (let's call it "Artificial Life") akin to the Nemesis system of Mordor—and he reacts according to your past history. You can interact with him in meaningful ways—socialize, gift, murder, whatever you like—and he remembers, thanks to Artificial Life. As you progress through the game, you keep encountering him in different places, and he changes each time according to both you and the nature of the world he lives in.

It's not that far of a stretch. Mordor already elevates Uruk based on their interactions (namely, they turn into a recurring NPC by killing you), and Watch Dogs already allows you to fiddle in people's lives. If both systems were utilized in tandem, we could build an NPC that you could actually interact with, as opposed to an NPC who exists solely to be shot, stabbed, beaten, or otherwise murdered.

As is, there's simply too much killing.

We recommend