February 5, 2008

EP 3.2: Role-playing games

by Noah Wardrip-Fruin · , 6:37 am

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.

Quest flags

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.

Dialogue trees

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. PIC

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. PIC

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.

21 Responses to “EP 3.2: Role-playing games”

  1. Dennis G. Jerz Says:

    Hunt the Wumpus preceded D & D and Adventure. While the player’s commands hardly count as conversation, even the early games included a DM-like voice who informed the player about the surroundings. And Maze War introduced a player-character avatar (a floating eye) and multiplayer features (including chat, which has some connection to in-game dialogue in an RPG, especially in the context of D and D).

  2. noah Says:

    Ah yes. Hunt the Wumpus brings up memories. It’s one of the games I played as a child on a mainframe terminal up at my mom’s campus. But I always placed it as published in 1975. While it was distributed earlier in pre-publication forms, I understand the same is true of D&D. Does HtW actually predate D&D? (Not that we need to make a fetish of these things, but…)

    There’s also the issue that, in this paragraph, I’m really talking about tabletop RPGs — so it would be a bit difficult to thread computer examples into the text. However, I could footnote them, which might help clarify that there were things happening in the computer world in parallel with the tabletop world.

  3. Jose Zagal Says:

    The 2nd sentence makes it sound like all (or most!) RPGs are systems created for pre-existing fictional settings. While it may be true that some RPGs have been created and designed this way there are just as many cases where the system and the setting were created together. There are also “generic” systems that have been used and adapted across a variety of games and settings as well.

    Also, I’m not familiar with a game inspired by William S. Burroughs. Could you add, even as a footnote, the game(s) you are referring to here?

  4. Jose Zagal Says:

    I’m not sure what you mean by “digital media” as a core experience.

  5. Dominic Says:

    I think this is a strong conclusion, especially since I have in mind Murray’s Hamlet on the Holodeck observation that “the computer is not fundamentally a pathway but an engine”. Dialogue trees are indeed a spatialized parcours through a “pre-rendered” fictional situation (very much like the real-time VS pre-rendered graphics). And in this sense, they seem to be closer to “Choose-your-own-adventure” books than to tabletop RPGs. This mismatch proves problematic indeed…

    Also, while I don’t think it is especially lacking or weakening your argument, I think it might be worth it to address the keywords-based conversational logic, kind of as an intermediary between the textual “recognition” involved in free typing and the 100% scripted dialogue tree. Or do you see that exactly as the free-typing system, with the only difference being that the keywords are revealed to the player instead of hidden? I recall reading somewhere that the Ultimas featured this, though my own early memories of this experience shift more towards Daggerfall, Shadowrun on the SNES and Morrowind.

  6. Dennis G. Jerz Says:

    Gregory Yob wrote in a 1975 Creative Computing article that referred to inventing Wumpus two years earlier. He also referred to existing grid-based games called Hurkle, Snark, and Mugwump. Yes, the D and D games were circulated before the official publication. While I recognize you don’t need to establish the exact timing in order to make your point, it’s probably good to acknowledge parallels.

  7. noah Says:

    Glad you find it a strong conclusion. Tomorrow’s section plays it out in specific reference to Knights of the Old Republic, but the observation is definitely meant to be more general (and lines up nicely with the phrase of Murray’s you provide).

    I think you’re right that it might be good for a note to mention some additional forms in which dialogue options can play out, such as the use of keywords. Another good example of dialogue form, given the overlapping authorship with KotOR, might be Mass Effect’s.

  8. noah Says:

    Sounds like I might need to rephrase. I just mean that the RPG experience moves from the collaborative, live performance of people to a media experience (and specifically digital media, able to employ processes).

  9. noah Says:

    Yes, good catch. I should clarify that not all RPGs are for pre-existing fictional settings. In terms of H.P. Lovecraft and William S. Burroughs, I was specifically thinking of Call of Cthulhu and Over the Edge. Of course, the mapping of CoC to Lovecraft is more direct than the one of OtE to Burroughs. But as designer Jonathan Tweet puts it:

    A lot of the tone and imagery in OtE was inspired by Naked Lunch by William S. Burroughs. Reading that book (pointed out to me by not-yet-pro Robin D. Laws) is what changed my general desire for a personal RPG into the real deal. There’s a good bit of Philip K. Dick in there, too.

    I can definitely note this in the book.

  10. noah Says:

    Agreed. I’ll definitely put in a note about the computer/tabletop parallel developments, or weave some text about earlier computer elements into a later paragraph. Thanks for the suggestion!

  11. Jose Zagal Says:

    Perhaps a “digitally mediated experience” might hit closer to the mark?

  12. Sarah Toton Says:

    It may be worth noting/knowing about the online RPG CMS’s available: Obsidian Portal (www.obsidianportal.com) and Gleemax (www.gleemax.com). Also, Marketplace recently ran a story called “D&D Goes Digital” that may be worth checking out: http://marketplace.publicradio.org/display/web/2007/12/28/dungeons_and_dragons/)

  13. Emily Boegheim Says:

    “…quest flags, its usually impossible…”

    You’re missing an apostrophe in “its”.

    By the way, I’m really enjoying the book so far!

  14. noah Says:

    Yes, or maybe I should do a little sentence surgery. Perhaps something like this:

    “When brought to the computer, then, the core experience of story and character in RPGs shifts. In tabletop and live-action RPGs story and character are experienced primarily through collaborative human performance. But for computer RPGs, especially single-player ones, story and character become media experiences — made interactive via computational processes.”

    Is that better? It seems clearer, but also a bit repetitive in its phrasing…

  15. noah Says:

    Ah — good thought. I could mention those, and also things like Living Greyhawk, which use online coordination of offline, distributed events toward a different form of massiveness than I’m mentioning with MMOs.

  16. noah Says:

    Thanks for the catch — and the compliment!

  17. Jose Zagal Says:

    That works better for me. :-)

  18. Benjamin Grandis Says:

    That final sentence of the paragraph does imply that the only main changes in NPC feelings occur within a positive spectrum, which may be true for a great number of cRPGs, but there are a fair few, especially the larger ones, which experiment with the ability for even your party members to grow to resent you, often for quite complex reasons which tie into the plot and yet are quite avoidable (I’m thinking here of KotOR 2, Neverwinter Nights 2, Mass Effect, but also a lot of the Infinity Engine games…)

    Just a very very minor quibble. Loving the book.

  19. Sarah Toton Says:

    Thanks for your note. All these online supplements might be helpful to consider. They seem to complicate the tabletop-computer RPG divide in ways that are often overlooked. Even older online tools like PCGen (http://pcgen.sourceforge.net/01_overview.php) have become popular resources for many GMs.

    Great post, by the way.

  20. noah Says:

    You’re absolutely right. I’ll change that in the final text.

    Glad you’re liking the book!

  21. noah Says:

    Thanks. I’ll definitely work this in (probably in a note) because I agree that it’s important that people understand that there are a variety of hybrid forms in this space, and a variety of types of work in each form — not just D&D and WoW.

Powered by WordPress