I’m working on an RPG, and one of the major components is dialogue between the player and npc that can lead to different dialogue paths and quests.
The first ever dialogue system I made (awhile ago) was pretty simple. There was a table with messages in like
local Msgs = {"Hi, this is msg1", "Hi, this is msg2"}
and it would loop through and display it to the player.
But now, I need it more depth and I’m pretty clueless how I’d go back it. Here’s an example of what I mean.
Player initiates conversation
NPC asks the player “Do you care about the environment?”
If player responds with Yes then they get asked if they want to accept a quest and are prompted with a yes/no
If player responds with no then the npc talks about why the environment is important then ends the conversation
I currently have no idea how I’d go about this and making it, so any ideas would be greatly appreciated.