Welcome to Raph Koster's personal website: MMOs, gaming, writing, art, music, books.
Game talk

Why don’t our NPCs…

June 9th, 2006

In thinking about the UO resource system in recent posts (1, 2, 3), I also got to thinking about other things that we either wanted to or tried to get the NPCs to do. Today, NPCs have gradually evolved more and more towards being quest dispensers. Originally, we wanted NPCs that would give the illusion of life.

But there were a few bumps on the road, and today NPCs in all the games pretty much suck.


Moving around was actually one of the biggest bumps. One of the most obvious cues that an NPC is actually nothing more than a quest dispenser is to make them immobile terminals with hovering icons over their head. Yet this is what players demand. In early UO the NPCs moved about — there was even some attempt to make them move about purposefully, from trade implement to trade implement, but that failed. When the NPCs would move around while you were trying to talk to them, players objected, and then eventually the NPCs were frozen in place because their primary purpose was as a dispenser of items. I fought this for a long time because I hated the notion of reducing the NPCs back down…

Anyway, here’s some of the big areas that I think are hugely underexploited in NPCs today.

A sense of persistence

However, also in UO, all NPCs were “born” with a name randomly selected from a few baby book lists that we coded into the game. This meant that on different shards, the NPC tending the forge might have a different name. In fact, everything in UO was this way — there were no static, named NPCs or creatures at launch. This cost us the equivalent of “slaying Nagafen,” but it also led to other, different sorts of feelings.

For example, the feeling of coming to the forge one day and seeing that burly Bob the smith, with whom you have dealt for months, was no longer there. Instead, you saw Sarah, who introduced herself as his niece and informed you that Bob was in fact killed by MasTaKillA, an actual other player. I recall implementing a crude form of this, but I don’t remember if we ever deployed it.

Memory in general is underexploited in NPCs today. On LegendMUD, the shopkeeper Aasma will remember regular customers for a period of two weeks, offer them specials, and even let them run a tab. This sort of familiarity, even when you know it is all faked with simple tracking mechanisms, actually adds a lot to the experience. Imagine walking into a tavern and having some NPCs greet you as an old friend rather than as a stranger — a perfect candidate behavior to be on every friendly shopkeeper in the game. Even better if they can timestamp when they last saw you and say “it’s been a long time!”

Which naturally leads into…

Reacting to players

In UO, for a while NPCs would react to you based on your prestige. They’d bow when particularly notable players came by. Of course, first pass they bowed at everyone notable all the time, and as was usual in UO days, this led to the behavior being removed altogether, rather than being finetuned. One can easily imagine that after accomplishing a great deed, a very transitory variable gets placed on you, which causes NPCs to react strongly (bowing, scraping, cheering, etc), but then they forget how special you are in an hour or so. This is much more rewarding than the bland “only the quest dispenser knows what you did” approach that prevails today.

On Legend, there was a bootblack how hung around on the Victorian Isle of Dogs. If you were advanced enough, when you came by, he’d shout to the whole town, “Cor! Didja know Alanna was in town?” Many a PvPer cursed his name and slew him in revenge; many a player also worked to get to the point where they too could be announced.

Having some personality

Providing a distinct sense of personality to different NPCs is challenging. Elaborately constructed ones on Legend were all handcrafted at first, but some of the behaviors were so nifty that they were then inherited by many of the other NPCs in the game. Mrs. O’Leary, innkeeper in Gold Rush San Francisco, would kick you out of her inn if she caught you saying cuss words. Tika, innkeeper in Celtic Ireland, would react to every single social in the game, and if fights or aggressive uses of socials broke out, would call Angus from upstairs to eject the participants from the building. Eventually, some of Tika’s reactions

