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

5.00 star(s) 8 Votes

fzdc

Well-Known Member
Jul 25, 2017
1,655
1,652
any way to import images back into the RPA and replace old ones?
 

goobdoob

Conversation Conqueror
Modder
Respected User
Dec 17, 2017
7,425
9,680
any way to import images back into the RPA and replace old ones?
Sure. Extract the RPAs, delete them, move the folder into the relevant Ren'Py SDK folder (make sure you use the same version that the author used), tell it to make RPAs, and build distributions.
 
  • Like
Reactions: Canto Forte

fzdc

Well-Known Member
Jul 25, 2017
1,655
1,652
Sure. Extract the RPAs, delete them, move the folder into the relevant Ren'Py SDK folder (make sure you use the same version that the author used), tell it to make RPAs, and build distributions.
ah so i need the SDK
thanks
i thought the tool would have a way.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,108
14,759
i thought the tool would have a way.
If I remember correctly, unren use unrpa to extract the archive, which in a extractor only tool. But if you have some notions about Python, you can use instead of the Ren'py's SDK.
 
  • Like
Reactions: Canto Forte

fzdc

Well-Known Member
Jul 25, 2017
1,655
1,652
If I remember correctly, unren use unrpa to extract the archive, which in a extractor only tool. But if you have some notions about Python, you can use instead of the Ren'py's SDK.
all i know about Python is it's the #1 cause for headaches.
wasted 4 years studying programming and im not going back.
I need a beer just thinking about it.
 

goobdoob

Conversation Conqueror
Modder
Respected User
Dec 17, 2017
7,425
9,680
all i know about Python is it's the #1 cause for headaches.
wasted 4 years studying programming and im not going back.
I need a beer just thinking about it.
If you think Python causes headaches, just wait until you look at Perl...
 
  • Like
Reactions: Canto Forte

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,108
14,759
If you think Python causes headaches, just wait until you look at Perl...
I highly disagree, it's the sweetest language you can find. And obviously it's absolutely not because it's my main language since more or less 20 years :D
 
  • Like
Reactions: Canto Forte

Cmann

Active Member
Donor
Feb 7, 2019
517
744
all i know about Python is it's the #1 cause for headaches.
wasted 4 years studying programming and im not going back.
I need a beer just thinking about it.
The 'hardest' thing is setting up Python path variables, after that either use bat or cmd with 'py rpatool -c'.
 

Regardie

Well-Known Member
Jul 27, 2017
1,445
1,125
Hi, I modified UnRen.bat 0.7 - now working with Layered Images
+ integration un.rpyc 1.0.12

Usage!!!
After decompiling un.rpyc launch the game (like early unRen.bat versions).

Update 5:03 (GMT +2):
+ update rpatool in program code
So I have tried both the OP version and this version of the tool on the game Sisterly Lust and I have 4 files that fail to decompile.

I was hoping the layered images stuff in this version was the problem with the original tool. here is a snip of the error messages.
Code:
Failed at decompiling ...\Sisterly Lust\SL-0.20-Extra Scenes Edition (PC)/game\day01.rpyc
Traceback (most recent call last):
  File "<unrpyc>", line 30, in decompile_game
  File "<unrpyc>", line 22, in decompile_rpyc
  File "<unrpyc>", line 17, in read_ast_from_file
  File "<magic>", line 141, in safe_loads
  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
The other three have the same error. Thoughts?
 

goobdoob

Conversation Conqueror
Modder
Respected User
Dec 17, 2017
7,425
9,680
So I have tried both the OP version and this version of the tool on the game Sisterly Lust and I have 4 files that fail to decompile.

I was hoping the layered images stuff in this version was the problem with the original tool. here is a snip of the error messages.
Code:
Failed at decompiling ...\Sisterly Lust\SL-0.20-Extra Scenes Edition (PC)/game\day01.rpyc
Traceback (most recent call last):
  File "<unrpyc>", line 30, in decompile_game
  File "<unrpyc>", line 22, in decompile_rpyc
  File "<unrpyc>", line 17, in read_ast_from_file
  File "<magic>", line 141, in safe_loads
  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
The other three have the same error. Thoughts?
I ran the Mac/Linux version on the Mac version of SL 0.20, and it worked fine. The Mac/Linux version is functionally equivalent to 0.7 in the OP. The main differences are it lets you specify the path to the game, and it uses the system python, instead of the python in the game.

The path in the error:
/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py

