Tool Ren'Py UnRen.bat v1.0.11d - RPA Extractor, RPYC Decompiler, Console/Developer Menu Enabler

5.00 star(s) 8 Votes

Madeddy

Active Member
Dec 17, 2017
804
459
In mod thread it says it should be installed using Unren.
Well, the mod's thread want you to do something useless.
In take a guess and say he talks about the walkthrough mod for "DIK". If i am right with this, you can ignore his nonsense claims.
Instructions say this:
  1. Download unren and place it into your Being a DIK folder
  2. Run unren and pick option 1)Extract RPA packages
  3. Extract the folder "game" from badik_mod to your Being A DIK folder
:rolleyes:
 
  • Haha
Reactions: goobdoob

hapciupalit

New Member
Dec 4, 2017
3
0
I'm having some problems with Innocent Witches 0.5 while decompiling the rpyc files. I tried with both on window with this script and on Mac with one, but still I cannot manage to decomplie every rpyc file.
With this script this is what one of the files return

Code:
Traceback (most recent call last):
  File "D:\DirtyGames\Innocent_Witches-0.5.1B\Innocent_Witches-0.5.1B-pc\game\..\unrpyc.py", line 139, in worker
    no_pyexpr=args.no_pyexpr, comparable=args.comparable, translator=translator, init_offset=args.init_offset)
  File "D:\DirtyGames\Innocent_Witches-0.5.1B\Innocent_Witches-0.5.1B-pc\game\..\unrpyc.py", line 105, in decompile_rpyc
    ast = read_ast_from_file(in_file)
  File "D:\DirtyGames\Innocent_Witches-0.5.1B\Innocent_Witches-0.5.1B-pc\game\..\unrpyc.py", line 86, in read_ast_from_file
    data, stmts = magic.safe_loads(raw_contents, class_factory, {"_ast", "collections"})
  File "D:\DirtyGames\Innocent_Witches-0.5.1B\Innocent_Witches-0.5.1B-pc\decompiler\magic.py", line 599, in safe_loads
    encoding=encoding, errors=errors).load()
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 858, in load
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 1217, in load_build
  File "D:\DirtyGames\Innocent_Witches-0.5.1B\Innocent_Witches-0.5.1B-pc\decompiler\magic.py", line 127, in __setstate__
    raise FakeUnpicklingError("{0}.__setstate__() got unexpected arguments {1}".format(self.__class__, state))
FakeUnpicklingError: <class 'renpy.python.RevertableSet'>.__setstate__() got unexpected arguments ({u'back_button': True},)
Does any of you know how to fix this? Or what have done wrong?
 

Madeddy

Active Member
Dec 17, 2017
804
459
Does any of you know how to fix this? Or what have done wrong?
No. Yes.
Take a look at and the read the bug report. It explains the problem.

Edit:
Attention @Modder- and Dev-folks: The decompiling problems with StS has now a separate Bug entry at . Feel free to add your input/knowledge there for faster untangling of the problematic.
 
Last edited:

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,094
14,736
Take a look at and the read the bug report. It explains the problem.
Er... No. This entry regard the tag property issue. The error encountered with this issue appear when you try to run Ren'Py with the generated rpy files, not when you try to "uncompile" them.


Attention @Modder- and Dev-folks: The decompiling problems with StS has now a separate Bug entry at . Feel free to add your input/knowledge there for faster untangling of the problematic.
Still not the same problem. The problem encountered by hapciupalit is that a Ren'py statement have now arguments not take in count by unrpyc. This while the problem you point seem to be related to an unknown statement.
 

goobdoob

Conversation Conqueror
Modder
Respected User
Dec 17, 2017
7,425
9,679
Er... No. This entry regard the tag property issue. The error encountered with this issue appear when you try to run Ren'Py with the generated rpy files, not when you try to "uncompile" them.




Still not the same problem. The problem encountered by hapciupalit is that a Ren'py statement have now arguments not take in count by unrpyc. This while the problem you point seem to be related to an unknown statement.
Either way, the problem is in unrpyc. We'll have to wait for a fix, or someone here will need to fix it.

hapciupalit the best way to get this fixed is to open an issue on the unrpyc github page and explain what you're seeing.

(unrpyc is one of the tools that UnRen uses. If it's broken there's not much we can do.)
 

Madeddy

