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

5.00 star(s) 9 Votes

moskyx

Engaged Member
Jun 17, 2019
3,969
12,778
Any easy way to pack the extracted files into an .rpa again?

"RPA Extractor for Windows" is from 2014/2015 and most stuff (except extraction) doesn't really work anymore.

"rpatool" seems to be outdated and buggy as well. It produces .rpa files with the correct size and without errors, but the files don't actually work in recent games and it fails to extract anything when you try to unpack the generated .rpa file again. There's also an open issue from 2017(!) on its github claiming it not longer works with modern versions of RenPy.
Why would you like to do that? And in case you really need to do it, why not use the Ren'Py SDK to
 
  • Like
Reactions: Wonko_the_Sane*

moskyx

Engaged Member
Jun 17, 2019
3,969
12,778
I just wanted to remove the text background image from a game.

Unfortunately using RenPy didn't work for me either.
I put build.archive("images", "all") into a new project's options.rpy, but it still compiled images as a regular folder instead of an images.rpa file.
If you only want to remove that background, I'd say you could probably do it just by editing the gui.rpy or screens.rpy where that background is coded to be added to the textbox. Same way, if you want to replace that background with a different one, you could edit those lines of code and then include an "images" (or "gui") folder of your own with the new pic without creating an rpa, Ren'Py will find it without problems
 
  • Like
Reactions: wiwem71072

Meushi

Well-Known Member
Aug 4, 2017
1,146
12,721
Any easy way to pack the extracted files into an .rpa again?

"RPA Extractor for Windows" is from 2014/2015 and most stuff (except extraction) doesn't really work anymore.

"rpatool" seems to be outdated and buggy as well. It produces .rpa files with the correct size and without errors, but the files don't actually work in recent games and it fails to extract anything when you try to unpack the generated .rpa file again. There's also an open issue from 2017(!) on its github claiming it not longer works with modern versions of RenPy.
Again, why are you trying to put the modded files back into an rpa?

From the context I assume you're modding someone else's game. If so there's no need to repack the modded images or scripts, the loose files will take precedence over the originals within the rpa files.

And rpatool has worked fine on any game I've repacked for.
 

bymechul

Newbie
Jul 31, 2019
18
3
"Error while decompiling D:\LifeWithPleasure-V1.0-pc\game\names.rpyc:
Traceback (most recent call last):
File "D:\LifeWithPleasure-V1.0-pc\unrpyc.py", line 191, in worker
tag_outside_block=args.tag_outside_block, init_offset=args.init_offset, try_harder=args.try_harder)
File "D:\LifeWithPleasure-V1.0-pc\unrpyc.py", line 154, in decompile_rpyc
ast = read_ast_from_file(in_file)
File "D:\LifeWithPleasure-V1.0-pc\unrpyc.py", line 125, in read_ast_from_file
raw_contents = chunks[1]
KeyError: 1"

I get this error. what's the problem? and how can i fix it?
 

Abhishek_tanwar

Active Member
Feb 20, 2021
883
3,523
View attachment 1065329

I had originally created this script for myself, but I've decided to clean it up a bit and release it for everyone. You can extract RPA archives (using built in ), decompile RPYC files (using built in ), enable the console and developer menu for Ren'Py games and more.

No dependencies, no internet connection required. You can right click->edit to see the source. Works on Windows 7, 8 and 10. XP and Vista users might need this PowerShell update from Microsoft:

Instructions:
1. Copy UnRen.bat to either the game's root directory (where the exe is) or the /game/ folder
2. Double click on UnRen.bat to execute
3. Select the option you require

Both RPA and RPYC files will be extracted/decompiled to the same path as the original files.

Known Issues:
- Having non-ASCII characters in your folder path may cause issues

Let me know if you encounter any issues or bugs.

Contributions:
If you'd like to contribute any changes or improvements, check out the new (currently out of date)

You don't have permission to view the spoiler content. Log in or register now.
You don't have permission to view the spoiler content. Log in or register now.
Thank you for sharing it sir !
 

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,367
Can you briefly describe the difference between UnRen and UnRen.bat (which I believe is in v0.12)? I didn't see anything on your thread about what UnRen does that UnRen.bat doesn't.
It's still the same UnRen.bat The only difference is how it does the unpacking of archives. You can read more in the change log.
 
  • Like
Reactions: Walter Victor

Dyhart

Well-Known Member
Jul 30, 2017
1,914
1,403
After using this, how does one go about READING/editing RPYC files. I have the actual ren'py app and that doesn't work, neither does something simple like wordpad. I did option 1 and option 2 with the intend to adjust a few things but the files all come up jibberish.

EDIT: Answered my own question right below this.
 

Dyhart