Trying to make some generic behaviors is a trickier task. In UO, we looked up the randomly generated intelligence level of the NPC, and also a randomly set mood, I think it was. Then we wrote 270 different ways of saying each thing they knew how to say. A stupid surly guy might greet you with “What the hell do YOU want?” whereas a highborn, educated snob might say “Much as it pains me to do so, I greet you.” These stuck, so you’d get to know the snob at your local bakery (at least until someone killed them).

This meant, of course, that there was a lack of specificity to what each NPC would say. 270 entries for “hello” is a lot of work, too. So we broke the speech into libraries, so that the baker would have a library of talk about baking, and a library of generic talk. The baking library didn’t have the amount of variation that the generic stuff did, but the flavor in the generic text was enough to give the NPC some personality.

Other generic things that all NPCs knew how to do included talking about the weather, giving you the time, and even giving directions to nearby landmarks or shops. This latter was accomplished by matching against keywords for what the player was looking for (“where” and “bank” in one sentence would do it), followed by a lookup into a table for the BANK spawn region. The closest one would be found, then the NPC would calculate the distance and direction, and a generic script library provided “You’re looking for the bank? It’s a little ways to the northeast.”

Showing some initiative

One of the big problems that we always ran into with UO and muds was the fact that interaction was keyword-based. This meant that when localization became dominant, it was of course swept away even though it allowed for far more diverse interaction than conversation trees. It also meant, though, that NPCs would butt into conversations between players, thinking they had heard something of import. NPCs taking action on their own is nonetheless something really cool when people get to see it.

In SWG in beta there was a random spawn of a slave girl who would dash out into the street and fixate on a player. She’d rush up and say “Oh please, please, you have to help me! They’re after me! Quick, take this, and don’t let them catch you!” She would then hand you a data disk. Then she would run away, spawn a troop of Stormtroopers who would hunt her down and kill her in one shot. The player was left with a datadisk and intrigue.

Alas, the data disk did nothing, It was a tease. Eventually this, along with all the other “dynamic points of interest,” were removed because of technical difficulties with spawning, primarily. I think this is a huge shame, because the dynamically appearing closed scenario quests allowed incorporation of a ton of extra variables to allow variability, and could appear almost anywhere.

But that’s more of a topic for a quests post. So let’s talk about Indiana Jones instead.

On LegendMUD, Indy was a mob that was only ever spawned as a joke by the admins. I wrote him mostly to get a handle on the scripting system. He’d appear, and announce on the global channels that he was putting together a party for a high-level adventure — I think it was actually to seek the Grail. Then he’d actually run around the mud, cracking jokes, using his whip, and pretending to be gathering up this party. If you met up with him, he had a large library of quotes and reactions drawn from the movies and The Young Indiana Jones Chronicles.

In UO, beggars, as previously mentioned, would come up and beg from you. When at sea, the tillerman, the faux-NPC built into the ship who served as a method of controlling the vessel, would tell sea stories drawn from a library, in order to pass the time. Will O’the Green in Legend would stop you at the crossroads and demand a toll; pay it, and he’d let you proceed.

In fact, this whole class of what we might call “environmental quests” was a bit of a showcase for NPCs. In Viceroyal Lima, a wagon would periodically get stuck in the mud; get enough players to push at the same time, and they could free it from the mud. If you found Big Jim in the back room of the Salty Dog, you could play a crude version of blackjack with him for money.

Faking you out

In EQ2, there’s a collection of systems that gets called “the ecology system.” It’s actually, I believe, a set of handcrafted scripts that can be applied somewhat generically, primaily in the towns, to allow things like dogs chasing cats, that sort of thing. This isn’t really an ecology, of course — rather, it’s what I call stagecraft, much like billowing cloth and clever lighting replaces fire or water on a stage.

Stuff like dogs chasing cats is of course very very old stagecraft in the virtual worlds biz. Countless muds have had similar; in the Andes in medieval Peru on Legend, all the animals hunt each other appropriately, and some of them even venture into town. Jackdaw type birds sometimes steal baubles. And so on.

