After the initial release of the first version of this system I decided to remake the entire thing from scratch to not only make it perform better but for it to be far more flexible and customizable.
You can find the older version of this system here:
Now then, here’s a small preview of the dialogue system in action:
This is a very simple dialogue that I put together in a couple of minutes using the node presets I created for the dialogue system. Now here’s how it looks inside the node editor:
A dialogue starts with a DialogueRoot node. This is what determines the beginning of the exchange. From the root you can start branching out your dialogue with a selection of different nodes.
Here is a list of all the different nodes:
This is the search menu. It can be opened in the editor by pressing S. Every node you have in the NodePresets folder in ServerStorage will be displayed here. Now then, let’s start going over what each of these nodes do
Dialogue Root
Marks the beginning of a dialogue
Prompt
Displays a wall of text to the player.
Response
Gives the player options for responses during dialogue.
Command
Runs any code on the client side.
Condition
Condition nodes are used to select one node out of many using a function. For example: Select Node1 if player has over 100 Gold, otherwise select Node2. (More in depth instructions can be found in the condition module script)
Lock
Lock is used to lock certain paths that can be later unlocked. The Main Pathway is used to determine the locked node while the Toggle path is used to determine the node that you must get to in order to toggle the value of the lock.
Now then, here’s what you’ll need to get this up & running.
First off, the main framework. This is the node editor used to create & manipulate dialogue.
Side note regarding this plugin: This plugin is not made only for the dialogue system as it is an actual working system by itself and can be used for many other projects. I plan to make a separate dev forum post about this once I think it’s polished enough to have its own spotlight.
And then the dialogue system itself:
Here’s what it contains:
-
DialogueEvents contains the necessary remote event & bindable event for initiating dialogue. Location: ReplicatedStorage
-
NodePresets contains the necessary nodes for creating dialogue. This is utilized by the Node Editor plugin. Location: ServerStorage
-
DialogueUI is the main thing. This contains the UI and the code for the system to actually work. The given UI is not exactly meant to be used in a final product it’s more of a place holder to test the system. So if you have plans for the UI that fits your game better then do use that instead. The structure of the UI should be simple enough so modifying it to your needs shouldn’t be hassle. Location: StarterGui
-
TestDialogue is a quick example of dialogue made with the system that you can check out if you want a quick look of the system. Location: Wherever
If you don’t care to place all the stuff into the right places by hand you can also run this installation code inside studio:
local Folder = workspace:FindFirstChild("DialogueSystem",true)
if game.ServerStorage:FindFirstChild("NodePresets",true) then
for _,Node in pairs(Folder.NodePresets:GetChildren()) do
Node.Parent = game.ServerStorage:FindFirstChild("NodePresets",true)
end
else
Folder.NodePresets.Parent = game.ServerStorage
end
Folder.DialogueEvents.Parent = game.ReplicatedStorage
Folder.DialogueUI.Parent = game.StarterGui
Folder.TestDialogue.Parent = workspace
Folder:Destroy()
And now you should be all set! To initiate a dialogue, you must simply fire either the bindable- or the remote event inside the DialogueEvents folder and send a dialogue configuration as an argument. For example:
But wait, there’s more!
With the dialogue configuration you can also send dialogue parameters. These are used to determine wether or not the dialogue should close if you walk too far away from a certain position. They can be also used to set the speaker of the dialogue aka the thing you’re talking to. You can also manipulate it directly inside the UI using command nodes if you for example want to have multiple characters talk to you.
Here’s an example of the parameters being used:
And that should be all! If something was left unclear, let me know. I would also love to hear what you think of the plugin and the system. If you have any cool ideas or features you’d like to see in future updates then let me know as well. And while not necessary; if you do end up using this in your own projects I would really appreciate being credited.
If you liked this, I highly encourage you to check out my other work as well:
That’s all! Thank you for stopping by and I hope you have a nice day!
-Sol