I guess that this will all boil down to a matter of opinion, but I'm all ears for assistance.
I'm making a game with multiple endings. For debugging purposes, all these endings will do right now will display some text. What the game will do is it will take the necessary variables, and generate a code signifying whether a certain objective was completed, or how close to completion it was, yada yada. So, for example, this:
1 2 3
|
bool bNicholeAlive;
...
bNicholeAlive = true;
|
Would output a code like this:
NAT
What I was planning on doing with this code would be to use an XML file, and iterate through it, comparing the necessary parameters from the code generated earlier on. For example:
1 2 3 4 5 6 7 8 9
|
<Ending>
<param 1 = "NAF">
Nichole died before she could escape.
</param>
<param 1 = "NAT">
Nichole managed to escape with her life.
</param>
</Ending>
|
Then, using the pugixml library and a simple iterator, the code NAT would output:
Nichole managed to escape with her life.
The thing is, I'm not entirely sure how to go about something like that in XML, or if XML is even the best method for something like this.
If XML is inferior to another method, then please, say so.
If XML would, in fact, work for this application, then suggestions on proper organization/naming of the tags would be appreciated.
TL;DR: Would XML be a good language to help manage text output for conditional events, such as multiple endings in a game?
Thank you for your time,
Aunvre