Stagecraft definitely has a huge place; not everything must be modeled to a high level of detail. My favorite system I have ever done along those lines is the nonhuman script in Ultima Online. As a primer, you may want to read A Grammar of Orcish by Yorick of Yew.

Based on my species, pick one of the following syllable libraries:

Orcish (heavy on the ughg gaghs)
Chittery (heavy on the kth chkhth)
Slithery (heavy on the ssiss sisshtsh)
Wispish (every consonant, plus the letter y)

Also based on my species, set a length of words (in syllables) and a length of sentence (in words).

Every once in a while, saySomething(with no parameters)

If you hear text, you have a chance of calling saySomething(with the overheard text as a parameter)

saySomething(text):

if the passed in text has any of the following words: food, eat, gold, any of the city names, any of the virtue names, any of the major fictional character names like British or Blackthorn, words related to combat, words related to gameplay

pick from the following list of other words: kill, eat, no afraid, scared, attack, hunt, ugly, puny, hate, love, etc.

Build words up to sentence length. If random chance hits, insert one of the list of words instead, or one of the overheard words. End the sentence with a bit of punctuation: ? ! . or … (and capitalize sentences appropriately).

Building words: grab random syllables from your syllable list, up to the word length.

This meant, of course, that if you were near a wisp, and happened to say the word “moongate,” the wisp might respond with “Zthgtts zzkzyz moongate? Yjjkkjwh virtue shrine.”

This led to a sizable number of people believing a large number of urban myths about wisps, including that they tended to hang around healers, that they healed you, that they gave quests, that enhanced bardic abilities, and so on. From the Seekers of the Wisps conference:

Khajja the Fang: On two occasions I have been helped by wisps. I was healed while fighting a gargoyale And once I was assisted by a wisp while fighting an orc mage. It casted offensive spells. That is all.

Aurora Sylvr says: Wisps have been known to do “unusual” things. We have had many reports of them aiding in unfair battles

Khajja the Fang says: So it is not unusual?

Aurora Sylvr says: It’s rare.. but not completely unusual

I don’t even want to think about how much dialogue we were saved from having to write thanks to this trivial little system.

Conclusion

Here’s where I editorialize a little bit. We’ve tended to, over time, focus so much on the quest and kill aspect of these games that we’ve reduced down other elements in favor of this. We no longer have NPCs with schedules because it interferes with getting a quest promptly and killing things faster. We no longer have NPCs that give directions because a radar map is more convenient. We no longer have NPCs that crack a joke when you say something because we’ve removed NPCs hearing you altogether. We no longer have NPCs that take initiative because all interactions must be through menus. We no longer have NPCs that fool people into thinking they are maybe real because it’s confusing.

But there’s fun to be had in those things, and a sizable amount of humor to be mined, and springboards for much further development of other systems. There’s storytelling (will no one have a thought for Sarah’s pain and her desire for Burly Bob’s killers to be brought to justice?).

Players objected quite a lot to seeing the fictional dressing stripped away from the modern quest dispenser NPCs in SWG, seeing them as actual metallic terminals. And yet, that’s how our NPCs act today anyway. We should swing the pendulum back a little bit. I, and I think many other players, would gladly trade some inconvenience for a world that feels a little less like a pellet dispenser.

*

You can follow any responses to this entry through the RSS 2.0 feed. Responses are currently closed, but you can trackback from your own site.

Meta

Recent Comments

Categories

Tags

Recent Trackbacks

Archives



A Theory of Fun
for Game Design

Book cover for A Theory of Fun for Game Design, by Raph Koster

Press
Excerpts

Buy from Amazon

Twitter @raphkoster



The whole Web

Raph's Website

See popular posts »



After the Flood

After the Flood CD Cover

Available as MP3 download
$14.99


More stuff to buy

Alligator and Penguin Mug

Alligator and Penguin
Large Mug

$13.99


LegendMUD

click here to visit the Legend website

"The world the way they thought it was..."