Announcement

Collapse
No announcement yet.

Dialogue Nodes (C++)

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

    [PLUGIN] Dialogue Nodes (C++)

    Hello there!

    I've been working for a few months on a new game project for which our team had to develop or use a dialogue system.
    Turns out no solution satisfied us on the marketplace or elsewhere, thus here I am, making my own!

    User experience and game-agnosticism are very important notions to me, so I designed this pure game-logic system in the most flexible and simple way I could : it is entirely made of Blueprint nodes.
    Click image for larger version  Name:	Thumbnail_MarketPlace.png Views:	1 Size:	54.5 KB ID:	1617932


    BP Integrated   Flexible   User friendly

    Click image for larger version  Name:	Gallery_0.png Views:	2 Size:	293.0 KB ID:	1617938

    Click image for larger version  Name:	Gallery_1.png Views:	2 Size:	305.5 KB ID:	1617939




    Click image for larger version  Name:	Gallery_2.png Views:	2 Size:	338.5 KB ID:	1617940




    Click image for larger version  Name:	Gallery_3.png Views:	2 Size:	292.9 KB ID:	1617941

    Click image for larger version  Name:	Gallery_4.png Views:	2 Size:	340.9 KB ID:	1617942



    Features:
    • Blueprint integrated system
      • 5 Blueprint nodes for dialogue design
      • One single node for dialogue execution
      • Intuitive dialogue branching with pins and wires
    • Dynamic access to Blueprint elements
      • Boolean conditions for dynamic branching
      • Text variable replacements inside dialogue lines
      • Trigger Blueprint actions
    • Rich Text support
      • Live preview formatting directly in Blueprint nodes
      • User defines its own <tags></> to be displayed in-game and in-editor
    • ​​​​Metadata, Sound and Dialogue Wave assets inside every node
    • Node display depends on Project Settings and metadata
    • 24 pages documentation (link below)
    • Example project with basic UI (link below)
    Important note: no UI implementation inside the plugin. UI entirely depends on your game project so it's up to you to implement it.

    Links:
    As user-experience is at the core of my work, I will gladly hear about all your feedbacks and suggestions!
    I've been working on it alone for a few months now (on my free-time) and I would like to have the point of view of other designers.

    I'm all ears!

    Have fun with this plugin system, never stop writing!
    - A Crafty Weazel -
    Last edited by CraftyWeazel; 05-15-2019, 02:57 AM.

    #2
    Small update:

    Now with an "Add out +" button to easily add outcome options Not a big deal, but quite practical.

    Click image for larger version

Name:	UE4_AddOutButton.PNG
Views:	14
Size:	53.6 KB
ID:	1562964

    Comment


      #3
      User-interface update:

      You can write text with tags that will automatically be detected and formatted in the rich text box of the node.
      To do so, you will have to create a Text Style data table and select it from the plugin's settings in Project Settings > Editor.

      Click image for larger version  Name:	UE4_PreFormattingExample.PNG Views:	1 Size:	60.4 KB ID:	1564074

      Thanks to that update, you can have as many text formats as you want, with all UE4's RichTextBox possibilities (font, color, size, shadow...).

      Note: you can't add decorators like you would do to insert inline images or widgets (tooltips on keywords for example). I don't think I will do it inside the editor's UI, but it's still possible at runtime.
      Note 2: here you specify a Text Style data table for the editor display only. The text styles at runtime are specified separatedly, which allows you to have a preview set for the writing phase, and a runtime set for the real dialogue once in game.
      Last edited by CraftyWeazel; 12-19-2018, 08:18 PM.

      Comment


        #4
        Custom-variables update:

        You can add as many custom variables as you want in your text lines and options thanks to the brackets [ ]. Just write your [variable name] inside brackets and press enter. Then a Text pin is added to the node where you can write a value, or link anything directly from the blueprints.
        As you can see in the example, the same variable can be used multiple times and may also be placed between < > signs to make dynamic text tags! (see previous update)

        Click image for larger version

