nagidev / DialogueNodes

A plugin for creating, editing and using branching dialogues in Godot
MIT License
426 stars 26 forks source link

Save connections of Nodes regardless of being bound to the START Node #55

Open ch0m5 opened 1 day ago

ch0m5 commented 1 day ago

Problem

Current Save&Load system for DialogueData files seems to save and/or load connections based on whether they are connected to a START Node (be it themselves or by passing through other Nodes). I presume this is because the system follows a domino-based load starting from the START Node, so anything not bound to it, directly or otherwise, doesn't have its connections loaded.

This is not ideal as it can easily lead to the loss of a lot of data in the case of a branch of Nodes being disconnected from the START node.

Proposed Solution

It would be better if Save & Load of Node connections where Saved and Loaded regardless of their connections being related to the START Node. You store and load all nodes present in the graph and their respective connections, regardless of their relationship with the START Node.

Visual Showcase

https://github.com/user-attachments/assets/6a84f33b-d899-4e49-b741-1e44b48bb6f8

nagidev commented 1 day ago

I can get something working for this. Thanks for the suggestion!