February 5, 2008
Games employ fiction in many ways.1 The most story-ambitious genre of computer games is probably the computer role-playing game (RPG) — a form that traces its roots back to a non-computer form of gaming: the tabletop RPG.
The first tabletop role-playing game was Dungeons & Dragons, created by Gary Gygax and Dave Arneson and published in 1974 (Mona, 2007). It grew out of a tabletop war gaming tradition in which maps were used to represent battlefields, miniatures representing units or individual combatants were placed on the maps, and players would then move figures and engage in battles by following sets of rules and consulting tables of numbers (process and data of the system) with a random element at times introduced using dice. Dungeons & Dragons departed from this model by suggesting that each player take on a single character, that play sessions connect with one another in an ongoing campaign during which each character would develop, and that the game encompass much more of the characters’ lives (and the fictional world in which they live) than raw combat.
The result was the birth of a genre that is, when well-played, undoubtedly the most successful combination of game and fiction now in existence. RPG systems have been created for a wide variety of fictional settings (inspired by authors ranging from H.P. Lovecraft to William S. Burroughs), are played both as tabletop games and live performances, and embody a diversity of aesthetic goals (the design goals of Greg Costikyan’s games alone range from reproducing the wacky physical comedy of classic cartoons to evoking the alienation of Brechtian theater2). Most retain a role for one of the players as the “game master.” This player undertakes the advance planning for the current campaign, plays the roles of the non-player characters (NPCs), shapes events to ensure the type of story desired, and executes most of the rule processes. This leaves other players free to concentrate on the defining features of RPGs: playing their characters and collaboratively developing the fiction.
Of course, with computer RPGs the situation is somewhat different. Many computer RPGs are single-player experiences. In these cases, if there is a group of characters played in the game, the same player controls them all. Or, if multiple players work together (as in massively multi-player online RPGs, such as World of Warcraft) the game is structured for players to communicate over a network, rather than face-to-face.3 Crucially, no player has the part of the game master. The execution of the rules, presentation of the fictional world, portrayal of NPCs, and shaping of the story is left to computational processes and data.
When brought to the computer, then, the core experience of story and character in RPGs shifts from collaborative performance (in the tabletop and live action variants) to digital media (especially for single-player games). In particular, two operational logics have come to prominence in the story and NPC presentations of computer RPGs. These are quest flags and dialogue trees.
Modern computer RPGs use many of the same technologies and techniques for representing their fictional worlds as other games. A character (or group) moving through an explorable three-dimensional world — with objects to pick up, NPCs to engage, and combat to resolve — is present in first-person shooters (e.g., the Doom series), platformers (e.g., the Prince of Persia series), and RPGs (e.g., the Knights of the Old Republic series). What changes is the emphasis in play. As the name would suggest, first-person shooters are focused on combat as the main form of play. It becomes both the primary challenge and main motivation for players moving through the world. Platformers, on the other hand, make movement itself (sometimes through a puzzling space of platforms of varying shapes and heights) the main challenge and motivation for players. RPGs, however, often work to motivate players to engage in a variety of types of play (e.g., exploration, combat, and intellectual puzzle-solving) via character development set in a larger story. In particular, many RPGs give the sense that the story itself is playable by offering the player freedom to roam across a world infused with quests that operate at many scales, can sometimes be completed in different ways, and are often optional or available for partial completion. As each player chooses which quests to accept — as well as how, whether, and when to complete them — this creates a different story structure for each playing. Some of the player’s non-quest activities may be directly related to this structure (e.g., taking on tasks in the world that earn money, in order to acquire enough to purchase an item needed for a quest) but the structure also provides one context in which even world exploration for its own sake can be situated.
Despite the variety of experiences players can have with quests, it is commonly observed by both players and authors that there are a very limited number of types of quests — perhaps three, or even one. As Lee Sheldon points out in Character Development and Storytelling for Games, this observation is correct, as far as it goes, given that “the mechanism for tracking progress by the game engine is virtually identical in every quest” (2004, 227). This mechanism is the setting and checking of a collection of small pieces of data — often called “tokens” or “flags,” but sometimes known by the more formal term “variables” — as the player progresses through the world. These data flags represent the state of the world as it relates to quests of varying scope. They are generally checked and set by relatively simple “scripts” that can be edited by game designers and writers (without recompiling the entire code of the game). The state of quest flags is often explicitly presented to players in the form of a personal “journal” or “notebook” that scripts update with helpful reminder texts about the current state of each quest (at the same time that flags are updated). Other quests are, while often signaled equally directly, instead organized around the possession and use of game world objects without messages in the journal.
Overall, this approach is notable for its simplicity of structure. In fact, it is so simple that game companies have worked to open its authoring to players who are not software developers. For example, when game developer BioWare published the game Neverwinter Nights (Oster, Holmes, Greig, Moar, Brockington, Knowles, Ohlen, Bartel, and Manthorpe, 2002) they also released the Aurora toolset for creating new spaces, objects, NPCs, and quests. The goal, in part, was to offer players a rare opportunity in the world of computer RPGs — to play a game master, in a manner somewhat similar to tabletop RPGs, crafting the game experience of other players.4 As in many other games, the quests of Neverwinter Nights are presented to the player in the form of a virtual journal.
Figure 3.1: Aurora’s Journal Editor.
Using Aurora, the first step in creating a quest is to begin a new category for entries in player journals, using the special purpose “Journal Editor” tool (shown in figure 3.1). Each entry in a category is designed to let the player know that the appropriate scripts have been activated to set the flags that are necessary for the next stage of the quest.5 For example, one could create a journal category with three entries:
- Grandfather had a signet ring that belonged to his own great-grandfather. But apparently no one has seen it since it was passed down to him — and it wasn’t mentioned in his will.
- Grandma would treasure this ring with the rest of Grandpa’s jewelry. But the carved symbol you’ve seen before at your Uncle’s, so he might be interested in it as more than a memento. Of course, it also looks valuable, and you could use the money you’d get from selling it.
- You no longer have the ring.
Different events can trigger scripts that change the current state of the player journal. For example, the first entry above could be added based on a conversation with the player character’s grandmother or finding and reading a letter sent to the player character’s father. The same script could set a value of “true” for a flag with a name such as “lookingForRing.” Dialogue trees for NPCs could be different based on this flag, offering the player the option of asking people if they know anything about the ring, leading to clues as to its location. Once the ring is found, a script fired by that event could move the journal to the next entry, as well as set lookingForRing to its earlier “false” value, while flag such as learningAboutRing could be set to “true.”
If the game authors wish to move all players through the quest in the same way, the ring could be in a locked attic room that isn’t accessible until lookingForRing is true. Alternately, the player could have the option of finding the ring before hearing about it in any other way. Quest designs that follow this latter sort of approach (forcing players through as few “gates” as possible) certainly give the player more options for how stories unfold, making the story have some of the same feel of free exploration as the graphical world.
But seeking this feeling of exploration carries a price, one which attention to the shape of processes can lessen. For example, in the case of our hypothetical family ring quest, starting by finding the ring (jumping straight to the second stage) seems unlikely to produce any problem with the flags or journal. Setting lookingForRing to false when it is already false makes no difference, and starting with the second stage of the quest works with the journal entries as written. But to determine such things the game author has to carefully think through every possibility — and the more freedom given to the player (as to when, how, and whether to take on and complete quests) the more the events of different quest strands need to be considered relative one another.
Which brings us back to the idea of simplicity. The quest flag structure is a simple one in a variety of ways. It’s easy for software developers to implement, it doesn’t require much in the way of computational resources (leaving both programming and processing resources free for areas of the game such as graphics, which is something most game companies value), and it can be exposed to the audience quite straightforwardly. But given the goal of the audience feeling able to play within the fictional world — not just in areas such as combat, but also in terms of the stories being told — the quest flag structure quickly brings game authors to a limit point of complexity, holding back the future development of the form. I’ll consider this further in my discussion, below, of BioWare’s widely lauded single-player RPG, Knights of the Old Republic. First, however, a brief discussion of dialogue trees is in order.
Tabletop and live-action RPGs create dialogue between characters by having two human beings improvise it. No computer process can substitute for the immediacy of such an exchange (or even come close to an ability to understand free-form human language) so computer RPGs have been forced to take a different approach. As with the quest flag approach to story, the computer RPG approach to dialogue is simple both in terms of software implementation and audience comprehension. This approach is the dialogue tree.
Like the Eliza system, the dialogue tree model of conversation is founded on turn-taking. But what happens at each turn is utterly different. During the audience’s turn, dialogue trees do not allow for the free-form textual input of Eliza. Instead, when interacting with a dialogue tree, the player is generally presented with a small number of options (usually ranging from one to five) for what the player’s character can say. After a selection is made, the system performs the response of the NPC(s) to which the player’s character is speaking. Conversation continues in this manner until the player selects a conversation-ending option (which may or may not be explicitly presented as such).
Rather than NPC responses being generated by applying rules to the audience’s last statement, as with Eliza, each NPC response is selected by traversing a hierarchically-organized data structure. This is what gives the dialogue tree its name.
Figure 3.2: Aurora’s Conversation Editor. The branches of the dialogue segment that begins “Yes child?” are collapsed in this view, with further player responses hidden.
Figure 3.2, an image of Aurora’s “Conversation Editor” tool for authoring dialogue trees, makes this more specific. It looks quite similar, at first glance, to the tool for quest journal entries. One difference, however, is that while the journal contained quest stages in an order likely to be encountered by players, the ordering of the text in the conversation editor seems rather odd:
- Yes child?
- I found grandfather’s ring.
- I’ve been wondering about some things.
- Is there any food in the fridge?
- (FullName), you’re looking well. And dressed smart. What’s that on your hand?
- The scar?
- No, the ring.
- [link to “This ring?”]
- This ring?
- Oh, I — I almost thought it was your grandfather’s. Haven’t seen it since we were young.
- I miss him.
- We all do.
- [link to “You still think of his ring?”]
- Excuse me. I have to go to the bathroom. [End conversation]
- You still think of his ring?
- I remember because he was so secret with it. There are times I wonder if he got killed for it, and that’s why it wasn’t with his things. If you found it, that would put me at ease. Would you look?
- Of course.
- Thank you so much.
- Soon, I promise. But not right away.
- I understand. Come back a better time.
- One of my cousins would be better. Jerry’s a cop.
- You’re probably right.
This odd ordering is in part a reflection of the “tree” nature of dialogue trees. Each of the two groupings above starts with an initial statement by the grandmother NPC, with possible replies nested at the next level of indentation, each of which leads to a particular NPC reply (and/or the end of the conversation), which may itself have further player character statements nested at a further indentation level below. For this reason, dialogue tree segments can’t be read straight through. In addition, dialogue trees are rarely pure tree structures. Instead, many branches make connections to other parts of the tree — as above, where both of the possible responses to the grandmother’s first question (“What’s that on your hand?”) lead to the same place, because of a link from “No, the ring” to “This ring?”6 Given this, understanding how players will experience a segment of a dialogue tree requires both traversing the hierarchical tree structure and following the links that connect the structure’s branches.
Another type of odd ordering, that of the two primary tree segments, emerges from common authoring practices. Dialogue trees check and set the same types of flags employed by quests — and different sets of dialogue are appropriate at different moments. The expanded segment of dialogue above (that begins “(FullName), you’re looking well”) is appropriate for the first time the player character meets the grandmother, which only happens once, so it is placed at the bottom. The most commonly-encountered dialogue is placed at the top, as the default, and only altered (or skipped) if particular flags have certain values. If the grandmother were to have only two possible segments in her dialogue tree, this could be accomplished simply by having a flag called, for example, “firstTimeTalked” which is initially set to true. The default dialogue segment would be skipped whenever firstTimeTalked is true, and entry into the second dialogue segment could trigger a script to set firstTimeTalked to false.7
Chris Bateman, in Game Writing: Narrative Skills for Videogames (2006), is generally negative about dialogue trees. He writes:
Despite the name, dialogue trees are seldom true trees but rather converging and diverging chains of conversation. They can be a nightmare to work with, and the benefits they provide are somewhat minimal. Nonetheless, some players greatly appreciate the illusion that they have control over what their character can say, with the consequence that dialogue trees remain important, especially in cRPG games. (277)
My view of dialogue trees is rather different. First, one remarkable thing about dialogue trees is how little illusion they present, especially when compared with systems like Eliza. Each NPC will only respond to a limited number of things — and these are plainly presented. Further, because dialogue tree traversal options are “converging and diverging” (often, for default dialogue segments, in a cyclical pattern, so that the final options at the ends of branches include a return to the trunk) the fact that dialogues are structured as tree traversals becomes clear even to first-time players.
While this is certainly a (poor) “illusion” of real conversation, it isn’t an illusion of control over what the player character says, as Bateman suggests. Rather, in most RPGs it is an important method of making gameplay decisions — with different dialogue options altering game variables in different ways. The range of possible results from dialogue tree choices is vast, including, in popular RPGs, accepting or declining quests (and rewards for those quests); defusing tense situations or initiating battles; learning more about NPCs (and perhaps unlocking quests related to their personal lives); and changing how NPCs feel about the player character in more emotional ways (ranging from feelings of loyalty and honesty to romantic subplots).
At a technical level, it is correct to say that all these things boil down to menu selections. But successfully traversing these menus can be a tricky business, one made easier for players who draw on their knowledge of the game’s fictional world. In addition, it is one of the most direct means by which players can express the role they imagine for their character(s): agreeing or refusing to do things for others, acting out of kindness or mercenary motivation, telling the truth or spreading falsehood, and so on. Building such consequential choices into dialogue trees is also quite simple for authors. In figure 3.2, the lower portion of the window shows how a few menu selections are sufficient to cause a line of dialogue (“Thank you so much”) to also update the player’s journal — in this case moving the quest in the Grandpa’s Ring category to entry number one. Figure 3.3 shows this taking place in the game.
Figure 3.3: Receiving a quest from Grandma in the example module.
But, despite the ease of this basic piece of authoring, Bateman is certainly correct that dialogue trees can be a nightmare to work with — as can the larger method of storytelling that they form in combination with quest flags. Further, this might be one of their smaller problems, as I discuss below in the context of a particular example. First, however, a broader look at the logics of these operations is in order.
Quest and dialogue logics
The primary operational logic at work in Eliza is transformation — each statement from the audience is immediately transformed into Eliza’s next statement, using a set of processes in a manner specified by the data of the current script. In computer systems parlance, we might say that Eliza conversations are nearly “stateless.” Eliza doesn’t model the ongoing state of the conversation, using its script differently depending on prior interactions, except to avoid excessive repetition of the use of certain rules.8
The combination of quest flags and dialogue trees, on the other hand, is in some ways all about state. The quest flag logic is precisely one of milestone-based progression. Quest flag fictions are ordered sets of discrete units. What matters is where the player is located — at which milestone along the path — and this is precisely what is exposed through the mechanism of the player journal. In some cases the beginning of the progression may be skipped, and the end may never be reached, but at each moment of play the fiction is at a particular point, among a small number of pre-defined points, arranged in order.
The logic of the dialogue tree, on the other hand, is essentially that of the directed graph. Rather than modeling conversation as a set of discrete exchanges with no context (as in Eliza) the dialogue tree always locates the current conversational state at one particular point, among a set of pre-determined points, from which navigation is possible to other points via pre-determined links. As with the milestones of quest flags, its usually impossible to go backwards — the graph is directed toward “progress” in the conversation — but it is also usually possible to loop back to the main trunk of the currently-available conversation, if occasionally rather circuitously.
In other words, somewhat like the graphical logics of games, the logics of dialogue trees and quest flags are about location in a given space. But while the graphical spaces of games are often simulated in a manner that supports almost innumerable possible locations, the milestones of quest flags and graphs of dialogue trees mark out all the possible positions (and transitions between them) ahead of time. This mismatch proves problematic.
1Some games, of course, can hardly be said to engage fiction at all. No one wants a story with their Tetris — and its “fictional world” of falling blocks barely supports the phrase. Given the sometimes-contentious nature of critical discussion around the relationship between games and fiction, I should perhaps also make clear that I do not believe any games “are” stories or narratives in a classic narratological sense. Rather, following Espen Aarseth’s call for discussion of “quest games” (2004) I propose, here, to give careful attention to the specific operational logics of quests and dialogue trees in computer role-playing games. For readers interested in a more detailed discussion of games and narratology, I suggest chapter eight of Marie-Laure Ryan’s Avatars of Story (2006).
2In Toon (1984) and Bestial Acts (1993), respectively.
3Though many MMO play groups, including some in which I have participated, include face-to-face interaction between some players.
4And, in fact, Neverwinter Nights is a licensed computer version of the tabletop game Dungeons & Dragons — which remains the most popular tabletop RPG, in addition to being the first.
5In Aurora’s model the current state of the quest journal is rarely queried by any part of the game system — it’s just a method of exposing information to the player and assiduously avoiding the perils of the Eliza effect.
6The “[END DIALOGUE]” at this point in the image is not correct, but an artifact of Aurora. The same is true after “You still think of his ring?”
7In an actual game that included the Grandfather’s Ring quest, the grandmother conversation would need another flag structure, given that the initial dialogue must be different if the ring has been found before the first conversation with the grandmother.
8And, of course, Eliza also makes an occasional fallback on pre-created transformations when the most recent audience statement contains no keywords.