Creating a dialogue system with branching choices, conditions and consequences

Hey there!

I am currently developping a small visual novel with a strong emphasis on choices and branching story, and am looking for a way to create a reliable system to manage all the dialogues, including choices and their outcomes, conditions blocking certain choices and different consequences for choosing A or B.

So far, I have created a datatable and a blueprint structure which hold the text, character sprites, etc., as well as a few functions (in my main HUD widget blueprint) to manage player inputs and when to display the “choices” UI or the normal one - see pictures.

Problem is, this system doesn’t work to efficiently and simply manage choices, blocking options if certain conditions are not met, or to create branches in the story. I’d also have to put all my dialogues in a single DT, which would be impossible to manage in the long run.

How do I turn this system (or create an entirely new one if I have to) to achieve what I am looking for?

Thank you very much for your help!

Hey,

So theres a few approaches I would take here. If you have C++ experience I would look at creating a custom Graph you can use. This can be complex and potentially overkill however.

Alternatively, I would move away from data tables and look at Data Assets instead, defining a Line of Dialogue and what comes after. If this is another line of Dialogue this is easy otherwise a choice can lead to another Data Asset. You could then have some logic within the Data Assets for defining rules to gate certain choices.

HI there,

I setup a VN system in a very similar way to you for my University Final year project. I ran into the same issue as you where scaling up the story all inside a DT was not going to be very efficient. With the knowledge I have now I would definitely move towards using data assets and some sort of custom graph for linking the individual frames together.

I’m not sure if you have knowledge of custom graphs but I first found them through a plugin called Narrative https://www.fab.com/listings/e3f81dd7-e00b-4c32-ba52-a366145b2ae6. This however is pretty expensive to justify. If you want to create your own custom graphs I recommend taking a look at this repository GitHub - jinyuliao/GenericGraph: Generic graph data structure plugin for ue4. It helped me with getting to grips with the idea of custom editor graphs and nodes. ( It will require C++ knowledge however )

Hey,
Thank you for your answer ! I didn’t know about data assets, I’ll look into it as I do not have enough C++ knowledge. Thank you!

1 Like

Hey,
Thank you for your answer ! Indeed, I cannot justify paying almost $300 dollars for Narrative, although it looked very interesting. I’ll make research about data assets and custom graphs, see what I can do with that.