Announcement

Collapse
No announcement yet.

Dialogue Plugin

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

    Originally posted by sarlewis View Post
    Can someone explain how to make this wonderful project work for a more common type of GAME such as third person type of gameplay. I am having trouble using this plugin in my thirdperson game
    It all depends on your game. I'm going to assume for a second that your third person game has a crosshair, and you want to "talk" to the NPC when the NPC is in your crosshair AND not further than 2 meters away from your character.

    This system would involve Linetraces on Tick, and a basic understanding of what class inheritance is. The simplest would be for your NPCs to inherit from one parent NPC class, and when you do a Linetrace, you check if it casts to an NPC. The more correct approach would be to have a Blueprint Interface, because talking is just a particular case of "using", like opening a book, or looking inside a chest, but this is a more "advanced" way.
    Anyway, to do a Linetrace, you'll need some basic understanding of how to set up Collision Channels.

    If you don't have a crosshair in your game, but simply want to talk to the closest NPC to your character, you'd need to place a collision sphere around your character, and then detect when an NPC enters your sphere. This also involves collision channels.

    If you have a mouse based control scheme, then it's all much easier, and a working example can be found in the demo project linked on the marketplace page.

    I'm not trying to be evasive about answering your question, but game logic in a broad sense is just not part of the dialogue system. Your particular problem requires an interaction system. Incidentally, there are some interaction systems on the marketplace, so I'd recommend looking into them, or getting on Udemy and watching a couple of tutorials on the subjects I've mentioned to get a better grasp on the engine.
    Let me know if you have any questions.
    MMO Starter Kit
    Dialogue Plugin
    Voxel Plugin
    Character Customization: Female
    Character Customization: Male

    Comment


      UE 4.26.0 has a bug, where Rich Text Blocks inside a Retainer Box display garbage. And Dialogue Plugin relies on just that hierarchy. So I can either release a perfectly fine version of the plugin that simply doesn't display rich text correctly in 4.26.0, or delay the release until a hotfix? I don't want to cut out the rich text functionnality just for a short while, and then bring it back in. So I don't know...

      Here's an example of the problem.
      It should display:


      It actually displays:


      I have reported the bug. When the issue appears on the tracker, I'm inviting you all to vote it up. I'll put a link here.
      Last edited by CodeSpartan; 12-06-2020, 10:23 AM.
      MMO Starter Kit
      Dialogue Plugin
      Voxel Plugin
      Character Customization: Female
      Character Customization: Male

      Comment


        I've released the 4.26 version, it features a comments system as described on the previous page. No news about the engine bug that breaks rich text yet.
        Don't migrate for now if you're using rich text.
        Last edited by CodeSpartan; 12-08-2020, 12:35 AM.
        MMO Starter Kit
        Dialogue Plugin
        Voxel Plugin
        Character Customization: Female
        Character Customization: Male

        Comment


          Thank you so much for the detailed explanation on how to implement the delay functionality in C++.
          I'm also really impressed with how fast you made the plugin available for 4.26. I'm loving the comment bubbles!

          Comment


            Hi, love the plugin so far and it seems very straightforward and easy to use, thank you. I am having an issue with calling inside created Dialogue events though. When I want to cast to a placed NPC from within an event (to turn on an attached light bulb, for example) what should I aim to call for? I'm somewhat newer to Unreal so I apologize if this is a basic question. I tried to do a straight CastTo node, but it fails to cast (confirmed with print strings). Calling All Actors of Class doesn't work because, while I can call the actor, I can't Get anything specific from there, such as the light bulb.
            What would be the correct method to talk to placed NPCs in the world from Dialogue Events?

            Comment


              Hello,

              I have an initial dialogue with 3 questions, immediately I would like only one to appear. after that i wanted to set a boolean at the end of it and that when returning to Npc it would show only option B or C (if the boolean return true or false).

              I try but I didnt figure how to work, do I need put a condition in each node?

              And that within each option B or C there would be response variations like "Yes / Yeah / Yep /" each time you back and talk with same Npc. with randomly show some of the asnwers, how I can do that?

              And why not a discord server?

              Thanks in advanced!

              Comment


                How close the dialog without need choose an answer in some cases? Not always. Like NPC say something and the dialogs closes after 2 seconds.

                Comment


                  I'm not getting any remote functionality with this plug-in at all. When I push the bottom face button on the gamepad the only thing that happens is the next button keeps getting highlighted brighter and brighter. Even the left click on the mouse isn't working when I click the next button. The dialogue widget won't go away.You definitely need a discord channel.
                  Last edited by macsmw1id; 12-18-2020, 10:26 AM.

                  Comment


                    Originally posted by macsmw1id View Post
                    I'm not getting any remote functionality with this plug-in at all. When I push the bottom face button on the gamepad the only thing that happens is the next button keeps getting highlighted brighter and brighter. Even the left click on the mouse isn't working when I click the next button. The dialogue widget won't go away.You definitely need a discord channel.
                    Responded to your email.

                    Originally posted by Mostarda TK View Post
                    Hello,

                    I have an initial dialogue with 3 questions, immediately I would like only one to appear. after that i wanted to set a boolean at the end of it and that when returning to Npc it would show only option B or C (if the boolean return true or false).

                    I try but I didnt figure how to work, do I need put a condition in each node?

                    And that within each option B or C there would be response variations like "Yes / Yeah / Yep /" each time you back and talk with same Npc. with randomly show some of the asnwers, how I can do that?

                    And why not a discord server?

                    Thanks in advanced!
                    A lot to unpack here.
                    For your first question where you want A, but then on your next revisit you only want B or C, you have multiple ways to do that.
                    Way #1: the condition on B and C should be "if A was visited and if B should be displayed", and same with C. By "and" I mean the node should simply have two conditions.
                    And the condition on A should be "A wasn't visited?".
                    So you use three bools in total in this case, or maybe just one enum if that works for you.
                    Way #2: have your answer to A lead to a similar node, but it would only have B and C as answers, with appropriate conditions for each.
                    Up to you which approach to use, both would work.

                    As for how to implement a random "Yeah/Yes/Yep", you can use the Text Variables. You type in %yes% into the node, and then define what it should return - you generate a random number and "Switch" on it. More on that in the documentation, paragraph "5. Variables in text".

                    Originally posted by Mostarda TK View Post
                    How close the dialog without need choose an answer in some cases? Not always. Like NPC say something and the dialogs closes after 2 seconds.
                    You can use a Dialogue Event. In this event, simply call a "Remove from Parent" on the dialogue widget reference. The reference has to be saved into a variable when you "create widget of type". You can do it in Character, Controller, Player State or wherever it is that you create the dialogue widget.

                    Originally posted by Mostarda TK View Post
                    And why not a discord server?
                    I prefer email for work, discord for personal stuff.
                    Last edited by CodeSpartan; 12-19-2020, 08:48 AM.
                    MMO Starter Kit
                    Dialogue Plugin
                    Voxel Plugin
                    Character Customization: Female
                    Character Customization: Male

                    Comment


                      Hello, I've been having this problem while packaging my project for linux :

                      "ERROR: Missing precompiled manifest for 'DialoguePlugin'. This module was most likely not flagged for being included in a precompiled build - set 'PrecompileForTargets = PrecompileTargetsType.Any;' in DialoguePlugin.build.cs to override.
                      PackagingResults: Error: Missing precompiled manifest for 'DialoguePlugin'. This module was most likely not flagged for being included in a precompiled build - set 'PrecompileForTargets = PrecompileTargetsType.Any;' in DialoguePlugin.build.cs to override."

                      The plugin is residing in the engine and I have tried setting 'PrecompileForTargets = PrecompileTargetsType.Any;' in DialoguePlugin.build.cs.
                      I'm still receiving the same error.
                      Last edited by yranos; 12-28-2020, 06:17 AM.

                      Comment


                        Originally posted by yranos View Post
                        Hello, I've been having this problem while packaging my project for linux :

                        "ERROR: Missing precompiled manifest for 'DialoguePlugin'. This module was most likely not flagged for being included in a precompiled build - set 'PrecompileForTargets = PrecompileTargetsType.Any;' in DialoguePlugin.build.cs to override.
                        PackagingResults: Error: Missing precompiled manifest for 'DialoguePlugin'. This module was most likely not flagged for being included in a precompiled build - set 'PrecompileForTargets = PrecompileTargetsType.Any;' in DialoguePlugin.build.cs to override."

                        The plugin is residing in the engine and I have tried setting 'PrecompileForTargets = PrecompileTargetsType.Any;' in DialoguePlugin.build.cs.
                        I'm still receiving the same error.
                        Thanks for the report, I'll check it out in the next few days.
                        MMO Starter Kit
                        Dialogue Plugin
                        Voxel Plugin
                        Character Customization: Female
                        Character Customization: Male

                        Comment


                          Greetings,

                          Love the plugin!

                          Have a bunch of questions about it:

                          ​​​​​1) Adding variables to the Dialogue node struct. (Managed to figure it out in the end)
                          followed the documentation example, which works fine with a simple variable like an integer, but in my case I need to add FDataTableHandleRow as a variable and this method does not seem to work.
                          I do not know C++ so if you can advise how to properly add more complicated variables like a struct or a set, that would be great
                          2) How to add new variables directly to the Dialogue asset (not the nodes). Can you give a similar example? (right now I believe it has two variables exposed to BP, name and Display Idle splines).
                          3) Events. Why don't you pass the reference of widget that calls the event to it? It would make it easier to run contextual events based on the nodes that called them. Right now event has nothing and has to find even the widget that called it with suboptimal methods ( your example video has stuff like get actors of class etc)
                          3) Events. It seems that when you create a variable inside the event it shows up inside the Dialogue node even if it is not instance editable. So it makes it hard to create some utility variables inside events without bloating the dialogue node.
                          I was under the impression that only instance editable ones should show up in the dialogue nodes.

                          Thanks!
                          Last edited by RC_Malokai; 01-22-2021, 04:49 AM.

                          Comment


                            Originally posted by RC_Malokai View Post
                            3) Events. It seems that when you create a variable inside the event it shows up inside the Dialogue node even if it is not instance editable. So it makes it hard to create some utility variables inside events without bloating the dialogue node.
                            I was under the impression that only instance editable ones should show up in the dialogue nodes.
                            I was under that impression too when I wrote the documentation. I guess you could call it an engine bug, but Epic won't deal with something so minor.

                            Originally posted by RC_Malokai View Post
                            How to add new variables directly to the Dialogue asset (not the nodes). Can you give a similar example? (right now I believe it has two variables exposed to BP, name and Display Idle splines).
                            Just add a field normally and it will display. E.g.




                            Originally posted by RC_Malokai View Post
                            1) Adding variables to the Dialogue node struct. (Managed to figure it out in the end)
                            I do not know C++ so if you can advise how to properly add more complicated variables like a struct or a set, that would be great
                            Documentation #7.8 explains this.
                            If it doesn't work for structs/sets too, let me know.

                            Originally posted by RC_Malokai View Post
                            3) Events. Why don't you pass the reference of widget that calls the event to it? It would make it easier to run contextual events based on the nodes that called them. Right now event has nothing and has to find even the widget that called it with suboptimal methods ( your example video has stuff like get actors of class etc)
                            If this is something you need, you can implement the retrieval of the widget on GameInstance or somewhere similar, and just call it from your events. You likely save a reference to the dialogue widget anyway whenever you spawn it. There is no overhead for doing something like this.


                            Originally posted by CodeSpartan View Post

                            Thanks for the report, I'll check it out in the next few days.

                            A little update on the Linux problem. Sorry it's taking so long. My Linux machine broke (network adapter can't connect to network), so I have to find another machine with Linux on it...
                            MMO Starter Kit
                            Dialogue Plugin
                            Voxel Plugin
                            Character Customization: Female
                            Character Customization: Male

                            Comment


                              So in regards to this bug:


                              The good news is that they entered it into the system: https://issues.unrealengine.com/issue/UE-107863
                              Please upvote the issue on the tracker if you're using the plugin, because otherwise the bug will likely be backlogged and it may take a long time to get it fixed. However if it gets a good amount of upvotes, I'm guessing it can get fixed in the next ~6 months, optimistically. So please vote. Thanks!
                              MMO Starter Kit
                              Dialogue Plugin
                              Voxel Plugin
                              Character Customization: Female
                              Character Customization: Male

                              Comment


                                Hey!

                                I'm using this plugin and it works great, but I need to tweak it to make it really streamlined. I tried to achieve it, but I need your help. I'm affraid I will mess it up on some pint.


                                I need to:

                                - add an alternative text window for a PC, so I can display a dialogue option like "I will do that", but print (and add audio) the full answer like "Of course I will do that, honey!" - i tried to add the box using the instructions in the post #282, but i got those errors when I try to compile it through the Viseual Studio:

                                Code:
                                1> [1/4] Module.DialoguePluginEditor.cpp
                                1>F:/allmother/UE4/AllMother/Plugins/DialoguePlugin/Source/DialoguePluginEditor/Private/DialoguePluginEditorSettingsDetails.cpp(82): error C2039: "AlternativeText": nie jest sk�adow� elementu "FDialogueNode"
                                1> F:\allmother\UE4\AllMother\Plugins\DialoguePlugin\Source\DialoguePlugin\Public\Dialogue.h(92): note: zobacz deklaracj� "FDialogueNode"
                                1>F:/allmother/UE4/AllMother/Plugins/DialoguePlugin/Source/DialoguePluginEditor/Private/DialoguePluginEditorSettingsDetails.cpp(166): error C2039: "AlternativeText": nie jest sk�adow� elementu "FDialogueNode"
                                1> F:\allmother\UE4\AllMother\Plugins\DialoguePlugin\Source\DialoguePlugin\Public\Dialogue.h(92): note: zobacz deklaracj� "FDialogueNode"
                                1>F:/allmother/UE4/AllMother/Plugins/DialoguePlugin/Source/DialoguePluginEditor/Private/DialoguePluginEditorSettingsDetails.cpp(174): error C2039: "AlternativeText": nie jest sk�adow� elementu "FDialogueNode"
                                1> F:\allmother\UE4\AllMother\Plugins\DialoguePlugin\Source\DialoguePlugin\Public\Dialogue.h(92): note: zobacz deklaracj� "FDialogueNode"
                                1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(46,5): error MSB3073: The command ""E:\Epic Games\UE_4.26\Engine\Build\BatchFiles\Build.bat" AllMotherEditor Win64 Development -Project="F:\allmother\UE4\AllMother\AllMother.uproject" -WaitMutex -FromMsBuild" exited with code 6.
                                1>Done building project "AllMother.vcxproj" -- FAILED.
                                I don't know why it's in polish, but translations is like "zobacz deklaracj�" - "see declaration" and "nie jest sk�adow� elementu" - is not a part of element"


                                I first copied the plugin to the local project and removed the plugin from the Engine. doesn't work


                                - I need to add "skip" button for both when the PC and NPC answer is playing. Right now "Next" only shows when PC is speaking so I can skip to NPC's answer, but I need both. I followed the video for the Souls-like dielogues and added a skip function on a button but it shows this error:

                                Code:
                                Blueprint Runtime Error: "Accessed None trying to read property CallFunc_GetEffectMaterial_ReturnValue". Blueprint: MyReplyWidget Function: Execute Ubergraph My Reply Widget Graph: EventGraph Node: Set Scalar Parameter Value
                                But it works... a bit.

                                When I skip the NPC dialogue, it skips to the first possible PC node, and still shows both nodes after the timer is done, so midway through the first node text, it shows the selection again and I can replay the node or... switch it to a diffrent one.

                                Also, is it possible to add the skip button but asign it to a input button, from project settings, and not through "OnKeyDown" node?


                                - I need to play non-branching dialogue nodes one after another, without having to select the only avilable. I think it's connected to the thing above, but should be branched somehow, like counting the possible nodes and if just one then go straight to this one, and if not, show them to me. And if I'm skipping, show me the dialogue options immediately.

                                - I already added the delay function so that PC's dialogue options only turn up when the NPC is finished talking, which is great, but the timer gets a little confused.


                                Also, I've built a rather ugly system in the Player Controller that counts total mouse-wheel rolls in the game and pulls it into the widget, so I can select the dialogue options with mouse wheel and accept it with an "E" key and it works fine, but I would love to pull the button from the input settings, and not leave it on the blueprint.

                                But maybe you managed to come up with something as a mouse-wheel and keyboard button input in the meantime?



                                Last edited by czlowiek_kon; 02-05-2021, 11:55 AM.

                                Comment

                                Working...
                                X