Create and Fuck your AI Cum Slut -70% OFF
x

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

5.00 star(s) 9 Votes

trauts

Active Member
Aug 12, 2018
816
628
in here

1) Extract RPA packages
2) Decompile RPYC files
3) Enable Console and Developer Menu (Can break your game)
4) Enable Quick Save and Quick Load
5) Force enable skipping of unseen content
6) Force enable rollback (scroll wheel)
7) Deobfuscate when decompile RPYC files (Use basic code)
8) Extract and decompile
9) All of the above (Can break your game)

The following choices require administrative privileges
+) Add a right-click menu entry for folders to run the script
-) Remove the right-click menu entry from the registry

x) Exit

Enter your choice:
 

Madeddy

Active Member
Dec 17, 2017
966
676
tried decompile using your new unren-forall (9.6.48) on One Week Away, after I select #2, the window just closes...
Is there a debug mode? to see where the problem is?
How do you use unren? Do you simply double-click it in the target location OR do you open the CMD window manually and type then {target-DIR/unren.bat} ?

With the second way, the CMD should NOT(with correct sys cfg) close after unren ends its run and you should be able to get additional error messages(if any).

I put my money on some misconfiguration in your system. Maybe a second python installed somewhere or a rights problem.
 

trauts

Active Member
Aug 12, 2018
816
628
With the second way, the CMD should NOT(with correct sys cfg) close after unren ends its run and you should be able to get additional error messages(if any).
you are right, the window did not close if i ran it from command prompt.
the only additional message was "8 was unexpected at this time."


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

Available Options:

1) Extract RPA packages
2) Decompile RPYC files
3) Enable Console and Developer Menu (Can break your game)
4) Enable Quick Save and Quick Load
5) Force enable skipping of unseen content
6) Force enable rollback (scroll wheel)
7) Deobfuscate when decompile RPYC files (Use basic code)
8) Extract and decompile
9) All of the above (Can break your game)

The following choices require administrative privileges
+) Add a right-click menu entry for folders to run the script
-) Remove the right-click menu entry from the registry

x) Exit

Enter your choice: 2

----------------------------------------------------

Check the Ren'Py version to adjust the `offset` variable.
8 was unexpected at this time.

f:\OneWeekAway-0.4.0-pc>
 

trauts

Active Member
Aug 12, 2018
816
628
turned echo on in UnRen-forall, a bit more info after selection:
Enter your choice: 2

f:\OneWeekAway-0.4.0-pc>echo.


f:\OneWeekAway-0.4.0-pc>echo ----------------------------------------------------
----------------------------------------------------

f:\OneWeekAway-0.4.0-pc>echo.


f:\OneWeekAway-0.4.0-pc>if "2" == "1" call :extract

f:\OneWeekAway-0.4.0-pc>if "2" == "2" call :decompile

f:\OneWeekAway-0.4.0-pc>REM --------------------------------------------------------------------------------

f:\OneWeekAway-0.4.0-pc>REM Write to temporary file first, then convert. Needed due to binary file

f:\OneWeekAway-0.4.0-pc>REM --------------------------------------------------------------------------------

f:\OneWeekAway-0.4.0-pc>set "decompcab=f:\OneWeekAway-0.4.0-pc\decomp.cab"

f:\OneWeekAway-0.4.0-pc>set "decompilerdir=f:\OneWeekAway-0.4.0-pc\decompiler"

f:\OneWeekAway-0.4.0-pc>set "unrpycpy=f:\OneWeekAway-0.4.0-pc\unrpyc.py"

f:\OneWeekAway-0.4.0-pc>set "deobfuscate=f:\OneWeekAway-0.4.0-pc\deobfuscate.py"

f:\OneWeekAway-0.4.0-pc>if exist "f:\OneWeekAway-0.4.0-pc\decomp.cab.tmp" (del "f:\OneWeekAway-0.4.0-pc\decomp.cab.tmp" )

f:\OneWeekAway-0.4.0-pc>if exist "f:\OneWeekAway-0.4.0-pc\decomp.cab" (del "f:\OneWeekAway-0.4.0-pc\decomp.cab" )

f:\OneWeekAway-0.4.0-pc>if exist "f:\OneWeekAway-0.4.0-pc\decompiler" (rmdir /Q /S "f:\OneWeekAway-0.4.0-pc\decompiler" )

f:\OneWeekAway-0.4.0-pc>if exist ".tmp" (del ".tmp" )

f:\OneWeekAway-0.4.0-pc>if exist "" (del "" )

f:\OneWeekAway-0.4.0-pc>call :elog "Check the Ren'Py version to adjust the `offset` variable."

f:\OneWeekAway-0.4.0-pc>REM --------------------------------------------------------------------------------

