CREATE YOUR AI CUM SLUT ON CANDY.AI TRY FOR FREE
x

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

5.00 star(s) 9 Votes

Sil1998

New Member
Nov 8, 2017
4
0
What I've seen (I had problem 2.1 with the Mac version of Milfy City) is enabling the developer menu causes this issue.

Open unren-dev.rpy and remove the line that says
config.developer = True
dang my bad then, i tried searching it out went through a lot of posts didnt see this one so thought nobody had it posted
 

goobdoob

Conversation Conqueror
Modder
Respected User
Dec 17, 2017
7,426
9,696
excuse me,I found a game that change the RPYC2_HEADER from normal to RENPY RPC2 7cDRy,,
the rpa file is like this
7cDRy,,.0000000000120f3f 42424242
Made with Ren'Py,fange translation.RENPY RPC2 7cDRy,,
the unren.bat can't extract the rpa files, can anyone help? thanks very much!
Get rpatool from and play with it.
 

trauts

Active Member
Aug 12, 2018
741
567
tried to decompile rpyc file after extract RPA files of the latest C-Plan Game and got the following errors:
edit: version v0.7 (180818) of unren

+ Decompiling "prologue.rpyc" - 140910 bytes
Error while decompiling E:\C_Plan-v0.0.2a-pc - Copy\game\prologue.rpyc:
Traceback (most recent call last):
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 126, in worker
no_pyexpr=args.no_pyexpr, comparable=args.comparable, translator=translator, init_offset=args.init_offset)
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 91, in decompile_rpyc
ast = read_ast_from_file(in_file)
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 77, in read_ast_from_file
data, stmts = magic.safe_loads(raw_contents, class_factory, {"_ast"})
File "E:\C_Plan-v0.0.2a-pc - Copy\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 1206, in load_setitems
TypeError: 'RevertableDict' object does not support item assignment

+ Decompilation of 1 file failed
+ Decompiling "rel.rpyc" - 5564 bytes
Error while decompiling E:\C_Plan-v0.0.2a-pc - Copy\game\rel.rpyc:
Traceback (most recent call last):
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 126, in worker
no_pyexpr=args.no_pyexpr, comparable=args.comparable, translator=translator, init_offset=args.init_offset)
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 91, in decompile_rpyc
ast = read_ast_from_file(in_file)
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 77, in read_ast_from_file
data, stmts = magic.safe_loads(raw_contents, class_factory, {"_ast"})
File "E:\C_Plan-v0.0.2a-pc - Copy\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 1206, in load_setitems
TypeError: 'RevertableDict' object does not support item assignment

+ Decompilation of 1 file failed
+ Decompiling "screens.rpyc" - 76906 bytes
+ Output file already exists. Pass --clobber to overwrite.
+ Decompilation of 1 file failed
+ Decompiling "script.rpyc" - 12771 bytes
Error while decompiling E:\C_Plan-v0.0.2a-pc - Copy\game\script.rpyc:
Traceback (most recent call last):
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 126, in worker
no_pyexpr=args.no_pyexpr, comparable=args.comparable, translator=translator, init_offset=args.init_offset)
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 91, in decompile_rpyc
ast = read_ast_from_file(in_file)
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 77, in read_ast_from_file
data, stmts = magic.safe_loads(raw_contents, class_factory, {"_ast"})
File "E:\C_Plan-v0.0.2a-pc - Copy\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 1206, in load_setitems
TypeError: 'RevertableDict' object does not support item assignment

+ Decompilation of 1 file failed
+ Decompiling "up1.rpyc" - 265370 bytes
Error while decompiling E:\C_Plan-v0.0.2a-pc - Copy\game\up1.rpyc:
Traceback (most recent call last):
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 126, in worker
no_pyexpr=args.no_pyexpr, comparable=args.comparable, translator=translator, init_offset=args.init_offset)
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 91, in decompile_rpyc
ast = read_ast_from_file(in_file)
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 77, in read_ast_from_file
data, stmts = magic.safe_loads(raw_contents, class_factory, {"_ast"})
File "E:\C_Plan-v0.0.2a-pc - Copy\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 1206, in load_setitems
TypeError: 'RevertableDict' object does not support item assignment

+ Decompilation of 1 file failed
+ Decompiling "up2.rpyc" - 320365 bytes
Error while decompiling E:\C_Plan-v0.0.2a-pc - Copy\game\up2.rpyc:
Traceback (most recent call last):
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 126, in worker
no_pyexpr=args.no_pyexpr, comparable=args.comparable, translator=translator, init_offset=args.init_offset)
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 91, in decompile_rpyc
ast = read_ast_from_file(in_file)
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 77, in read_ast_from_file
data, stmts = magic.safe_loads(raw_contents, class_factory, {"_ast"})
File "E:\C_Plan-v0.0.2a-pc - Copy\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 1198, in load_setitem
TypeError: 'RevertableDict' object does not support item assignment

