[OPEN SOURCE] Not Yet: Dialogue System

Hi!
Where and how is the “long term memory” option of conditions stored?
The memory only seems to be cleared/reset by an editor restart, which means that it is either stored in the RAM, or in a temporary file somewhere. The memory persists when I switch maps, and even when I start/end play in editor.
This information would be useful for debugging/testing, and for integrating into my save system.

Sorry, but we do not support Mac OS for the Plugin as we can’t test it there, you can try to get the plugin yourself from GitLaband you try to compile it and fix potential problems, maybe even make a Pull Request with the fixes :wink:

That is because the dialogue memory is a static instance, you must clear it manually in your play/begin play for it to work properly in the Editor.
For C++ call UDlgManager::ClearDialogueHistory OR for BP call the function** ClearDialogueHistory**.
See example project

As for integrating into your save system, you can have a look at **SetDialogueHistory **(to set the dialogue history from your loaded file) or **GetDialogueHistory **(to save your history). If you are using C++ you can check the **FDlgMemory **for all the memory related stuff.
You can also resume a Dialogue from a point in time with ResumeDialogue.

Hey Elathan,

Just wondering if you could expand on how exactly we can add a timer to the dialogue nodes?

Thanks in advance.

Just setup a timer the way you want in your project after the dialogue started / ChooseChild() was called.
If you want to setup the time for each nodes differently you would need to modify the plugin and add a float to the dialogue nodes though.

Thanks Elathan.

I’m assuming that we need to use code to modify the plugin and not blueprints?

I’m trying to pass a variable identifier in order to set an anim montage to play and the delay before the next dialogue begins. Could you shed some light on what the best way to achieve this would be?

Appreciate your patience and supporting this free plugin!

Yes, you would need to modify the source code for that. Just add your variable(s) to UDlgNode_Speech with virtual getter function(s) defined in the parent class (UDlgNode).
You will also need to modify FDialogueGraphNode_Details if you want your variables to appear in the editor.

Easiest way to figure this out is to check on USoundWave* VoiceSoundWave; inside the speech node, and see what happens with that, and try to copy.
Let us know if you have any concrete questions.

Hi Elathan,

Thanks for the reply, great stuff.

In the meantime i’ve figured out a way to do it via blueprints and functions, Specifically using a switch with the ModifyFloatValue function.

Animations are synced up with a delay to progress the dialogue further.

The only thing I’m still wondering about is in regards to hiding the buttons in the UMG, I still have the “Next” button appear. I can’t seem to leave the field blank in the Dlg Editor and have it not appear.

Please advise.

@thetinger

What i did to proceed to the next dialogue without pressing next is a simple trick i guess.

To clarify, lets say for example we want the NPC to talking after the player has made a choice and of course has stopped talking, without pressing next.
So at the “Edge” between the player’s dialogue and the NPC’s i wrote into the text (e.g. pass).
Then at the dialogue widget where the Update choices happens, i check with the Get Option Text if “pass” is true. After that it is pretty much straight forward. I make the NPC talk and etc.

I don’t know if this can be achieved natively somewhere inside the settings the plugin gives you but it would be nice to have an option at the edge to do the above. If only i had time i would tinker with the source code. Also i am not 100% sure this being implemented in source, if it had a negative impact to its other features, i don’t thinks so but you never know without checking the code first.

Depending on your logic maybe having only one option can be a clear indicator that it is between npc lines.

If that is not the case you could grab the node which is pointed by the edge, and see the owner - it is only possible in C++ so far, and that might limit the way the special nodes work (e.g. you will have to use the same node owner for selector nodes as their children).

But e.g. if you don’t use SpeakerState for edges, which is just an FName, you could use that to mark edges as player edge / npc edge.
If that’s still not good you could just add an own variable to the edges, that’s a bit similar but slightly easier than adding variable to nodes.

Hi, could anyone give me some pointers on implementing this in a first person game with blueprints? The tutorial uses the top down preset and relies on TopDownController, which I didn’t have an equivalent of. I tried making one and continuing with the tutorial, but the end result doesn’t work right (the dialog widget is stuck on the screen with default text and no way to interact with it). I’m assuming it’s because none of the default functionality of TopDownController exists, but I’m not sure how to get this working without it.

this one is not in for 4.17 or not working for some reason. also would be pretty nice to have a list of precoded event names, int names etc to use instead of “search”. will add it once i figure out where to do it

Check the controller class in project settings, and use that instead of the TopDownController. If it is simply the PlayerController (I don’t think so, but I did not check) you can create your own, and set that as the default controller in project settings.

Sorry about that, but we don’t have the time to support older engine versions with new features right now.
I am not sure what is the point of the precoded event names - do you want it so you can use the same names on different actors? If that is the case the easiest way would be to simply use the search but modify the code so that it is not limited to the participant.

basically to add all the possible requirements once (level, karma, factions relations etc) and forget about it. events (quest, advance quest, finish quest etc)

Easiest way right now is to create a dummy dialogue where you add all the events to nodes.
If you know C++ it makes more sense to modify the suggestion list to include your names.

It was PlayerController, but I did what you said, and it’s working great now. Thanks!

Cant figure out how to add the additional “color to blue, color to green, etc” executable. Whenever I hit the refresh node button to try and add them, nothing happens. I’ve already redone this step several times and even completely redid the tutorial from scratch, need help… Link to tutorial I’m using here: Wiki · Not Yet / DialoguePluginSystem · GitLab

Refresh node refreshes it automatically based on the events you added to the dialogues. First you have to add your event to a dialogue, then press refresh button, and it should be added here.

Sorry for late response, the forum notifications stopped working for me for some reason.

Hey,

First of all, thank you so much for creating and sharing this wonder.

Do you know or plan to include any way to internationalize and localize the dialogues?

We use FText, so localization should work out of the box. (We did not test anything related that though).

Hey, Elathan,

Thanks for that, I will try asap.

May I ask you something else? Where do you reckon it is the best practice to get and play the Sound Waves associated to the nodes?

Thanks