Giter Site home page Giter Site logo

gdsdecomp's Introduction

Godot RE Tools

This software in an alpha stage. Please report any bugs on the github page.

Introduction

Code Screenshot

This module includes following features:

  • Full project recovery
  • PCK archive extractor / creator.
  • GDScript batch decompiler.
  • Resource text <-> binary batch converter.

Full project recovery performs the following:

  • Loads project resources from an APK, PCK, or embedded EXE file
  • Decompiles all GDScript scripts
  • Recovers the original project file
  • Converts all imported resources back to their original import formats
  • Converts any auto-converted binary resources back to their original text formats
  • Recreates any plugin configuration files

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/bruvzg/gdsdecomp/releases

Usage

GUI

  • To perform full project recovery from the GUI, select "Recover project..." from the "RE Tools" menu: Menu screenshot
  • If the project is encrypted, select the "Set encryption key..." menu option first first and enter the key.
  • In the file dialog, select the apk, pck, or embedded exe you want to recover:

File dialog

  • In the PCK explorer dialog, select "Full Recovery" or "Extract Only", then select the directory you want to recover the project to, then click "Extract...":

Recovery dialog screenshot

  • After it finishes, it will pop up a recovery box telling you the location of the log file, what editor version you should use when editing the recovered project, report any non-recovered assets:

Recovery log

Command Line

Example:

gdre_tools --headless --recover=game.pck

Main arguments:

  • --recover=<pck/exe/apk> : Perform full project recovery on the specified PCK/EXE/APK.
  • --extract=<pck/exe/apk> : Perform extraction only (no resource conversion) on the specified PCK/EXE/APK

Optional arguments:

  • --output-dir=<out_dir> : Output directory, defaults to <NAME>_extracted, or the project directory if one is specified
  • --key=<key> : The Key to use if PAK/EXE/APK is encrypted (64 character hex string)
  • --ignore-checksum-errors : Ignore MD5 errors during PCK checking and perform recovery/extraction anyway

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.

Limitations

Support has yet to be implemented for converting the following resources:

  • Bitmap and image fonts (recovering 4.x TTF/OTF fontfiles is supported)
  • Models (obj, dae, fbx, glb, etc.)

Support for converting certain resources is limited:

  • Recovered .csv translation files will likely have missing keys; this is due to .translation files only storing the hashes of the keys. It is recommended to just politely ask the developer if you want to add additional translations.

In addition, it does not support decompiling any GDNative/GDExtension or GDMono scripts. For Mono/CSharp, you can use Ilspy or dotPeek.

Compiling from source

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.

Requirements

Godot 4.0 (master branch) @ daeb1c7292cbb426fd45c5ca98b1c7da40b390ba

  • Support for building on 3.x has been dropped and no new features are being pushed
    • Godot RE Tools still retains the ability to decompile 3.x and 2.x projects, however.

Standalone

Assuming you compiled with scons platform=linuxbsd target=template_debug,

$ bin/godot.linuxbsd.template_debug.x86_64.llvm --headless --path=modules/gdsdecomp/standalone --recover=<pck/apk/exe>

License

The source code of the module is licensed under MIT license.

gdsdecomp's People

Contributors

bruvzg avatar cgytrus avatar cypelf avatar linuxusergd avatar lock-the-door avatar lufog avatar nikitalita avatar polybiusproxy avatar raylu avatar the-thirtyfour avatar whoozle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gdsdecomp's Issues

convert translations