Active Member
Dec 17, 2017
804
459
Er... No. This entry regard the tag property issue. The error encountered with this issue appear when you try to run Ren'Py with the generated rpy files, not when you try to "uncompile" them.
Ok. Possible. I cited also the wrong number; it's 82
I did not differentiate this so much because i put this (for myself) simply in the same category. -> "RenPy code change bugs".
 
Last edited:

Madeddy

Active Member
Dec 17, 2017
804
459
View attachment 528709

Hey, It seems like it doesn't recognize the Ren'Py archive for some reason ? Still trying to understand atm. But I tried with your tool Madeddy and it worked !
Hm. I am not sure...
Did you by chance fish the link to rpakit out of my signature and try it out? If so, then nice it worked for you. I can do with some testers and such. Waiting for the unavoidable bug reports which surely happen. ;)

I guess it's mine (somewhere in this thread), as for the error, visibly they changed the file signature again.
No. This would have worked i'd say. Nothing was changed. Still "RPA-4.0" header with "42" as key. Dont know what @kirokura did. He should perhaps consider that we don't have a magical glass orb.
 

goobdoob

Conversation Conqueror
Modder
Respected User
Dec 17, 2017
7,425
9,679
Did you by chance fish the link to rpakit out of my signature and try it out? If so, then nice it worked for you. I can do with some testers and such. Waiting for the unavoidable bug reports which surely happen. ;)
rpakit, huh? I don't need to unpack an rpa right now, and I don't feel like messing around, but some questions:
  1. Why should I use this instead of rpatool? Sell me on it! :)
  2. GPLv3? Ew...I don't want any GPL on me. IMO Apache or BSD or something similar is better, because of the non-viral properties. IANAL, but I have to deal with them on licensing issues for open source software.
 
D

Deleted member 1928798

Guest
Guest
Hm. I am not sure...
Did you by chance fish the link to rpakit out of my signature and try it out? If so, then nice it worked for you. I can do with some testers and such. Waiting for the unavoidable bug reports which surely happen. ;)
Yep took it from your signature. I'll make bug reports if I find anything so brace yourself haha
 

Madeddy

Active Member
Dec 17, 2017
804
459
Yep took it from your signature. I'll make bug reports if I find anything so brace yourself haha
You do this. Any found bug helps to improve it. (y)
  1. Why should I use this instead of rpatool? Sell me on it! :)
  2. GPLv3? Ew...I don't want any GPL on me. IMO Apache or BSD or something similar is better, because of the non-viral properties. IANAL, but I have to deal with them on licensing issues for open source software.
blobpeek.png

Oh boy! I got challenged.
I did'n say anything. Bummer. Nobody looks at the user signatures. Ever! Totally not my fault. LisaRepacks did dig my app out and i developed it by pure accident. (Look in my for this.)

to 1) Should? Hmp. Thats your choice.
Lets just say:

UnrpaRpatoolRpaKit
8 formats/variants | 6 working4 formats/variants | 3 working8 formats/variants | 8 working
  • [+] Supports a good number of formats.
  • [+] Good extensibility and maintainability.
  • [-] Project got IMO less usable with the packaging and splitting to a dozen files.
  • [-] It has two formats(RPA1/3.2) not working atm which i last year already reported.
  • [+] Still works for RPA 2/3/3.2.
  • [+] Can change existing RPA
  • [-] Its not really maintained anymore. Last change was a year ago and by another user (added RPA3.2). Nearly 3 years for the main devs last activity.
  • [-] Bad maintainability; adding other formats is cumbersome.
  • [-] RPA1 not working.
  • [+] Supports every format except ZiX
  • [+] Easily extensible
  • [+] Takes also a directory with RPA as input(No manual feeding)
  • [-] Still in alpha. Relatively untested "in the wild"; Has surely bugs. (A logical guess)

(Should i have added "+ Its shiny" for RpaKit? :unsure:)

to 2) Bah! I did simply add the license the advisor tool said. Laziness got me this.
I wanted just to open source it and that changes by others are stated, so people come not crying to me with the bulls**t of others. A somewhat security layer. I switched it now to Apache-2 license. :whistle:

So. I opened it simply for others, because why not? People can test/use it, make bug reports, add stuff, improve my ugly code. And i learn some from it.

Next thing is, i want to add a second identifying run if it fails for a file and try to get it then still working. The ability to force a archive version like unrpa does could also be useful.

Greets
 
Last edited:

goobdoob

Conversation Conqueror
Modder
Respected User
Dec 17, 2017
7,425
9,679
You do this. Any found bug helps to improve it. (y)



