CensoredUsername / unrpyc

A ren'py script decompiler
Other
861 stars 157 forks source link

1.1.5 Hit and Miss with Ren'Py7.4 Games #111

Closed OrdosAlpha closed 3 years ago

OrdosAlpha commented 3 years ago

1.1.5 is hit and miss with all games produced with the latest build of Ren'Py. The bytecode.rpyb also fails to decompile the 7.4 games where un.rpyc fails to load.

Using un.rpyc:-

I'm sorry, but an uncaught exception occurred.

While running game code: Exception: Could not load file C:\Ren'Py\Ren'Py 7.4\Depravity 0.59 Hotfix/game/un.rpyc.

-- Full Traceback ------------------------------------------------------------

Full traceback: File "renpy/bootstrap.py", line 326, in bootstrap renpy.main.main() File "renpy/main.py", line 447, in main renpy.game.script.load_script() # sets renpy.game.script. File "renpy/script.py", line 283, in load_script self.load_appropriate_file(".rpyc", ".rpy", dir, fn, initcode) File "renpy/script.py", line 771, in load_appropriate_file raise Exception("Could not load file %s." % lastfn) Exception: Could not load file C:\Ren'Py\Ren'Py 7.4\Depravity 0.59 Hotfix/game/un.rpyc.

When using the bytecode.rpyb file:-

I'm sorry, but an uncaught exception occurred.

While parsing C:\Ren'Py\Ren'Py 7.4\Depravity 0.59 Hotfix/renpy/common/_errorhandling.rpym. PicklingError: Can't pickle <class 'renpy.ast.Init'>: it's not the same object as renpy.ast.Init

-- Full Traceback ------------------------------------------------------------

Full traceback: File "renpy/bootstrap.py", line 326, in bootstrap renpy.main.main() File "renpy/main.py", line 413, in main renpy.exports.load_module("_errorhandling") File "renpy/exports.py", line 2569, in load_module initcode = renpy.game.script.load_module(name) File "renpy/script.py", line 308, in load_module self.load_appropriate_file(".rpymc", ".rpym", dir, fn, initcode) File "renpy/script.py", line 751, in load_appropriate_file data, stmts = self.load_file(dir, fn + source) File "renpy/script.py", line 614, in load_file pickle_data_before_static_transforms = dumps((data, stmts), 2) PicklingError: Can't pickle <class 'renpy.ast.Init'>: it's not the same object as renpy.ast.Init

jackmcbarn commented 3 years ago

Does it work if you use unrpyc.py instead of un.rpyc?

CensoredUsername commented 3 years ago

huh. Can you confirm if this is with absolutely stock ren'py? The first one doesn't give much info except if fails to load that file (might be various reasons for that, but it should load with stock ren'py.

The second one is definitely weirder. Something in the python environment got properly mangled if that triggered, and I'm not sure what exactly. Seems like some decompiler datastructures are sticking around that really shouldn't be.

Hard to say anything conclusive with only the error logs though. Can you confirm if it works with command line unrpyc?

madeddy commented 3 years ago

I tested the game in the users version and with unrpyc_v1.1.5 and had NO issues at all. CLI and RenPy dependent(un.rpyc) versions. Bytecode file wasn't used because unneeded. Unpacking, decompiling and running the game went without a hitch. The claim for a bug is IMO a mistake. I have the original rpa file with the scripts available if wanted(6.4MiB) by someone.

Its also beyond me why it would be needed for anyone to decompile the .rpyc files when all the related .rpy files are along them in the RPA. So, if this was just for testing then something else went wrong.

CensoredUsername commented 3 years ago

closing due to lack of response and inability to reproduce.