Name:	UE4_CustomVarsExample.PNG
Views:	13
Size:	69.8 KB
ID:	1569193

        This feature also comes with few options making things easier with custom variables. When you delete all occurence of a variable in the text, the pin doesn't disappear (it might be linked to something or contain a value). You can right-click on a custom pin to make it disappear, or you can also regenerate all pins to recreate all destroyed pins that still appear in the text.

        This update also comes with a few minor bug solving that I won't detail here.

        Comment


          #5
          Where can I get this?

          Comment


            #6
            Hi, I'm glad you're interested but it's still a WIP though.
            I can't deliver it right now as main features need to be done.

            I'm working hard to make things progress

            Comment


              #7
              This is pretty awesome actually. I really love that you incorporated RTF/B and variables directly into the node. That would speed things up quite a bit. Keep up the great work!
              Current Project - *shush shush* Ehh.. When its ready?

              Comment


                #8
                A K2Node_ system like this is way better than a full custom graph
                Can be placed on existing Blueprints.
                | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                Comment


                  #9
                  Very interesting!

                  Have you any plans to integrate your system into Behavior Trees and AnimBP?

                  WIP Thread

                  Comment


                    #10
                    Thanks for the feedbacks!

                    I quickly checked and it seems to work with AnimBP, but I need to test it further.
                    I don't have any plan to directly integrate it to Behavior Trees as it is quite different from BP, but you can still make bridges from BT to BP and then use any variable/condition in the dialogue branching.

                    Maybe things will be clearer when I release the update for executing the dialogue. Until now, I've only been working on the dialogue design, which is stored in a Dialogue object. It should be out soon, but it's quite a bit of work too.

                    Comment


                      #11
                      Sidenote: as I see some great coders are here, does anyone have an idea on how to change the color of the pin connections?
                      I made a custom exec pin (orange one in screens) but I can't manage to edit the connection color, as it is hard-defined in the graph settings. Any way to inject new setting?

                      Comment


                        #12
                        Dialogue Execution update:

                        I finished the last biggest part of the system, the execution HUB. From one node, you manage all the execution of the dialogue.

                        Click image for larger version

