The best solution to what you want to do is JSON/Array
Here you would write out the JSON file manually or use some kind of tool. Here you write in a format(please forgive me for my JSON parsing is in error, just use as theory)
Mayor{
image: mayorspresheet,
speeches{
hello{
emotion: "smile",
dialog: "Good day, your new around here; Our litte town...bleah"
}
abouttown{
emotion: "excited"
dialog: "oh my yes, our town has been prosperous for years..."
}
}
}
somevillain{
image: "crucifix"
speach{
firstmeeting{
emotion: "curiousgrin"
dialog: "And who are you to intrude upon my work?"
}
mwahaha{
emotion: "evillaugh"
dialog: "mwa ha ha ha "
}
}
}
Now of course this is not accurate to how you will use it.
emotion refers to animation set in the sprite sheet.
names refer to the manual sprite name
dialog names you have to figure a way to trigger them.
When you import the JSON into the array. you will end up with 3 dimensional layer that you will need to create an in game event engine to handle
DimensionX, this is the NPC's name.
Function.Call("Dialog.Talk", NPC.name, NPC.dialog)
----
Function Talk
setimagesideright(NPCArray[Function.Param(0), Function.Param(1), 0)
setdialog(NPCArray[Function.Param(0), Function.Param(1), 1)
-----
Of course this is all simple design. You can also create JSON scripts to handle long conversations going back and forth. This would also be written to a different JSON and array.
ConvoFile.json
wakeupchrono{
1{"mom", "wakeup1", "right"}
2{"chrono, "grumble", "left"}
3{"mom", "lazyson", "right"}
4{"chrono, "grumble", "left"}
...............
}
chronolucafirst{
similar as above :P
}
anyways. this is probably the best way to handle it in my opinion. It's probably the most long term solution for LARGE games with more complex dialog and even include tree options into the speech.
firstmeeting{
emotion: "curiousgrin"
dialog: "And who are you to intrude upon my work?"
options{
1{ reply: "i'm askign the question", "shepard", "pissedoff", "Shut up before I shoot."}
2{ reply: "I'm shepard, and you are"....
3{ reply: "[Shoot]", ....}
}
}
anyways. i've written enough and probably made it a large incoherent mess :P good luck.