Saturday, June 16, 2007

Writing Dialog the Weird Way

This is related to writing dialog in games, despite the rather odd start:

I have a family member who sent me a really detailed horoscope for my birthday.

Did it fit me? Sure.

It also fit my coworkers, my least favorite politicians, the bag lady who wants a nickel, and my long-dead pet dog. That's how they are written. They only start to miss as they get too specific. I'm "unassertive"? Compared to who? Genghis Khan?

But it occurred to me that horoscopes are really effective at what they do. The techniques they use (techniques shared with tarot cards and psychics of all forms) are very well documented and easy to learn. I think everyone should be familiar with them, because you're far more likely to be attacked by misleading sentences than by a man with a knife.

These methods are built to work on anyone.


One of the real problems of writing dialog in games is that the player could be playing a wide variety of characters. In some games the variety is extremely small - just the same character played in different ways. In some games the variety is absurdly huge - you can play any race, creed, gender, category, belief system... in short, you could be anyone.

The common way to deal with this is to write huge dialog trees that change depending on your stats. "If the player is playing a girl character, start the 'hit on' tree." This is astoundingly painful on both ends, since it takes a lot of effort by the writers and is very transparent to the players.

The techniques used to write horoscopes, give tarot readings, and convince you to join Scientology might be useful in this regard.

There are lots of tricks, but I'll only discuss two of them:

1) Vague statements are the staple of this kind of writing. Pointing out things that all people share and few people talk about to strangers is part of this, and the other part is making the statement itself open to interpretation. For example, "You probably have some issues with relationships" or "you don't always do all you can for people".

Tweaked for a game, these statements could be equally "prescient". For example, we can basically rest assured that by fifteen hours into the game, the player will have developed a strong feeling about one of the NPCs - love, hate, respect, irritation, whatever. We can use this method to talk about that emotion (that relationship) without even knowing anything about it. We can then use step two to gently get information from the player about the specifics.

2) Fishing for details is the art of tossing out specific suggestions which have a fairly high likelyhood of being right, and (optionally) then adjusting based on the reaction of the individual. An example might be "I see someone whose name starts with 'D'... Dehhh... dah...'" and then the target goes "Donald?"

This needs to be treated carefully in a game, though: a player's knowledge about their character is likely to be limited to their statistics, whereas most fishing revolves around people and common events like birthdays. Most fishing dialog will have to be carefully framed, as mentioned above, or the slack will have to be picked up by adaptive characters also involved in the conversation (see below).


An additional method is to turn these tricks against NPCs. Let the player's dialog contain these kinds of techniques, or let one NPC "read" another in this way.

In this manner, you can basically get a player to learn everything about an NPC and come to think of them as a person - without requiring lengthy exposition or forced cut-scenes. It could even be done on the fly, allowing NPCs with only a vague starting personality to define details about themselves as comments and questions are made.

The trick is to get the dialog to sound natural. You don't want everyone to always sound like they're trying to be psychic, or, worse, have them switch between "normal" and "psychic" mode.

The thing to remember that you're not trying to do horoscopes. You're trying to write dialog. That means that you gently embed these techniques into dialog that follows all the normal rules of character and plot advancement.

Therefore, instead of writing "you are concerned about finances", you might write "Well, I'm going to go buy a new sword. You were doing a lot of fighting yourself, as I recall. Need anything? Healing potion? New boots? Scantily clad local?"

What do you think? Doable? Additional tricks I didn't talk about?


Le Driver said...

This would be a great way to get players thinking the game had been acting intelligently, tracking behaviours and shaping the game world in response to them, when in reality, it involves nothing more complicated than a bit of human creativity and a basic understanding of human psychology. Very nice.

I will have to link to this the next time I do a web-roundup. Dialogue and RPGs certainly go hand-in-hand!

- Natasha

Patrick said...

Whats interesting is language processing as an interface largely depends on cold reading to a large extend, its basically a way of whittling syntax to semantic token cluster and then (in Facade's case) having dialogue fit expected patterns. Of course, Facade perhaps underutilized the technique you describe in the static half of that equation. Maybe if it did the writing wouldn't have been so goddamned on-the-nose, not to mention a bit irritating.

"What, are you saying my X is Y?"

Come one guys, text is cheap, we can do better than leading questions.

On another note, mad props to Stern and Mateas.

Craig Perko said...

There's lots of techniques that I think we could use to write better game dialog. Until now, everyone's dialog advice is basically "do movie dialog"... but we aren't movies.

Our dialog tricks need to be less focused on advancing plot and more focused on drawing the player in, I think. This is simply one way of doing that.

Of course, most games have dialog that's terrible by ANY measurement, and this won't help with that... :P