I need to put an exported copy of my game into godot

Godot Version

The newest

Question

My character movement got deleted and i didn’t realize it until after id saved and closed the engine. It will take too long to rewrite it so i need a way to bring an earlier exported copy of my game into the engine.

Did you embed your pck file? You may be able to de-compile the project but it may not match your code exactly.

As with the second best time to plant a tree, it may be time to look into a source control solution like git

2 Likes

Thanks for the info, gertkeno. Just to clarify, if the exported game wasn’t embedded with the .pck file, does that mean there’s no way to recover the original GDScript or scenes from it? Also, has anyone here actually had success using GDRETools to restore parts of their project, like scripts or scenes, from a .pck? Curious about what’s realistically possible.

I actually figured it would be much harder to extract from an embedded export than a pack file; the linked program states it can extract from either.

I haven’t used this tool, but I know that Godot only exports the compressed files so it will not totally recover most resources. Textures for example are all in .ctex format. I could see GDScript when packed to binary tokens removing all comments and maybe (but unlikely) variable/function names, this also happens when de-compiling traditional programs.

is there a way to just find the code and copy and paste it, or do i have to follow all the steps and decompile it?

You have to follow the steps, but it’s really only a few:

  1. Download the decompiler here.
  2. Unzip it.
  3. Run it.
  4. Drag your EXE or PCK on top of it.
  5. Copy your scripts.

I also recommend you start using Github. I wrote a tutorial on it. Level 3: GitHub & Plugins — Dragonforge Development

I just tried it out and I was able to see all the scripts - minus all comments. (Which is to be expected.) Also in the .godot/imported folder I found all the images and sound files I had in the game. Plus I could preview them in the decompiler. This is a really nice tool. Thanks for pointing it out @gertkeno.

1 Like