I started adding support for converting .translation files to something plaintext, but I ran into a v3-v4 issue

        } else if (importer == "csv_translation") {
            err = export_translation(output_dir, iinfo);
Error ImportExporter::export_translation(const String &output_dir, Ref<ImportInfo> &iinfo) {
    Error err;
    Ref<Translation> tr = ResourceLoader::load(iinfo->get_path(), "", ResourceFormatLoader::CACHE_MODE_IGNORE, &err);
    ERR_FAIL_COND_V_MSG(err != OK, err, "Could not load translation file " + iinfo->get_path());
    ERR_FAIL_COND_V_MSG(!tr.is_valid(), err, "Translation file " + iinfo->get_path() + " was not valid");
    List<StringName> messages;
    tr->get_message_list(&messages);
    for (const StringName &s : messages) {
        print_line(s, tr->get_message(s));
    }
}

this gives me

ERROR: Cannot get class 'PHashTranslation'.
   at: instantiate (core/object/class_db.cpp:325)
ERROR: res://translations.en.translation:Resource of unrecognized type in file: PHashTranslation.
   at: load (core/io/resource_format_binary.cpp:781)
ERROR: Failed loading resource: res://translations.en.translation. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (core/io/resource_loader.cpp:228)
ERROR: Could not load translation file res://translations.en.translation

based on https://github.com/godotengine/godot/blob/72b845b28773dd40adf6f55b226fb732910cbf14/editor/project_converter_3_to_4.cpp#L1493, PHashTranslation seems to be the name of OptimizedTranslation in v3

calling ClassDB::add_compatibility_class("PHashTranslation", "OptimizedTranslation"); ahead of time causes a segfault when I try to load it, so they don't seem to be compatible

I'm not really sure where to go from here. gdsdecomp doesn't build against v3 and I'm not sure how it's able to load other v3 assets

Unpack project.binary

Can the project.binary file be decompiled also? If not then this could be an enhancement idea.
I've forgotten my "pixel perfect" settings that I made 3 years ago and would be nice to also be able to do that.

Error compiling with 3.1.1-stable in Windows?

I get the following error when I try to compile the module with the source for 3.1.1-stable

scons: Building targets ...
[ 70%] Compiling ==> modules\gdsdecomp\editor\gdre_editor.cpp
gdre_editor.cpp
modules\gdsdecomp\editor\gdre_editor.cpp(24): fatal error C1083: Cannot open include file: 'core/crypto/crypto_core.h': No such file or directory
scons: *** [modules\gdsdecomp\editor\gdre_editor.windows.tools.64.obj] Error 2
scons: building terminated because of errors.

There doesn't seem to be any crypto folder inside core

Decompiling scripts with strings containing escape sequences

If script defines strings with special symbols, decompiled script will leave them unescaped. In result strings with new line symbols will ruin script formatting. Attempting recompiling such scripts will generate empty gdc file without any error message.

For example string "\n\nText.\n" will be decompiled like this:
var text = "

Text.
"

Build fails on latest master of Godot

[Initial build] Compiling thirdparty/glslang/glslang/OSDependent/Unix/ossource.cpp ...
[Initial build] Compiling modules/gdsdecomp/register_types.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_015d36d.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_054a2ac.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_0b806ee.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_1a36141.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_1add52b.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_1ca61a3.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_216a8aa.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_2185c01.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_23381a5.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_23441ec.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_30c1229.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_31ce3c5.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_3ea6d9f.cpp ...
[Initial build] Compiling modules/glslang/register_types.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_48f1d02.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_4ee82a2.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_506df14.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_513c026.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_514a3fb.cpp ...
[Initial build] Linking Static Library modules/libmodule_glslang.linuxbsd.opt.tools.64.a ...
Ranlib Library modules/libmodule_glslang.linuxbsd.opt.tools.64.a ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_5565f55.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_5e938f0.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_6174585.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_620ec47.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_62273e5.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_64872ca.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_65d48d6.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_6694c11.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_703004f.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_7124599.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_7d2d144.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_7f7d97f.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_85585c7.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_8aab9a0.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_8b912d1.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_8c1731b.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_8cab401.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_8e35d93.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_91ca725.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_97f34a1.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_a3f1ee5.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_a56d6ff.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_a60f242.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_base.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_be46be7.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_c00427a.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_c24c739.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_c6120e7.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_d28da86.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_d6b31da.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_e82dc40.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_ed80f45.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_f3f05dc.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_f8a7c46.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_ff1e7cf.cpp ...
[Initial build] Compiling modules/gdsdecomp/bytecode/bytecode_versions.cpp ...
[Initial build] Compiling modules/gdsdecomp/editor/gdre_cmp_dlg.cpp ...
[Initial build] Compiling modules/gdsdecomp/editor/gdre_dec_dlg.cpp ...
[Initial build] Generating default project theme icons header.
[Initial build] Compiling modules/gdsdecomp/editor/gdre_editor.cpp ...
[Initial build] Compiling modules/gdsdecomp/editor/gdre_enc_key.cpp ...
modules/gdsdecomp/editor/gdre_editor.cpp: In member function 'void GodotREEditor::init_gui(Control*, HBoxContainer*, bool)':
modules/gdsdecomp/editor/gdre_editor.cpp:413:41: error: 'AUTOWRAP_WORD_SMART' is not a member of 'Label'
  413 |   about_label->set_autowrap_mode(Label::AUTOWRAP_WORD_SMART);
      |                                         ^~~~~~~~~~~~~~~~~~~
scons: *** [modules/gdsdecomp/editor/gdre_editor.linuxbsd.opt.tools.64.o] Error 1
scons: building terminated because of errors.
[Time elapsed: 00:12:50.954]

This is on f41cb30f9b7fe46a014162aba9c0e9a9697343d2 of Godot building with /usr/bin/env python3 $(which scons) platform=linuxbsd -j4 target=release_debug.

According to the requirements in the readme, I'm supposed to be using Godot 4.0.

Relacing Label:AUTOWRAP_WORD_SMART with TextServer:AUTOWRAP_WORD_SMART fixes it, it seems.

MacOS Could Not Initialize Vulkan On Godot 4.0 Beta Build

I get the error in a prompt

Your video card driver does not support any of the supported Vulkan or OpenGL versions.

when running this newest build https://github.com/bruvzg/gdsdecomp/actions/runs/2283325472

In the terminal it outputs

barens-MacBook-Pro:~ blake$ /Users/blake/Downloads/GDRE\ Tools.app/Contents/MacOS/GDRE\ Tools --verbose
arguments
0: /Users/blake/Downloads/GDRE Tools.app/Contents/MacOS/GDRE Tools
1: --verbose
Current path: /Users/blake
TextServer: Added interface "ICU / HarfBuzz / Graphite"
TextServer: Added interface "Fallback"
Godot Engine v4.0.dev.custom_build.489f11ee0 - https://godotengine.org
ERROR: Could not initialize Vulkan
   at: DisplayServerOSX (platform/osx/display_server_osx.mm:3789)

I am running MacOS 10.14.6 on a Macbook Pro Mid 2015 model.

Compiling errors caused by absense of files inside a `core` folder that does not exist

I have been attempting to compile gdsdecomp as described in the readme, by placing gdsdecomp within modules (using Godot 3.3.4, the most recent release) and then compiling godot as normal, but I receive this error each time:

modules\gdsdecomp\register_types.cpp(6): fatal error C1083: Cannot open include file: 'core/object/class_db.h': No such file or directory
scons: *** [modules\gdsdecomp\register_types.windows.tools.64.obj] Error 2
scons: building terminated because of errors.

I do not understand this error, but to my understanding no core folder exists in gdsdecomp, and the class_b.h file in godot 3.3.4 is located within core itself, and no core/object folder seems to exist. Whatever is occuring, it seems to be caused by files that are being included in the files but do not actually exist as the folder they would be in is absent, and the corresponding files from godot are in completely different folders within core

Program impossible to use on smaller resolution monitors

When trying to use the program on a smaller resolution monitors the popups are too large to work with, and they are also unresizeable, resizing cursor shows up but does not do anything.
Here is an image that shows this issue
image
The extract button is completely unreachable

.glb files aren't recovered

When I recover a game, the .glb files are missing from the output folder. Just the .import files are in it

decomp error

"""
test
"""
var a=1 if OS.get_name()=="test" else 2

decomp result:
"
test
"
var a=1if OS.get_name()=="test"else 2

CI build failing on Windows due to hanging on initial project import

It looks like the current build on Windows gets to ${{ matrix.command-export }} --no-window -e -q --audio-driver Dummy ${{ matrix.command-postfix }} before hanging; it looks like it doesn't actually quit with -q. Uncertain as to why; the current master may not be compatible with the version of swiftshader we're using, or may be a bug introduced in godot. Will take a look later this month.

scripts from a godot 2.1.3 project

helloo, it's me again

i'm so sorry to bother you with these issues, i'd like to be able to resolve them myself.

i have one or two quick questions. i'm trying to get back old scripts from a game made with godot 2.1.3.

you say in the readme that i would need to use the module with godot 2.1.3 engine to decompile the .gdc scripts into .gd, but the module is only compatible with 3.1 ?
I tried to decompile those files with a 3.1 build but whenever i do this godot freezes and become unresponsive (it still use more and more memory in the task manager so i first assumed it was working on the key encryption and tried to get the key back by disassembling the .exe but i could not find it)
I also desperately tried to add the module to a 2.1.3 build but it didn't work, i got an issue with scons

Do you plan to make the module compatible with older builds of the engine in the future ?
or do you think it's related to the encryption key as i first thought ? in this case do you have any idea on how to get it from the exe since i can't seem to be able to find it ? i'm really not very good with the disassemblers and everything

thanks a lot, i'm really impressed by your work !

Getting Started - Linux

Greetings,

It's not quite clear from the README how to get started as a godot newbie (on linux). I messed around by checking out the 3.2 branch here, and downloaded a few versions of godot (3.2.2 stable - headless&server&x11; 3.1 stable - headless&server; 3.1-beta6 - x11; and a local scons build of 3.2.2 stable). Wasn't able to get a functioning version under any of those on Ubuntu 16.04.7 (kernel 4.15.0-115-generic). I assumed one of the above would satisfy the requirements for Godot 3.x, but no dice.

I figured it would be possible to run with something like:
bin/godot_server.x11.tools.64 --path ~/dev/gdsdecomp/standalone

But that's where I get errors such as
ERROR: is_class_enabled: Cannot get class 'GodotREEditorStandalone'.
At: core/class_db.cpp:1329.

Or, if I ran:
~/Downloads/godot/Godot_v3.2.2-stable_linux_server.64 ~/dev/gdsdecomp/standalone/project.godot
Then I'd get:
ERROR: is_class_enabled: Condition "!ti" is true. Returned: false
At: core/class_db.cpp:1329.

Note: for the godot executable (which shall remain nameless) I'm looking into, I was able to successfully do the README sections for "To detect Godot version" and "To detect GDScript version"

Any attention and/or tips would be appreciated. Thanks
~ririmudev

error building on windows

=====
b'modules\\gdsdecomp\\utility\\image_parser_v2.cpp: In static member function \'static String ImageParserV2::image_v2_to_string(const Variant&)\':\nmodules\\gdsdecomp\\utility\\image_parser_v2.cpp:85:29: error: \'FORMAT_PVRTC1_2\' is not a member of \'Image\'\n   85 |                 case Image::FORMAT_PVRTC1_2:\n      |                             ^~~~~~~~~~~~~~~\nmodules\\gdsdecomp\\utility\\image_parser_v2.cpp:88:29: error: \'FORMAT_PVRTC1_2A\' is not a member of \'Image\'\n   88 |                 case Image::FORMAT_PVRTC1_2A:\n      |                             ^~~~~~~~~~~~~~~~\nmodules\\gdsdecomp\\utility\\image_parser_v2.cpp:91:29: error: \'FORMAT_PVRTC1_4\' is not a member of \'Image\'\n   91 |
        case Image::FORMAT_PVRTC1_4:\n      |                             ^~~~~~~~~~~~~~~\nmodules\\gdsdecomp\\utility\\image_parser_v2.cpp:94:29: error: \'FORMAT_PVRTC1_4A\' is not a member of \'Image\'\n   94 |                 case Image::FORMAT_PVRTC1_4A:\n      |                             ^~~~~~~~~~~~~~~~\nmodules\\gdsdecomp\\utility\\image_parser_v2.cpp:118:127: error: \'FORMAT_PVRTC1_4A\' is not a member of \'Image\'\n  118 |                         subimgstr = ", " + itos(Image::get_image_required_mipmaps(img->get_width(), img->get_height(), Image::FORMAT_PVRTC1_4A)) + ", ";\n      | 
      ^~~~~~~~~~~~~~~~\nmodules\\gdsdecomp\\utility\\image_parser_v2.cpp: In static member function \'static Error ImageParserV2::write_image_v2_to_bin(FileAccess*, const Variant&, PropertyHint)\':\nmodules\\gdsdecomp\\utility\\image_parser_v2.cpp:206:37: error: \'FORMAT_PVRTC1_2\' is not a member of \'Image\'\n  206 |                         case Image::FORMAT_PVRTC1_2: {\n      |                                     ^~~~~~~~~~~~~~~\nmodules\\gdsdecomp\\utility\\image_parser_v2.cpp:209:37: error: \'FORMAT_PVRTC1_2A\' is not a member of \'Image\'\n  209 |                         case Image::FORMAT_PVRTC1_2A: {\n      |                                     ^~~~~~~~~~~~~~~~\nmodules\\gdsdecomp\\utility\\image_parser_v2.cpp:212:37: error: \'FORMAT_PVRTC1_4\' is not a member of \'Image\'\n  212 |                         case Image::FORMAT_PVRTC1_4: {\n      |                                     ^~~~~~~~~~~~~~~\nmodules\\gdsdecomp\\utility\\image_parser_v2.cpp:215:37: error: \'FORMAT_PVRTC1_4A\' is not a member of \'Image\'\n  215 |                         case Image::FORMAT_PVRTC1_4A: {\n      |                                     ^~~~~~~~~~~~~~~~\nmodules\\gdsdecomp\\utility\\image_parser_v2.cpp:237:121: error: \'FORMAT_PVRTC1_4A\' is not a member of \'Image\'\n  237 |                                 mipmaps = Image::get_image_required_mipmaps(val->get_width(), val->get_height(), Image::FORMAT_PVRTC1_4A);\n      |                                                                                                                         ^~~~~~~~~~~~~~~~\nmodules\\gdsdecomp\\utility\\image_parser_v2.cpp: In static member function \'static Error ImageParserV2::parse_image_v2(FileAccess*, Variant&, bool, bool)\':\nmodules\\gdsdecomp\\utility\\image_parser_v2.cpp:325:46: error: \'FORMAT_PVRTC1_2\' is not a member of \'Image\'\n  325 |                                 fmt = Image::FORMAT_PVRTC1_2;\n      |                                              ^~~~~~~~~~~~~~~\nmodules\\gdsdecomp\\utility\\image_parser_v2.cpp:328:46: error: \'FORMAT_PVRTC1_2A\' is not a member of \'Image\'\n  328 |                                 fmt = Image::FORMAT_PVRTC1_2A;\n      |                                              ^~~~~~~~~~~~~~~~\nmodules\\gdsdecomp\\utility\\image_parser_v2.cpp:331:46: error: \'FORMAT_PVRTC1_4\' is not a member of \'Image\'\n  331 |                                 fmt = Image::FORMAT_PVRTC1_4;\n      |                                              ^~~~~~~~~~~~~~~\nmodules\\gdsdecomp\\utility\\image_parser_v2.cpp:334:46: error: \'FORMAT_PVRTC1_4A\' is not a member of \'Image\'\n  334 |
              fmt = Image::FORMAT_PVRTC1_4A;\n      |                                              ^~~~~~~~~~~~~~~~\n'
=====
scons: *** [modules\gdsdecomp\utility\image_parser_v2.windows.opt.tools.64.o] Error 1
scons: building terminated because of errors.
[Time elapsed: 00:02:09.109]

OS: Windows 11 x64
Using MinGW

Error while building on Linux with 3.2

Following the instructions I get this error when building with the 3.2 branch of Godot.

modules/gdsdecomp/register_types.cpp:6:10: fatal error: core/object/class_db.h: No such file or directory
    6 | #include "core/object/class_db.h"

Building on the master branch produces another String related error that I do not think has anything to do with gdsdecomp

error while rebuilding Godot

hey, thank you for this program. I am trying to rebuild Godot with your module, but i systematically end up getting this error :

image

the translation could roughly be :
"the expression has not been evaluated in constant
failure is due to reading an obsolete variable
see the use of 'bufsize' "

it points to these four identical lines in the code :

uint8_t buf[bufsize];

do you have any idea on how to fix that ? thanks a lot.

Document a high level explanation of how "decompilation" works.

Since Godot documentation says absolutely nothing about how the pck file is created/packed and how exacly scripts are "compiled", a huge number of developers will be very grateful if at least somewhere the whole process is clearly explained, and because this project did a great job of reverse engineering everything I can't think of a better place to ask for this.

Fix MacOS CI by adding `universal` template export

Godot project exports for MacOS now require a universal export template in order to run natively on ARM macs. I am not sure how to do this with github actions, and it doesn't seem like Godot's github CI does this? @bruvzg , do you know how to compile an arm binary on Github actions?

Nonexistent function 'set_key' in base 'PckDumper'

Version v0.0.9 will return this error when using the "key" argument and not decompile the scripts.

SCRIPT ERROR: Invalid call. Nonexistent function 'set_key' in base 'PckDumper'.
          at: dump_files (res://gdre_main.gd:64)

Cannot convert project.binary back to text

Hi there, after unpacking a .pck I want to convert the project.binary back to text, however when doing so on the latest MacOS release I get this error in the output:
screenshot

And when running in terminal this is my output:

ERROR: Unable to recognize  '/Users/blake/Downloads/May Rocket Export/project.binary'.
   at: open (modules/gdsdecomp/utility/resource_loader_compat.cpp:224)
ERROR: Cannot open resource '/Users/blake/Downloads/May Rocket Export/project.binary'.
   at: convert_bin_to_txt (modules/gdsdecomp/utility/resource_loader_compat.cpp:24)

I am running macOS 10.14.6 on a MacBook Pro (Retina, 15-inch, Mid 2015)

The version I am running of GDRE is GDRE_tools-standalone-osx from this build: https://github.com/bruvzg/gdsdecomp/actions/runs/2399523878

Support usage outside the Godot engine, as a standalone program

Hello, I would suggest to create another version of the project besides the Godot module.
It would be way easier to use, as it's not the easiest thing to have to recompile the Godot engine with this module.
With the module already working great, this would be awesome to just be able to download and run a standalone version to use it directly.

Get the decryption key

Hello,

I'm painfully trying to get the decryption key for .gde files, do you have an advice on how to get it from the exe or else ? Or do you plan on adding an option to get the key directly in the gdsdecomp module ?

thanks

[Suggestion] - a way to decompile .cs files

In a process of recovering some of my oldest projects I stumbled upon an interesting "bug" โ€” gdsdecomp doesn't know what to do with .cs files and leaves it empty. Tried full recovery with .8 and .9, both hadn't succeded.

Would be cool if there'd be a way to restore them as well.

[Suggestion] - Section for the best ways to secure your Godot application?

I know there is a small portion in the official godot docs, but I think it would be relevant/beneficial in this repo as well. Maybe a section for tricks to "maximize the security" of your Godot app? For example, changing the XOR key before compiling adds one extra step the hacker has to do, etc.

Awesome repo btw, I'm learning a lot.

Illegal Construction Variable

Hello
When I try to recompile Godot in version 3.4.2 I get the error
scons: *** Illegal construction variable module_gdsdecomp-3.x_enabled'
File "/home/john/Documents/Godot Decompile/godot-3.4.2-stable/SConstruct", line 288, in `

I can compile Godot without this fine, and I used gdsdecomp-3.x as well

Error while using cli (linux)

Note: I'm currently using ubuntu 20.04.2

when trying to do a "Full Project Export" i'm getting the following error:

Godot Engine v3.3.3.rc.custom_build.4d48e3334 - https://godotengine.org
OpenGL ES 3.0 Renderer: Mesa Intel(R) HD Graphics 5500 (BDW GT2)
OpenGL ES Batching: ON
/lib/x86_64-linux-gnu/libasound.so.2: undefined symbol: snd_dlpath
 
ERROR: move_child: Parent node is busy setting up children, move_child() failed. Consider using call_deferred("move_child") instead (or "popup" if this is from a popup).
   At: scene/main/node.cpp:332.

Resync with 4.0 after 4.0 beta release

I'm waiting to resync with 4.0 until it enters beta to be sure that there are no other major breaking changes in the API for the eventual 4.0 release.

Unable to Compile Godot

I am unable to compile Godot with gdsdecomp because there is no module called stb_vorbis, the error states:
modules\gdsdecomp\editor\gdre_editor.cpp(20): fatal error C1083: Cannot open include file: 'modules/stb_vorbis/audio_stream_ogg_vorbis.h': No such file or directory
scons: *** [modules\gdsdecomp\editor\gdre_editor.windows.tools.64.obj] Error 2
scons: building terminated because of errors.

Error importing StreamTextures2D

While decompiling my friend's game (for fun), I found that there're some export errors with StreamTexture2D. Here's what I have found.

ERROR: Resource F:/Downloads/GDRE_tools-standalone-windows/Test-Woodland/ does not exist
   at: (modules\gdsdecomp\utility\gdre_settings.cpp:369)
ERROR: Can't open texture file
   at: (modules\gdsdecomp\utility\texture_loader_compat.cpp:29)
WARNING: Failed to load texture StreamTexture2D
     at: ImportExporter::export_imports (modules\gdsdecomp\utility\import_exporter.cpp:337)

Hopefully it should help.

closes after starting

i am on win11 and when I start it, first it shows the window, then immediately closes.
Where can I find the log files that I can send in?

Issue with decompiling

currently there is an issue with negative match cases being indented incorrectly, how it is:
image
how it should be:
image

new release version ?

hi,
I downloaded gdretools_linux64_0.0.6.zip , i think it is old version ,but it's work ๐Ÿ‘
can you update new release version? because i can't compile godot source on linux ...
thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.