Blueprint Dialogue System

Oh yeah, didn’t thought on that at first because i was getting a hard time at understanding some processes but now it’s clear and i’m alreayd using that. Thank you very much :slight_smile:

I seem to be having the baddest luck ever…
I have a question for you; is there any way that only altering the layout (the appearance of the dialog box, including changing panels positions and sizes aswell as adding my own new panels to it) can cause the syste to stop working? Even freezing the engine completly and having to hard close it?

That’s all i did and got that behaviour. If there’s just text it just doesn’t show any text at all but i can’t advance through it so my only option is to close the game. But if there’s any option to chose (any response in the dt) the entire engine just freezes without showing any text at all too. But this time the only way to close it is by CTRL+ALT+SUPR and closing the engine the hard way because it start eating my ram really quickly.

Any solution?

I haven’t experienced this myself but I don’t modify the base UI, I only inherit from it when creating new interfaces (the alternative dialogue UI in the sample does this).

My first instinct would be that the interface isn’t the cause, but the data might be.
Have you tried different content, or tried the same content on the default interface (you can plug your data into the sample project to see if it is the cause)?

That being said, I can’t be certain of anything from where I’m sitting. Keep me posted on your findings and I’ll shed some light if/when I can!

Thank you for your time and help,

this being said yeah it’s working completely cool with the default layout. But as soon as i switch to this one…
Could this be caused because i move and resized the panel where the text must show? Dunno just throwing out crazy facts. I tried deleting any new panel i added but still the same problem.

Also i changed some of the “adjust size to content” checkboxes

The size and location of the panels aren’t important, so long as they exist. I don’t think the adjust size to content should matter very much, though the text populates the wrapbox at runtime - there might be some dependency there?
There is also a large ‘click zone’ box that fills the screen and is required to move forward in the dialogue. If that’s not there, you’ll need to advance the dialogue through some other means (custom).

Ok so look like i’m finding the cause.
Can’t be fully sure but it’s a start.
I increased very much the size of the portrait then i got forced to resize the Scroll Box for the text and add a negative value in the Left Padding to match it with my designed area for the text…
And looks like this is it!
Probably UMG don’t like that negative value because as soon as i reverted it back to 0 it started working suddenly. I suposse i’ll have to get the portrait panel out of that horizontal box in order to match my design.

Oh interesting, I’m very glad to hear you figured it out! Thanks for reporting back :slight_smile:

It was definitely that. Probably i would never noticeed if i have portraits already configured but because i haven’t, the scroll box panel was moved to its spot -150 or so, meaning it was out of the screen.
Looks like it can’t draw text if its out of the screen and that’s why it was getting stuck in there.
Now finally, everything is working fine! :slight_smile:

Thank you for your help, this system is really great ^^

Ah I see, yes that makes sense now!

If you feel up to it, it would be helpful to get your rating and possibly a review of the system on the store page

I’m glad it’s all working now, I’ll keep this UMG behavior in mind in case it happens to anyone else! :smiley:

Thank you!
And yeah i’ll be doing it as soon as i can ^^

Hey, I just want to let you know, the awesome support you’ve been providing in this thread is one of the big reasons that I’m making your dialogue system my first marketplace purchase (despite the - for me, as a hobbyist - pretty hefty cost). Keep rocking. :slight_smile:

Hi JHolden, thanks for letting me know! It’s nice to hear :slight_smile:

So I’m really enjoying working with this so far, it hasn’t been too painful to mod and it’s way cleaner than what I could’ve come up with. :slight_smile:

I do have one quick question, if you don’t mind; I’m trying to implement keyboard control for dialogue screens, specifically E to advance text, and arrow keys to select responses when the dialogue branches. For the former I’ve gotten partway there by using UMG’s OnKeyEnabled function:

However, I was wondering if you’d be able to give me some suggestions on how to directly tie action mappings from the project’s Input settings to the appropriate events in your system? Since UI_Dialogue is a UMG widget it doesn’t appear to be possible to directly run Input Action events on its graph, and I’m rather lost on how else I could be going about this. :slight_smile:

I’ve been doing this in the player controller. In the sample file BP_DialogueSample_PlayerController I use the DialogueClosed/Opened interface functions to track when a dialogue is being viewed, and in your case you’ll want to capture the action input event and call the current dialogue’s **OnClickZoneClicked **function…that function name could have been better :stuck_out_tongue:

Hmm okay- not to be dense, but assuming I’m doing this from the character blueprint, how would I actually go about getting a reference to the current dialogue?

No worries!

The file I mentioned (BP_DIalogueSample_PlayerController) implements the DialogueAware interface which has the DialogueOpened/Closed events. Those events pass along a reference to the dialogue UI, so you can keep it in a variable on your player controller. In the sample, I only use those events to set a flag of viewing an interface or not, but in your case, you’ll want to store a reference to the interface so that you can interact with it.

Ooh I see what you’re getting at, sorry for being dense. :slight_smile:

My project’s in C++, so I’m trying to minimize the number of objects that need blueprint, and I had a slight idea about how to do it without an external event: I use the same key to start a conversation, and to advance the dialogue to the next line, so I tried modifying the event which my system uses to start dialogues. This is in my override of BPC_Dialogue, so it should already have a reference to the active UI. My addition is highlighted in yellow:

This starts conversations fine, but it won’t advance them; is my reasoning correct that if OwnerHasActiveDialogues is true, Active UI should contain a reference to the current UI? The only reason I could think this wouldn’t work is if for some reason OwnerHasActiveDialogues doesn’t return true when I think it does.

I can see this maybe working, but I can imagine problems when a conversation works its way through several ui’s or Dialogue components, or if the event interaction calls someone else.

Have you put some breakpoints down to see how far it gets in the blueprint code? The events might not be triggered at all: By default in Keyboard & Mouse mode, the dialogue component puts the game in UI Only input mode. You’d need to place it in Input mode ‘Unmanaged’, but then you’ll need handle managing the mouse and keyboard events yourself.

This is unrelated, but the entire system spontaneously broke overnight; it worked last time I loaded unreal, and now for some reason it won’t load dialogue windows at all. Do you know if the error “Player controller invalid while in BPC_Dialogue_Base: DisplayUI” is used anywhere besides DisplayUI? I’ve verified that DisplayUI is wired correctly, and deleted the link to that error message, and it still plays every time I try to open a dialogue, so I assume it’s used somewhere else in the code.

That’s the only place the message exists