Home » Community » Forums » Game Programming » Ideas wanted for XML-Based Dialog system
  Intel sponsors gamedev.net search:   
[Control Panel] [Register] [Bookmarks] [Who's Online] [Active Topics] [Stats] [FAQ] [Search]

Add Forum to Favorites |  Send Topic To a Friend | View Forum FAQ | Track this topic


 Last Thread Next Thread 
 Ideas wanted for XML-Based Dialog system
Post New Topic  Post Reply 
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.

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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.

 User Rating: 1807   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

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.

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

All times are ET (US)

Post Reply
 Last Thread Next Thread 
Forum Rules:
You may not post new threads
You may post replies
You may not edit your posts
You may not use HTML in your posts
Jump To:
Administrative Options: