I would like to know what the best way to implement the story functionality of an RPG would be. I am writing the game in C++ using the SFML library for graphics, and I have implemented drawing tiles, level loading and player movement, but I am not sure on how exactly to go about implementing the story. How would I implement when to do cutscenes, what to do in cutscenes, changes in dialogue, and have dialogue options affect the game? I am planning to have the dialogue in JSON files in a format similar to this
"dialogue" :[
{"type" : "dialogue", "character" : "player", "text" : "dialogue here", "result" : "next"},
{"type" : "dialogue", "character" : "character", "text" : "more dialogue", "result" : "next"},
{"type" : "option", "options" : [{"text" : "option 1", "result" : "goto 4"}, {"text" : "option2", "result" : "goto 5"}]},
{"type" : "dialogue", "character" : "character", "text" : "from option 1", "result" : "next"},
{"type" : "dialogue", "character" : "character", "text" : "from option 2", "result" : "next"}
]
Is this a good way to go about this? Should I also consider embedding a scripting language like Lua for cutscenes and other high-level tasks?