f:\OneWeekAway-0.4.0-pc>REM Display msg (Check the Ren'Py version to adjust the `offset` variable.) to console and "f:\OneWeekAway-0.4.0-pc\UnRen-forall.log"

f:\OneWeekAway-0.4.0-pc>REM --------------------------------------------------------------------------------

f:\OneWeekAway-0.4.0-pc>set "msg=Check the Ren'Py version to adjust the `offset` variable."

f:\OneWeekAway-0.4.0-pc>if "Check the Ren'Py version to adjust the `offset` variable." == "." (
echo.
if defined unrenlog (echo. 1>>"f:\OneWeekAway-0.4.0-pc\UnRen-forall.log" )
) else (
echo Check the Ren'Py version to adjust the `offset` variable.
if defined unrenlog (echo Check the Ren'Py version to adjust the `offset` variable. 1>>"f:\OneWeekAway-0.4.0-pc\UnRen-forall.log" )
)
Check the Ren'Py version to adjust the `offset` variable.

f:\OneWeekAway-0.4.0-pc>exit /b

f:\OneWeekAway-0.4.0-pc>if exist "f:\OneWeekAway-0.4.0-pc\game\script_version.txt" (for /F "usebackq tokens=1,2,3 delims=(), " %a in ("f:\OneWeekAway-0.4.0-pc\game\script_version.txt") do (set major_version=%a ) )

f:\OneWeekAway-0.4.0-pc>REM And use the correct unrpyc version.
8 was unexpected at this time.

f:\OneWeekAway-0.4.0-pc>if LSS 8 (

f:\OneWeekAway-0.4.0-pc>
 

joelurmel

Engaged Member
Nov 3, 2022
2,391
4,222
turned echo on in UnRen-forall, a bit more info after selection:
Enter your choice: 2

f:\OneWeekAway-0.4.0-pc>echo.


f:\OneWeekAway-0.4.0-pc>echo ----------------------------------------------------
----------------------------------------------------

f:\OneWeekAway-0.4.0-pc>echo.


f:\OneWeekAway-0.4.0-pc>if "2" == "1" call :extract

f:\OneWeekAway-0.4.0-pc>if "2" == "2" call :decompile

f:\OneWeekAway-0.4.0-pc>REM --------------------------------------------------------------------------------

f:\OneWeekAway-0.4.0-pc>REM Write to temporary file first, then convert. Needed due to binary file

f:\OneWeekAway-0.4.0-pc>REM --------------------------------------------------------------------------------

f:\OneWeekAway-0.4.0-pc>set "decompcab=f:\OneWeekAway-0.4.0-pc\decomp.cab"

f:\OneWeekAway-0.4.0-pc>set "decompilerdir=f:\OneWeekAway-0.4.0-pc\decompiler"

f:\OneWeekAway-0.4.0-pc>set "unrpycpy=f:\OneWeekAway-0.4.0-pc\unrpyc.py"

f:\OneWeekAway-0.4.0-pc>set "deobfuscate=f:\OneWeekAway-0.4.0-pc\deobfuscate.py"

f:\OneWeekAway-0.4.0-pc>if exist "f:\OneWeekAway-0.4.0-pc\decomp.cab.tmp" (del "f:\OneWeekAway-0.4.0-pc\decomp.cab.tmp" )

f:\OneWeekAway-0.4.0-pc>if exist "f:\OneWeekAway-0.4.0-pc\decomp.cab" (del "f:\OneWeekAway-0.4.0-pc\decomp.cab" )

f:\OneWeekAway-0.4.0-pc>if exist "f:\OneWeekAway-0.4.0-pc\decompiler" (rmdir /Q /S "f:\OneWeekAway-0.4.0-pc\decompiler" )

f:\OneWeekAway-0.4.0-pc>if exist ".tmp" (del ".tmp" )

f:\OneWeekAway-0.4.0-pc>if exist "" (del "" )

f:\OneWeekAway-0.4.0-pc>call :elog "Check the Ren'Py version to adjust the `offset` variable."

f:\OneWeekAway-0.4.0-pc>REM --------------------------------------------------------------------------------

f:\OneWeekAway-0.4.0-pc>REM Display msg (Check the Ren'Py version to adjust the `offset` variable.) to console and "f:\OneWeekAway-0.4.0-pc\UnRen-forall.log"

f:\OneWeekAway-0.4.0-pc>REM --------------------------------------------------------------------------------

f:\OneWeekAway-0.4.0-pc>set "msg=Check the Ren'Py version to adjust the `offset` variable."

f:\OneWeekAway-0.4.0-pc>if "Check the Ren'Py version to adjust the `offset` variable." == "." (
echo.
if defined unrenlog (echo. 1>>"f:\OneWeekAway-0.4.0-pc\UnRen-forall.log" )
) else (
echo Check the Ren'Py version to adjust the `offset` variable.
if defined unrenlog (echo Check the Ren'Py version to adjust the `offset` variable. 1>>"f:\OneWeekAway-0.4.0-pc\UnRen-forall.log" )
)
Check the Ren'Py version to adjust the `offset` variable.

f:\OneWeekAway-0.4.0-pc>exit /b

f:\OneWeekAway-0.4.0-pc>if exist "f:\OneWeekAway-0.4.0-pc\game\script_version.txt" (for /F "usebackq tokens=1,2,3 delims=(), " %a in ("f:\OneWeekAway-0.4.0-pc\game\script_version.txt") do (set major_version=%a ) )

f:\OneWeekAway-0.4.0-pc>REM And use the correct unrpyc version.
8 was unexpected at this time.

f:\OneWeekAway-0.4.0-pc>if LSS 8 (

f:\OneWeekAway-0.4.0-pc>
What is the content of the game/script_version.txt?
 

trauts

Active Member
Aug 12, 2018
816
628
when you asked about the contents of script_version.txt, it dawned on me, your new UnRen-forall is looking for the script_version.txt to read from, whereas the older versions didn't (9.4 - 9.6.39). i copied the script_version.txt from my "temp holding area" to my "game" staging area. ran it again, it decompiled successfully!:D
the reason i separate the real game directory is because i extract the script.rpa only, then followed by decompile. didn't want to extract all the rpa files.
thanks for helping me troubleshoot this.
 
Last edited:
  • Like
Reactions: joelurmel

Madeddy

Active Member
Dec 17, 2017
966
676
What is the content of the game/script_version.txt?
... your new UnRen-forall is looking for the script_version.txt to read from ....
... i separate the real game directory ...
Resume:
1. As a user you should not change a apps standard work environment without need. If you do anyway, be aware, every strange behavior is likely rooted in this and should be your first POI for problem search.
2. As a dev you should try not to depend on factors which are easily to change and will most likely. If you still do, be at least aware and use checks to catch this. (Some devs remove this file and reading it from uncompyled files in the renpy dir is also bad as they can be also missing.)

Just some unimportant thoughts from old little me. :geek:
 
  • Like
Reactions: joelurmel

L7Bear

Well-Known Member
May 29, 2017
1,212
1,970
Running from Powershell in Windows 11:
1755068232383.png
result:
1755068180111.png



Running from Command Prompt in Windows 11:
1755068328914.png
result:
1755068363981.png



Edition Windows 11 Home
Version 24H2
Installed on ‎5/‎12/‎2025
OS build 26100.4770
Experience Windows Feature Experience Pack 1000.26100.197.0


1755068407251.jpeg
 

Nemo56

Forum Fanatic
Jan 7, 2018
5,811
4,814
hmmm ... try to type the command chcp in your power shell ... what's the output?


never mind that.
It looks as if the directory of your powershell is not part of your path environment settings.

Code:
set "powershellpath="

for %%i in ("powershell.exe") do (
    if not "%%~$PATH:i"=="" (
        set "powershellpath=%%~$PATH:i"
        echo found !powershellpath! >> unren.log
    ) else (
        echo other %%i >> unren.log
    )
)

if "%powershellpath%"=="" ( //the error message that you see on screen
Here Unren looks for it and can't find it. Try to add it manually. Type "environemnt" in the start menu search field, that should open the according configuration options.
 

Nemo56

Forum Fanatic
Jan 7, 2018
5,811
4,814
optionally you can just set it manually.
set powershellpath=c:\Windows\System32\WindowsPowerShell\v1.0

... and then remove the loop that is searching for it.

It's a bad hack but it would do the job if your PowerShell is still the default v5.1
 

joelurmel

Engaged Member
Nov 3, 2022
2,391
4,222
Running from Powershell in Windows 11:
View attachment 5140375
result:
View attachment 5140373



Running from Command Prompt in Windows 11:
View attachment 5140378
result:
View attachment 5140380



Edition Windows 11 Home
Version 24H2
Installed on ‎5/‎12/‎2025
OS build 26100.4770
Experience Windows Feature Experience Pack 1000.26100.197.0


View attachment 5140385
The main problem is in your PATH variable, or you have disk problem if your Windows was recently installed.
Try firstly to check your disk with chkdsk an after run "sfc -scannow" without quotes in a cmd or PowerShell.
And lastly, this version of Unren is not functional with Ren'Py version 8.4.* use my version in my sig.
 
  • Heart
Reactions: L7Bear
5.00 star(s) 9 Votes