+ Decompiling "prologue.rpyc" - 140910 bytes
Error while decompiling E:\C_Plan-v0.0.2a-pc - Copy\game\prologue.rpyc:
Traceback (most recent call last):
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 126, in worker
no_pyexpr=args.no_pyexpr, comparable=args.comparable, translator=translator, init_offset=args.init_offset)
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 91, in decompile_rpyc
ast = read_ast_from_file(in_file)
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 77, in read_ast_from_file
data, stmts = magic.safe_loads(raw_contents, class_factory, {"_ast"})
File "E:\C_Plan-v0.0.2a-pc - Copy\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 1206, in load_setitems
TypeError: 'RevertableDict' object does not support item assignment

+ Decompilation of 1 file failed
+ Decompiling "rel.rpyc" - 5564 bytes
Error while decompiling E:\C_Plan-v0.0.2a-pc - Copy\game\rel.rpyc:
Traceback (most recent call last):
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 126, in worker
no_pyexpr=args.no_pyexpr, comparable=args.comparable, translator=translator, init_offset=args.init_offset)
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 91, in decompile_rpyc
ast = read_ast_from_file(in_file)
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 77, in read_ast_from_file
data, stmts = magic.safe_loads(raw_contents, class_factory, {"_ast"})
File "E:\C_Plan-v0.0.2a-pc - Copy\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 1206, in load_setitems
TypeError: 'RevertableDict' object does not support item assignment

+ Decompilation of 1 file failed
+ Decompiling "screens.rpyc" - 76906 bytes
+ Output file already exists. Pass --clobber to overwrite.
+ Decompilation of 1 file failed
+ Decompiling "script.rpyc" - 12771 bytes
Error while decompiling E:\C_Plan-v0.0.2a-pc - Copy\game\script.rpyc:
Traceback (most recent call last):
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 126, in worker
no_pyexpr=args.no_pyexpr, comparable=args.comparable, translator=translator, init_offset=args.init_offset)
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 91, in decompile_rpyc
ast = read_ast_from_file(in_file)
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 77, in read_ast_from_file
data, stmts = magic.safe_loads(raw_contents, class_factory, {"_ast"})
File "E:\C_Plan-v0.0.2a-pc - Copy\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 1206, in load_setitems
TypeError: 'RevertableDict' object does not support item assignment

+ Decompilation of 1 file failed
+ Decompiling "up1.rpyc" - 265370 bytes
Error while decompiling E:\C_Plan-v0.0.2a-pc - Copy\game\up1.rpyc:
Traceback (most recent call last):
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 126, in worker
no_pyexpr=args.no_pyexpr, comparable=args.comparable, translator=translator, init_offset=args.init_offset)
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 91, in decompile_rpyc
ast = read_ast_from_file(in_file)
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 77, in read_ast_from_file
data, stmts = magic.safe_loads(raw_contents, class_factory, {"_ast"})
File "E:\C_Plan-v0.0.2a-pc - Copy\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 1206, in load_setitems
TypeError: 'RevertableDict' object does not support item assignment

+ Decompilation of 1 file failed
+ Decompiling "up2.rpyc" - 320365 bytes
Error while decompiling E:\C_Plan-v0.0.2a-pc - Copy\game\up2.rpyc:
Traceback (most recent call last):
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 126, in worker
no_pyexpr=args.no_pyexpr, comparable=args.comparable, translator=translator, init_offset=args.init_offset)
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 91, in decompile_rpyc
ast = read_ast_from_file(in_file)
File "E:\C_Plan-v0.0.2a-pc - Copy\game\..\unrpyc.py", line 77, in read_ast_from_file
data, stmts = magic.safe_loads(raw_contents, class_factory, {"_ast"})
File "E:\C_Plan-v0.0.2a-pc - Copy\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 1198, in load_setitem
TypeError: 'RevertableDict' object does not support item assignment

+ Decompilation of 1 file failed
 

Tacito

Forum Fanatic
Jul 15, 2017
5,570
46,974
tried to decompile rpyc file after extract RPA files of the latest C-Plan Game and got the following errors:
edit: version v0.7 (180818) of unren
Try this https://f95zone.to/threads/unren-ba...sole-developer-menu-enabler.3083/post-2148980

or the last version here

After that if you launch the game there are some errors in screens.rpy , line 397 ... others are the same problem
screen main_menu() tag menu:

instead of (I think)

screen main_menu():
tag menu

But I am not an expert :)
 
Last edited:

goobdoob

Conversation Conqueror
Modder
Respected User
Dec 17, 2017
7,426
9,696
I use the rpatool -x scripts.rpa but still can't extract the rpa files ,the error is:
Traceback (most recent call last):
File "rpatool", line 363, in <module>
archive = RenPyArchive(archive, padlength=padding, key=key, version=version, verbose=arguments.verbose)
File "rpatool", line 65, in __init__
self.load(file)
File "rpatool", line 229, in load
self.version = self.get_version()
File "rpatool", line 87, in get_version
raise ValueError('the given file is not a valid Ren\'Py archive, or an unsupported version')
ValueError: the given file is not a valid Ren'Py archive, or an unsupported version

