# Ideas wanted for XML-Based Dialog system

This topic is 3203 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I saw a couple of topics about XML representation of a dialog. I have some tingling feeling that they are not very good. Unfortunetely I could not come up with anything better. I am open to ideas how to represent a dialog with XML. I thought of doing sth like:
 <Phrase Character="nameOfCharacter" Identifier="[string or int]">
<Prerequisite>
<CharacterConditionCheck>
<Identifier>[string or int]</Identifier>
<Value>[string or int]</Value>
</CharacterConditionCheck>
<DialogHistory>
<PhraseSaid Depth = "Full|[number]">
<Identifier>[string or int]</Identifier>
</PhraseSaid>
</DialogHistory>

<Random>43</Random>

</Prerequisite>

<Content>
<Hero> Hello, how are you? </Hero>
<Char> Fine, thank you. And you? </Char>
<Hero> Doing fine. </Hero>
</Content>

<CharacterConditionChange>
<Identifier>[string or int]</Identifier>
<Value>[string or int]</Value>
</CharacterConditionChange>

</Phrase> 
Using the <Prerequisite> element checks are made if this phrase is available. So when you start a dialog. All phrase are enumed and their prerequisites are checked and its decided which to be used. I am thinking of adding CurrentTopic to the mix. So there are no random dialog options. I am open to all kind of suggestions. We want to create, kinda non-linear conversation. So there are going to be different kind of character conditions like mood, emotion, and different state of topics that was talked about.

##### Share on other sites
Dialogs are very much like directed graphs, so any data representation which can handle such a structure should work just fine. XML would be the preferred solution if you're making it text-based, but at the end of the day you probably don't want to expose such XML directly (since it can get rather hairy) and instead make a tool that allows user to create these nodes visually and link them together with arrows. Think along the lines of Kismet in the Unreal engine. At that point you can explose as much functionality as you wish, such as conversational paths that are only available when certain game conditions are met, etc. There really is no set way to make a dialog system, it depends entirely on how dynamic and interactive you want to make conversations with NPCs.

##### Share on other sites
Update:

I have decided that this will not work. Rather I will create a editor (or try to use some other software by extending) and deserelize the objects to XML. I will use graph structure as suggested. I will start first by actually creating working engine with hard codded objects. Then I will start working on some tool. Probably WPF based.

• 33
• 12
• 10
• 9
• 9
• ### Forum Statistics

• Total Topics
631352
• Total Posts
2999487
×