CensoredUsername / unrpyc

A ren'py script decompiler
Other
824 stars 149 forks source link

Decompiling RPYC Files not working #174

Closed Kirbyarm closed 4 months ago

Kirbyarm commented 6 months ago

I've been trying to get this to work for a couple of days now using various methods and decompilers, this repo being by far the most commonly suggested avenue to take to achieve this. Scripts and bats error out when trying to decompile, and when I put the provided un.rpy, un.rpyc into the game folder and/or the bytecode.rpyb file in the cache folder, whatever combination of these three files I try, the game either crashes during startup or starts up and does nothing at all.

The error when running UnRent.bat v1.0.11d is:

(times 468)

File "C:\Users\Mackenzie\Desktop\Modding\renpy-7.4.11-sdk\SL\unrpyc.py", line 121, in printlock = Lock() File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python3.9/multiprocessing/context.py", line 67, in Lock File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python3.9/multiprocessing/synchronize.py", line 17, in ModuleNotFoundError: No module named '_multiprocessing'

Summary: 468 files failed to decompile 1 decompiled file already exists


Here are the game crash traceback.txt's for some of the combinations attempted:

https://files.catbox.moe/3tihoa.txt https://files.catbox.moe/3tihoa.txt https://files.catbox.moe/ff4dej.txt

(apologies, pastebin seems to think this is suspicious spam and deletes it so I had to upload the txt's to a file uploader site)


And needless to say, the game launches fine when I remove these scripts.

I'm a completely newb when it comes to python or programming so I don't really understand how to use the command line tool things to try that method. I get invalid syntax errors when I copy/past the code into command prompt or an instance of Python 2.7.3

Any help would be greatly appreciated, I really wish to be able to mod and add to the game! Thanks for your time.

CensoredUsername commented 6 months ago

Hey, thanks for the detailed issue report.

Unfortunately right now I haven't been able to find the time to work on unrpyc so it is compatible with the latest releases of ren'py right now. So games made with ren'py version 8 and above right now don't work with at least this repository. As your traceback lists Ren'Py 8.1.1.23060707 this means the game you're trying to decompile right now isn't supported.

I'm unsure what other scripts packaging this tool are doing, afaik some are based on a fork on this repo that is more up to date (maintained by @madeddy ), which might give you more luck.

cooperdk commented 6 months ago

Hey, thanks for the detailed issue report.

Unfortunately right now I haven't been able to find the time to work on unrpyc so it is compatible with the latest releases of ren'py right now. So games made with ren'py version 8 and above right now don't work with at least this repository. As your traceback lists Ren'Py 8.1.1.23060707 this means the game you're trying to decompile right now isn't supported.

I'm unsure what other scripts packaging this tool are doing, afaik some are based on a fork on this repo that is more up to date (maintained by @madeddy ), which might give you more luck.

It also (hilariously) attempts to decompile itself, which is kind of a rookie mistake. It doesn't even work on Ren'Py 7.5.3.

As a side note, these files decompile fine with the Russian web-based decompiler. And I would honestly rather steer clear of anything Russian.

madeddy commented 5 months ago

That's no unrpyc related issues we see here. What you try'd cannot work:

The error when running ${\color{lightgreen}UnRent.bat}$ v1.0.11d is:

UnRen isn't intended to be run with the Ren'Py SDK. Please follow the instructions where you got the tool and it should do fine. As a bonus you will there find help with modding etc.. 😉

File \"C:\Users\Mackenzie\Desktop\Modding\ ${\color{red}renpy-7.4.11-sdk}$\SL\unrpyc.py\", line 121, in printlock = Lock() File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/ ${\color{red}python3.9}$/multiprocessing/context.py", line 67, in Lock

Executing a unrpyc version intended to run in python3 in python2 (The sdk is a v7.4.x -> python2) will also not work.


As a side note, these files decompile fine with the Russian web-based decompiler.

Just as info tidbit: Whatever out there manages to decompile these days Ren'Py 8.x apps, uses to my knowledge one of two modified/updated unrpyc versions. Both are nearly the same: One is from me and the other from someone else i worked even a bit with on some of the problems we encountered while porting it to Python 3. If you want you can try with the version from my fork. I tested it just now with a Ren'Py 8.1.x game and it still works. unrpyc py3_port

Greets

CensoredUsername commented 4 months ago

No testcases here so this ends up being a duplicate of #92.