Dialogue Plugin

I made an unofficial Discord because responding to a forum is way too slow. If you want to join, it’s here Dialogue Plugin by CodeSpartan The developer has not endorsed this.

Very minor update today, which simply adds a dispatcher event “OnDialogueClose”, which you can use as follows:

3 Likes

Thank you, that was the problem.

Helloooo
Do we know how we could have Response with a Delay ?

From the doc :
“7.14 Response with a Delay
Situation 1: You want the player to hit a response, but then you want a delay to occur, before the NPC continues the conversation. For example, because you want an animation to be played.
Situation 2: You want an NPC to say something, but before displaying player answers, you want a delay to occur.
Watch this video to implement it: … (coming soon)”

same issue

using UE 4.26, unfortunately, could not switch to 4.27 due to some game package issues

Hi! The tool is being very inspiring, thank you!
However, I do have problems in downloading the demo project from the link provided, it said 404 page not found. Where else can I download it or is there any tutorial for beginner to learn how to trigger dialogue through blueprint?
Thank you very much!!

Hey. I don’t know why you got 404, maybe Epic’s servers went down for a sec, since they’re supposed to be doing the redirect. The link to the demo project is: https://github.//DialogueDemo
That said, if your game is not a top-down game, then it should work differently. In case of a first person, you probably want to do Line Trace for Objects from your camera in the direction where you’re looking, and those objects should have their collision set-up correctly. It’s a whole thing, an interaction system basically. I sometimes think I should record a video for each template, though it would be basically an hour long unreal engine lesson on collision and linetraces, which is a bit outside of the goal of this plugin.

Hello! If I would start to praise your plugin it will take an entire page, so I will get to the point.
If I have a DataAsset as an element of each node, can I make the node display this DataAsset’s thumbnail in the tree view? Or change color, or grab image from DataAsset’s variables.
Basically it’s a minor quality of life change, to know who is speaking that line, so I can make less mistakes.

How familiar are you with Slate? If you are, then putting an image there is doable, I can point to where in the code the node is drawn.
Changing the color of a node - that’d be more difficult, since the node is just an image (with the color baked in). I should’ve gone with a white image and used a tint, then assigning an arbitrary color to a node would’ve been easy.

Familiarity is - I had to google what it is Unreal UI code. However - if you point at the place in the code for drawing a node, I can search for youtube tutorial for putting my little picture there.
Thanks!

Check out the SDialogueNodeWidget::Construct function in DialogueNodeWidget.cpp
It has some comments as to what’s being done. Towards the end of the function you’ll find a comment that says “text block - displayed only when out of Editing mode”. The text block has to be wrapped into a horizontal box, where the first element is this text block, and the second element will be your image, just like you’d do in UMG. You start modifying the code after line 111. Good luck! Let me know how it went.

Basically I’m almost there, to satisfy my needs:


I’ve just copied your speech icon. I’m planning to paint it according to font that is assigned to a speaker. But I’m a dummy so I will keep brute forcing until it works.
The problem is It seems that I grab a color from character DataAsset just fine:

FLinearColor SDialogueNodeWidget::GetNodeCharaterIcon() const
{
	if (Dialogue->Data[NodeIndex].Speaker == nullptr)
	{
		return FLinearColor::White;
	}
     FLinearColor TextColor;
	 TextColor = Dialogue->Data[NodeIndex].Speaker->CharacterFonts[0].ReplaceDefault;
	 return TextColor;
}

But as soon as I try to assign the color to the icon:

			+SOverlay::Slot()
				.VAlign(VAlign_Center)
				.HAlign(HAlign_Right)
				.Padding(0, 0, -30, 0) // left top right bottom
				[
					SNew(SImage)
					.Image(FDialogueEditorStyle::Get()->GetBrush("VoiceIcon"))
				    .ColorAndOpacity(SDialogueNodeWidget::GetNodeCharaterIcon)
				]

It just doesn’t bake. I’ve made a few attempts with TAttribute, or this, but .ColorAndOpacity hates this,

Good progress. I wish I could assist, but I haven’t touched Slate in about 6 years now, ever since I made the plugin, so I’m of no use here.

Maybe try tint instead of color? I don’t know if Slate has this attribute.

I’ve tried to find tint first because I always use tint in widgets. Alas - did not found any tint. :man_shrugging:

Just gave it a try and this worked:

In .h

FSlateColor GetExtraIconColor() const;

In .cpp

FSlateColor SDialogueNodeWidget::GetExtraIconColor() const
{
	return Dialogue->Data[NodeIndex].ExtraIconColor; // retrieve yours correctly here
}
// SImage attribute:
.ColorAndOpacity(this, &SDialogueNodeWidget::GetExtraIconColor)

Notice that it’s FSlateColor, not FLinearColor.

OMG that did it! So it was the converting FLinearColor to FSlateColor problem! Thanks to you, my word salad is now a salad with distinct components, instead of gray mush.
Best dialogue plugin on Unreal engine market!

Hello!

I would like to know, if possible, when will the plugin be updated for 5.1 compatibility.

It’s not up to me, I sent the update on day 1.

2 Likes

There’s some refactoring required in 5.1.

The lines you posted are about uninitialized fields in a struct, like a bool. An unitialized bool defaults to false, there’s nothing to fix here. I don’t know why you’re getting this. You should wait for the release.