Godot Version
4.2
Question
Hey all! I’ve got a dialogue system I made not too long ago, works just fine for what I need but its a pain to author in. Its basically just an Array where I add on a single response at a time, its not too bad but makes tracking branching dialogue extremely difficult.
So I want to switch to a visual system for making the branching dialogue! I have looked some of the plugins that are around for dialogue management already, but none of them work well with the rest of my systems. I am working on a multiplayer game, so the saving and loading of progress in dialogue gets weird with some of these other plugins. Which means I need to make my own, what joy!
I have the initial parts of it working, where I can open a window and populate it with basic nodes. But it seems like it should come in with ports, and I am not getting any. And I can’t seem to find any information at all online. It looks like plugin designing is very very hard to find info on. Is there any info at all on how to create a dialogue plugin?
My current Code:
@tool
extends EditorPlugin
var graph_edit: GraphEdit
func _enter_tree():
graph_edit = GraphEdit.new()
graph_edit.set_size(Vector2(600, 400))
graph_edit.size_flags_horizontal = Control.SIZE_EXPAND_FILL
graph_edit.size_flags_vertical = Control.SIZE_EXPAND_FILL
graph_edit.minimap_enabled = false
add_control_to_dock(DOCK_SLOT_RIGHT_BL, graph_edit)
create_test_nodes()
func create_test_nodes():
for i in range(3):
var node = GraphNode.new()
node.title = "Dialogue Node " + str(i + 1)
graph_edit.add_child(node)
node.set_slot(0, true, 0, Color.RED, true, 0, Color.BLUE)
node.set_slot(1, true, 0, Color.GREEN, true, 0, Color.YELLOW)
But this is what the nodes look like:
So I am not seeing any of the ports. Any ideas on what to do here?
Any tutorials to follow for making GraphEdit things?