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

5.00 star(s) 9 Votes

frozenfeet

Well-Known Member
Aug 2, 2019
1,200
1,833
I have played a couple of games that are using Ren'Py 7.5.0. And UnRen .91 throws this error

"! Error: Cannot locate python.exe, unable to continue.
Are you sure we're in the game's root or game directory?"

Is there an simple way that I could fix this myself?

P.S.- I fixed it myself for some reason they changed the name of the folders in 7.5.0. They have a "py2-" added to the folder name.
 
Last edited:
  • Like
Reactions: Currahee666

Currahee666

Newbie
Mar 3, 2018
19
23
I have played a couple of games that are using Ren'Py 7.5.0. And UnRen .91 throws this error

"! Error: Cannot locate python.exe, unable to continue.
Are you sure we're in the game's root or game directory?"

Is there an simple way that I could fix this myself?

P.S.- I fixed it myself for some reason they changed the name of the folders in 7.5.0. They have a "py2-" added to the folder name.
Use UnRen v.0.11-new
https://f95zone.to/threads/mod-upda...tool-unren-v-0-11v4-new-unren-windowed.92717/
 
  • Like
Reactions: dani31

QuantumSciGuy

New Member
Oct 10, 2018
3
2
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.
This is for those who get the errors shown below while running UnRen-0.91.bat in Windows 10.

I almost gave up, but finally searched the net again and found the solution, thanks to ItsRKM at

Add cmd.exe, powershell.exe, and python.exe to "Allow an app through Controlled Folder access" using Windows Security (use Windows search to find Controlled Folder access). Remove them when done using UnRen-0.91.bat.

- Adding cmd.exe solved "The system cannot find the file specified." This error resulted when using the redirect symbol (">") in batch files (even "echo . > test.txt" from the command line) in Windows 10. It has NOTHING to do with not finding a file! UGH!
- Adding powershell.exe solved "Cannot invoke method. Method invocation is supported only on core types in this language mode."

Once I added the first two to "Controlled Folder access", I got the following error (with names changing) during extraction of each file:
"Could not extract file images/img3680.jpg from archive: [Errno 9] Bad file descriptor"

- Adding python.exe solved the "Could not extract file... Bad file descriptor" error.

I hope this doesn't add any other security concerns to Windows 10. Since I suspect it DOES, I will remove these 3 exes from "Controlled Folder access" when UnRen-0.91.bat is done.

Here are my results with the default Windows 10 settings:

