Announcement

Collapse
No announcement yet.

Blueprint Dialogue System

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

    Originally posted by Cinebeast View Post
    Sorry for not responding sooner. Yes, this helped! I've set up a system that works reliably well now.
    Great! Glad to hear it

    Comment


      Hello Mr Grogger,

      I just purchased your dialog system and... It's awesome ! Even with few knowledges of mine, I'm able to do some simple tasks easily...

      But now, I want to do a lot more. Your first tuto on youtube was quite helpfull but insufficient. I know it's a lot of work, but you know, when you want to learn, you're always exigent... So ! I just see this topic and I wanted to ask you something...

      Did your dialog system programmed for more advanced taks like events ?

      For example : I have to talk to "A" guy who tell me to talk to "B". Once I talked to "B", and return to "A", "A" has new lines. is that already in the code or do I have to had some C++... Or is it simple to add it with some blueprint, maybe ?

      I apologize one milion time for all my mistakes.


      Thanks by advance, and for all your work. It's fantastic, keep going !

      Comment


        Originally posted by Ednoc View Post
        Hello Mr Grogger,

        I just purchased your dialog system and... It's awesome ! Even with few knowledges of mine, I'm able to do some simple tasks easily...

        But now, I want to do a lot more. Your first tuto on youtube was quite helpfull but insufficient. I know it's a lot of work, but you know, when you want to learn, you're always exigent... So ! I just see this topic and I wanted to ask you something...

        Did your dialog system programmed for more advanced taks like events ?

        For example : I have to talk to "A" guy who tell me to talk to "B". Once I talked to "B", and return to "A", "A" has new lines. is that already in the code or do I have to had some C++... Or is it simple to add it with some blueprint, maybe ?

        I apologize one milion time for all my mistakes.


        Thanks by advance, and for all your work. It's fantastic, keep going !
        Hi Ednoc, I'm glad you're enjoying the system so far!

        Yep, it was built with scripting in mind. There's a built in Blueprint-Only script interpreter that you might have noticed, and this is hooked into the dialogue system so you can achieve what you're asking.

        What will help you with your example is the Hub and Silent traits, Script Variables, and Conditions.

        For example:

        A has two dialogue options: 1) Hi, go talk to B; 2) Great, you've talked to B!

        We want (1) to run when the player hasn't spoken to B, so in the Condition column we will check to see if a variable is set: !isvalid(hasTalkedToB) || !hasTalkedToB
        If the conditions fail, the dialogue doesn't run, so in this case we only want the player to say "Hi, go talk to B" if the variable hasTalkedToB doesn't exist (isvalid returns false if it doesn't exist), or the variable is false.

        We want (2) to run when the player HAS spoken to B, so the Condition column would be isvalid(hasTalkedToB) && hasTalkedToB

        The next thing we need is a new dialogue row to act as the hub and selects the right dialogue to say. A dialogue entry with the Silent and Hub traits in the trait column (eg. Silent; Hub will automatically select the next valid branch from the Branch column (eg. branches TalkToB; HasTalkedToB to process. The first dialogue to pass the 'conditions' test will execute.

        The last part of the example is actually talking to B and setting the variable when the player talks to NPC B. The PostAction column is a good place to set new variables or call functions, and we would set hasTalkedToB=true in that column. Once set, the player would talk to NPC A again, this NPC's current branch would be the HUB branch we made, then the HUB would try to see if TalkToB branch is valid, the condition would fail

        The following sections in the documentation should help you out with advanced functionality:

        Conditions, Use Conditions, Functions, Custom Functions, Scripting



        I realize this is a long winded example, but I hope it helps!

        Comment


          Hey all, I just wanted to note that the system has been tested with 4.12 and the current version is compatible for upgrading

          Comment


            Originally posted by Grogger View Post
            Hi Ednoc, I'm glad you're enjoying the system so far!

            Yep, it was built with scripting in mind. There's a built in Blueprint-Only script interpreter that you might have noticed, and this is hooked into the dialogue system so you can achieve what you're asking.

            What will help you with your example is the Hub and Silent traits, Script Variables, and Conditions.

            For example:

            A has two dialogue options: 1) Hi, go talk to B; 2) Great, you've talked to B!

            We want (1) to run when the player hasn't spoken to B, so in the Condition column we will check to see if a variable is set: !isvalid(hasTalkedToB) || !hasTalkedToB
            If the conditions fail, the dialogue doesn't run, so in this case we only want the player to say "Hi, go talk to B" if the variable hasTalkedToB doesn't exist (isvalid returns false if it doesn't exist), or the variable is false.

            We want (2) to run when the player HAS spoken to B, so the Condition column would be isvalid(hasTalkedToB) && hasTalkedToB

            The next thing we need is a new dialogue row to act as the hub and selects the right dialogue to say. A dialogue entry with the Silent and Hub traits in the trait column (eg. Silent; Hub will automatically select the next valid branch from the Branch column (eg. branches TalkToB; HasTalkedToB to process. The first dialogue to pass the 'conditions' test will execute.

            The last part of the example is actually talking to B and setting the variable when the player talks to NPC B. The PostAction column is a good place to set new variables or call functions, and we would set hasTalkedToB=true in that column. Once set, the player would talk to NPC A again, this NPC's current branch would be the HUB branch we made, then the HUB would try to see if TalkToB branch is valid, the condition would fail

            The following sections in the documentation should help you out with advanced functionality:

            Conditions, Use Conditions, Functions, Custom Functions, Scripting



            I realize this is a long winded example, but I hope it helps!
            Hi Grogger,

            Bought and used it for some testing and is easy to learn and looks awesome. Nice work !

            However, I do not use data tables, but a real database (via TCP sockets) and an external program (in Java) to create dialogues. I never know upfront what the next "line of speech" will be (and who will say this line) as it is triggered by dozens of params and not even in UE. The only thing locally packed (in UE) will be the images as I suppose no other way around is available (correct me if I'm wrong).

            Do I have to do this via the scripting as well (and have a closer look at the above mentioned links you provided), or is a (BP) struct and events for this available (should be faster, no interpretation needed) ?

            Thanks for your insights !

            Cheers,

            Geert

            Comment


              Originally posted by gm0124816 View Post
              Hi Grogger,

              Bought and used it for some testing and is easy to learn and looks awesome. Nice work !

              However, I do not use data tables, but a real database (via TCP sockets) and an external program (in Java) to create dialogues. I never know upfront what the next "line of speech" will be (and who will say this line) as it is triggered by dozens of params and not even in UE. The only thing locally packed (in UE) will be the images as I suppose no other way around is available (correct me if I'm wrong).

              Do I have to do this via the scripting as well (and have a closer look at the above mentioned links you provided), or is a (BP) struct and events for this available (should be faster, no interpretation needed) ?

              Thanks for your insights !

              Cheers,

              Geert
              Hi there,

              If you aren't using data tables but you still want to use this system, you'll want to look at overriding the GetDialogueItem, GetDialogueRownNames, GetAsset, and GetSpeakerAttributes functions in your BPC_Dialogue child class. You'll need to convert your data into DialogueTableItem structures in those functions for the UI to know what to show/respond. If your system works by branching (even dynamically), I'd imagine it should convert fairly easily to the DialogueTableItem structure.

              Hope that helps!
              Cheers

              Comment


                Originally posted by Grogger View Post
                Hi there,

                If you aren't using data tables but you still want to use this system, you'll want to look at overriding the GetDialogueItem, GetDialogueRownNames, GetAsset, and GetSpeakerAttributes functions in your BPC_Dialogue child class. You'll need to convert your data into DialogueTableItem structures in those functions for the UI to know what to show/respond. If your system works by branching (even dynamically), I'd imagine it should convert fairly easily to the DialogueTableItem structure.

                Hope that helps!
                Cheers
                Aha ! That looks like what I was looking for ! I will dive into these BP's/functions one of the next days. The conversion should be pretty simple, as long as you use UE standard variables in the struct (as I suspect).

                Thanks for the info !

                Cheers,

                Geert

                Comment


                  Hello,

                  First, I just wanted to say that this system is great and we have had a lot of success working with it. It has enabled some cool stuff, including using the BPC use scanner to allow us to create use actions on items in our level entirely unrelated to dialogue. Overall, this has been a great system to use.

                  We are running into a bug though, and I am not sure what is causing it. Currently, we have a system set up that triggers dialogue when you enter a collision zone. So, for example, you put a box trigger into a level and use a dialogue object when you cross the trigger. However, once you end the dialogue the character continues walking in the direction they had been walking in, until you press and release the movement key again. My understanding is that for some reason, input is being halted from the mouse and keyboard, causing the game to not register the key up event triggering. Have you seen anything like this, or do you have any idea where input might be blocked during the use of dialogue?

                  Comment


                    Originally posted by mfasman95 View Post
                    Hello,

                    First, I just wanted to say that this system is great and we have had a lot of success working with it. It has enabled some cool stuff, including using the BPC use scanner to allow us to create use actions on items in our level entirely unrelated to dialogue. Overall, this has been a great system to use.

                    We are running into a bug though, and I am not sure what is causing it. Currently, we have a system set up that triggers dialogue when you enter a collision zone. So, for example, you put a box trigger into a level and use a dialogue object when you cross the trigger. However, once you end the dialogue the character continues walking in the direction they had been walking in, until you press and release the movement key again. My understanding is that for some reason, input is being halted from the mouse and keyboard, causing the game to not register the key up event triggering. Have you seen anything like this, or do you have any idea where input might be blocked during the use of dialogue?
                    Hi mfasman95, thanks for the kind words

                    I haven't encountered this myself (I have additional checks outside of the dialogue system), but I have encountered issues with the input mode since 4.11. The system sets the input mode "UI Only" when a dialogue is opened and closed if the component is set to Keyboard & Mouse, and "UI and Game" mode if set to gamepad. If you want to override this, you can set the components to not handle input modes or cursor at all (set it to "unmanaged").

                    Without my code in fron of me, I believe I handle it by monitoring when a dialogue is opened and closed in the player controller (using the interface BPI_DialogueAware) and using SetIgnoreMoveInput (https://docs.unrealengine.com/latest...put/index.html) on opened, and ResetIgnoreInputFlags (https://docs.unrealengine.com/latest...ags/index.html) on close

                    Comment


                      I'm starting to get into the system and it looks promising. There is a small issue I've come across, however. In 4.11 the Datatables that reference assets have 'Object' Type in their structs(DT_DialogueAssets_Main and DT_DialogueSpeakerAttributes_Main). Is that intended? because it makes it impossible to actually choose and place an asset into the Data table row from the editor. What is the expected pipeline? Always *.csv and import?

                      Comment


                        Originally posted by vipeout View Post
                        I'm starting to get into the system and it looks promising. There is a small issue I've come across, however. In 4.11 the Datatables that reference assets have 'Object' Type in their structs(DT_DialogueAssets_Main and DT_DialogueSpeakerAttributes_Main). Is that intended? because it makes it impossible to actually choose and place an asset into the Data table row from the editor. What is the expected pipeline? Always *.csv and import?
                        Unfortunately, the UE4 DataTable editor doesn't support object references, so a CSV import is needed to use assets. The sample has an example asset table csv file you can look at for reference (the basic use is to "Copy Reference" on the object in the content browser and paste it into the row)

                        Comment


                          Hello again! Things have been going pretty swell, but I've run into a new hurdle and I need some help.

                          Unfortunately I want to do the same thing Ednoc was doing, except your explanation isn't really working for me. I want a part of a conversation (not the whole thing) to change depending on whether or not the player completed a task in the last level. So, I need to figure out how to share and update variables from level-to-level, which I'm not clear on.

                          In the meantime I've been running tests on the conversation by changing the variable on Begin Play of the level, but no luck so far. The conversation starts and I swap to a branch that's Silent and a Hub, but instead of picking between two branches to continue the dialogue, it simply ends. Maybe my conditions aren't being recognized, I don't know.

                          Hope you get what I'm saying! I feel like I'm not communicating the issue as well as I should be.

                          EDIT: I solved the main issue! I feel so silly -- I made a simple grammar mistake, that's what was breaking things for me.

                          I'm still curious about storing and sharing variables between levels, though. I'm not sure how I'm going to move things from the game mode to the game instance and back again.
                          Last edited by Cinebeast; 09-21-2016, 11:35 AM.
                          I'm an artist! Check out my work at https://cinebst.wixsite.com/cinebeastart and hit me up!

                          You can e-mail me at cinebst@gmail.com.

                          Comment


                            Originally posted by Cinebeast View Post
                            Hello again! Things have been going pretty swell, but I've run into a new hurdle and I need some help.

                            Unfortunately I want to do the same thing Ednoc was doing, except your explanation isn't really working for me. I want a part of a conversation (not the whole thing) to change depending on whether or not the player completed a task in the last level. So, I need to figure out how to share and update variables from level-to-level, which I'm not clear on.

                            In the meantime I've been running tests on the conversation by changing the variable on Begin Play of the level, but no luck so far. The conversation starts and I swap to a branch that's Silent and a Hub, but instead of picking between two branches to continue the dialogue, it simply ends. Maybe my conditions aren't being recognized, I don't know.

                            Hope you get what I'm saying! I feel like I'm not communicating the issue as well as I should be.

                            EDIT: I solved the main issue! I feel so silly -- I made a simple grammar mistake, that's what was breaking things for me.

                            I'm still curious about storing and sharing variables between levels, though. I'm not sure how I'm going to move things from the game mode to the game instance and back again.

                            Hi Cinebeast, I'm glad you managed to solve the first issue

                            The only thing that needs to be restored/preserved is the 'Variables' array in the ScriptInterpreter. You can choose to copy these somehow before unloading the current level and re-copying them to the new script interpreter when the level loads, OR you can store the script interpreter on the GameInstance to begin with (your BPC_Dialogue child classes will need to be updated to instead get the script interpreter from there)

                            Comment


                              How hard would it be to add support for 3D widgets (to output stuff into 3D widgets and not to the HUD/screen) ?

                              What does the process of integration into existing projects look like ?

                              Also just noticed link in your signature goes into 404 and not into marketplace page

                              Comment


                                Originally posted by motorsep View Post
                                How hard would it be to add support for 3D widgets (to output stuff into 3D widgets and not to the HUD/screen) ?

                                What does the process of integration into existing projects look like ?

                                Also just noticed link in your signature goes into 404 and not into marketplace page

                                Ooo, thanks for noticing the link was broken, looks like Epic's changed to a URL with the asset name in it.

                                3D Widgets should be perfectly possible with the current system, there are a few functions that would need to be overridden in the BPC_Dialogue component. I haven't attempted it myself yet, though I did build it with this possibility in mind (especially with the 'passive' dialogue I intend to use as chat-bubbles in my own game).

                                As for existing project integration, the dialogue system is non-intrusive for the most part. A dialogue 'ScriptInterpreter' actor needs to be spawned and maintained (variables copied across levels if desired), the dialogue components need to be placed on the actors who will have dialogue, and the Use system should be integrated or replaced with your own 'use/interact' system.

                                Hope that helps

                                Comment

                                Working...
                                X