Tool Ren'Py UnRenGUI, UnRen-forall(v9.4), UnRen-Powershell-forall(v9.4), UnRen-old

5.00 star(s) 3 Votes

mazinogamer

Member
Dec 2, 2022
111
442
UnRen has never searched and passed this type of files for decompilation. Are you sure you really need them?
It was to translate a game into my language and then port it to Android, but I already used another advanced method
 

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,384
unrpyc support decompiling .rpymc files to .rpym

@mazinogamer, perhaps tell why we shouldn't decompile rpymc on that game? was there an error? it might help VepsrP to troubleshoot and fix any error (... right, VepsrP? :LOL: )
Your script passes this type of files for decompilation? I just haven't figured out exactly how it looks for and defines files for decompilation.
[[ $1 ]] && opt=("${opt[@]}" "$1")
Probably this line of code, but it's not very clear for me how it works. :unsure:
 

dikau

Member
Dec 16, 2019
315
282
Your script passes this type of files for decompilation? I just haven't figured out exactly how it looks for and defines files for decompilation.
Yeah... So, if you just pass a folder to unrpyc, then unrpyc will find all *.rpyc and *.rpymc recursively in that folder. And My bash script does this (these why, I think you said about I pass all files into single unrpyc).

You can see theres a dot, on this code: "$python" "$unrpyc" "${opt[@]}" .
this is telling unrpyc to look on this current folder. the dot is an alias of current folder.

[[ $1 ]] && opt=("${opt[@]}" "$1")
Probably this line of code, but it's not very clear for me how it works. :unsure:
On shell script, the code $1, is the first positional argument of a function or the main script it self if it invoked out of a function. ($1, $2, $3, until $9: positional arguments)
And specifically on Bash conditional [[ ]] checks, you can omit the "if" keyword and the && will run the right hand code if the [[ ]] evaluates to true

So, on my script, basically if we don't pass anything to that function then it just run "--init-offset" on unrpyc parameter (the opt variable), where I set it on local opt=(--init-offset).

And on "Menu" option number 9 (try harder), I pass the "--try-hard" argument, so it will add it to the opt variable. That is all.
 
Last edited:
  • Like
Reactions: VepsrP

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,384
Yeah... So, if you just pass a folder to unrpyc, then unrpyc will find all *.rpyc and *.rpymc recursively in that folder. And My bash script does this (these why, I think you said about I pass all files into single unrpyc).

You can see theres a dot, on this code: "$python" "$unrpyc" "${opt[@]}" .
this is telling unrpyc to look on this current folder. the dot is an alias of current folder.
Hm... It might be worth trying to do the same.(y) For some reason, this idea did not occur to me.:unsure::HideThePain:
 

frozenfeet

Well-Known Member
Aug 2, 2019
1,207
1,873
Which version of powershell do I need? When I try to run the powershell script version it just opens for a second then closes :(.
 

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,384

Madeddy

Active Member
Dec 17, 2017
838
487
...
zlib.error: decoding with 'zlib' codec failed (error: Error -3 while decompressing data: incorrect header check)
Again: Always cite error messages completely! We don't sit on your should and see whats going on for you.
It's strange, in fact my rpatool takes the header from the engine itself, so there should be no mistakes with this. I'll check in about 7 hours when I get home from work.
This last error isn't from the header anymore. There's also something else done who zlib doens't agree with. Seeing in your custom rpatool that you do not use all of renpys loader internals, i guess they fucked with index or the stored format of the actual file data. Your rpatool doesn't account for such.

Edit: As expected. See attachment... The lines 150 to 153 are extra... how cute...
 
Last edited:

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,384
  • Yay, new update!
Reactions: "CJ"
Aug 29, 2020
139
558
[Ren'Py] - Goodbye Eternity [v0.6.1] [RNGeusEX] | F95zone
(ExtraLife)

With UnRen-forall.bat



Code:
Extracting _decomp.cab...

Searching for rpyc files...

   + Searching for rpyc files in C:\renpy-8.0.3-sdk.0. Proj\GoodbyeEternity-0.6.1-pc\game\

File not found: C:\renpy-8.0.3-sdk.0.

File not found: Proj\GoodbyeEternity-0.6.1-pc\game\

No script files to decompile.


and with UnRen-1.0.10



Code:
Decompiling C:\renpy-8.0.3-sdk.0. Proj\GoodbyeEternity-0.6.1-pc\game\chiaki_dress_without_jacket.rpyc to C:\renpy-8.0.3-sdk.0. Proj\GoodbyeEternity-0.6.1-pc\game\chiaki_dress_without_jacket.rpy...

Error while decompiling C:\renpy-8.0.3-sdk.0. Proj\GoodbyeEternity-0.6.1-pc\game\chiaki_dress_without_jacket.rpyc:

Traceback (most recent call last):

  File "C:\renpy-8.0.3-sdk.0. Proj\GoodbyeEternity-0.6.1-pc\unrpyc.py", line 171, in worker

    tag_outside_block=args.tag_outside_block, init_offset=args.init_offset, try_harder=args.try_harder)

  File "C:\renpy-8.0.3-sdk.0. Proj\GoodbyeEternity-0.6.1-pc\unrpyc.py", line 135, in decompile_rpyc

    ast = read_ast_from_file(in_file)

  File "C:\renpy-8.0.3-sdk.0. Proj\GoodbyeEternity-0.6.1-pc\unrpyc.py", line 108, in read_ast_from_file

    raw_contents = raw_contents.decode('zlib')

  File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python2.7/encodings/zlib_codec.py", line 43, in zlib_decode

error: Error -3 while decompressing data: incorrect header check


I am also sending an rpyc file of the game, in case this is useful
 

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,384
File not found: C:\renpy-8.0.3-sdk.0.

File not found: Proj\GoodbyeEternity-0.6.1-pc\game\
In these two lines lies the solution. Python didn't like the space in the path (at least in my code. if so, I will try to handle this case later) and he divided it into two. Just remove the space and it should work.
 
  • Like
Reactions: Derek Lamperouge
Aug 29, 2020
139
558
In these two lines lies the solution. Python didn't like the space in the path (at least in my code. if so, I will try to handle this case later) and he divided it into two. Just remove the space and it should work.
Thanks for the reply.
I changed the path, and now it gives the same error as Unren 1.0.10
 
5.00 star(s) 3 Votes