gdsdecomp icon indicating copy to clipboard operation
gdsdecomp copied to clipboard

[FR] Convert project.godot back to binary

Open Kein opened this issue 1 year ago • 3 comments

Much like with GDscript compilation - an ability to compile project file to binary

Kein avatar Dec 15 '24 18:12 Kein

What's the use case for this?

nikitalita avatar Dec 19 '24 21:12 nikitalita

Manual patching and repacking. As of now you have to pack and extract whole project and this way you also cannot redistribute the solution.

Kein avatar Dec 20 '24 08:12 Kein

This should be straightforward to implement, as it can be done using ProjectSettings.save_custom() and a file name that ends in .binary. (Save it to a temporary location if needed, as there's no method to get the file contents as a PackedByteArray without saving it.)

The difficulty is that you need to load these project settings somehow to be able to save them, so you may have to run an instance of the project and inject a script that calls ProjectSettings.save_custom() in _init().

That said, since you mention redistributable solutions (e.g. modding), I would recommend https://github.com/GodotModding/godot-mod-loader instead.

Calinou avatar Sep 10 '25 22:09 Calinou