winget install --id=GDRETools.gdsdecomp -e
Godot reverse engineering tools.
Godot RE Tools is a reverse engineering software designed to assist in recovering and modifying Godot engine projects. It supports various versions of the engine, including 4.x, 3.x, and 2.x.
Key Features:
Audience & Benefit:
Ideal for game developers, modders, and researchers seeking to modify existing Godot games or access their original source code. The tool enables project recovery without needing the original development environment, facilitating modifications and reverse engineering efforts.
Available via winget for easy installation on Windows systems.
This module includes following features:
Full project recovery performs the following:
This module has support for decompiling Godot 4.x, 3.x, and 2.x projects.
Grab the latest release version from here: https://github.com/GDRETools/gdsdecomp/releases
On Windows, you can also install it from Scoop:
scoop bucket add games
scoop install gdsdecomp
gdre_tools --headless [options]
Main commands:
--recover= Perform full project recovery on the specified PCK, APK, EXE, or extracted project directory.
--extract= Extract the specified PCK, APK, or EXE.
--compile= Compile GDScript files to bytecode (can be repeated and use globs, requires --bytecode)
--decompile= Decompile GDC files to text (can be repeated and use globs)
--pck-create= Create a PCK file from the specified directory (requires --pck-version and --pck-engine-version)
--pck-patch= Patch a PCK file with the specified files
--list-bytecode-versions List all available bytecode versions
--txt-to-bin= Convert text-based scene or resource files to binary format (can be repeated)
--bin-to-txt= Convert binary scene or resource files to text-based format (can be repeated)
Recover/Extract Options:
--key= The Key to use if project is encrypted as a 64-character hex string,
e.g.: '000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F'
--output= Output directory, defaults to , or the project directory if one of specified
--scripts-only Only extract/recover scripts
--include= Include files matching the glob pattern (can be repeated)
--exclude= Exclude files matching the glob pattern (can be repeated)
--ignore-checksum-errors Ignore MD5 checksum errors when extracting/recovering
Decompile/Compile Options:
--bytecode= Either the commit hash of the bytecode revision (e.g. 'f3f05dc'), or the version of the engine (e.g. '4.3.0')
--output= Directory where compiled files will be output to.
- If not specified, compiled files will be output to the same location
(e.g. '/main.gd' -> '/main.gdc')
Create PCK Options:
--output= The output PCK file to create
--pck-version= The format version of the PCK file to create (0, 1, 2)
--pck-engine-version= The version of the engine to create the PCK for (x.y.z)
--embed= The executable to embed the PCK into
--key= 64-character hex string to encrypt the PCK with
Patch PCK Options:
--output= The output PCK file to create
--patch-file== The file to patch the PCK with (e.g. "/path/to/file.gd=res://file.gd") (can be repeated)
--include= Only include files from original PCK matching the glob pattern (can be repeated)
--exclude= Exclude files from original PCK matching the glob pattern (can be repeated)
--embed= The executable to embed the patched PCK into
--key= 64-character hex string to decrypt/encrypt the PCK with
**
res://**/*.gdc
matches res://main.gdc
, res://scripts/script.gdc
, etc.res://
or user://
res://*.gdc
will match all .gdc files in the root of the project, but not any of the subdirectories.res://
addons/plugin/main.gdc
is equivalent to res://addons/plugin/main.gdc
*.gdc
would be equivalent to res://**/*.gdc
res://main.gdc
. res://main.gd
is the source file of res://main.gdc
, but is not included in the project PCK.
res://main.gd
would not recover res://main.gd
.res://main.gdc
would recover res://main.gd
Use the same Godot tools version that the original game was compiled in to edit the project; the recovery log will state what version was detected.
Support has yet to be implemented for converting the following resources:
dae
, fbx
, glb
, etc.)There is no support for decompiling any GDNative/GDExtension or GDMono scripts. For Mono/CSharp, you can use Ilspy or dotPeek.
Clone this repository into Godot's modules
subfolder as gdsdecomp
.
Rebuild Godot engine as described in https://docs.godotengine.org/en/latest/development/compiling/index.html.
For ease of bootstrapping development, we have included launch, build, and settings templates for vscode in the .vscode directory. Once you have read the instructions for compiling Godot above and set up your build environment: put these in the .vscode folder in the Godot directory (not gdsdecomp), remove the ".template" from each, and launch vscode from the Godot directory.
Godot 4.0 (master branch) @ 1d8e738499fc10ae248bcb11653a681de42dc964
Assuming you compiled with scons platform=linuxbsd target=template_debug
,
$ bin/godot.linuxbsd.template_debug.x86_64.llvm --headless --path=modules/gdsdecomp/standalone --recover=
The source code of the module is licensed under MIT license.