Best way to update my dialogue system to add dialogue choices, and eventually quests?

Hello! SO. I’m working on a hybrid 2D/3D project right now. I’m having trouble updating my dialogue system. I’m using datatables for the first time, and I have no idea how to continue. The idea is to make a dialogue system where I can have dialogues with characters, give the player choices, and based on those choices trigger quests to unlock. Could someone help me out here? I have no idea where to begin. This is how my system currently works:

WBP - speechbubble



WBP - hud


Struct

Datatable

CHARACTER BASE PARENT CLASS





I really need lots of help with this. I’d really appreciate it. I’m even thinking of discarding this system in favour of another one idk.

Hey @itsgoshi !

How is going? I see you are only working with blueprints, I will answer to assume you use only that.

1 - Static Dialogue System
Walk near to a npc / cube interact and read something. I see you already resolved this.

2 - Dialogue choices : Extend the Dialogue System.

I see you already have a “Next Row” Colum.
There is a lot of way to do this. I will tell you maybe not the best way to do it but the easy way to implement it.

I am not sure how are you saving you flags for the dialogue system but I recommend to use a FName : Boolean and in you struct add two new variables. Two Arrays of FNames and another FName in case the check fails

Before enter in the Dialogue you can check if those flags are set on true or in false like you setup in you Data Table
If the check enters you show the dialogue if not you jump to the FailRow.

Other Approach possible is to use a Map with the value you want.

If you want something more powerful you can reference than support numbers flags. To check if greater or less. I would recommend this approach as well.
You can do it more modular, but will require to create a new struct or new object for each condition. (If you are only working on blueprints.)

So I will go with have four tmaps
Booleans Checks : name : booleans
Equal Numbers Checks : name : float
Greater Numbers Checks : name : float
Less Numbers Checks : name : float

3 - For the Quest System
I recommend this Plugin for Unreal for quest system.

It’s powerful. I am not sure it can be use with plugin only editor. But if you read the documentation you can find some cool ideas.

If you still need help, no doubt in write again.

Hey, from my personal experience I can say, that making a dialogue system can really be a lot of work, not only because of printing the dialogue itself, but handling animations, sounds, cameras, player input and so on. Two years ago i was at your position and figured out, that data table based system can be a pain in terms of triggering quests, events or general anything gameplay related because of missing flexibility. I thought about a AI Behaviour tree approach, but I hate working with the AI behaviour tree and blackboards so i ended up making my own system directly in blueprints. So a complex dialogue tree that is completely constructed in blueprints so that I can add whatever event or gameplay logic I like to any text or choice in my dialogue tree.
I started this about two years ago, redid the whole core system twice and have submitted this system a month ago on Fab. I feel like this approach of yours is quite similar to the one I was going for two years ago and by all the work that a dialogue system can cause, I highly encourage you to take a look at some of the dialogue plugins that are already out there.
The one I can recommend (because I made it) is Dialogue For Everyone - DFE and if you like I can tell you all about its features and answer your questions if you have any.

I found another approach using Behaviors Trees

I share you a list of videos in YT:

Hey! So I’ve never used flags before tbh. :flushed:
What exactly do you mean in regards to Fname?

Three fnames all together? Two that ar arrays and one that is boolean?

“Flags” is the name that you usually call to things you want to save related to what the player answer to the player.

For example here you are going to save the decisions you take “somewhere”. Then you can later get the value of that flag to show or not show some dialogues or events.

For example if you

Oh I am sorrry about the fname thing.
Fnames is the name of Names in c++. Why use names instenad of strings? Names internally use a unique id to be easy to identify for the proccessor making it quick to compare.

What I was saying is to use Maps to compare the Flag Name you want to check and the Value that should have.

Ah okay! Im’m using blueprints thats why that didn’t make sense haha.

I’m still very confused as to how to update the system though. It seems optimal for the game, but there’so choices so i’m stumped. I’d love some more guidance on this.

If you want to implement something like a npc you ask about things.
You can use a similar system.

Just in the table add an extra tab when you can add options, associate a id (number) to each option. So if the row has an option you show it to the player after that you can jump to another spreadsheet with more dialogue.