-----------------------------------------------------------------------------------------
__ __ ____ __ __
/ / / /___ / __ \___ ____ / /_ ____ _/ /_
/ / / / __ \/ /_/ / _ \/ __ \ / __ \/ __ `/ __/
/ /_/ / / / / _, _/ __/ / / / / /_/ / /_/ / /_
\____/_/ /_/_/ |_|\___/_/ /_(_)_.___/\__,_/\__/ v0.91 (includes Gideon.v5 mods) (191007)
Sam @ www.f95zone.to

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

Available Options:
1) Extract RPA packages (in game folder)
2) Decompile rpyc files (in game folder)

3) Enable Console and Developer Menu
4) Enable Quick Save and Quick Load
5) Force enable skipping of unseen content
6) Force enable rollback (scroll wheel)

8) Options 3-6
9) Options 1-6

Enter a number: 1

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

Creating rpatool...
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
Cannot invoke method. Method invocation is supported only on core types in this language mode.
At line:1 char:5
+ & { [IO.File]::WriteAllBytes("(path removed for post) ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: ( : ) [], RuntimeException
+ FullyQualifiedErrorId : MethodInvocationNotSupportedInConstrainedLanguage


Searching for RPA packages
+ Unpacking "archive.rpa" - 1705365698 bytes
C: (path removed for post)\game\..\lib\windows-i686\python.exe: can't open file 'C: (path removed for post)\game\_rpatool.py': [Errno 2] No such file or directory

Cleaning up temporary files...
Could Not Find C: (path removed for post)\game\_rpatool.py.tmp
Could Not Find C: (path removed for post)\game\_rpatool.py

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

Finished!

Enter "1" to go back to the menu, or any other
key to exit:
 
Last edited:

coretex

Active Member
Jun 15, 2017
581
487
As far my experiences.. you shouldnt have that issue if you dont put stuff in controlled folder paths.
Dont use Program Files or otherwise.. Ideally dont use Desktop... if you got another drive.. D: or other, create a folder and use that, or even go to C root, create a folder yourself, and dump in there. Even with older versions of Unren, iv never had to clear file/folder access to any exe's like that.
 
  • Like
Reactions: VepsrP

Gio

Member
Modder
Aug 12, 2016
330
330
i found a "bug" i have no rpyc files inside the game folder but in game/extra folder and i was getting errors while trying to decode them
 

QuantumSciGuy

New Member
Oct 10, 2018
3
2
As far my experiences.. you shouldnt have that issue if you dont put stuff in controlled folder paths.
Dont use Program Files or otherwise.. Ideally dont use Desktop... if you got another drive.. D: or other, create a folder and use that, or even go to C root, create a folder yourself, and dump in there. Even with older versions of Unren, iv never had to clear file/folder access to any exe's like that.
I put all my games in a Games folder that is not in the controlled folder path (or so I thought). Well, I've re-checked and... there are lots of folders in my users directory listed, but then so is C:\, so I guess the whole damn drive is protected. These were the default settings in my pre-built machine. I don't know if that's the standard, as I'm new(ish) to Windows 10.
 
Last edited:

coretex

Active Member
Jun 15, 2017
581
487
Yea most of C: from the start is unless you make a new folder yourself. Anything in side of Users can be locked down. Things may even be fine until a UAC prompt for elevation kicks in and then screws up whatever you were trying to do. Even though its your "own" acct, once you elevate, it considers it a new instance/session and that elevated version of your acct does not necessarily have access to your own user folder tree. Yes.. you technically could turn off UAC prompts, and that would fix some of it, but then opens you up to potential security risks. I usually just end up making my own folder set and usually put everything on a separate drive. Yes that means more manual file work.. but i know it works! . Also in case you ever need to nuke and redo your entire C drive (OS drive) you dont lose your own files mostly. Thats why I either redirected some of the user directory folders, or just manually backed up, certain things to the alt drive.
 

Shadowkeeper

Newbie
May 22, 2019
42
40
i found a "bug" i have no rpyc files inside the game folder but in game/extra folder and i was getting errors while trying to decode them
Yeah, that's more a limitation than a bug.
Fortunately, moving just one rpyc file (I usually go for options.rpyc) to the game folder from whatever folder the dev hid them in is enough for unren/unrpyc to find and decompile all of them.
 

yyunus

Member
Mar 28, 2020
317
146
It says it's done when i choose extract RPA files, bu there is no folder with the extracted files. What's the problem?
 

david123

Member
Game Developer
Jul 1, 2017
350
959
1647644430341.png

Hey guys I came across something new - to me - an RPG maker project with just the application file. Any idea how I can extract content from something like this?

Edit: nvm found it - it was an archive - used this tool :
 
Last edited:

bullshiter

New Member
Nov 2, 2019
2
0
Is there any way to update unrpyc tool to nightly 8.0 builds? It uses Python 3.9 now, so it must content some of rewriting.
 

Madeddy

Active Member
Dec 17, 2017
814
468
rayminator -> Look five posts above yours.

...
P.S.- I fixed it myself for some reason they changed the name of the folders in 7.5.0. They have a "py2-" added to the folder name.
Late answer for this but that's better as never:
Ren'Py is in the process to move to python3 which is then Ren'py version 8.x but the main dev wants still to support for some time the old python2 branch which would be everything up to version 7.5. To distinguish these two branches easily and clearly in the library directory's (../lib/) they got the name prefix "py2-" and "py3-".
On some point this will surely be fixed in some of the tools depending on it.

Time goes on, things change, we adapt. ;)
Is there any way to update unrpyc tool to nightly 8.0 builds? It uses Python 3.9 now, so it must content some of rewriting.
It will happen. I explained in the Unren for linux thread (citing myself; thats a new one):
If Ren'py 8.x releases(python3) i will try and go back to the Unren rewrite i began ~two years ago. This tool-version will then be naturally compatible with every OS with Python support. Which should be most. Admittedly we need then also "unrpyc" in py3 or we will miss decompiling ability.
I will add: Having "unrpyc" with py3 support is important. Before this it will not make much sense to finalize the new UnRen and release it. I mean, for rpa unpacking i have already my own py3 compatible tool written(RpaKit) and the classic well known "RPAtool" is still compatible.
 
Last edited:

mpampasas

Newbie
Aug 3, 2021
19
15
hello so i get this error [Errno13] permission denied and it says it could not extract the files i chose to extract. Any ideas? Tried on multiple games same error appears.
 
5.00 star(s) 9 Votes