# Non-Player Characters

LLMS index: [llms.txt](/dvw/en/llms.txt)

---

What are non-player characters for? They

- Buy, sell, and make stuff.

- Provide services.

- Guard places.

- Get killed for loot.

- Dispense quests (or clues for other NPCs’ quests).

- Supply background information (history, lore, cultural attitudes).

- Do stuff for players.

- Make the place look busy.

In buying, selling, and making stuff, they’re normally just fictional conveniences; they may as well be vending machines. Similarly, in providing services (training, repairs, healing spells, and so on), they are interface conceits: Designers want the players to be able to obtain the services in question, and NPCs are the mechanism that has evolved to dress up what’s happening so it fits in context. Their being player-friendly helps; they don’t look like vending machines.

Guards exist for the same general reason: They’re the way designers traditionally choose to enforce a range of gameplay elements that require some justification if not to seem arbitrary. For example, suppose players are to be prevented from attacking one another within a city’s walls; one way to effect this would be simply to tell them that they can’t. This is unsatisfactory because it’s out-of-context—why can’t they? Furnishing an explanation along the lines of “you’d never get away with it” is slightly better, but still not ideal: Let players be the judge of whether they’d get away with it, not some invisible commentator. By introducing guards, players can find out for themselves that they indeed won’t get away with it. Guards are almost invariably unbelievably tough. Characters that routinely hew down hordes of rampaging giants remain impotent against guards. This is because guards that are unable to guard might as well not be there. Guards that are regularly beatable are meant to be regularly beatable, and therefore aren’t guarding any location or state of affairs that the designer really doesn’t want to be violated. These “guards” therefore fall into the “get killed for loot” category. NPCs of this sort are basically just regular monsters that look like player characters (PCs). They may be slightly smarter than their monster brethren, but essentially they’re there to be hacked and slain. Rarely do these NPCs have names.

NPCs that dispense quests may double up as one of the other kinds of NPC, but in general they have a special status. Indeed, they may be so special that they’re elevated to having their own, distinct personalities. Even so, they’re still principally a front to allow players to communicate with the virtual world without feeling silly. Their job is to give players things to do and then to remunerate them once they have done it. Beyond that, they’re mere flavor text.

Quest dispenser NPCs get players to do things for them. With sidekick NPCs, it’s the other way round: They do things for players. Although nominally independent, sidekicks are in essence mere extensions of the player’s character. Though presented as henchmen/ henchwomen, servants or familiars/pets [^41], they’re really just a way to extend the powers of a player. Too many objects to carry? Employ a porter or pack animal. Can’t find someone to heal you after a fight? Hire the necessary skills in the form of a cleric. Sidekicks aren’t usually used in larger games, as players themselves are intended to undertake the necessary roles. Besides, if a group of 25 players and their 25 sidekicks were trying to act in concert all semblance of organization would rapidly disappear. Players do still need mules, but in those situations they create secondary player characters instead.

Lore providers are like online manuals. Players can consult them to find out things they want to know, or be accosted by them to be told things they don’t want to know but, dammit, it’s for their own good that they do. Lore providers can be standalone, but they will often have some other function too (for example, quest dispenser).

The final type of NPC is the extra. These wander around as part of the background. Any attempts by players to bring them to the foreground (for example, by communicating with them, stealing from them, shooting arrows at them) are rewarded with a canned or inert response. Extras don’t feature highly in virtual worlds; because players can routinely interact with one another, they are disappointed when confronted with NPCs that have no obvious reason to exist.

Okay, so I admit that this summary of NPC types is perhaps a little cynical. There are plenty of virtual worlds where even the monsters can have personalities [^42], let alone the NPCs. The problem is that there are too few such worlds. When a virtual world is alive with real players, designers don’t feel the need to make NPCs more than ciphers for interacting with the virtual world. Players objectify NPCs in a way that only killer types objectify PCs.

