- Home /
Too subjective and argumentative
Dialogue strategy?
Hi All,
So I'm trying to plan out how I'd like to do dialogue in a game I'm working on. If people don't mind sharing, how have other people handled dialogue?
My initial thoughts were to use XML (I deal with web a lot, so when all you've got is a hammer...), figuring that I'd have a character's actual dialogue stored along with an ID number or something, which I use to pull the appropriate text. Thus, instead of a character saying "Hi, nice to meet you", it just pulls dialogue ID#3 (or whatever), keeping text separate from the code. Easy revisions / alterations, right? Too bad XML doesn't seem to be supported, or if it, I'm not skilled enough to jam it into Unity.
I've read up on another solution (sqlite). Without having actually done it, I like the database idea, and it could also work with some other aspects of this game (a db of items, for example) but that seems like it might be a bit much at this stage.
Right now, the easiest answer seems to be to have a bunch of text in a script somewhere. So I write a function GetDialogue(x), where x identifies which dialogue block to pull.
BUT dialogue seems to be a fairly popular topic, so I wanted to see if people had better ideas?
It's a pretty wide ranging question. But you can totally use X$$anonymous$$L in Unity. Checkout System.Xml. There are a lot of methods for dealing with and traversing an X$$anonymous$$L tree.
This question isn't related to Unity, and therefore is not suitable for Unity Answers.
Unity Answers is a place for questions that can be answered! Avoid asking questions here that are subjective, argumentative, or require extended discussion.
Unity Forums is a place for discussions, opinions, showing off your work, getting feedback, and general community chatter.
Please post discussion questions on the forum; UnityAnswers is for specific development questions that have objective answers.