A quick look at the tool we use to map out dialog and catch "plot errors."

Keeping track of all the various interconnections within a simulated conversation can be pretty overwhelming. Even when I was working on the game " Ruins " -- in which the conversations were extremely short & linear, often consisting of only two or three question-and-answer "blocks" -- I found that I needed to build a small tool to perform some kind of sanity check. I've been extending that tool for Kentucky Route Zero and I'd like to share a bit about it with you now.
The tool is a small Python script called "dialog_analysis.py". It runs through a list of all the conversation data in the game, which are stored in separate files for each character (some characters have multiple files for conversations that happen in different contexts and can never intersect), and for each conversation file it generates a flow-chart style map that shows all the interconnections and possibilities. I explained a little bit about how the dialog system works in a newsletter a few months ago, but as an overview: each conversation is a navigation through a network of "scenes," dialog nodes which contain statements made by characters and usually a set of response options for the player. Some of these scene nodes have no content, but just route the player to a different node depending on the status of some state the game is tracking. For example, Conway may be talking to Junebug after just having helped rescue her robot friends; when the conversation hits the "init" scene node (the first scene in any conversation), it recognizes that this event has just happened and redirects the conversation to a scene in which the two discuss their recent adventure.
So I'm looking at all this formatted text which represents the possibility space of a conversation, and while these text files are certainly the best way for me to write quickly, they're probably the *worst* way for me to get a gestalt view of the conversation and quickly identify scenes that are unreachable or otherwise problematic. Here's an example flowchart generated by the dialog analysis tool:



(Download a larger section of the chart here, if you're interested: http://cardboardcomputer.com/media/donald-dialog-graph-excerpt.png )
Ellipse-shaped nodes are scenes that have both an "incoming" and "outgoing" connection; that is, they are reachable and they lead to at least one other scene. Rectangle-shaped nodes are terminal; they're either unreachable or they're a dead end. This is ok in the special case of the "init" scene, which is always the first scene in a conversation. But you can see that I accidentally made the "describe-radio-repair" scene unreachable (actually I'm just not sure where to link it in yet).
Having this "gestalt view" to fall back on is a great help: I can write some parts of conversations in fragments without always having to be conscious of how they're connected, and always have a sanity check to save a time-consuming testing process that I'd otherwise need to ensure there are no dead-ends or unreachable scenes.

more soon!
jake+tamas