how can I change the RPYC2_HEADER in rpatool? thanks!
See lines 52-54. RPA2_MAGIC, RPA3_MAGIC, RPA3_2_MAGIC. As I said before, play with it.
 
  • Like
Reactions: xt2021

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
11,009
16,295
how can I change the RPYC2_HEADER in rpatool? thanks!
You can't since RPYC2_HEADER refer to the rpyc files. What you need to solve the rpa problem is to report the value found in the renpy/loader.py file, around lines 132 :
Code:
            # 3.0 Branch.
            if l.startswith("RPA-3.0 "): # <- this value
                offset = int(l[8:24], 16)
into rpatool as value for RPA3_MAGIC. Generally it's enough, but some also mess with the obfuscation code itself.

And if effectively the RPYC2_HEADER have also been changed, then you'll need this tool once you'll have extracted them from the rpa file.
 
  • Like
Reactions: xt2021

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
11,009
16,295
+Added transparent text box mod.
Not sure that it's a good idea.
Penfold Mole mod is in perpetual development, to add support for new games, correct bugs, take count of changes in supported games, and so on. Which mean that you'll have to update your own tool every time he will update his mod.
From my point of view, it goes against the advantage that present unren, which is intended to be a stable tool in addition to an all-in-one tool. Plus, as we can already see with the questions regarding rpatool and unrpyc, it will move part of the support for the mod into this thread.

But well, it's just my point of view.
 
  • Like
Reactions: Penfold Mole

kwazimoda

Newbie
Aug 5, 2018
57
41
Not sure that it's a good idea.
Penfold Mole mod is in perpetual development, to add support for new games, correct bugs, take count of changes in supported games, and so on. Which mean that you'll have to update your own tool every time he will update his mod.
From my point of view, it goes against the advantage that present unren, which is intended to be a stable tool in addition to an all-in-one tool. Plus, as we can already see with the questions regarding rpatool and unrpyc, it will move part of the support for the mod into this thread.

But well, it's just my point of view.
You follow the branch, and you could already make sure that my mod appeared in the form of updating the tool itself for unpacking layered images.
I also include updates when I make updates to the components of the program.
For the last option, the version is descripted on the choose screen, which is currently the last.
Well, in the end, the choice of each of the proposed use that is not. I specifically point out that this is not my development, but only a modification. The author promised to update the utility a few months ago, so I leave behind him the decision what to leave in the update, what to throw out.

On 4 march SAM wrote:
Just a heads up, UnRen 0.8 with updated rpatool and unrpyc as well as a couple of other fixes and features is on my todo, I've just been busy with other F95 related work.

Hope to get around to it in the next week or 2.

https://f95zone.to/threads/unren-ba...eloper-menu-enabler.3083/page-30#post-1652771

Change log my modded from him post:
v1 (16.03.19):
+ ‎replace Unrpyc.py with ‎updated Un.rpyc (Unrpyc.py not LayeredImages support)
- for decompilation need manually starting game

v2 (16.03.19):
+ update rpatool in program code (support Python 3.x)

v3 (17.03.19):
+ show UnRen.bat path if python not found (information for user)

v4: (28.03.19)
+ after unpacking un.rpyc file game exe file launch automatically.

v5: (03.07.19)
+ Update un.rpyc (1.0.12 -> 1.0.15)
+ Corrected path after rpatool uses

v6: (16.07.19)
+ Add to .rpa files delete option after unpacking

v7 (24.07.19)
+ Add Transparent Text Box Mod v2.5.9

What did I do wrong?
 
Last edited:

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
11,009
16,295
v7 (24.07.19)
+ Add Transparent Text Box Mod v2.5.9

What did I do wrong?
Like I said in my comment, the answer of your question is right above it. It's just that I wouldn't have added something that will be updated as often that the Transparent Text Box mod will be.
Partly because it will force your own tool to be updated to follow the move. This while rpatool and unrpyc have no real reasons to be updated again before Ren'py version 8 ; well, perhaps that unrpyc will need one last update because of the user defined statements update in Ren'py, but probably not much more.

But obviously, it's just my point of view, and you do what you want.
 

kwazimoda

Newbie
Aug 5, 2018
57
41
Like I said in my comment, the answer of your question is right above it. It's just that I wouldn't have added something that will be updated as often that the Transparent Text Box mod will be.
Partly because it will force your own tool to be updated to follow the move. This while rpatool and unrpyc have no real reasons to be updated again before Ren'py version 8 ; well, perhaps that unrpyc will need one last update because of the user defined statements update in Ren'py, but probably not much more.

But obviously, it's just my point of view, and you do what you want.
User asked to add such a function, I added. If you talk like that, then the author of this tool himself abandoned it.
I looked at the frequency of updates to the Transparent Text Box mod, one update in 2-3 months, not so often.
And in the end, the choice of each - to use a function or not.
When the SAM updates the main tool version (if it happens), then he will decide what to leave, what to throw out.
 
5.00 star(s) 9 Votes