Announcement

Collapse
No announcement yet.

Dialogue Plugin

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • started a topic [RELEASED] Dialogue Plugin

    Dialogue Plugin

    Marketplace Link

    Hi everyone!

    I'm very happy to announce Dialogue Plugin, an editor extension that allows you to easily create dialogues in UE4, through a custom node-based editor.

    I've wanted to create a dialogue editor for more than a year now, and I've always felt that the ideal editor should be 1) node-based and 2) fully integrated, without the need of 3d party software such as Excel. Now I finally did it.

    Feel free to check out the video and let me know what you think about the workflow:

    (old video for 4.17 and lower)

    Current Documentation
    Older documentation:
    - for 4.20 - 4.21

    - for 4.18 - 4.19
    - for 4.12 - 4.17

    Features:

    • Voiceover support
    • Events and conditions (branching) -- new system since 4.18
    • VarStrings (e.g. %charname%) -- since 4.22
    • Customizable appearance
    • Gamepad support
    • Doesn't require third party software such as Excel
    • Source code included

    Conditions and events tutorial:

    (old video for 4.17 and lower)

    Click image for larger version  Name:	2.png Views:	1 Size:	67.5 KB ID:	1179436

    Click image for larger version  Name:	1-2.png Views:	1 Size:	379.8 KB ID:	1179437

    Click image for larger version  Name:	3.png Views:	1 Size:	208.8 KB ID:	1179438


    Frequently asked:

    1) Sample project from the second video: Download

    2) Sample project with VR set up: Download
    This is what you'll find in it:
    Last edited by CodeSpartan; 04-04-2019, 09:00 PM.

  • replied
    Originally posted by AIELGENERAL View Post
    holding down the button which selects on the game pad would fire not just only the current reply but automatically fire any responses or even the continue button the moment they were on screen.
    I don't have it, and I don't see how it could happen, because the code is "OnKeyDown", meaning it only triggers once when you press the button down. It can't keep triggering, unless you have a faulty gamepad, or you did something weird to your code.

    Maybe there's a bug in the stock widget? I did modify it for 4.23, so there's always a possibility. I can look at your project if you send it to me by mail. My email is on the marketplace (my seller's page).
    Last edited by CodeSpartan; 09-13-2019, 01:53 PM.

    Leave a comment:


  • replied
    Hello, first let me say thanks for making this plugin, I look forward to using it throughout many of my projects. I have a few questions bare in mind and I hope I can word them correctly.

    So when the widget is first created it appears on screen with reply options and shows the mouse cursor. If i click on the screen the mouse is consumed and does not appear leaving me unable to use it. My solution to this has been to show the mouse cursor myself upon creating the widget, so I guess that is a solution I have found. The big issue I am having is that the reply buttons and the continue button do not have focus upon the widget being created meaning that the d-pad on a game pad do nothing. To fix this I set focus on the widget and this led to an issue in which holding down the button which selects on the game pad would fire not just only the current reply but automatically fire any responses or even the continue button the moment they were on screen.

    So it seems that setting focus on the widget so i can use a game pad will focus the buttons so i can select them but it is also keeping focus and if I hold the select button down it will fire any buttons that appear. I hope i have described my issue well enough that you can assist me in finding a way to fix this.

    Leave a comment:


  • replied
    Submitted the 4.23 version. As always, it should go live in a couple of days.

    - Fixed a bug where VarStrings wouldn't get replaced in player spoken lines.
    - Fixed a bug where the widget would consume all input: OnKeyDown would return "handled" for all keys, instead of just the ones that we want to use.
    - For C++ users: changed RecieveEventTriggered from BlueprintImplementableEvent to BlueprintNativeEvent.

    Leave a comment:


  • replied
    Originally posted by PrincePac92 View Post
    Much thanks CodeSpartan.

    But i has some other questions.
    If i trigger an event via your system, i always can click "continue".

    So i have an camera transition to a gate, that opens and than the camera fade back.
    Is there a way to "wait" until the event is done? So that the player cant click continue if the sequence is playing.
    One example of doing it: in the event itself, hide the entire "DialogueWidget", launch the sequence, delay 5 secs, show the widget back.

    Leave a comment:


  • replied
    CodeSpartan Hi, didn't know how else to contact you. I have some paid custom work needed for your character customization plugin. Please contact me khangle81@gmail.com if you're interested. thanks!

    Leave a comment:


  • replied
    Much thanks CodeSpartan.

    But i has some other questions.
    If i trigger an event via your system, i always can click "continue".

    So i have an camera transition to a gate, that opens and than the camera fade back.
    Is there a way to "wait" until the event is done? So that the player cant click continue if the sequence is playing.

    Leave a comment:


  • replied

    Originally posted by ExHe11 View Post
    Hello! Can I use this plugin to implement a dialogue between two or more characters?

    It's not there out of the box, but you can implement it using "dialogue events".
    A switch between characters could mean doing the following in a custom dialogue event:
    - switch the camera position
    - updating the name of the speaker in the UMG widget
    - updating the portrait

    In short, it's not complicated, but you have to know blueprints.

    Originally posted by ExHe11 View Post
    Does animation connect on its own or can it be done using your plugin?
    Same as above. You can call any animation logic you want using dialogue events.



    Originally posted by PrincePac92 View Post
    CodeSpartan
    2. I want to ask also how i can set the player answer in the text box as the chat partner as well. So that i can see my selected choice.

    3. [Idea] And how about an option, that you can change the start, if you already talked to the npc. So that he gives you first a quest and at the second time he give a tipp or something like that. (i know i create it with a bool right now, But would be a nice comford way, because in many games you can talk multible times with a npc).
    2. Modifying the UMG widget would be required.
    3. Using "Dialogue Event", put the NPC into some array that signifies that you visited him. In the dialogue tree, make a "dialogue condition" to check if you visited the NPC and branch the dialogue using that.

    Leave a comment:


  • replied
    CodeSpartan

    ​​​​​​​
    Originally posted by ExHe11 View Post
    Hello! Can I use this plugin to implement a dialogue between two or more characters? Does animation connect on its own or can it be done using your plugin? Thank you in advance.
    1. I wanna ask the same first question


    2. I want to ask also how i can set the player answer in the text box as the chat partner as well. So that i can see my selected choice.


    3. [Idea] And how about an option, that you can change the start, if you already talked to the npc. So that he gives you first a quest and at the second time he give a tipp or something like that. (i know i create it with a bool right now, But would be a nice comford way, because in many games you can talk multible times with a npc).

    Greez

    Leave a comment:


  • replied
    Hello! Can I use this plugin to implement a dialogue between two or more characters? Does animation connect on its own or can it be done using your plugin? Thank you in advance.

    Leave a comment:


  • replied
    Mmm well no, you didn't understand my question correctly (probably because of my bad English), but you pointed me on the right direction.
    I made some modification on those cpp lines and I got it.

    Click image for larger version

Name:	icon.png
Views:	1
Size:	585.9 KB
ID:	1643775

    Now, every time you update the plugin, I just need to open VS and edit it again, but is quite simple.

    Thank you gentleman.
    Last edited by Rykroft; 07-18-2019, 01:15 PM.

    Leave a comment:


  • replied
    Originally posted by Rykroft View Post
    [...]
    Sorry, I didn't understand the exact specifics.

    Let's say you have a quest item called "bloodied axe", which you need to turn in a quest.

    When you talk to the quest giver, if you don't have the axe:
    - is the player's line "here is your axe" simply not visible, or
    - is it visible, but the axe's icon is greyed out?

    If the line is visible despite you not having the axes and you click it, what is supposed to happen then? Do you want it to be unclickable, or does the NPC simply say "you don't have the axe yet"?


    -----

    For the sake of giving you at least some info, I'm going to assume that you just want to be able to add an icon of an item to a reply. If the player has the said item, then the icon is colored, otherwise it's grey.

    Move the plugin into your project, so you can modify the C++ code. It's in the documentation's paragraph 6.2

    For the sake of this example, let's assume that your items as Data Assets. Open Dialogue.h, go into struct FDialogueNode and add the following line at the end of the struct:
    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Dialogue Node")
    class UDataAsset* ItemToHave = nullptr;

    Open DialoguePluginEditorSettingsDetails.cpp
    After line 75, add this line:
    const TSharedPtr<IPropertyHandle> CustomItemField = Child->GetChildHandle("ItemToHave");
    After line 115, add this line:
    CurrentNodeCategory.AddProperty(CustomItemField);

    Now all your nodes will have an additional field for an item: https://i.gyazo.com/175919886fdd9034...4021c1b5df.png

    Go into your DialogueWidget, "DisplayPlayerReplies" method. Add some blueprint method to run here: https://i.gyazo.com/fa8a0a33e185b8e1...8583a45a57.png
    Your blueprint method must check if player has this item. If yes, then add a colored icon to the reply widget and make it visible. If not, add a grey one. Or if the "ItemToHave" is not valid, don't add anything.
    Last edited by CodeSpartan; 07-15-2019, 08:22 AM.

    Leave a comment:


  • replied
    Originally posted by DarthSoul-92 View Post
    Hi! I'm creating a VR pawn project with the dialogue plugin in 4.21 and I've copied the same blueprints from the example in 4.22. The problem is that when it displays the widget the replies don't appear so it can´t continue the dialogue. I think it is because it doesn´t allow me to set the parent actor when it creates the widget but I don´t know how to get it. Could you help me?
    Not sure I understand your problem correctly, but if you're using the 4.21 engine version, the repository with the demo has the 4.21 version in the commits history. Just get this one. Let me know if you need help downloading it, because it requires you to know how to use git (e.g. sourcetree) and how to checkout a different version.
    Originally posted by falola View Post
    CodeSpartan What would be the best way to have events fire during a node and after a node (for example play an animation when a node displays the text but afterwards trigger another animation but have no additional nodes?
    Not sure of what you're trying to do in terms of gameplay. Animations are a particular case in dialogues, they usually require building a separate system altogether depending on what you want to do in your game. But I wouldn't recommend controlling all animations from dialogue nodes, especially trying to fire multiple animations in a certain order from a node. That can work once, but always doing it like this would be too tedious.

    In rare cases when you want 2-3 things happen in a certain order, I'd most likely just expose an additional float variable in an event, and use this float for a "Delay" before executing the code. And then I'd fine-tune the timing. I can't think of cases where things like this would happen often, so fine tuning the values is not a problem.
    Originally posted by Macw0lf View Post
    Is there another way? It would make sense for the RunEventsForNode(FDialogueNode Node) function to be available on the dialogue itself, or somewhere generically accessible.. without needing a widget.
    All they do is call Event->RecieveEventTriggered(...) on UDialogueEvents.
    If you've already changed so many things in your setup, you have to keep going and make your HUD also run events. Shouldn't be difficult.

    Leave a comment:


  • replied
    Originally posted by TonyCooper View Post
    Hi there!
    Firstly, great plugin - just what I needed to quickly get things off the starting line for my dialogue.
    One specific question though: where in the blueprints is the mouse cursor made visible? I can't seem to find it, yet when you interact with the NPC the mouse cursor appears.
    I need to find this as I want to make other things happen specifically at the same time as the cursor appears.
    Thanks in advance,
    Tony.
    The mouse can appear/disappear due to the following two nodes: https://i.gyazo.com/ed4029357be01ba2...0ac91926db.png
    Search for them in all blueprints/umg and adjust your code accordingly.

    Originally posted by KhxiSaki View Post
    hi so how can i install this plugin if i use the source code of ue4 on github?all i can find is the launcher one ?is there a github for this?
    Check out the documentation on how to move the plugin into your project, paragraph 6.4.

    Originally posted by Audio_Pete View Post
    Love this plugin, love everything about it.

    I have a question regarding the 2D/3D audio (apologies if this has been covered but I couldn't find anything in the forum)

    I want to have my audio attenuated to be coming from the NPC I am talking to in a 3D manor, not in the 2D way it it default set to. I have attempted to work it out myself but haven't been able to get it working. any help would be amazing!
    https://i.gyazo.com/d53221ab360660db...8932100322.png

    This is called from two places. From "PlayPlayerReply" and "DisplayNpcNode".

    If you want NPC sounds to play from a certain location, you have to:
    - if the method is called from DisplayNpcReply, do this: https://i.gyazo.com/bdfad563c781a81b...dd3d3926be.png
    - make sure to promote the return value to a variable
    - in the "StopDialogueSound" method, make sure to stop both types of sounds (you now have two types: 2d and 3d sounds)

    Leave a comment:


  • replied
    Hi, not sure if this has been covered previously, but I could find it, so here goes.

    When I upgraded to the new events system, all my events stopped working.. I did create an Event BP etc.. but eventually traced it to the fact that I don't use the DialogueUserWidget (ever). I have my open recursive loop thingy that runs all my dialog in my own widget emebedded in my HUD.

    I realised that the missing ingredient was that I had to run DoEvents to force the events to run during a node... but... DoEvents calls a function on the DialogueUserWidget... (void UDialogueUserWidget::RunEventsForNode(FDialogueNode Node) for which I have no need or purpose. Seems weird to construct a dummy widget just to call this function...

    Is there another way? It would make sense for the RunEventsForNode(FDialogueNode Node) function to be available on the dialogue itself, or somewhere generically accessible.. without needing a widget.

    help!?

    Leave a comment:

Working...
X