Create and Fuck your AI Slut -70% OFF
x

Tool Ren'Py UnRenGUI, UnRen-forall(v9.4), UnRen-Powershell-forall(v9.4), UnRen-old

5.00 star(s) 3 Votes

molitar

Engaged Member
Sep 22, 2016
3,229
3,274
434
After unpacking Goodbye Eternity (https://f95zone.to/threads/goodbye-eternity-v0-6-9-rngeusex.82497/) then trying to decompile it I get this error.
One thing I have discovered about unren is either if you have many sub-folders or spaces than you will need to first copy the files under \lib\py3-windows-x86_64\ directly under \lib\ and I it will typically work. Otherwise you need to copy the game folder to the root of the drive and run it. The UnRen does not like long paths or medium paths with spaces.

This leaves you with the 2 options copy the game folder to the root of the drive like C:\ or copy the Python files directly to the root of \lib\.
 

Madeddy

Well-Known Member
Dec 17, 2017
1,016
735
244
VepsrP
I discovered some potential problematic stuff in the batch:
  1. Py not found error with manual startet win cmd console and certain start conditions
    • Start win cmd by hand
    • Stay on the path in c: where the cmd starts(for me it starts in ("c:\users\my_username>")
    • Execute unren on another drive: > d:\some_path\unren_v8.4.bat
    • Drag and drop some game in and get the error...!
    • ...could this be why some people get this error sometimes and we scratch our heads?
  2. The batch file has 12 cases of missing the closing double-quote: "%gamedir%. I am not sure why this not errors all the time.
  3. "Change dir" curiosity: You have in the unrpa and unrpyc sections 2 different styles to use "cd": One time its %gamedir%, the other time "%gamedir%".
    • Could this be the reason for the parens in path problem?
    • Which of the variants is the right one?
    • Why is "change dir" ever needed at this point? I cant see why. :unsure:
Thats all for now. :coffee:
Greets
 
  • Like
Reactions: yoyomistro

Madeddy

Well-Known Member
Dec 17, 2017
1,016
735
244
VepsrP Sancho1969

Related to my previous post: I think i found the reason for the parenthesis problem:
The variable %gamedir% misses sometimes one or both quotes, however they are unconditionally necessary to escape special chars inside.
Example from newest unren_v8.4 from VepsrP:
Code:
REM Decompile rpyc files
REM --------------------------------------------------------------------------------
echo    Searching for rpyc files...
cd "%gamedir%"  <-- unneeded command: unrypc searches itself in the target dir for files; same for rpa unpacking section i guess
REM set "PYTHONPATH=%pythondir%Lib"

if exist "%pythondir%Lib" (
    if "%option%" == "2" (
        echo    + Searching for rpyc files in %gamedir%  <-- both quotes missing
        "%pythondir%python.exe" -O "%unrpycpy%" --init-offset "%gamedir%   <-- missing closing quote
    )
    if "%option%" == "9" (
    ...
    ... etc.
Hope this helps.
 
Last edited:

Madeddy

Well-Known Member
Dec 17, 2017
1,016
735
244

Sancho1969

Message Maven
Modder
Donor
Jan 19, 2020
12,382
49,488
892
VepsrP Sancho1969

Related to my previous post: I think i found the reason for the parenthesis problem:
The variable %gamedir% misses sometimes one or both quotes, however they are unconditionally necessary to escape special chars inside.
Example from newest unren_v8.4 from VepsrP:
Code:
REM Decompile rpyc files
REM --------------------------------------------------------------------------------
echo    Searching for rpyc files...
cd "%gamedir%"  <-- unneeded command: unrypc searches itself in the target dir for files; same for rpa unpacking section i guess
REM set "PYTHONPATH=%pythondir%Lib"

if exist "%pythondir%Lib" (
    if "%option%" == "2" (
        echo    + Searching for rpyc files in %gamedir%  <-- both quotes missing
        "%pythondir%python.exe" -O "%unrpycpy%" --init-offset "%gamedir%   <-- missing closing quote
    )
    if "%option%" == "9" (
    ...
    ... etc.
Hope this helps.
You could very well be on to something there bud. I could be mistaken, but I believe other versions of unren use regex, which would likely solve all the directory naming issues completely. Yeah, I know, I hate regex too but have to use it in my own code due to the advanced features in my mod core code.
 

estrada777

Forum Fanatic
Modder
Donor
Mar 22, 2020
4,880
11,576
698
I must have missed something. What's going on when the decompile script runs and now it prints a bunch of "False" lines?
 

Madeddy

Well-Known Member
Dec 17, 2017
1,016
735
244
... I could be mistaken, but I believe other versions of unren use regex, which would likely solve all the directory naming issues completely. Yeah, I know, I hate regex too...
I don't think there where ever regex in unren. I did read the "findstring" command can a bit of it, but this was it IMHO. Or do you mean this here?
set "rpatoolps=%rpatool:[=`[%"
set "rpatoolps=%rpatoolps:]=`]%"
set "rpatoolps=%rpatoolps:^=^^%"
set "rpatoolps=%rpatoolps:&=^&%"

AFAIK has this just some relation to unpacking the base64 embeds for the 3rd party tools and isn't even regex: Just some string manipulation to escape certain chars. e.g: searches the string inside the rpatool variable for stuff: from [ too `[ OR & too ^& ...
See

(And yeah i hate regex too because i get headache from it, but its very useful and powerful. If i just where proficient in it...)
I must have missed something. What's going on when the decompile script runs and now it prints a bunch of "False" lines?
Hm... Could be a bunch of stuff. In which relation?
UnRen version? Game name? The games Renpy version? Problem-code example?
 
Last edited:
  • Like
Reactions: yoyomistro

yoyomistro

Engaged Member
Jan 15, 2017
3,136
4,696
445
I don't think there where ever regex in unren. I did read the "findstring" command can a bit of it, but this was it IMHO. Or do you mean this here?
set "rpatoolps=%rpatool:[=`[%"
set "rpatoolps=%rpatoolps:]=`]%"
set "rpatoolps=%rpatoolps:^=^^%"
set "rpatoolps=%rpatoolps:&=^&%"

AFAIK has this just some relation to unpacking the base64 embeds for the 3rd party tools and isn't even regex: Just some string manipulation to escape certain chars. e.g: searches the string inside the rpatool variable for stuff: from [ too `[ OR & too ^& ...
See

(And yeah i hate regex too because i get headache from it, but its very useful and powerful. If i just where proficient in it...)
Hm... Could be a bunch of stuff. In which relation?
UnRen version? Game name? The games Renpy version? Problem-code example?
Almost every week I'm on here and I say, I need to patch this game... I'll learn regex for real... Then I pull up a tutorial, read it for 5 minutes, close it, then go back and make my scuffed basic regex patch :HideThePain:.
 
  • Haha
Reactions: Walter Victor

estrada777

Forum Fanatic
Modder
Donor
Mar 22, 2020
4,880
11,576
698
Hm... Could be a bunch of stuff. In which relation?
UnRen version? Game name? The games Renpy version? Problem-code example?
Here's an example, this time they printed True, but sometimes they also say False. They only started appearing in one of the last couple of updates and I just wondered what it meant.
 

Tiur

Well-Known Member
Nov 13, 2021
1,317
3,669
398
Here's an example, this time they printed True, but sometimes they also say False. They only started appearing in one of the last couple of updates and I just wondered what it meant.
Those are debug messages. Update to 8.4 and you won't see them anymore.

From the Changelog in the OP:
1678575441809.png
 

CurtimusPrime92

Active Member
Jul 17, 2020
587
463
152
Which RenPy version does this game use? Did you get errors while it decompiled other files of this game ?
Code:
(8, 0, 3)
and it was like 99% successful decompile except for the one file that didnt decompile "customgui.rpyc"

edit
unless dev had a 0 byte file called customgui.rpy that he made compiled with the game release then he went and deleted all the rpy's leaving only rpyc's and customgui is actually unused?
 
Last edited:

moskyx

Forum Fanatic
Jun 17, 2019
4,542
15,735
718
Yup, it's an unused file. That game's .rpa only contains the pics, the scripts are placed as .rpy
 
5.00 star(s) 3 Votes