Is that correct?

What happens if you run the Mac/Linux version in an Ubuntu shell?

What happens if you install Python 2.7.x from python.org, and modify the bat file to use that instead of the python in the game?
 

Regardie

Well-Known Member
Jul 27, 2017
1,445
1,125
I ran the Mac/Linux version on the Mac version of SL 0.20, and it worked fine. The Mac/Linux version is functionally equivalent to 0.7 in the OP. The main differences are it lets you specify the path to the game, and it uses the system python, instead of the python in the game.

The path in the error:
/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py

Is that correct?

What happens if you run the Mac/Linux version in an Ubuntu shell?

What happens if you install Python 2.7.x from python.org, and modify the bat file to use that instead of the python in the game?
Yes that is the path in the error but that path is not on my system. I would need to check if I have a python install outside of all the renpy games. Plus it is only four of the 45 .rpyc files in the extracted game directory. It's just odd.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,108
14,759
The path in the error:
/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py

Is that correct?
Yes but no. In case like this, the path given is the one stored in the pyo file. It correspond to the path when the file was "compiled", and can be totally independent of the effective path where the file is located when the error happen. In this particular case, it's a path on pyTom's computer.
Reported on the game, the path is "[path to the game]/lib/pythonlib2.7/pickle.pyo".


Plus it is only four of the 45 .rpyc files in the extracted game directory. It's just odd.
And it don't happened when I tried it with the Windows version of unren, nor when Goobdoob tried it with the Mac/Linux one ; the version of the game not being significant here since the content of "lib/pythonlib2.7/" is shared between them.
The only thing I can think about, is that for a reason or another, the rpyc files are corrupted. So, is the game working or not ?
 

Regardie

Well-Known Member
Jul 27, 2017
1,445
1,125
I tried it on Win 7 64 bit with both the OP version of unren.bat 0.7 which does not support RenPy 7 layered images and kwazimoda's version that I found a few pages back which says it does. The game also has German and Portuguese files and they were converted fine.

With either tool, I had to unpack the scripts.rpa first to get to the rpyc files, then run the decompile step. Kwazimoda's batch is nice that it cleans up after itself but it's not very clear that you need to keep the tool open at a certain step and run the game to create the files, then when you close the tool it deletes the unren.rpy file it created. Different behaviour than the old @PeppeLePew modded version of 0.3 I had been using for quite some time.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,108
14,759
I tried it on Win 7 64 bit with both the OP version of unren.bat 0.7 which does not support RenPy 7 layered images and kwazimoda's version that I found a few pages back which says it does.
And if you put the attached file directly in the game folder (where there's the rpa file), then launch the game, does all the rpy files are "uncompiled" correctly or not ?
And you didn't answered, is the game working correctly or not ?
 

Tacito

Forum Fanatic
Jul 15, 2017
5,195
40,395
And if you put the attached file directly in the game folder (where there's the rpa file), then launch the game, does all the rpy files are "uncompiled" correctly or not ?
And you didn't answered, is the game working correctly or not ?
With Girl house I had to use (game works ... ) for layered image problem , 1.0.13 gave errors at time I tested it... but I have to try with new release posted.

Python:
init:
    layeredimage curbg:
        if hour in [22,23,24,0,1,2,3,4,5,6]:
            "images/mainmenu/mainmenu_bg_night.png"
        if hour in [20,21] or hour in [7,8]:
            "images/mainmenu/mainmenu_bg_sunset.png"
        if hour in [9,10,11,12,13,14,15,16,17,18,19]:
            "images/mainmenu/mainmenu_bg_day.png"
With the version in unren ... only
layeredimage curbg:
 
Last edited:

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,108
14,759
With Girl house I had to use (game works ... ) for layered image problem
Except that there's no layered images in Sisterly Lust, and files "decompile" correctly for at least two persons. Therefore, to reduce the field of search, I want to know if it works with the (very old) version of un.rpyc that works for me, in which case the problem come from unren.
 

Regardie

Well-Known Member
Jul 27, 2017
1,445
1,125
And if you put the attached file directly in the game folder (where there's the rpa file), then launch the game, does all the rpy files are "uncompiled" correctly or not ?
And you didn't answered, is the game working correctly or not ?
I can't try just your version of un.rpyc as the script files are in an archive format so I would have to use some version of unren.bat to extract the files from the archive first and that could be the problem step as well.
 
5.00 star(s) 8 Votes