Again, though, things are changing. Virtual world technology is driven by the big, graphical games, which in turn are driven by their hard-core players. The hard-core players play other computer games, particularly single-player role-playing games. When they see NPCs in these games that are above and beyond what they encounter in virtual worlds, they perceive virtual worlds to be behind the times.

They have a point, too. Virtual worlds have a much longer lifespan than ordinary computer games. A game from five years ago will look very dated by current standards, of course, but it isn’t just a graphics issue: Gameplay that was cutting edge five years ago can seem dated, too (albeit less so). Virtual worlds have to adapt and evolve if they are to keep up with the times. There is an argument that textual games don’t become dated because people’s imaginations don’t become dated [^43]; in her tour de force 1994 exploration of the Internet [^44], J.C. Herz asserts that no graphical virtual world could ever match the imagery present in LambdaMOO—a sentiment with which the players of many textual worlds would agree. This may be true of the imagery, but it’s not (yet) true of the gameplay.

NPCs embody gameplay elements; therefore, if gameplay seems dated, then its associated NPCs will seem dated, too. Players don’t want dated content.

Just because players want something, that’s not a reason to give it to them, of course. Design is about consequences, and players don’t always accept them. Creating a fully rounded personality for a non-player character has been demonstrably possible since the days of Floyd from Steve Meretzky’s Planetfall [^45], but it takes a lot of effort. In a graphical virtual world, there’s also the issue of animating different personalities. Slimy, sycophantic advisors have different body language than confident, cruel despots.

Animating such differences is a painstaking art. Motion capture can help, but it doesn’t work for dragons.

In other words, creating fully rounded NPCs is an expensive business, especially in graphical worlds, and very especially if you want 10,000 of them. Players who require intelligent NPCs can expect to have to pay more to get them.

Yet the same applies to many single-player role-playing games. Baldur’s Gate II [^46] has several hundred NPCs; some of these are so rounded that they can (act as if they) fall in love, but most are there either as plot hooks or local color. Nevertheless, it’s possible to speak to all of them, even if they don’t actually have anything meaningful to say. The mechanism for interaction is simplistic—the same, select-response-from-a-menu deal that the original Ultima series used—but it’s better than the nothing you get from unidimensional virtual world NPCs. Textual virtual worlds sometimes implement a similar approach that masks the actual number of choices available (you might have to “ask guard about prisoner” rather than selecting it as an option from a list), but only for a few specific NPCs. Beyond that, there are pattern-matching schemes [^47] based on Joseph Weizenbaum’s classic Eliza [^48], and hugely sophisticated bots like Michael Mauldin’s Julia [^49] (although these don’t have a gameplay role).

Artificial Intelligence research is ever-advancing. It’s unreasonable to expect virtual world designers to ask programmers to endow NPCs with the latest technology, but even a few 20-year-old ideas would make a big difference. So why don’t virtual worlds contain more intelligent NPCs?

The usual explanations are as follows:

- They don’t need them because they have real players instead. (Yet they do need dumb NPCs?)

- Smartening up NPCs would be too expensive. (So how do single-player role-playing games seem to manage it?)

- It takes too long to add AI to NPCs in virtual worlds. So much other stuff has to go in beforehand that it’s just unnecessary icing on the cake. (But a small team of AI experts couldn’t work on it from the beginning?)

- Artificially intelligent NPCs are never convincing and always spoil immersion. (More or less than artificially unintelligent NPCs do?)

- Neither the designers nor the programmers are familiar with AI. (And they can’t ever become familiar with it [^50]?)

- Players don’t like NPCs that are too clever. (So don’t make them too clever [^51]?)

- It’s inappropriate for this particular virtual world. (Finally, a valid excuse. You may have a fiction that explains why NPCs are stupid—time travel to Neanderthal times, for example)

In most cases, the reasons that virtual worlds don’t have intelligent NPCs are to do with complacency, inexperience, and (for free virtual worlds) lack of resources. However, there is also a view of “if it ain’t broke, don’t fix it.” There may be only scant justification for not making NPCs more rounded, but that hardly amounts to an incentive to unflatten them. Why should virtual worlds contain more intelligent NPCs?