Name:	UE4_DialogueHUB.PNG
Views:	16
Size:	124.9 KB
ID:	1569725

                        It is composed of five parts. The three to the rights are ways to give information to the dialogue. The two to the left are events fired by the dialogue when necessary.
                        • Launch Dialogue
                          This is the pin you use to launch the dialogue. You use it only once, the dialogue cannot be launched again before it reaches an end or it is terminated.
                          The Dialogue pin just below is where you select the Dialogue object you want to launch, which means you can launch dialogues from anywhere, not necessarly where you created them.
                          Once the dialogue is launched, events will be fired.
                        • Select Option
                          You use this pin when the dialogue is waiting for an input, after a choice proposed to the player.
                          The Option ID pin just below is used to tell the dialogue which option was selected by the player. An option's id is its position in the Options array (see below).
                          Even if there is no option, just a "press a button to continue" thing, you still use this pin and give any Option ID.
                        • Stop Dialogue
                          You use this pin to manually terminate the dialogue, like when the player decides to quit the dialogue before a branch end.
                          This will tell the dialogue that it can reset and you will be able to launch it again.
                          Note that it fires the Dialogue End event (see below).
                        • Dialogue Line
                          This event is fired each time a NPC-line is encountered in the dialogue (or a player-option directly leading to other player-options).
                          The String pin carries the processed text of the line, replacing all [variables] by their current value. You should display it in a RichText UI component.
                          The Options pin carries an Array of OptionStruct. Those are structs containing processed text of each option as well as their visibility and availability (only visible options are in the array).
                          You should display the line and the different options when this event is fired and wait for player's input. Then, notify the dialogue through the "Select Option" pin.
                        • Dialogue End
                          This event is fired when the dialogue reaches a branch end, or when it is manually terminated through the "Stop Dialogue" pin.
                          You should close UI elements you want to close here and do anything relevant after the dialogue is ended.
                        I recommand to make a displayer class (maybe a widget blueprint) that will properly handle every dialogue execution, then pass it relevant Dialogue objects from the blueprint that need to execute a dialogue. This way, you can define your own UI design once and use it everywhere in your game, with a direct and strong link to blueprints.

                        Comment


                          #13
                          General Improvements + Documentation Update:

                          Hi there, I made some progress since last update since January! Most of them are bug solving and optimizations, but I added few visual and practical things too.
                          • Metadata parameters:
                            Now, on each Line/Option node, you'll be able to add as many metadata parameters as you want, in a Name-String map. You might want to specify the Character who is talking for example, or its mood. You could also specify which skill is required for the player to select an option.

                            These metadata parameters may be declared for all nodes at the same time in the plugin's settings. Here you can define default parameters and their default value. When you create a new node, it will use these defaults, but then you'll be able to change the values, add/delete parameters...

                            Note: You can use [text parameters] inside metadata parameters too! This allows you to change their value dynamically depending on game.
                          Click image for larger version  Name:	UE4_MetadataParameters.png Views:	1 Size:	14.3 KB ID:	1580773

                          Click image for larger version  Name:	UE4_Settings.PNG Views:	1 Size:	48.2 KB ID:	1580774
                          • Title parameter and colors:
                            In the settings, you can specify the name of one of the metadata parameters so that the engine displays it directly into the node's title. Then, for different values of that parameter, you can specify different colors the node might take. The change is immediate and it allows the designer to make their dialogue branching much clearer, with color codes and quick look-up.
                          Click image for larger version  Name:	UE4_TitleParameterAndColors.PNG Views:	1 Size:	102.5 KB ID:	1580775
                          • Sound and Dialogue Wave:
                            Just two parameters you can set for each Line/Option, if you want to play your dialogue with audio.
                          Click image for larger version  Name:	UE4_AudioProperties.PNG Views:	1 Size:	20.5 KB ID:	1580772
                          • Full documentation:
                            I worked hard and produced a comprehending guide on how to use the whole plugin! From the simple beginnings to the technical ends, I tried to give details in an educational way. Hope this is good. The document will be shipped with the plugin as a PDF and updated with each new version of the plugin.
                          Click image for larger version  Name:	UE4_Documentation.png Views:	1 Size:	64.7 KB ID:	1580771




                          I think I am slowly reaching a milestone where I might be able to ship a first version of the plugin. I will let you know and as always I am fully opened to feedback!
                          Last edited by CraftyWeazel; 02-04-2019, 08:02 PM.

                          Comment


                            #14
                            I have to say this is looking amazing. Looking forward to get my hands on it for my game!

                            Comment


                              #15
                              Hi there!

                              After a while (I just moved to China for work), I've been working again on my dialogue plugin and I'm proud to say that the first version of it is ready !
                              The team I'm in is going to use it on our project to get some fast feedbacks and solve the first bugs + make the first improvements. As is it an user-experience plugin in the end, I will make it evolve with user feedbacks.

                              However, I will soon make it purchasable on the MarketPlace for 24.99$. According to what I've seen and tried, I think it's a fair price, also considering that it will evolve to follow the needs.

                              Small update though, since last time:
                              • As I added important meta-data to nodes, like speaker's name, and it appears in the node title, maybe changing it's color etc., I made a small enhancement: when you create a new Line node by dragging a pin from another one, it copies its metadata. This way, when you're creating a dialogue with a specific character, it's pre-filling every node with this character's name.
                              • Some bug solving, tests and optimization.
                              • Example project to be shipped with the plugin (4.22), with features demonstration and an example of UI implementation.
                              • Plugin packaging for 4.22, on Win32, Win64, Mac, Linux, PS4, XboxOne, Switch, Android, SteamVR, GearVR (no iOS for now, I've got a compile issue...)

                              Comment

                              Working...
                              X