- Jun 30, 2018
- 3,016
- 4,618
To be more precise, it's not really a separate fork. In fact, it is a continuation of the original instrument. Since no one has updated it for quite some time, I took it into my own hands. But in the absence of the ability to update the original topic, I had to create my own thread. For more than a year and a half, but not all people are aware of it yet and therefore write about errors here.Since you have a separate thread for your fork + original GUI take on UnRen, I'll add a link to that in this OP and you can handle its progress and fixes there.
It's fine to mention here to be helpful and exchange ideas of course, but I'd also like to keep bug reports/updates distinct where possible. Thanks.
I understand the history of your version and appreciate your work - you might remember I had a presence here rather briefly to make the 0.91 minor update, which is when I first saw your activity. Then we got more busy with the site's needs and haven't been back here until now.To be more precise, it's not really a separate fork. In fact, it is a continuation of the original instrument. Since no one has updated it for quite some time, I took it into my own hands. But in the absence of the ability to update the original topic, I had to create my own thread. For more than a year and a half, but not all people are aware of it yet and therefore write about errors here.
set "currentdir=%~dp0%"
if exist %1 set "currentdir=%~dp1%"
if exist %currentdir%lib for /f "tokens=4" %%A in ('dir %currentdir%lib\*windows* ^|find "windows"') do set "pythondir=%currentdir%lib\%%A\"
set "currentdir=%~dp0%"
if exist %1 set "currentdir=%~dp1%"
if exist" %currentdir%renpy" set "renpydir=%currentdir%renpy\"
if exist "%currentdir%game" set "gamedir=%currentdir%game\"
if exist "%currentdir%lib" for /f "tokens=4" %%A in ('dir "%currentdir%lib\*windows*" ^|find "windows"') do set "pythondir=%currentdir%lib\%%A\"
Thanks for your report.OK, there have been several games recently that UnRen-master.bat can't find the python directory, even though it's right there...
I know that's not the same tool as the one that is linked in the OP of this thread, but it's worked on pretty much every Ren'Py build I've wanted to extract and enable the console on until now, which is why I've still been using that tool.
Anyways, it looks like others are having the same issue (not finding Python directory). For me, one game that I came across this issue with was A Moment of Bliss:
https://f95zone.to/threads/a-moment-of-bliss-v2-2-1-lockheart.113727/
The 1.05 tool that is included in the OP of this thread does seem to work on this one, and at least one other game where I encountered this issue.
Just wanted to note this, for anyone else that might still be using the UnRen-master.bat tool and is encountering this issue. If the 1.05 tool isn't working either for some game, of course your best bet here will be to note which game you are having an issue with, and which tool you are using, so that whomever is working on Unren can take note.
Thanks for your report - v1.0.7 is working with this game level, if you'd like to try it out.Doesnt work on game https://f95zone.to/threads/ravenous-v0-083-preview-lament-entertainment.125534/
I've tried all the builds of Unrepy on the game with version 0.0.5b / Renpy 8.0.0
Any help?
Thanks - the v1.0.7 works from the main directory for that game level, if you'd like to try again.UnRen 1.0.2 (or any other) didn't decompile rpyc for a Ren'Py 7.5.2 game (A Moment Of Bliss 2.2.1). It decompiled some, but not all rpyc files. When I put it in the game/ folder, it decompiles all of them just fine. That's weird... Previous unrens also worked from the game's main dir.
Thanks for that update - I was able to recreate with a different scenario, but same effect.Hey, you guys are the best.Problem solved. Everything works correctly.Thank you.
Only point 1 works. When decompiling .pryc files, the same error. (1.05)
(Windows7 system, Russian language, paths are spelled out everywhere in Windows)
Thanks, I'll take this into consideration for an upcoming cleanup release.%~dp0% is the directory of the file or .lnk the batch is called up from.Code:set "currentdir=%~dp0%" if exist %1 set "currentdir=%~dp1%"
%1 is the first parameter passed to or a file dropped on the batch on call up.
%~dp1% is the path to the file dropped on a .lnk or the actual batch file.
grabs the python directory ignoring all that py2 py3 i386 x86_64 mumbojumboCode:if exist %currentdir%lib for /f "tokens=4" %%A in ('dir %currentdir%lib\*windows* ^|find "windows"') do set "pythondir=%currentdir%lib\%%A\"
if exist %currentdir%lib
when "lib" is found
for /f "tokens=4" %%Z in ('dir %currentdir%lib\*windows* ^|find "windows"')
runs "dir %currentdir%lib\*windows*" | find "windows"
passes the 4th token of the find result, the directory name returned by dir, to the temp_variable_A
do set "pythondir=%currentdir%lib\%%A\"
sets pythondir to %currentdfir%lib\temp_variable_A\
that stack of attempts at locating the renpy.exe infuriated me with the prior iterations of unren the most, and if they add yet another variant in the future, it gets even more convoluted.
final block. easy (somewhat). clean!Code:set "currentdir=%~dp0%" if exist %1 set "currentdir=%~dp1%" if exist" %currentdir%renpy" set "renpydir=%currentdir%renpy\" if exist "%currentdir%game" set "gamedir=%currentdir%game\" if exist "%currentdir%lib" for /f "tokens=4" %%A in ('dir "%currentdir%lib\*windows*" ^|find "windows"') do set "pythondir=%currentdir%lib\%%A\"
the version i have is OOOOOLD, 0.91 gideonmod .5 because I cba to keep editing this change in (mainly the drag and drop mod) and as far as i am concerned, it works. I mainly use it to drop the console, menu, save and rollback files and only in rare cases when i need to see what the game is doing (or want to look at the pretty pictures) i use the decompilers. so far i havent had any issues with my relic.Thanks, I'll take this into consideration for an upcoming cleanup release.
At the moment, it's obviously more brute force than elegance - but, if you look at the latest code (i.e., v1.0.7) there is a reason: I am breaking out every form of Python directories found in Ren'Py testing thus far - the decompiler is highly sensitive to Ren'Py's (somewhat neutered) Python version and I'm currently carrying three versions of UNRPYC (two of them slightly modified by me) to attempt maintaining backwards compatibilty as we continue moving with Ren'Py 8 + Python 3.x.
So you run UnRen even before you unpack the whole game? why? is it so difficult to wait for the full unpacking of the game and only then run the script?the version i have is OOOOOLD, 0.91 gideonmod .5 because I cba to keep editing this change in (mainly the drag and drop mod) and as far as i am concerned, it works. I mainly use it to drop the console, menu, save and rollback files and only in rare cases when i need to see what the game is doing (or want to look at the pretty pictures) i use the decompilers. so far i havent had any issues with my relic.
anyway,
You don't have permission to view the spoiler content. Log in or register now.
also, i'd like to request with this code cleanup that unren doesnt force quit if /game and /renpy exist since some games take an age or three to unpack and lib/<pythondirs> are much too often the last in the list to unpack when /game is a real superheavy mama.
i have changed some paths in here since i dont get why you keep switching back and forth with \..\
I honestly rewrote the entire directory handling section today and it is somewhat as you laid out, but not quite. I decided to run everything in the main directory going forward (regardless of where you place UnRen.bat) so needed to change things up. So, if you want to feedback on anything for code optimization, then v1.0.8+ is probably best to try out.the version i have is OOOOOLD, 0.91 gideonmod .5 because I cba to keep editing this change in (mainly the drag and drop mod) and as far as i am concerned, it works. I mainly use it to drop the console, menu, save and rollback files and only in rare cases when i need to see what the game is doing (or want to look at the pretty pictures) i use the decompilers. so far i havent had any issues with my relic.
anyway,
You don't have permission to view the spoiler content. Log in or register now.
also, i'd like to request with this code cleanup that unren doesnt force quit if /game and /renpy exist since some games take an age or three to unpack and lib/<pythondirs> are much too often the last in the list to unpack when /game is a real superheavy mama.
i have changed some paths in here since i dont get why you keep switching back and forth with \..\
Hi, are you saying that "indentation mismatch" occurs after decompiling the .rpyc to .rpy and then running the game with those .rpy files still in under the main folder heirarchy?Hi. Sorry for the stupid question, I'm new to this. I get rpy files from rpyc. But when starting the game, there is always an "indentation mismatch" error in different files. What to do with it? Manually edit all files? Or am I doing something wrong?
I've read it and I don't get the point of fumbling around to indirectly test for the python version (exist windows no set py2_windows > exist py2_windows no set py3_windows > exist py3_windows). such incremental spaghetti construction is hostile logic, at best meant to make it harder to read and follow the code.I honestly rewrote the entire directory handling section today and it is somewhat as you laid out, but not quite. I decided to run everything in the main directory going forward (regardless of where you place UnRen.bat) so needed to change things up. So, if you want to feedback on anything for code optimization, then v1.0.8+ is probably best to try out.
HiHi, are you saying that "indentation mismatch" occurs after decompiling the .rpyc to .rpy and then running the game with those .rpy files still in under the main folder heirarchy?
If so, perhaps offer which game this is affecting and we'll try to determine what might be happening. Ren'Py / Python are very sensitive to relative indentation, as a whole.
File "game/1000_base_game/game/characters/isabelle/q_isabelle_piano.rpy", line 24: indentation mismatch.
Version 1.0.8 - Bug
Symptom
"Error: Cannot locate python.exe, unable to continue."
UnRen is in the same folder as game executable.
Problem
Looking at the code:
If my OS is 64 bit Windows, and the game has only a 32-bit version of python, unren will will not find python.exe.
It seems like once it detects I'm running x64 it doesn't bother looking for a 32-bit version of python.
Workaround
Changed line 142 to default to i686 instead of x86_64 to get it running. It did just fine.
Thank you for keeping this open-source. <3
Because RPYC is the compiled code of the game, and RPA is the archives of the game. These are two different types of files. At the expense of packing several files, this can be done using the rpatool, for this you need to be able to use python.Hi.
1. Please tell me if it is possible to pack RPY files into one RPA file ?
The information says that UnRen.bat can decompile RPYC files. Why RPYC and not RPY ?
I have a mod and the way to install it is to delete the native RPA file and install the "scripts" folder (with RPY files only, no RPYC ) instead of RPA. It might be more convenient for people if I pack the folder with RPY scripts into one RPA file, and suggest they replace the RPA file, but I don't know how to do that. Is there any way to pack the RPY folder separately from the game without putting it in the game folder, like if you wanted to pack some off files in RAR
So to get the RPA file I need to run the game (to make it create RPYC files), then delete the RPYC files and use RPYC to create the RPA?Because RPYC is the compiled code of the game, and RPA is the archives of the game. These are two different types of files. At the expense of packing several files, this can be done using the rpatool, for this you need to be able to use python.
No, you don't need to run the game. It is necessary to specify in RPAtool which files you want to add to the archive. I will not say more precisely, it is necessary to read the instructions for the tool. But, in my opinion, it's easier to use the game engine itself. Download it, add the necessary files to its folder and create all the necessary archives in it.So to get the RPA file I need to run the game (to make it create RPYC files), then delete the RPYC files and use RPYC to create the RPA?
Thanks for the info about rpatool, I'll look for some guide.
Thanks for the reply.