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

5.00 star(s) 9 Votes

joelurmel

Engaged Member
Nov 3, 2022
2,375
4,183
By the way, just tried your UnRen-forall script, and while it doesn't report any errors on screen when decompiling rpyc files, I just don't have any resulting rpy files in my folders...and the Unren log is full of errors related to unrpyc, if you want to have a try at it yourself and understand what might be happening here...
Currently downloading for checking
 

joelurmel

Engaged Member
Nov 3, 2022
2,375
4,183
For all Unren users,

Bad news since the release of Ren'Py 8.4.*, no tool is capable of decompiling rpyc files anymore.
This is because Ren'Py decided to change the file structure and implement anti-reverse engineering measures to prevent this.

We must therefore wait for an update of the unrpyc tools from CensoredUserName or rpydec, or even a new tool.
 

alain8891

Member
Dec 18, 2023
314
1,171
For all Unren users,

Bad news since the release of Ren'Py 8.4.*, no tool is capable of decompiling rpyc files anymore.
This is because Ren'Py decided to change the file structure and implement anti-reverse engineering measures to prevent this.

We must therefore wait for an update of the unrpyc tools from CensoredUserName or rpydec, or even a new tool.
Thanks for taking the time to check on this. Hoping unrpyc will get updated, or a new tool gets out, otherwise this will be a huge stop-gap for modding...
 

ZenoMod

Well-Known Member
Nov 12, 2022
1,476
1,794
For all Unren users,

Bad news since the release of Ren'Py 8.4.*, no tool is capable of decompiling rpyc files anymore.
This is because Ren'Py decided to change the file structure and implement anti-reverse engineering measures to prevent this.

We must therefore wait for an update of the unrpyc tools from CensoredUserName or rpydec, or even a new tool.
Thanks for the news.

Shit, the main reason why I play Ren'Py games is because they are decompilable. So I can explore the code and do my own mini-mods. And definitely I'm not the only one.

If they actually succeed in making Ren'Py script not decompilable, the Devs using this anti-decompile technology will experience a loss of pledgers.

---

I mean: some games with good renders and/or good story but an overcomplicated grinding and/or idiotic minigames are worth playing only if we can mess with the code. Otherwise they are a boring waste of time... and we can switch back to porn manga... :HideThePain:
 

trauts

Active Member
Aug 12, 2018
808
627
I have updated my UnRen-forall.bat with a beta fix for Ren'Py 8.4.
It seems to work with 3 games. Waiting for your comments (y)
tried decompile using your new unren-forall (9.6.48) on One Week Away, after I select #2, the window just closes
this is what's in the UnRen-forall log file:
Code:
Checking if Python is available
Python found at F:\OneWeekAway-0.4.0-pc\lib\py3-windows-x86_64\
Check Python Version
Python version is 3.12.7, which is upper or equal to 3.8

Init phase
scriptdir         = F:\OneWeekAway-0.4.0-pc\
currentdir         = F:\OneWeekAway-0.4.0-pc
pythondir         = F:\OneWeekAway-0.4.0-pc\lib\py3-windows-x86_64\
pynoassert         = []
renpydir         = F:\OneWeekAway-0.4.0-pc\renpy\
gamedir          = F:\OneWeekAway-0.4.0-pc\game\
PYTHONHOME         = F:\OneWeekAway-0.4.0-pc\lib\py3-windows-x86_64\
PYTHONPATH         = F:\OneWeekAway-0.4.0-pc\lib\python3.12
PYTHONVERS         = 3.12.7
rpatool-new      = y
major_version      = []
offset             = []

Check the Ren'Py version to adjust the `offset` variable.
i tried with another game, MultiverseofMILFS-VOL3-pc
it was able to extract the rpa file, but the same happened when trying to decompile
Code:
Checking if Python is available 
Python found at F:\MultiverseofMILFS-VOL3-pc\lib\py3-windows-x86_64\ 
Check Python Version 
Python version is 3.9.10, which is upper or equal to 3.8 
 
