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

5.00 star(s) 8 Votes

oidex

Active Member
Jan 9, 2018
659
1,717
Sam If you ever get tired of having to split the embedded files into chunks due to batch file string limitations, you could use something like this:

test.bat
Code:
@echo off

call :extract_file test.zip
exit

:extract_file
set esc=%~1
powershell -c "[IO.File]::WriteAllBytes('%~f1', [convert]::FromBase64String(((gc -path '%~f0' -raw) -split('--##-- ')).where({$_ -match '^%esc:.=\.%'}).substring('%~1'.length).trim()))"
exit /b

--##-- test.zip
UEsDBBQAAAAAAHerNFG4k+ruBAAAAAQAAAAIAAAAdGVzdC50eHRURVNUUEsBAhQAFAAAAAAAd6s0
UbiT6u4EAAAABAAAAAgAJAAAAAAAAAAgAAAAAAAAAHRlc3QudHh0CgAgAAAAAAABABgAsxM0HoSP
1gEwT5IehI/WAQROWnJ2j9YBUEsFBgAAAAABAAEAWgAAACoAAAAAAA==

Also, just out of curiosity, why is the stuff packed in cab files? If you are already using powershell to concat the chunks, why not use the Expand-Archive cmdlet and regular zip files? Backward compatibility?
 

blackmasha

Active Member
Jun 21, 2018
526
383
They just mean that some devs just write a name in, like instead of [mc_name] or [momname] or something, they just type in the name. You can use a GREP tool to find and replace directory-wide in that case.
I am not sure how to do this..
 

yoyomistro

Engaged Member
Jan 15, 2017
2,678
3,338
I am not sure how to do this..
I mean use a program like this one: . It allows you to do an exhaustive search of files in a directory for any text you want. It also has a replace function which comes in really handy. It's made playing a lot of games on here much easier for me, as it works with pretty much any engine that you can unpack/decompile.
 
  • Like
Reactions: blackmasha

fulcrum

Engaged Member
Feb 2, 2018
3,295
1,808
I am not sure how to do this..
look for script.rpy. do not open script.rpyc, thats compiled and unreadable.
open script.rpy with a text editor (not wordpad or other higher processors like ms windows word, they may fuck up the file by auto converting it to something else than is set).
use the search function.
search for the character name.
replace the character name.
mark the character name.
press control (CTRL) and x.
the character name is now in your clipboard as text.
press ctrl v.
it is now pasted back into the file.
keep searching and replacing every hit with ctrl v.

if there is no sccript.rpy, decompile script.rpyc using unren. if there is no script.rpyc either, use unren to unpack .rpa archives and look again. if there are still none of these files afterward, the developer renamed them and i can not help you.
 
  • Like
Reactions: blackmasha

blackmasha

Active Member
Jun 21, 2018
526
383
look for script.rpy. do not open script.rpyc, thats compiled and unreadable.
open script.rpy with a text editor (not wordpad or other higher processors like ms windows word, they may fuck up the file by auto converting it to something else than is set).
use the search function.
search for the character name.
replace the character name.
mark the character name.
press control (CTRL) and x.
the character name is now in your clipboard as text.
press ctrl v.
it is now pasted back into the file.
keep searching and replacing every hit with ctrl v.

if there is no sccript.rpy, decompile script.rpyc using unren. if there is no script.rpyc either, use unren to unpack .rpa archives and look again. if there are still none of these files afterward, the developer renamed them and i can not help you.
the last option helped, to unpack the RPA archive, thanks!
 

Dragon Sins

Member
Jul 27, 2017
483
242
OK, I don't really understand what this did, I did option 1 said creating rpatool from archive.rpa, it finished and nothing changed, I'm confused...
I just want to change text in the game, how do I do that?
 
Last edited:

FallenLondon

Active Member
Aug 5, 2016
715
501
Request: is it possible to add the option to set the music volume to zero through the tool? Even in those cases where the music isn't horrible it is always *much* too loud!
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,110
14,787
You have to put it in the folder where there's the executable file. But the path shown on the error contain "game", which is a bad sign. And at the same level than "unren", there's too many folders, among which "images" and "scripts", while there isn't the expected "game", "lib" and "renpy", which is a second bad sign.

Put unren on the right place and try again.
 
  • Like
Reactions: yoyomistro

mirian

Member
Nov 18, 2018
251
77
I copied the unren to the game folder but when I click 2 to open this message appears. what do i open?

cannot locate phyton.exe. Unable to continue. are you sure we re inb the game root directory?
 

ADIDAS

Member
Feb 3, 2018
316
297
So I double click the .bat file and am prompted to select a program to run the file. Help please
 

Walter Victor

Forum Fanatic
Dec 27, 2017
5,553
19,302
So I double click the .bat file and am prompted to select a program to run the file. Help please
If you clicked on either the UnRen.bat file or the UnRen-dev.bat file, you should have received a menu with numbered options. If you got something else, you may have clicked on the wrong .bat file, or perhaps you are in the wrong thread here.
 

Jansen

Well-Known Member
May 8, 2017
1,691
3,150
Hi All,

Need help here. I have re-installed windows so now when i use the Unren Bat V0.8 i keep getting this error. Can someone guide me what im doing wrong here??

1601747430349.png
 

Meushi

Well-Known Member
Aug 4, 2017
1,146
12,685
Can someone guide me what im doing wrong here??
The giant warning in the bottom right saying your virus protection blocked powershell from making changes to a controlled folder is probably a handy hint no?

Move the game you're trying to unpack to a different folder where you have full privileges (like C:\temp) and see if Unren works then.
 
  • Like
Reactions: Jansen

Jansen

Well-Known Member
May 8, 2017
1,691
3,150
The giant warning in the bottom right saying your virus protection blocked powershell from making changes to a controlled folder is probably a handy hint no?

Move the game you're trying to unpack to a different folder where you have full privileges (like C:\temp) and see if Unren works then.
shifting to another location actually worked. It was really that simple. Thanks alot Meushi
 
  • Like
Reactions: Meushi

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,110
14,787
I'm sorry, but an uncaught exception occurred.

While running game code:
File "renpy/common/000statements.rpy", line 531, in execute_call_screen
Exception: Screen player_room is not known.
This an error related to the game, not directly to unren. Talk about it directly in the game thread, starting by searching in it if there isn't already some messages talking about it.
 
  • Like
Reactions: Twistty
5.00 star(s) 8 Votes