2
\$\begingroup\$

How could I add logical branching conversation dialogue in C# with XNA? What I mean by this is a dialogue tree similar to this:

If the user is wearing red:
     DisplayText "You're wearing a red shirt!"
Else:
     DisplayText "You're not wearing a red shirt!"

The key is that I can't hard-code these logic questions into C# itself; it has to be readable from some sort of external file and still executable.

My question is very similar to this question: How can I implement dialog trees into my game?

But my focus is more on how I can actually begin to implement this feature into my game.

\$\endgroup\$
  • 3
    \$\begingroup\$ this question has nothing to do with XNA (unless you need help in drawing text on the screen) \$\endgroup\$ – Luis Estrada Mar 28 '13 at 21:05
  • 1
    \$\begingroup\$ I recommend that you take a look here: valvesoftware.com/publications/2012/… \$\endgroup\$ – user15805 Mar 29 '13 at 0:33
  • \$\begingroup\$ I'm asking this question in the context of XNA because a particular scripting language (for implementing the dialog tree) might be best for this particular framework. \$\endgroup\$ – kyothine Mar 29 '13 at 3:13
  • 1
    \$\begingroup\$ I voted to close because that other question DOES provide all the needed information. The highest answer suggests XML, which is a viable data source in XNA. The only remaining different part of this question are the implementation details. \$\endgroup\$ – Seth Battin Dec 23 '13 at 0:01

Browse other questions tagged or ask your own question.