There are only two reasons.

The first reason is that even minor personality quirks in an NPC can give players some reason to care. Players can anthropomorphize NPCs very well, and are happy to do so in a virtual world. It’s not that NPCs have any intrinsic meaning, but that players can invest them with it.

As an example, suppose that the NPC mother of a young NPC boy asks for your help to get a saucepan off his head. It’s just a little quest. Next time, she asks you to get him down from a tree he’s climbed. Maybe she hits him when he’s rescued, maybe she hugs him and cries with relief; it’s still just another little quest. The time after that, he’s got his head stuck in a fence; the time after that he’s locked himself in a cellar. You come to know the two NPCs—the reckless child and the self-critical mother—and if you need a small filler quest you’ll often pay them a visit. Then, one day, the mother comes running to you. Her son was dragged off before her eyes by some kind of red-eyed demon. She’s hysterical. He kept crying, “Mommy!,” she tried to save him but the beast hit her, by the gods, please, can’t you help?

Now the situation has meaning. You and the NPCs have a history. The mother didn’t go to any other PC, she went to you. Are you going to leave her son to be eaten alive? No way!

So that’s the first reason: It enables players to form emotional attachments to objects in the virtual world; these relationships can then be stressed to add drama and give players cause to ponder their own actions. The relationships aren’t anywhere near as strong as between real people, naturally, but they’re there. They give the player a reason to feel a part of the virtual world.

The second reason, you’ll either comprehend instantly or it’ll take an epiphany. It’s this: Imagine it! Imagine a virtual world with thousands of virtual people living virtual lives—each with their own goals, their own relationships, their own existence. A living, breathing, self-sustaining creation! Doesn’t that fill you with awe? Don’t you want to go there? Don’t you want to see what they’ll do, and do it with them? Wouldn’t that truly be a virtual world?

If so, you get it: I don’t have to explain further. If not, there’s little point in my trying to explain! All I can do is pose the following question: Should those lacking a god’s motivation assume a god’s powers?

There are other reasons why having intelligent NPCs is good, but their effects can be achieved using other mechanisms. The most important of these concerns the fact that even the biggest virtual worlds don’t have enough PCs to sustain their systems and, even if they did, few players would want to do the mundane things that occupy NPCs. Who craves a career as a city guard? Players visit virtual worlds because they offer experiences that they don’t get in the real one; they don’t want a “real life” in a virtual world. NPCs, on the other hand, live in the virtual world, so their “real life” consists of doing the kind of things players would do in their real “real lives.”

For example, some people want power. In this context, “power” means power over someone. Players won’t tolerate being under other players’ thumbs for long, therefore NPCs are needed to fulfill the roles of functionaries and foot soldiers. Similarly, players don’t buy or sell enough objects to sustain an economy, therefore NPCs should engage in commerce to ensure that prices rise or fall appropriately. The collective behavior of NPCs can be used to regulate reputation systems, consequences for high/low status/fashion, rumor propagation/decay, the growth/decline of settlements, elections to office, and many other useful “background” tasks that contribute prominently to the experience of players but in which players themselves are loathe to get involved. If NPCs report their feelings when asked, this can add even more: I might not care that the NPC wants to tell me about the nearby ruin I already visited five times, but I’d certainly care to know whether that NPC was thinking of voting for me in the upcoming Guild of Mercenaries elections.

Giving individual NPCs more capacity for self-determination is one way to implement these behaviors. Another way, though, is to model the actions of NPCs as a whole, rather than individually. For example, instead of each NPC deciding when they need to buy a new gown and the price they’re willing to pay for it, a general model of NPC buying habits can be used to calculate the overall demand curve for gowns and the impact that this has on price. This is easier to engineer, less expensive to program, and simpler to fine-tune than its micro-economic counterpart, although it’s also more predictable and not as robust. It’s a viable alternative to using hordes of independent NPCs to obtain the same effect. If you have those hordes for other reasons, though, it makes sense to arrange for their collective behavior to emerge from their individual actions, rather than simulating it and having the two diverge.

It could be argued that if a virtual world needs intelligent NPCs, making them artificially intelligent is the wrong route to take. Why not employ actors to control NPCs, and get intelligence of the natural variety? Set up an office in Hollywood where wannabe actors are endemic and it wouldn’t even be all that expensive.

I have two objections to this, one practical and one philosophical.

The practical objection I outlined earlier. Going hands-on works for small, intimate virtual worlds, but not for ones with large numbers of players—it’s hard to maintain non-superficial relationships with 200 people. Players are deeply suspicious of vendettas, favoritism, and other imagined ways to cheat; if they find that you sent one more monster against them than you did against some other group, they will whine incessantly [^52], no matter how much fun they had. They don’t generally like talking to patronizing, in-character, support staff at the best of times. Besides, it would be expensive to hire actors in quantity, even in Hollywood.

The philosophical objection is that one of the major goals of virtual worlds is self-reliance. Computers, not minds, model the physics; the same applies to the virtual inhabitants. If your virtual world design relies on people as components, it may be ahead of its time but it nevertheless crosses a boundary that stops it from being a virtual world. Players are necessary; community managers are acceptable; PC NPCs are a contradiction in terms.

Designers will determine the numbers and population density of NPCs depending on the roles they need them to fill. This raises a question: As a general rule, should it be possible for PCs to do anything that NPCs can? With some minor qualification for the virtual world’s fiction, the answer should be yes; it ensures flexibility in design. That in most virtual worlds it isn’t true shows just how inflexible designs are. The question also can be turned around: As a general rule, should it be possible for NPCs to do anything that PCs can? Again, the answer must be yes. Why yes? Players will usually have no trouble telling other players’ characters from NPCs, but that doesn’t mean NPCs also should be able to: If one NPC offers a quest, there’s no theoretical reason why some other NPC shouldn’t be able to undertake it. This can only add depth and variety to a virtual world—both good things.

From the foregoing discussion, it should be pretty obvious where monsters fit in to this equation: They’re simply NPCs that operate under different AI rules [^53]. What about players, though? Are they merely NPCs controlled by natural rather than artificial intelligence?

Would that it were so….


[^41]: A DikuMUD favorite that has since become standard in graphical worlds.
[^42]: MUD2 has a baby dwarf that players are strangely reticent to kill, at least until it howls and alerts the other 50 dwarfs in the vicinity.
[^43]: There is another argument that suggests they don’t become dated because they’re dated to begin with.
[^44]: Herz, J. C., Surfing on the Internet. New York, Little, Brown, 1995.
[^45]: Steve Meretzky, Planetfall. Cambridge MA, Infocom, 1983.
[^46]: James Ohlen and Kevin Martens (lead designers), Baldur’s Gate II: Shadows of Amn. Irvine CA, Black Isle Studios, 2000.
[^47]: Formally, these are known as “case-based reasoning.”
[^48]: Joseph Weizenbaum, ELIZA—A Computer Program for the Study of Natural Language Communication between Man and Machine. New York, Vol. 9 no. 1, Communications of the ACM, January 1966.
[^49]: Michael L. Mauldin, Chatterbots, Tinymuds, And The Turing Test: Entering The Loebner Prize Competition. Menlo Park CA, Proceedings AAAI 12, 1994.
[^50]: I did a PhD in AI because of its applicability to virtual worlds, although I wouldn’t necessarily recommend this degree of enthusiasm to everyone.
[^51]: I put a simple expert system into MUD2 to control mobiles in fights, but toned it down because it turned out to be better than many players. It’s merely a question of balance.
[^52]: Never underestimate the whine factor!
[^53]: Usually, they also operate under different environmental conditions: Monsters are subject to an ecology and NPCs are subject to an economy. As we’ll see later, these (like monsters and NPCs themselves) are really just two sides of the same coin.
