Planescape : Torment Logo


The Mortuary
The Mortuary
Navigation Bar

5/18/99
"Here are we, one magical moment, such is the stuff
From where dreams are woven
Bending sound, dredging the ocean, lost in my circle"
-David Bowie

I know that last week I promised to reveal a little bit more of the design document, but then I figured that since I'm currently obsessed with designing dialogues, I might as well share the pai... err, pleasure. Besides, dialogue design is part of the design doc, so it's a roundabout way of achieving my goal.

Now, before I get into the specifics of how we design a dialogue, I have to explain some of our terms. A GLOBAL FLAG is a message sent to the variable database that tells the computer a certain state is true. Most of our variables are multi-state, which means that they can have more than "True" or "False" conditions attached to them. Let's set up a quick and dirty mission using a fictitious flag set. We'll say that it involves someone named "Guido", who is trying to get the player to run an errand for him; specifically, he wants the player to write a weekly update and tell the Sawyer troll that the player is now responsible for said updates. The flag set might look like this:
GuidoErrand:
0= don't know Guido
1= know Guido
2= assigned update; told to talk to Sawyer
3= Spoke to Sawyer, told him about update
4= rewarded for errand

We can use global multi-state flags for just about anything, including starting conditions (where on the dialogue tree the dialogue begins when a certain flag state is true), preconditionals (if this flag state is met - or not met, in certain cases - then the player will have an additional dialogue option), and postconditionals (the player's answer to the NPC will set this flag to a different state).

Let's get on with Guido's quest. Keep in mind that we can't fit even a simple dialogue like this into a weekly update - they're all far longer than you might think - so I'm just going to illustrate it with examples.

Now, if the player has never met Guido before, the GuidoErrand variable will be at zero. In the scripting language we have to use for the dialogue editor, that translates to this:
Global("GuidoErrand", "GLOBAL", 0)
where
Global = the kind of flag we're using
GuidoErrand = the name of the variable flag in question
GLOBAL = where the engine checks for this variable; we also have AREA flags, but that's another matter.
0 = the state of the flag.

If the player speaks to Guido now, Guido's starting condition will take him to a node that looks like this:
----------------------
You see a long-haired German man. "Greetings," he says. "How would you like to do a weekly update?"
a. "I'd love to!"
b. "I'm not so sure. I'm kind of busy."
c. "A weekly update? What do you mean?"
----------------------
All of these answers will change the state of the flag, but they'll potentially to different things. Let's go with response a. This will do the following:

SetGlobal("GuidoErrand", "GLOBAL", 2) - as you can see by the table we set up at the beginning of this update, this means that the errand has been assigned, so the player is officially on this mission as far as Guido's script is concerned, and the dialogue can go like this:
--------------------
"Great!" says Guido, with real enthusiasm dripping from his voice. "Just go talk to the Sawyer troll and tell him that you're doing the update."
a, "I'm on my way. So long!"
(and here the dialogue ends)

If we had chosen 'b' or 'c', we'd have set the state of the flag to 1 instead of 2, giving us different reactions from Guido and Sawyer if we talked to them. However, we chose 'a', and we're not creep-and-savers, so we're stuck with our flags the way they are.

We're on our way to visit Sawyer. In fact, we reach him without incident. We enter his gloomy office, punctuated by the sounds of water dripping in the distance and the chittering of rats. We find Sawyer, hunched over a keyboard, and tell him we've been sent by Guido. Fortunately for us, we have a legitimate errand (when GuidoErrand = 2, Sawyer becomes much more friendly to us). We inform him that we've been assigned to do the weekly update. He growls his pleasure and sets our flag state to: SetGlobal("GuidoErrand", "GLOBAL", 3).

We leave Sawyer now, glad to have escaped with our lives, and make the long and arduous trek back to Guido's office. When we return to Guido, he thanks us for our devotion to the game, rewards us by letting us keep our jobs, and sets our flag state to 4. He also gives us experience and a hefty bonus:

AddPartyExperience(2000)
GivePartyGold($5000)

because of the dangers involved in our quest.

If we go back to talk to Guido again, his starting condition encompasses Global("GuidoErrand", "GLOBAL", 4) and his reactions are based on the knowledge that we've finished his quest and have been rewarded for it.

This is, sadly, far less involved than the dialogues that we create on a daily basis, which often have several characters interacting with each other in order to finish a basic quest. They're not always dialogue-intensive quests, but we have to cover each contingency in the flag states, not to mention setting up commands, experience, rewards, and the other wackiness we get throw into a dialogue, and so the dialogues grow and grow... and grow... and grow...

... and that's what we designers are working on for the foreseeable future.

If you've made it this far, go give yourself a cookie.

Next week, we'll figure out something else to talk about. Til then, have a holly jolly Christmas.

-Colin

Planescape: Torment & Design: © 1998 Interplay Productions. All Rights Reserved. © 1998 TSR, Inc. All Rights Reserved. Planescape, the Planescape logo, Advanced Dungeons & Dragons, Torment, the AD&D logo, and the TSR logo are trademarks of TSR, Inc. and are used by Interplay under license. TSR, Inc. is a subsidiary of Wizards of the Coast, Inc. Interplay, the Interplay logo, Black Isle Studios and the Black Isle Studios logo are trademarks of Interplay Productions. Exclusively licensed and distributed by Interplay Productions. All other trademarks and copyrights are property of their respective owners.