Game Development Reference
In-Depth Information
recent remark, plus a list of lines for the player to choose from. Notice that each
option is accompanied by a manner of speaking: diplomacy, bluff, intimidate, and
so on. This lets the player have some idea of the tone of voice his avatar would use
if the words were spoken aloud. Different approaches might work better with some
NPCs than with others.
As the NPC says phrases the player hasn't heard before, the player may ask for elab-
oration, end the conversation, or switch the subject to a different topic. Offering the
useful option, “Tell me again about…,” enables the player to return to an earlier point
in the conversation and go through the NPC's responses again if he didn't pay close
enough attention the first time. To end the conversation, the player chooses a line
clearly intended as a farewell message (“Thanks for your help. Maybe I'll talk to you
again later.”), or occasionally an NPC may cut off the conversation with a line such
as “I don't have anything else to tell you” or “I won't talk to you if you're going to
be rude.”
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,
Search WWH ::




Custom Search