Announcement

Collapse
No announcement yet.

Dialogue Plugin

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

  • 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:	13
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:


  • replied
    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? Will that require adding an additional events array to the plugin? My current thinking is to have an empty node and just not process it if there is no text as a fake node just to trigger events. Any thoughts? Thanks and love the plugin so far

    Leave a comment:


  • replied
    Hi, first thank for you amazing plugin, and your support. Second forget my English.

    I already implement my custom camera system to work with this dialogue plugin, a dialogue event that trigger a function within an actor component with a “Set View Camera with Blend” call. But have a very simple problem, I will explain it in detail because the more data you have, easier for you to understand it.

    Following the documentation, I had duplicate and edit both “DemoDialogueWidget” and “DemoReplyWidget” to fit my project. In the case of the reply widget, I added a simple image before the text, and I set it to collapsed by default. And, I wanted to show that image in case that the answer has a specific quest, item, etc.


    Click image for larger version  Name:	ReplyWidget.png Views:	1 Size:	139.3 KB ID:	1639401


    Now, If I understood correctly, events are triggered after you pass the current node, and conditions are checked when you arrive to a certain node, or something like that. And what I think that I need is to, modify “DemoReplyWidget” before is created.
    That means JUST AFTER the dialogue tree arrive to that node.

    Click image for larger version  Name:	CheckIf1.png Views:	1 Size:	125.9 KB ID:	1639402


    The function “Is condition Met for node” is written in c++ and I prefer not to mess with the plugin code, not only because it will be updated regularly and that means that I will have to redone everything, but also because I’m not a programmer.

    So, please correct me if I’m wrong, I need to create an event, in the previous node of a branching conversation, that change something in the NEXT “DemoReplyWidget” that will be created, and only if a certain condition is meet. Right?
    So, to that end, I opened “DemoDialogueWidget” and went to that part, specifically, in the custom event “DisplayReplies” after “DemoReplyWidget” and before is added to the vertical box (Player VBox) and added my custom function “CheckIfHasIcon” there.

    Click image for larger version  Name:	CheckIf2.png Views:	1 Size:	112.2 KB ID:	1639403

    Click image for larger version  Name:	CheckIf3.png Views:	1 Size:	116.6 KB ID:	1639404


    So… the flow would be like that: For each node that are about to be created you check conditions, if they are true, you spawn a “DemoReplyWidget” for each one of them.
    And then my “custom function” will also check if the node has an icon, and edit “DemoReplyWidget” before is loaded in the “Player VBox”


    My specific problem is, that I cannot access nodes that are not “reached” yet..
    I cannot find out how, an event in a given node to check the “condition” of the next node(let’s suppose a simple True or False Boolean in the condition), so I can pass that variable from the “node with the condition” to the previous node (the one with the event)

    I dug into the problem for two days without a solution, so, I’m asking know, to anyone who could oriented me with the problem, the approach or wherever is wrong on it.

    Again, thanks for the plugin, is amazing.
    I'm sharing a video to show you my current progress

    Last edited by Rykroft; 07-08-2019, 01:16 AM.

    Leave a comment:


  • replied
    How can I combine this with the Interfes???

    Leave a comment:


  • replied
    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?
    Attached Files

    Leave a comment:


  • replied
    from what I can tell, that project would also take care of the dialogues. Though I use this one, since I wanted to create my own quest / mission system.

    Leave a comment:


  • replied
    Sorry if this was already asked but has anyone integrated this into the Advanced Mission and Notification System made by Nocte Studios?

    Leave a comment:


  • replied
    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!

    Leave a comment:


  • replied
    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?

    Leave a comment:

Working...
X