FUNDAMENTALS OF GAME DESIGN, SECOND EDITION

Design Issues for Dialog Trees

When you create a dialog tree, you must be sure that every possible pathway through the tree produces a credible conversation. If the tree is large, verifying this can be a tedious and time-consuming job. If any of the arrows go back to an earlier point in the conversation, you may find that you have to rewrite some dialog to make sure that it works both for the first time through the tree and also for subse­quent times through. In the sample dialog tree, one aspect definitely is not credible: the player can ask the same question in the "Ask About Evidence" menu again and again, and the witness will always give exactly the same response without complain­ing. This is a weakness of scripted conversations, but it is so common that it has almost become a gaming convention. Players are usually willing to overlook it.

CONDITIONAL BRANCHES AND EXCHANGES

Dialog trees are seldom actually as simple as the sample dialog tree makes them look. Figure 7.5 shows a purely fixed conversation whose content is not influenced by the core mechanics: Each player input produces exactly one response from the witness. But sometimes you want other factors to determine what choices the player has and how the NPCs respond. An NPC's response won't necessarily be rig­idly connected with a player's menu choice. Some other factor, such as the level of the avatar's charisma attribute, may influence the NPC's reply. In order to specify this in the tree, you must include a way of indicating conditional branching: some text that reads (for example), "If the avatar's charisma is greater than 12, give response A, otherwise give response B." Likewise, role-playing games that include a diplomacy skill or a negotiation skill may give players with high skill levels extra menu items so that they can say things that unskilled characters cannot. To specify this in the tree, you would have to indicate the presence of conditional exchanges, such as "If the avatar's diplomacy attribute is greater than 10, also include..." and specify an exchange that only diplomatic avatars will get to use.

Again, a diagram with arrows may or may not be the best way to document a scripted conversation with conditional content. Many developers use spreadsheets to document scripted conversations because a spreadsheet program makes it easy to add rows and columns as necessary while keeping the document looking tidy. If you have any programming experience, you may find it easiest to write pseudo­code. Discuss it with the programmers, because whatever approach you choose, it is essential that they understand it in order to produce the correct results.

ANOTHER APPROACH

A completely different approach is to think of the conversation mechanism not as something that moves from one menu to another with each response (as in Figure 7.5), but as a flexible list of options to which different exchanges may be added or deleted at different times. In this approach, instead of creating menus of exchanges, you write each exchange separately, as an individual item, and give it its own name or number. Remember that an exchange consists of a player dialog choice and a response from the NPC that the avatar is talking to. After each exchange, instead of drawing arrows leading to a new menu, you would indicate which new exchanges should be added to the current list, and which should be deleted. This way you can easily add certain exchanges that remain in the conver­sation permanently, without having to document them in each new menu. For example, you can add a "That's all I wanted to know" exchange, which ends the conversation, to the menu at the very beginning, and never delete it no matter what else is said. That would enable the player to end the conversation at any point. Once a subject has been raised for the first time, you could add a "Tell me again about..." exchange to the menu, and until it is deleted, the player could always ask to hear about that subject again.

Here's how the first few lines of the conversation in the sample dialog tree would look using this approach. A conversation-ending dialog option, which was not in Figure 7.5, has been included; it is Exchange 5.

Beginning Action: Add exchanges 1, 2, 3, 4, and 5 to the menu.

Exchange 1:

Player: [Polite] "We need your help to solve a crime. Were you on 3rd Street

last night?"

Response: "Yeah, I was coming home from a bar."

Action: Delete exchanges 1, 2, 3, and 4. Add exchanges 6, 7, 8, and 9.

Exchange 2:

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

Response: "Getting drunk, what's it to you?"

Action: Delete exchanges 1, 2, 3, and 4. Add exchanges 6, 7, 8, and 9.

Exchange 3:

Player: [Direct] "We think you were involved in the shooting on 3rd Street

last night."

Response: "Hey, no way! Violence is not my thing, man."

Action: Delete exchanges 1, 2, 3, and 4. Add exchanges 10 and 11.

Exchange 4:

Player: [Accusatory] "Keane got shot last night. We know you did it, so

start talking."

Response: "That's garbage, and I'm saying nothing."

Action: Delete exchanges 1, 2, 3, and 4. Add exchanges 12 and 13.

Exchange 5:

Player: "That's all we need. You can go."

Response: "About time."

Action: END.

Exchange 6:

Player: [Polite] "That's good, we'll need the name of the bar."

Response: "I was in Foley's from 9 until midnight."

Action: Delete exchanges 6, 7, 8, and 9. Add... [exchanges from the "Ask About Evidence" menu].

Exchange 7:

Player: [Neutral] "Yeah? What bar were you in?"

Response: "Foley's. I'm there every night."

Action: Delete exchanges 6, 7, 8, and 9. Add. [exchanges from the "Time of Bar Visit" menu]. Exchange 8:

Player: [Direct] "You better not be lying. What's the name of the bar?"

Response: "I ain't lying. It was Foley's Bar."

Action: Delete exchanges 6, 7, 8, and 9. Add. [exchanges from the "Time of Bar Visit" menu]. Exchange 9:

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

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

Action: Delete exchanges 6, 7, 8, and 9. Add exchanges 12 and 13.

Exchange 10:

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

Response: "I was in a bar, OK?"

Action: Delete exchanges 10 and 11. Add exchanges 6, 7, 8, and 9.

Exchange 11:

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

Response: "Look, I was in a bar. 9 to midnight."

Action: Delete exchanges 10 and 11. Add. [exchanges from the "Ask About Evidence " menu]. Exchange 12:

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

Response: "Yeah, well I was in Foley's bar."

Action: Delete exchanges 12 and 13. Add. [exchanges from the "Time of Bar Visit" menu]. Exchange 13:

Player: [Threatening] "If you know who did it, you better talk or we'll charge you."

Response: "Fine, charge me. I want a lawyer."

Action: END.

This approach saves you a lot of duplicated effort if there are dialog options that you want to occur every time the game waits for input, such as the "I'm finished talking" option. You simply specify when they are added to the menu, and they remain in the menu until they are deleted. It also lets you document conditional responses, or conditional exchanges, easily by including if statements in the Response and Action lines.

The system is also powerful, because each exchange is a separate item that you can add to the menu any time you want to, instead of being part of a fixed collection of exchanges as in Figure 7.5. However, with this power, as always, comes some risk. It's much harder to read than a diagram like Figure 7.5, and it doesn't document exactly what's on the screen at any given point. In order to find out what options the player has at any point, you have to work your way through the whole conver­sation, keeping track of which items are added and deleted as you go.

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

FUNDAMENTALS OF GAME DESIGN, SECOND EDITION

THE SECRET OF MONKEY ISLAND

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 — Рашид - продажи новинок
e-mail: msd@msd.com.ua
Схема проезда к производственному офису:
Схема проезда к МСД

Партнеры МСД

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

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

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