Structure of a Dialog Tree

Scripted conversations may be designed using a dialog tree, a branching data struc­ture a little like the branching story tree. In a branching story tree, each branch point, or node, represents a place where the plot divides based on some factor— usually a player decision. In a dialog tree, each node represents a place where a conversation may branch, based on the player's decision about what he wants to say. Unlike a branching story, the arrows in a dialog tree can go backward as well as forward because players sometimes want to repeat parts of their conversations.

Each node contains a menu of exchanges, and each exchange includes one line of dialog available to the player and the NPC's response to that line. From each exchange, an arrow points to the next node in the tree—that is, the menu of dialog options that the player will see next. In a scripted conversation, the computer dis­plays all the dialog options in the current menu to the player, and waits for the player to choose one. When the player makes a selection, the computer plays back the NPC's response, then follows the arrow to the next menu and displays the dia­log options there. The conversation passes through menu after menu as the conversation progresses.

In addition to letting the player discuss a variety of topics with a given NPC, the menu system allows the player to choose from a variety of different attitudes in which she says essentially the same thing, enabling her to project herself into the game as, for example, aggressive, deferential, formal, or flippant. The NPC can then respond to each phrase differently, in whatever way his personality dictates. An easygoing character might find a flippant response amusing and may choose to reveal more information to the player, while a powerful character who brooks no nonsense might be offended by wisecracks and refuse to talk to the player any more. (If you take this approach and the NPC's information is vital to the plot,
make sure that either the powerful NPC gets over his snit after a while or there's some other way for the player to obtain the information.)

Figure 7.5 (on the following page) illustrates a brief conversation in which the player is acting as a police detective, interviewing someone who may have wit­nessed (or possibly committed) a crime. The conversation begins at the first menu, and in that menu the player has a choice of four approaches to the witness: polite, neutral, direct, or accusatory. Each approach produces a response from the witness, which then leads on to another menu of things for the player to say. Each menu has its own name.

In this example, the witness is rather uncouth, but is prepared to help the player as long as the player is not too hostile to him. If the player takes a strongly aggressive approach, the witness demands to see a lawyer, which ends the conversation. In this case, the player will not learn some of the information that the witness has, so the player will either have to re-interview the witness later, or find it out some other way.

Figure 7.5 includes several features that are particularly worth noting:

■ Not all the menus in the figure let the player ask the same question in different tones. Some give the player a choice of questions to ask about different subjects.

The menu "Ask About Evidence," for example, lets the player ask about gunshots, a car, or a man in jogging clothes. If the witness doesn't know anything about one of these subjects, the arrow leads back to the same menu again so the player can ask about a different subject.

■ Although all the witness responses in the menu "About the Car" lead to the same place (the "Follow-Up" menu), each one still provides the player with some different information.

■ Not all questions produce unique answers. In the "Time of Bar Visit" menu, the polite and neutral approaches both elicit the same answer from the witness. This is perfectly allowable if there's no particular reason to differentiate them.

Finally, note that in Figure 7.5, the maximum number of exchanges the player can have, without repetition, is eight. As with branching stories, if the menus continue to branch without folding back, you will soon get a combinatorial explosion of menus. In practice, they frequently converge, or link back to previous menus.

Unfortunately, there is no industry standard system of notation or scripting for designing dialog trees. Instead of creating a diagram with arrows as in Figure 7.5, you may find it easier to write your dialog in a text file, and instead of drawing arrows, simply write "Go to Menu [menu name]" to indicate which menu should follow a given response. If such factors will affect your dialog, you should sit down with your programmers and devise a system of notation that will be easy for you to cre­ate and easy for them to understand; they have to understand all the factors and when those factors come into play so they can write the software that actually implements the system.



A small dialog tree



[Polite] We need your help to solve a crime. Were you on 3rd Street last night?

Yeah, I was coming home from a bar. 4

[Neutral] What were you doing on 3rd Street last night?

Getting drunk, what's it to you? 4

[Direct] We think you were involved in the shooting on 3rd Street last night.

Hey, no way! Violence is not my thing, man. 4

[Accusatory] Keane got shot last night. We know you did it, so start talking.

That's garbage, and I'm saying nothing. 4



[Sarcastic] Oh, yeah, you're a model citizen. You got an alibi?

I was in a bar, OK?

[Accusatory] That's not what your police record says. Where were you?

Look, I was in a bar. 9 to midnight.



[Accusatory] You weren't in any bar, you were in the alley shooting Keane.


No I wasn't, and you've got nothing.



[Polite] Can you tell us what time you were there, please?

Got there around 9, left around midnight.

[Neutral] When did you get there, and how long did you stay?

Got there around 9, left around midnight.

[Direct] You better hope Foley backs you up. When were you there?

9 to midnight. He'll remember me all right.

[Accusatory] So tell me some lies about when you were there.

Forget it. I want a lawyer.






Did you hear any shots around that time?

We're trying to trace a tall man in jogging clothes. Did you see him? When you came out, did you see a blue car go by?

Подпись: No, no shots. I'd remember shots.Подпись: Not that I remember. Yeah... going real fast! A sports car. Good, 'cause I got places to be, you know? That's all we want to know for now.




Did you catch a look at the license plate?

What, I got a photographic memory? No.

Do you remember the model? Foreign, domestic?

Maybe a Porsche. I'm not a car guy.

Did you see the driver?

It was a man. That's all I can say.







[Direct] You're the prime suspect, unless you convince us otherwise.

Подпись: Yeah, well I was in Foley's bar.Подпись: Fine, charge me. I want a lawyer.[Threatening] If you know who did it, you better talk or we'll charge you.

Добавить комментарий



The Secret of Monkey Island, now nearly 20 years old, remains worth studying because it spawned a highly successful franchise. Although it is ostensibly set on a Caribbean island in …

Human Intelligence Instead of Artificial Intelligence

In single-player games, the player competes against the computer, so the computer has to have enough artificial intelligence (AI) to be a good opponent; building the AI for a complex …

Kaye Elling’s Five Cs

Kaye Elling was creative manager at Blitz Games on the Bratz series, and in 2006 she gave an insightful lecture called "Inclusive Games Design" at the Animex festi­val in the …

Как с нами связаться:

тел./факс +38 05235  77193 Бухгалтерия
+38 050 512 11 94 — гл. инженер-менеджер (продажи всего оборудования)

+38 050 457 13 30 — Рашид - продажи новинок
Схема проезда к производственному офису:
Схема проезда к МСД

Партнеры МСД

Контакты для заказов шлакоблочного оборудования:

+38 096 992 9559 Инна (вайбер, вацап, телеграм)
Эл. почта:

За услуги или товары возможен прием платежей Онпай: Платежи ОнПай