Skip to content

Improve load/save files situation - #3051

Merged
manuq merged 13 commits into
mainfrom
load-save-files
Oct 23, 2026
Merged

manuq merged 13 commits into
mainfrom
load-save-files

Conversation

@manuq

@manuq manuq commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

When loading a scene or resource file in the editor and immediately saving them without doing anything, the file on disk shouldn't change! This can be verified by running Project -> Tools -> Upgrade Project Files from within the Godot editor.

This PR fixes most of them currently happening, except for:

  • 14 files below addons/dialogue_manager/, which change for a number of reasons. Since this is third-party, I'm ignoring them.
  • scenes/quests/story_quests/el_hilo_que_no_teji/1_stealth/el_hilo_que_no_teji_stealth.tscn - Seems to change every time because of editable children combined with the new dither material, which has local-to-scene.
  • scenes/quests/story_quests/shjourney/8_shjourney_outro/Outro.tscn - This is because how Godot saves connections. A bug report for this already exists upstream at Connection order in .tscn file unpredictable and unstable godotengine/godot#119532

scenes: Store the debug color that InteractArea sets

This is the result of running "upgrade all project files" from the Project menu.

scenes: Commit project files changed by hand

Apply the changes that Godot 4.7 makes when saving these files. So opening and
saving them in the editor no longer produces a diff.

scenes: Store values written by tool scripts

grappling_hook_powerup: Restore editable children of Void enemy

This was removed by mistake in #2989. Without it, the editor drops the speeds
override of its PathWalkBehavior on save.

Also store the walking path that the Void spreading enemy assigns to its
PathWalkBehavior from the idle patrol path, in all the scenes where it has
editable children.

Reset animations played in editor before saving

Some tool scripts play their sprite animation in the editor, so the current
frame and its progress were stored in the scene every time it was saved,
producing a random diff.

Do as done already in character_sprite_behavior.

Character randomizer test: Update to the current Threadling scene

storyquests: Fix stale resource paths and properties

The editor rewrites these on save because the stored values are out
of date.

Legends Without Name: Store SpriteFrames as the editor saves them

And also remove leftover SpriteFrames .tres file.

El hilo que no tejí: Add missing UIDs

El hilo que no tejí: Store new shader parameters in materials

It looks like more uniforms were added after the materials were created. So
opening and saving in the editor changes the resource files.

El hilo que no tejí: Do not generate a texture in the editor

This StoryQuest has a very custom collectible, that generates a scaled-down
texture. At least, don't regenerate it when running in the editor.

This helps, but doesn't solve entirely the diff when opening and saving the
el_hilo_que_no_teji_stealth.tscn file.

Shjourney: Remove stale overrides of the Laberinto collectible

The collectible had editable children only to override its action text and
sprite texture. After the collectible was refactored, these overrides point to
nodes that no longer exist.

Resolve #2991

manuq added 7 commits October 23, 2026 11:07
This is the result of running "upgrade all project files" from the Project menu.

Helps #2991
Apply the changes that Godot 4.7 makes when saving these files. So opening and
saving them in the editor no longer produces a diff.

Helps #2991
The editor rewrites these on save because the stored values are out
of date.

Helps #2991
Some tool scripts play their sprite animation in the editor, so the current
frame and its progress were stored in the scene every time it was saved,
producing a random diff.

Do as done already in character_sprite_behavior.

Helps #2991
It looks like more uniforms were added after the materials were created. So
opening and saving in the editor changes the resource files.

Helps #2991
@github-actions

Copy link
Copy Markdown

Play this branch at https://play.threadbare.game/branches/endlessm/load-save-files/.

(This launches the game from the start, not directly at the change(s) in this pull request.)

manuq added 6 commits October 23, 2026 13:45
This was removed by mistake in #2989. Without it, the editor drops the speeds
override of its PathWalkBehavior on save.

Also store the walking path that the Void spreading enemy assigns to its
PathWalkBehavior from the idle patrol path, in all the scenes where it has
editable children.

Helps #2991
The collectible had editable children only to override its action text and
sprite texture. After the collectible was refactored, these overrides point to
nodes that no longer exist.

Helps #2991
This StoryQuest has a very custom collectible, that generates a scaled-down
texture. At least, don't regenerate it when running in the editor.

This helps, but doesn't solve entirely the diff when opening and saving the
el_hilo_que_no_teji_stealth.tscn file.

Helps #2991
@manuq
manuq marked this pull request as ready for review October 23, 2026 18:10
@manuq
manuq requested review from a team as code owners October 23, 2026 18:10
@manuq manuq changed the title Load save files Improve load/save files situation Oct 23, 2026
@manuq
manuq merged commit cd5d5b5 into main Oct 23, 2026
7 checks passed
@manuq
manuq deleted the load-save-files branch October 23, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Unsaved Local Changes" warning when joining Backstitch project

1 participant