View attachment 529728

Oh boy! I got challenged.
I did'n say anything. Bummer. Nobody looks at the user signatures. Ever! Totally not my fault. LisaRepacks did dig my app out and i developed it by pure accident. (Look in my for this.)
to 1) Should? Hmp. Thats your choice.
Lets just say:
  • Unrpa
    • 8 formats/variants | 6 working
    • [+] Its supports a good number of formats.
    • [-] Got IMO less usable with the packaging and split to a dozen files.
    • [-] It has two formats(RPA1/3.2) not working atm which i last year already reported.
    • [+] Good extensible and OK maintainable.
  • Rpatool
    • 4 formats/variants | 3 working
    • [+] Still works for RPA 2/3/3.2.
    • [-] Its not really maintained anymore. Last change was adding RPA3.2 a year ago and by another user. Nearly 3 years for the main devs last activity.
    • [-] RPA1 not working.
    • [-] Adding other formats is cumbersome.
  • RpaKit
    • 8 formats/variants | 8 working
    • [+] Supports every format except ZiX
    • [+] Easily extensible
    • [+] Takes also a directory with RPA as input(No manual feeding)
    • [-] Still in alpha. Relatively untested "in the wild"; Has surely bugs. (A logical guess)
(Should i have added "+ Its shiny" for RpaKit? :unsure:)

to 2) Bah! I did simply add the license the advisor tool said. Laziness got me this.
I wanted just to open source it and that changes by others are stated, so people come not crying to me with the bulls**t of others. A somewhat security layer.
I switches it to Apache-2. :whistle:

So. I opened it simply for others, because why not? People can test/use it, make bug reports, add stuff, improve my ugly code. And i learn some from it.

Next thing is, i want to add a second identifying run if it fails for a file and try to get it then still working. The ability to force a archive version like unrpa does could also be useful.

Greets
Exactly what I wanted to see. Maybe after it's out of alpha Sam should switch unren to use it!
 

Madeddy

Active Member
Dec 17, 2017
804
459
Exactly what I wanted to see.
Oh well. Nice to be of service. :p
Maybe after it's out of alpha Sam should switch unren to use it!
:oops: Um... Thats somewhat cringey now. Really. Because... I write at the moment on a alternate/port/unification of UnRen to a pure python app. Oops.

So, we have atm two unren. One from Sam for win and a linux/mac port(you heard from it?). I find this whole thing suboptimal. Two with same functionality, double maintanance. They need the rpa and decompiler apps(python) somehow delivered with them (embeded + encoded or separate) and for win Powershell must also be there.
I want to cut this all out. It comes in the end down to py, because we need it anyway.

Basically a simple cloning of UnRen cmd/shell code to python and put the needed RpaKit/Decompiler code plainly in the file.

If one is interested: I made last year some improvement(imho) to sam9's unren and made a pull request on github, but so far he reacted not to it. Feel free to test it out.

Greets.
 
Last edited:

goobdoob

Conversation Conqueror
Modder
Respected User
Dec 17, 2017
7,425
9,679
Oh well. Nice to be of service. :p
:oops: Um... Thats somewhat cringey now. Really. Because... I write at the moment on a alternate/port/unification of UnRen to a pure python app. Oops.

So, we have atm two unren. One from Sam9 for win and a linux/mac port(you heard from it?). I find this whole thing suboptimal. Two with same functionality, double maintanance. They need the rpa and decompiler apps(python) somehow delivered with them (embeded + encoded or separate) and for win Powershell must also be there.
I want to cut this all out. It comes in the end down to py, because we need it anyway.

Basically a simple cloning of UnRen cmd/shell code to python and put the needed RpaKit/Decompiler code plainly in the file.

If one is interested: I made last year some improvement(imho) to sam9's unren and made a pull request on github, but so far he reacted not to it. Feel free to test it out.

Greets.
Wait, there's a Mac/Linux version of UnRen? Shit, why didn't anyone tell me!

:p

(I'm the owner)

The Mac/Linux version is a port of Sam's. It's close to identical - same version of rpatool and unrpyc; with a little extra quality-of-life stuff I threw in (specify which game to unren, unrpyc with overwrite option, etc).

A Python-only version would be OK, but running it on Windows would be a pain, since it doesn't come with Python, and you have to jump through a couple hoops to run with the game's Python install.
 
5.00 star(s) 8 Votes