Init phase 
scriptdir         = F:\MultiverseofMILFS-VOL3-pc\ 
currentdir         = F:\MultiverseofMILFS-VOL3-pc 
pythondir         = F:\MultiverseofMILFS-VOL3-pc\lib\py3-windows-x86_64\ 
pynoassert         = [] 
renpydir         = F:\MultiverseofMILFS-VOL3-pc\renpy\ 
gamedir          = F:\MultiverseofMILFS-VOL3-pc\game\ 
PYTHONHOME         = F:\MultiverseofMILFS-VOL3-pc\lib\py3-windows-x86_64\ 
PYTHONPATH         = F:\MultiverseofMILFS-VOL3-pc\lib\python3.9 
PYTHONVERS         = 3.9.10 
rpatool-new      = y 
major_version      = [] 
offset             = [] 
 
 
RPA extract phase 
scriptdir         = F:\MultiverseofMILFS-VOL3-pc\ 
currentdir         = F:\MultiverseofMILFS-VOL3-pc 
pythondir         = F:\MultiverseofMILFS-VOL3-pc\lib\py3-windows-x86_64\ 
pynoassert         = [] 
renpydir         = F:\MultiverseofMILFS-VOL3-pc\renpy\ 
gamedir          = F:\MultiverseofMILFS-VOL3-pc\game\ 
PYTHONHOME         = F:\MultiverseofMILFS-VOL3-pc\lib\py3-windows-x86_64\ 
PYTHONPATH         = F:\MultiverseofMILFS-VOL3-pc\lib\python3.9 
PYTHONVERS         = 3.9.10 
rpatool-new      = y 
major_version      = [] 
offset             = [] 
 
Creating rpatool... 
[32m    + RPA tool created successfully[0m 
[33m    + RPA archives will be moved[0m 
 
Searching for RPA files in the game directory... 
 
     + Processing scripts.rpa 
"F:\MultiverseofMILFS-VOL3-pc\lib\py3-windows-x86_64\"python.exe  "F:\MultiverseofMILFS-VOL3-pc\rpatool.py" -o "F:\MultiverseofMILFS-VOL3-pc\game\" -x "F:\MultiverseofMILFS-VOL3-pc\game\scripts.rpa" 
[32m    + RPA package extracted: scripts.rpa[0m 
    Moving RPA F:\MultiverseofMILFS-VOL3-pc\game\scripts.rpa to 'F:\MultiverseofMILFS-VOL3-pc\rpa' 
[32m    RPA F:\MultiverseofMILFS-VOL3-pc\game\scripts.rpa moved to 'F:\MultiverseofMILFS-VOL3-pc\rpa'[0m 
 
Cleaning up temporary files... 
 
 
[32m    Finished[0m 
 
 
 
Check the Ren'Py version to adjust the `offset` variable.
 
Last edited:

joelurmel

Engaged Member
Nov 3, 2022
2,375
4,183
tried decompile using your new unren-forall (9.6.48) on One Week Away, after I select #2, the window just closes
this is what's in the UnRen-forall log file:
Code:
Checking if Python is available
Python found at F:\OneWeekAway-0.4.0-pc\lib\py3-windows-x86_64\
Check Python Version
Python version is 3.12.7, which is upper or equal to 3.8

Init phase
scriptdir         = F:\OneWeekAway-0.4.0-pc\
currentdir         = F:\OneWeekAway-0.4.0-pc
pythondir         = F:\OneWeekAway-0.4.0-pc\lib\py3-windows-x86_64\
pynoassert         = []
renpydir         = F:\OneWeekAway-0.4.0-pc\renpy\
gamedir          = F:\OneWeekAway-0.4.0-pc\game\
PYTHONHOME         = F:\OneWeekAway-0.4.0-pc\lib\py3-windows-x86_64\
PYTHONPATH         = F:\OneWeekAway-0.4.0-pc\lib\python3.12
PYTHONVERS         = 3.12.7
rpatool-new      = y
major_version      = []
offset             = []

Check the Ren'Py version to adjust the `offset` variable.
i tried with another game, MultiverseofMILFS-VOL3-pc
it was able to extract the rpa file, but the same happened when trying to decompile
Code:
Checking if Python is available
Python found at F:\MultiverseofMILFS-VOL3-pc\lib\py3-windows-x86_64\
Check Python Version
Python version is 3.9.10, which is upper or equal to 3.8

Init phase
scriptdir         = F:\MultiverseofMILFS-VOL3-pc\
currentdir         = F:\MultiverseofMILFS-VOL3-pc
pythondir         = F:\MultiverseofMILFS-VOL3-pc\lib\py3-windows-x86_64\
pynoassert         = []
renpydir         = F:\MultiverseofMILFS-VOL3-pc\renpy\
gamedir          = F:\MultiverseofMILFS-VOL3-pc\game\
PYTHONHOME         = F:\MultiverseofMILFS-VOL3-pc\lib\py3-windows-x86_64\
PYTHONPATH         = F:\MultiverseofMILFS-VOL3-pc\lib\python3.9
PYTHONVERS         = 3.9.10
rpatool-new      = y
major_version      = []
offset             = []


RPA extract phase
scriptdir         = F:\MultiverseofMILFS-VOL3-pc\
currentdir         = F:\MultiverseofMILFS-VOL3-pc
pythondir         = F:\MultiverseofMILFS-VOL3-pc\lib\py3-windows-x86_64\
pynoassert         = []
renpydir         = F:\MultiverseofMILFS-VOL3-pc\renpy\
gamedir          = F:\MultiverseofMILFS-VOL3-pc\game\
PYTHONHOME         = F:\MultiverseofMILFS-VOL3-pc\lib\py3-windows-x86_64\
PYTHONPATH         = F:\MultiverseofMILFS-VOL3-pc\lib\python3.9
PYTHONVERS         = 3.9.10
rpatool-new      = y
major_version      = []
offset             = []

Creating rpatool...
[32m    + RPA tool created successfully[0m
[33m    + RPA archives will be moved[0m

Searching for RPA files in the game directory...

     + Processing scripts.rpa
"F:\MultiverseofMILFS-VOL3-pc\lib\py3-windows-x86_64\"python.exe  "F:\MultiverseofMILFS-VOL3-pc\rpatool.py" -o "F:\MultiverseofMILFS-VOL3-pc\game\" -x "F:\MultiverseofMILFS-VOL3-pc\game\scripts.rpa"
[32m    + RPA package extracted: scripts.rpa[0m
    Moving RPA F:\MultiverseofMILFS-VOL3-pc\game\scripts.rpa to 'F:\MultiverseofMILFS-VOL3-pc\rpa'
[32m    RPA F:\MultiverseofMILFS-VOL3-pc\game\scripts.rpa moved to 'F:\MultiverseofMILFS-VOL3-pc\rpa'[0m

Cleaning up temporary files...


[32m    Finished[0m



Check the Ren'Py version to adjust the `offset` variable.
The problem is on your side. Maybe you have to redownload the game.
 

ZenoMod

Well-Known Member
Nov 12, 2022
1,476
1,794
tried decompile using your new unren-forall (9.6.48) on One Week Away, after I select #2, the window just closes
this is what's in the UnRen-forall log file:
Code:
Checking if Python is available
Python found at F:\OneWeekAway-0.4.0-pc\lib\py3-windows-x86_64\
Check Python Version
Python version is 3.12.7, which is upper or equal to 3.8

Init phase
scriptdir         = F:\OneWeekAway-0.4.0-pc\
currentdir         = F:\OneWeekAway-0.4.0-pc
pythondir         = F:\OneWeekAway-0.4.0-pc\lib\py3-windows-x86_64\
pynoassert         = []
renpydir         = F:\OneWeekAway-0.4.0-pc\renpy\
gamedir          = F:\OneWeekAway-0.4.0-pc\game\
PYTHONHOME         = F:\OneWeekAway-0.4.0-pc\lib\py3-windows-x86_64\
PYTHONPATH         = F:\OneWeekAway-0.4.0-pc\lib\python3.12
PYTHONVERS         = 3.12.7
rpatool-new      = y
major_version      = []
offset             = []

Check the Ren'Py version to adjust the `offset` variable.
i tried with another game, MultiverseofMILFS-VOL3-pc
it was able to extract the rpa file, but the same happened when trying to decompile
Code:
Checking if Python is available
Python found at F:\MultiverseofMILFS-VOL3-pc\lib\py3-windows-x86_64\
Check Python Version
Python version is 3.9.10, which is upper or equal to 3.8

Init phase
scriptdir         = F:\MultiverseofMILFS-VOL3-pc\
currentdir         = F:\MultiverseofMILFS-VOL3-pc
pythondir         = F:\MultiverseofMILFS-VOL3-pc\lib\py3-windows-x86_64\
pynoassert         = []
renpydir         = F:\MultiverseofMILFS-VOL3-pc\renpy\
gamedir          = F:\MultiverseofMILFS-VOL3-pc\game\
PYTHONHOME         = F:\MultiverseofMILFS-VOL3-pc\lib\py3-windows-x86_64\
PYTHONPATH         = F:\MultiverseofMILFS-VOL3-pc\lib\python3.9
PYTHONVERS         = 3.9.10
rpatool-new      = y
major_version      = []
offset             = []


RPA extract phase
scriptdir         = F:\MultiverseofMILFS-VOL3-pc\
currentdir         = F:\MultiverseofMILFS-VOL3-pc
pythondir         = F:\MultiverseofMILFS-VOL3-pc\lib\py3-windows-x86_64\
pynoassert         = []
renpydir         = F:\MultiverseofMILFS-VOL3-pc\renpy\
gamedir          = F:\MultiverseofMILFS-VOL3-pc\game\
PYTHONHOME         = F:\MultiverseofMILFS-VOL3-pc\lib\py3-windows-x86_64\
PYTHONPATH         = F:\MultiverseofMILFS-VOL3-pc\lib\python3.9
PYTHONVERS         = 3.9.10
rpatool-new      = y
major_version      = []
offset             = []

Creating rpatool...
[32m    + RPA tool created successfully[0m
[33m    + RPA archives will be moved[0m

Searching for RPA files in the game directory...

     + Processing scripts.rpa
"F:\MultiverseofMILFS-VOL3-pc\lib\py3-windows-x86_64\"python.exe  "F:\MultiverseofMILFS-VOL3-pc\rpatool.py" -o "F:\MultiverseofMILFS-VOL3-pc\game\" -x "F:\MultiverseofMILFS-VOL3-pc\game\scripts.rpa"
[32m    + RPA package extracted: scripts.rpa[0m
    Moving RPA F:\MultiverseofMILFS-VOL3-pc\game\scripts.rpa to 'F:\MultiverseofMILFS-VOL3-pc\rpa'
[32m    RPA F:\MultiverseofMILFS-VOL3-pc\game\scripts.rpa moved to 'F:\MultiverseofMILFS-VOL3-pc\rpa'[0m

Cleaning up temporary files...


[32m    Finished[0m



Check the Ren'Py version to adjust the `offset` variable.
The problem is on your side. Maybe you have to redownload the game.

I can confirm I had the same problem with OneWeekAway-0.4.0-pc

1) I chose 1 to extract .rpa (deleting after extraction) and it worked
2) I chose 2 do decompile .rpyc and the batch window just closed

WORKAROUND


After the crash, I relaunched UnRen-forall-9.6.48 and selected 2 to decompile and it worked.

---

I think something remains "dirty" after extraction, so after extraction of .rpa you have to exit the batch and relaunch it to be able to decompile .rpyc files.

Hope this helps
 

joelurmel

Engaged Member
Nov 3, 2022
2,375
4,183
I can confirm I had the same problem with OneWeekAway-0.4.0-pc

1) I chose 1 to extract .rpa (deleting after extraction) and it worked
2) I chose 2 do decompile .rpyc and the batch window just closed

WORKAROUND


After the crash, I relaunched UnRen-forall-9.6.48 and selected 2 to decompile and it worked.

---

I think something remains "dirty" after extraction, so after extraction of .rpa you have to exit the batch and relaunch it to be able to decompile .rpyc files.

Hope this helps
Ok, I will check
 
  • Like
Reactions: ZenoMod

serpong

New Member
Apr 14, 2020
4
0
What should I edit in the batch file so that the .rpa extracted contents go to its own folder rather than the directly to the "game" folder? Ex. UnRen extracts as such root (.exe folder) -> game -> images -> files

What I'm looking for the extract to do is root -> game -> UNREN EXTRACTS -> images -> files
How do I edit that into the .bat file? I'm not code savvy so I don't know what I need to add/change in the code wall.
 

serpong

New Member
Apr 14, 2020
4
0
What should I edit in the batch file so that the .rpa extracted contents go to its own folder rather than the directly to the "game" folder? Ex. UnRen extracts as such root (.exe folder) -> game -> images -> files

What I'm looking for the extract to do is root -> game -> UNREN EXTRACTS -> images -> files
How do I edit that into the .bat file? I'm not code savvy so I don't know what I need to add/change in the code wall.
OK, Copilot helped me add these lines of code to the batch file in case anyone else needed something similar, anything with extractdir is new, and everything seems to work fine for what I needed. To change the folder name just change the UNREN EXTRACTS text. Start at Line 570 where it cd %gamedir% and paste up to the echo command before the REM Offer remark. I did this because my HDD is running out of space from the 3 dozen games I've got unpacked and I had no idea which folders are safe to delete LOL.

Code:
cd %gamedir%
set "extractdir=%gamedir%UNREN EXTRACTS"
if not exist "%extractdir%" mkdir "%extractdir%"

"%powershellpath%" write-host -fore White -back DarkGray Working in: """"'%extractdir%'""""

for %%f in (*.rpa) do (
    echo    + Unpacking "%%~nf%%~xf" - %%~zf bytes
  "%pythondir%python.exe" -O "%rpatool%" -x "%%f" -o "%extractdir%" 2>nul
    if NOT !ERRORLEVEL!==0 (
    "%pythondir%python.exe" "%rpatool2%" "%%f" "%extractdir%"
    if NOT !ERRORLEVEL!==0 (
      set /a countunrpaerr+=1
      "%powershellpath%" write-host -fore Red "....... sorry',' could not extract the archive."
    ) else (
      set /a countunrpa+=1
    )
    ) else (
        set /a countunrpa+=1
    )
)
echo.
 

ZenoMod

Well-Known Member
Nov 12, 2022
1,476
1,794
Ok, I will check
I didn't have this problem myself with One Week Away. Extracted RPAs and decompiled RPYCs with no need for relaunching UnRen

Ok, I'm officially dumb...
...looks like the batch window closed because I chose "2" when the prompt was saying
Code:
 Enter "1" to go back to the menu,
.        or any other key to exit:
So... yeah... the window closed because I closed it... :HideThePain: :FacePalm:

I can confirm it was a case of PEBKAC. Sorry for reporting a false bug.
 
5.00 star(s) 9 Votes