ID:151986
 
I built the conversation system that was mentioned as a concept in [link], but in the end I'm not really happy with it, mostly because its kind of awkward the way the whole navigation and accepting offers stuff is working out.

If you played some of the old NES/SNES RPGs, conversations might go something like this:

You initiate conversation with a NPC.

You receive a message from the NPC. If the message is more than one message long, pressing the OK button will move on to the next message. If you're at the end of the message, pressing OK ends the dialog.

In some cases, the NPC will offer you a choice, which can lead to branching dialog or things which effect the player. Usually a choice is selected using the up and down arrows, and pressing OK selects that choice.

That last part is where it gets dicey for me. I have no idea how to design or format that, and I can't find diddley squat information on that topic, here or anywhere else.

I also need to have it so that the messages received can change depending on which flags the player has set. So an NPC might ask for help, leading to one dialog string. But if the player has already helped the NPC, then a flag will be set and a different dialog set will be shown.

Not sure how to do that either.
I'd just create strings of dialogue and give them a unique identifier (probably a number), and store this in some sort of file. Then, each option would direct them to a number, which would also allow multiple topics to converge back on a single topic.
A system akin to the one within RPG Maker 2000? Basically a lot of switches that decide the outcome of talking to them.
As Pop said, you could use a unique string or number.
Another way could be by using lists that store the outcomes of certain questions, of course if you wanted to do anything advanced you'd need to make a parser for them so that items could be given as well as gold etc.
In response to Lyndonarmitage1
Lyndonarmitage1 wrote:
if you wanted to do anything advanced you'd need to make a parser for them so that items could be given as well as gold etc.

That was kind of the point of this topic. Saying I should store strings by reference in a list is somewhat of a "Duh!" issue.

Regardless, I've come up with a simple dialog system that I think will work fine for my game.