Well-Known Member
Jul 30, 2017
1,914
1,403
After using this, how does one go about READING/editing RPYC files. I have the actual ren'py app and that doesn't work, neither does something simple like wordpad. I did option 1 and option 2 with the intend to adjust a few things but the files all come up jibberish.
rpyc is compiled file and no editable. For edit need rpyc decompiling to rpy. It's possible with UnRen.bat menu selection 2 case.
Ok interesting. So option 1, 2 and 2...from what I'm gathering. I'll attempt this in a bit.

EDIT: Ok I really don't know. option 1 created RPA files. Option 2 created RPYC files. using option 2 just created(and overwrote) the RPYC files again.
 
Last edited:

ZTex

Engaged Member
Apr 3, 2019
2,896
4,182
Ok interesting. So option 1, 2 and 2...from what I'm gathering. I'll attempt this in a bit.

EDIT: Ok I really don't know. option 1 created RPA files. Option 2 created RPYC files. using option 2 just created(and overwrote) the RPYC files again.
No.

Option 1 decompiles the .RPA (archive format) and creates standard directories instead eg. /game/images/*
Option 2 decompiles the .RPYC (the compressed format) files into .RPY into standard text.
It doesn't remove the prior .RPYC files.
 
Last edited:
  • Like
Reactions: Walter Victor

Dyhart

Well-Known Member
Jul 30, 2017
1,914
1,403
No.

Option 1 decompiles the .RPA (archive format) and creates standard directories instead eg. /game/images/*
Option 2 decompiles the .RPYC (the compressed format) files into .RPY into standard text.
It doesn't remove the prior .RPYC files.
Yeah I don't know. option 2 created RPYC files that were previously not there. It never created RPY files. I had to use unrpyc which is another program and worked fine.

Maybe it's the game. It was straitened times.
 

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,367
Yeah I don't know. option 2 created RPYC files that were previously not there. It never created RPY files. I had to use unrpyc which is another program and worked fine.

Maybe it's the game. It was straitened times.
instrument in this theme has not been working for a long time and is not updated by anyone. Above, I threw a link to my topic, where I post the actual version of the tool.
 

ZTex

Engaged Member
Apr 3, 2019
2,896
4,182
Yeah I don't know. option 2 created RPYC files that were previously not there. It never created RPY files. I had to use unrpyc which is another program and worked fine.

Maybe it's the game. It was straitened times.
Just checked and the base game is completely archived so using 1 will unarchive them.
like so
You don't have permission to view the spoiler content. Log in or register now.
after using 1 looks like so
You don't have permission to view the spoiler content. Log in or register now.

Then using 2 does the following....for clarity i've removed all the .rpyc just to show you that it's creating .rpy
You don't have permission to view the spoiler content. Log in or register now.

So it's more likely than not that you're doing something wrong.
 

mirian

Member
Nov 18, 2018
251
77
I've tried it but I can't use Unren.bat to extract rpa images, is there any easier way to extract game images?
 

Walter Victor

Forum Fanatic
Dec 27, 2017
5,688
19,629
I've tried it but I can't use Unren.bat to extract rpa images, is there any easier way to extract game images?
When you use Unren, what does it do for you? Is anything created? Especially, does it create an "image" folder? If it does, what if anything is in it?
 

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,367
I've tried it but I can't use Unren.bat to extract rpa images, is there any easier way to extract game images?
If something doesn't work for you, please provide more information. The name of the game, a screenshot of working tool, such general phrases will not help solve problems. In different games, there may be different reasons for the tool's malfunction.
 

mirian

Member
Nov 18, 2018
251
77
I am increasingly confused by the explanations on how to use Unren.bat or some rpa image extractor. I'm a layman in computer science and at my age it's hard to learn. Is there any tutorial that will teach me step by step how to extract these images. I'm just insisting because I have pictures of
several games and would like to have the sequel. Thanks if anyone can help me
 

Walter Victor

Forum Fanatic
Dec 27, 2017
5,688
19,629
I am increasingly confused by the explanations on how to use Unren.bat or some rpa image extractor. I'm a layman in computer science and at my age it's hard to learn. Is there any tutorial that will teach me step by step how to extract these images. I'm just insisting because I have pictures of
several games and would like to have the sequel. Thanks if anyone can help me
First off, have you reviewed the Instructions on Page 1 of this thread? You need to do that.

Let's assume that you have downloaded the zip file for UnRen.bat, and have extracted it.

Then let's assume that you have downloaded the zip file for some game and have extracted that.

If you click on the extracted folder, you should find a folder named 'game', in which you may find one or more .rpa files.

If .rpa files exist, you go back to the folder that contained the 'game' folder - the folder that contains the game's executable file that you double-click to start the game, and copy/paste UnRen.bat there.

Then just follow instructions: double-click on UnRen.bat, which will bring up the Menu displayed on Page 1. Click 1, then <Enter>, and UnRen.bat will extract those .rpa files, producing an 'images' folder which contains the images you seek.

You may see several files and folders that did not exist before you ran UnRen.bat. Don't worry about that. Your game will run the same as it did before.
 
  • Like
Reactions: FAP369ZONE
5.00 star(s) 9 Votes