PDA

View Full Version : Diagramming a conversation tree



pendell
2010-10-28, 12:25 PM
I'm confronted with an issue where I have to construct a conversation tree.

The sort of thing where the user is presented with an array of choices, and the conversation branches depending on that choice.

E.g.

"The troll demands 2 gold to cross the bridge"
1) Pay -> GO TO dialog 2
2) Haggle-> GO TO dialog 3
3) Fight->FIGHT , exit conversation.

I'm wondering if there is a method of diagramming a full conversation tree, showing all the different states and transitions that could happen during the action.

The most obvious way to do this would be with a state diagram (http://en.wikipedia.org/wiki/State_diagram), and that will certainly serve. But I'm wondering if there's a specialized variant specific to conversations or dialogs.

Respectfully,

Brian P.

warty goblin
2010-10-28, 12:41 PM
Honestly I'd program it in Java or Python as a graph. You'd need a couple of custom classes probably, but it really shouldn't be that hard.

To diagram it out something like Microsoft Visio would probably work, although it would get somewhat cumbersome.

If nothing else one could always write a custom GUI thingy to sit on top of your Java graph that would generate a visualization from a given set of nodes. This bit could get a bit complex, but fundamentally should be pretty doable.

endoperez
2010-10-28, 01:11 PM
This page (http://en.wikipedia.org/wiki/Digital_conversation) has an example of what it calls a "scripting canvas for a Digital Conversation".

It doesn't go any more in-depth, but the idea of using symbols to mark the type of dialogue sounds good. Questions, conversation-enders, fluff, important information (the kind which is added to a journal in games that have one)...

pendell
2010-10-28, 01:17 PM
This (http://en.wikipedia.org/wiki/File:DigitalConvoScript.png) looks like precisely what I'm looking for -- thank you! -- but I can't seem to find where this diagram came from, or what the different symbols mean. Googling 'conversation script' 'convoscript' 'digital conversation' didn't yield much.

Respectfully,

Brian P.

Prime32
2010-10-28, 01:27 PM
The dialog editor in Morrowind displays things as a sort of tree. Rather than "go to dialogue 3", your choice can result in "continue".

"I have a story to tell. Would you like to hear it?"

"Yes" - Continue
"No" - Go to 4
"Generic insult!" - Go to 5

"Well it all began... blah blah blah blah"

"Keep listening" - Continue

"...and that's how I became king of the Morlocks. Thanks for listening, here's some coppers for your trouble."
(Give 2cp)

"Bye" - Exit


"Farewell then."

"Bye" - Exit

He draws a sword, a dangerous look in his eyes. "Say that again."

"Okay, I'll listen." - Go to 2
"Bye" - Exit

Mando Knight
2010-10-28, 07:51 PM
The dialog editor in Morrowind displays things as a sort of tree. Rather than "go to dialogue 3", your choice can result in "continue".

The dialogue editor for KotOR does much the same...

...Which reminds me of something else you might consider. KotOR (and, I suspect, other games built on the same engine, i.e. Neverwinter Nights) has one file, "dialogue.tlk" and many separate "whatever.dlg" files. The former contains all of the strings used by the latter, which references them in its dialogue paths. I presume this allowed them an easier time debugging those two different halves of the conversation: the text that the players interact with and the code that the computer uses to direct the conversation.

blueblade
2010-10-28, 08:26 PM
Can I suggest you use a mindmap tool? Would be much quicker than Visio, clear, and can be fairly concise (some of those diagrams look like they would take a lot of pages). You'd have to come up with your own conventions and box/colour coding.

I recommend freemind as a starting point.

pendell
2010-10-29, 08:58 AM
Can I suggest you use a mindmap tool?


Something like Freemind (http://freemind.sourceforge.net/wiki/index.php/Main_Page), you mean? Hmmm... that might work, but I'm actually looking for something more like a state diagram or an automata.



The dialog editor in Morrowind displays things as a sort of tree. Rather than "go to dialogue 3", your choice can result in "continue".


The issue here is that I don't want the solution I'm creating to be technology-specific; I have an idea in mind, but I'm not sure the implementation is up to the task I am setting it. So I need a map -- a blueprint -- of the conversations that can stand on its own regardless of the engine I use it with.

Respectfully,

Brian P.

Prime32
2010-10-29, 10:16 AM
The dialogue editor for KotOR does much the same...

...Which reminds me of something else you might consider. KotOR (and, I suspect, other games built on the same engine, i.e. Neverwinter Nights) has one file, "dialogue.tlk" and many separate "whatever.dlg" files. The former contains all of the strings used by the latter, which references them in its dialogue paths. I presume this allowed them an easier time debugging those two different halves of the conversation: the text that the players interact with and the code that the computer uses to direct the conversation.That kind of separation is usually to aid localisation.