Tool GAME RIPPER (decrypt and extract Ren'Py, Godot, Unity, Unreal, WolfRPG, RPGM XP/VX/Ace/MZ/MV, PGMMV, GMS, APK, JAR, WASM, EXE etc.)

5.00 star(s) 1 Vote

justaplayer69

Member
Nov 29, 2023
221
279
Hey justaplayer69 are you planning on adding functionality for decrypting godot GDScript files?
I have not, because I did not need this, but if you guys want this feature, I can take a look.
I tried to use your tool but it just saved every gdscript file as gde(encrypted gdscript). I know that i can manually define the decryption key
That's a different key. There's a decryption key to decrypt the pack files, this is what you can specify manually. This is solely used to extract files, gdscript is a totally different kind of beast.
but the thing is i dont know it and i hoped that your tool could automatically detect it somehow.
I'll look into it.
I tried to use but it failed to find it. I also tried statically searching for it in the executable but i couldnt find it with ghidra.
Yep, not easy to use, and even if it worked, godot-key-extract looks for the unpacking decryption key and not the gdscript key.
Thanks, I'll take a look, but no promises. I haven't researched yet how gdscripts are encoded, it is possible that they are not using any key rather a bytecode or something. I'll let you know when I've figured it out and if it's doable.
where does the unpatch files located after I click unpack all?
Depends on the engine.

For RPG Maker, they are extracted next to the encrypted file but with normal extension (eg. img/pictures/AAA.rpgmvp will be saved to img/pictures/AAA.png). For Pixel Game Maker, the encrypted assets will be simply replaced with unencrypted assets (because they are using the same file name, and the engine can work with unencrypted assets just fine).

For WolfRPG, Unity, Ren'Py and other archive based engines, a directory by the same name as the archive is created and files are extracted under (for example Data.wolf will be unpacked into the Data\ directory; files in Game\archive.rpa will be extracted under Game\archive\ etc.).

The exception to this rule is Godot, those archives are extracted to the filenames as Godot references them (it's just leading dots are replaced with an underscore). For example if a Godot resource is referenced as "res://.godot/imported/AAA.ctex", then that will be extracted to _godot\imported\AAA.ctex, and the converted image is saved as _godot\imported\AAA.png. Keep in mind that this is just an example, games might use different paths for resources, however "_godot\imported" folder seems to be the most common variant.

Finally, assets embedded in binaries are extracted as "file@hexoffset.format". For example if there's a png image in the executable at offset 4096, that will be saved to "game.exe@0001000.png". If an archive is embedded, then a directory is created and files are saved under just like with non-embedded archives.
 
Last edited:

justaplayer69

Member
Nov 29, 2023
221
279
Hi Henry1887,

I did some digging on GDScript files. It looks like they have only one level of encryption, so there's no script key needed, they use the same as any other asset. The reason why the decrypted script looked like gibberish to you is because it is a bytecode (a highly version dependent one on top of that). I might be able to add a bytecode decompiler into GR, but until then, two steps needed:

1. unpack the game with GAME RIPPER (this will take care of the key autodetection and decryption)
2. use gdtool ( ) or gdsdecomp ( ) to convert the decrypted bytecode .gds file into a plain text script file

Gdtool is a command line tool and gdsdecomp is a windowed one. If the game isn't encrypted (or uses the old encryption method), then you can use gdsdecomp as-is. Otherwise if it's using the newer encryption, then first decrypt the script files with GR.
 

Henry1887

Member
Aug 2, 2020
388
385
Hi Henry1887,

I did some digging on GDScript files. It looks like they have only one level of encryption, so there's no script key needed, they use the same as any other asset. The reason why the decrypted script looked like gibberish to you is because it is a bytecode (a highly version dependent one on top of that). I might be able to add a bytecode decompiler into GR, but until then, two steps needed:

1. unpack the game with GAME RIPPER (this will take care of the key autodetection and decryption)
2. use gdtool ( ) or gdsdecomp ( ) to convert the decrypted bytecode .gds file into a plain text script file

Gdtool is a command line tool and gdsdecomp is a windowed one. If the game isn't encrypted (or uses the old encryption method), then you can use gdsdecomp as-is. Otherwise if it's using the newer encryption, then first decrypt the script files with GR.
the unpacked script from your tool is not bytecode for me. It is in a .gde format and not .gds
Am i doing something wrong when unpacking the game?
 

justaplayer69

Member
Nov 29, 2023
221
279
the unpacked script from your tool is not bytecode for me. It is in a .gde format and not .gds
Not sure what you mean by that, but GAME RIPPER just decrypts the assets and saves them verbatim. If the format is recognized, then a second converted file is saved too, however this doesn't influence the saving of the original asset as-is. If the script is saved as .gde (whatever that might be), then this is so because that's what stored in the game files.
 

Henry1887

Member
Aug 2, 2020
388
385
Not sure what you mean by that, but GAME RIPPER just decrypts the assets and saves them verbatim. If the format is recognized, then a second converted file is saved too, however this doesn't influence the saving of the original asset as-is. If the script is saved as .gde (whatever that might be), then this is so because that's what stored in the game files.
Well you said that game ripper takes care of the decryption and .gde is a encrypted gdscript format so I thought your tool would automatically decrypt it?
 

justaplayer69

Member
Nov 29, 2023
221
279
Well you said that game ripper takes care of the decryption and .gde is a encrypted gdscript format so I thought your tool would automatically decrypt it?
Yes. It does remove the asset encryption. If there's an additional level of encryption on scripts, then that's not removed (yet). I've just started researching GDScript, and I haven't seen such 2nd level decrypter in the other tools (just bytecode disassemblers). Of course this doesn't mean there's none, it's just I haven't found it yet.
 

djacoaio

New Member
Aug 30, 2022
2
0
Dunno, it works for me. I would have to reproduce the issue to tell more.

Which PR version are you ripping? With what GR version and on which platform? Can you see the audio files on the "SFX" tab?
Please run GR with the -v flag ("gameripper.exe -v") that will create gameripper.log file and attach that log here. I'll be able to tell more if I can see the messages.
i used the gameripper v1.7, with PR reward 2024_11, heres the log, i could see the sfx tab
 

justaplayer69

Member
Nov 29, 2023
221
279
Hi djacoaio,

Hmmm, there's no audio-related error message in your log, so it should work. I've also tested with PR reward 2024_11, I've attached my log. I see no difference with your log (except the timestamps), and audio is working for me perfectly.

A few thoughts:
- not all animations have audio, just some (actually I had to scroll down a lot to find the first one with a sound effect, see attachments)
- there's no audio if you press the "Scan for sprites" button (because sprite sheets store no such info)
- maybe another app was running and blocking the audio?
- have you accidentally muted your machine or experiencing contact problems with your headphone?

I'm truly sorry, I have no clue why there's no audio for you. I see no obvious reasons why it shouldn't work. Also it does work for me, and I can't fix something that I can't reproduce.

(ps: the only thing I've noticed is that something is wrong with your UTF-8 encoding setting, but I doubt this should affect the sound effects.)
 

justaplayer69

Member
Nov 29, 2023
221
279
Well you said that game ripper takes care of the decryption and .gde is a encrypted gdscript format so I thought your tool would automatically decrypt it?
I've checked the Godot source code. There's no additional gdscript encryption whatsoever (just the usual asset encryption), but plugins might implement it.

So I'm guessing this .gde is handled by some 3rd party plugin maybe?

(Technical details: core/io/file_access_encrypted.cpp implements just one level of AES decryption method, same as any other asset. However there's a "export_plugins.write[ i ]->set_export_preset(p_preset);" call which might override the method to add further level(s) of encryption. It seems an additional key is used for these and stored in a common manner, but without knowing the method implemented in the plugin there's no chance of decrypting.)
 
Apr 29, 2022
118
223
Hi. Great tool, thanks a lot, appreciate it.
Here's some notes/questions, if I may.

Version: GAME RIPPER ROM V1.7
Platform: windows 10

1. Navigation with mouse in sprites kinda does not work.
When switching sprites with up/down keys, it works fine.
When trying to use mouse, the program does something. Seems like it adds a new animation out of random sprites at the end of the list? And on every click it adds a new one with more frames than the previous one? Eventually after many clicks the frame count goes high and program hangs. Any mouse button triggers this effect (LMB, RMB, MMB, back/forward buttons) except mouse wheel.
Do you have any ideas on why this might happen? Any info I need to provide (logs or something)?
You don't have permission to view the spoiler content. Log in or register now.
2. Tbh these buttons' text isn't easy to read unless I zoom the screen in
You don't have permission to view the spoiler content. Log in or register now.
3. Any way to force the app with a language at startup? Like command line arg or something? No big deal at all, but it would be nice to use a language different from the system one without pressing F1 every time.
 

justaplayer69

Member
Nov 29, 2023
221
279
Hi. Great tool, thanks a lot, appreciate it.
Here's some notes/questions, if I may.
Of course, thanks for your feedback!
1. Navigation with mouse in sprites kinda does not work.
When switching sprites with up/down keys, it works fine.
When trying to use mouse, the program does something. Seems like it adds a new animation out of random sprites at the end of the list? And on every click it adds a new one with more frames than the previous one?
This is a feature which supposed to work when Shift is held down with the click. If this is constantly triggered on your Win10, then this is an SDL bug (to be precise, SDL_GetModState() returning a modifier key being pressed when it's not actually pressed). I'll find a workaround for this.
(For the records, the feature in question: click on the first frame, then shift+click on the last frame and all sprites in between these two will be added as a new animation to the end of the list.)
2. Tbh these buttons' text isn't easy to read unless I zoom the screen in
I have already increased the contrast between the font's color and the shadow, maybe I'll increase it a little bit more. It is using the Commodore 64 palette BTW.
3. Any way to force the app with a language at startup? Like command line arg or something?
Not yet, but I can definitely add this easily.
 
Apr 29, 2022
118
223
This is a feature which supposed to work when Shift is held down with the click. If this is constantly triggered on your Win10, then this is an SDL bug (to be precise, SDL_GetModState() returning a modifier key being pressed when it's not actually pressed).
Double checked that no modifier is pressed, and tested this on another win10 machine just to be sure - yes, it's constantly triggered.
(For the records, the feature in question: click on the first frame, then shift+click on the last frame and all sprites in between these two will be added as a new animation to the end of the list.)
Nice. This definitely will be useful for some short loops.
Not yet, but I can definitely add this easily.
I'd appreciate it.
 
Apr 29, 2022
118
223
unknown engine format, fallback to brute force scanning
It even does that. Awesome! Now I can finally take a look at Maumau CGs.
(CGs are fully exported, but some have black/white/transparent padding around 1/3 of the image height. Interesting. This makes me curious whether it is the way they were stored or some brute force consequences. Anyway, happy to finally be able to take a closer look at them. (y))

On another note, seems like Decrypt / Unpack all dumps the sprites right into the game folder. I think it would be nice to use a subdirectory for that, something like 'game folder/gameripper_export/', to keep exports isolated from the game files.
 

justaplayer69

Member
Nov 29, 2023
221
279
It even does that. Awesome!
Thanks!

This makes me curious whether it is the way they were stored or some brute force consequences.
It's how they are stored. Brute force scanning operates on encoded bitstream level (so it looks for PNG, OGG etc. bitstreams), but borders are added when those are decoded. It is pretty common btw, that's how multiple layers of CGs are positioned on each other in many games.

On another note, seems like Decrypt / Unpack all dumps the sprites right into the game folder. I think it would be nice to use a subdirectory for that, something like 'game folder/gameripper_export/', to keep exports isolated from the game files.
Yeah, this is something that I'm considering a lot lately. Originally GR was written for PGMMV, which uses the same file names for both encrypted and unencrypted assets, that's why I haven't implemented this from the start. Later as more and more engines were added, it become obvious that this is unique to PGMMV, other engines use different file names, so yeah, separate directory is something that's on my TODO list, but unfortunately a lot of work at this point.
 
  • Like
Reactions: thewhitespirit

justaplayer69

Member
Nov 29, 2023
221
279
Hi all,

I'm experiencing issues with f95zone.to. After more than 1.5 years, it suddenly told me that my email address is invalid.

I've specified a new email address, I've received the verification email, but when I clicked on the confirmation link in mail, nothing happened (instead of showing the "confirm" button, it just redirected me to the main page). I've asked for a new link several times, until one link was finally working and I could click on that "confirm" button.

If this continues, then I'm afraid I'll run out of email addresses pretty soon, and I won't be able to participate in the f95zone community. I want to let you know that if in the future I suddenly become silent this is the cause.

Rest assured, I'll be still working on GAME RIPPER regardless, I'll keep the gitlab repo up-to-date, and I'll be still reading this topic, it's just I won't be able to reply. But let's hope for the best that f95zone confirmation links will work and that this was just a temporary, one-time technical issue.
 
  • Heart
Reactions: jj12345678987654321
5.00 star(s) 1 Vote