X

Dialogue System Tool

School

2024

C#

Godot

About

The dialogue system tool is a school project that I have created in Godot, where you can connect nodes to eachother that have dialogue text inside of them and that you can export to json.

Info

  • Duration: 5 weeks
  • Language: C#
  • Tools: Godot

Proces

The project required the ability to load, edit, and export/save data.

I decided to create a dialogue system tool because, when developing dialogue systems in Unity, managing extensive text and branching dialogues becomes difficult. Typically, dialogue is stored in lists, but dialogue branching based on user choices complicates this, especially if branches loop back. Therefore, I wanted a visual system to display dialogues and their branching paths clearly. With this goal in mind, I began working on the graph view and graph nodes.

Connecting Nodes

To connect nodes in Godot, I had to use code since the editor doesn't support this feature directly. Godot requires specifying connection points and child objects in the hierarchy. Once I figured this out, I was able to connect nodes and add text.

Saving Files

I aimed to save both a 'project' file and an 'export' file. I saved both files in a JSON format with the 'project' file having a custom extension. Godot's beautiful UI framework allowed me to create windows, header buttons, and file dialogs for saving and loading these files easily.

Connection Issues

The improper loading of node connections was a challenge. The engine sometimes failed to set the saved names, causing mismatched connection points. I resolved this by using UUIDs instead of words for names, which eliminated the issue.

Project and Export Files

When saving the 'project' file, I included the node ID, connections, position, size, title, and content. For the JSON export, I included the node ID, connections, title, and content. This data allows other programs, like Unity, to read the dialogue and determine branching paths based on the amount of connected nodes.

Result

This was my first time using Godot and what I learned from this is how to design, create and export applications and/or games in Godot. This was a fun project to make and I enjoyed working with a different engine for a change.