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

5.00 star(s) 3 Votes

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,384
This looks for me like the game dev fraked somewhere the "file name" up and instead of correcting this in the script he did go the easy way by copying the needed file(-name) again in the game dir.
Code:
define end_of_file = (
    ".webp" if (
        developer.developer or (
            "webp_images" in config.archives or renpy.mobile
        )
    ) else ".png"
)
This is it
 
  • Like
Reactions: yoyomistro

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,384
Oh ok, I actually did find something interesting that looks like what you said lol... But I guess it's just for building quick small rpas or something?
Code:
init python:
    existingArchives = list()
    files = renpy.list_files()
    for rpa in files:
        if rpa.endswith(('.jpg', '.png', '.webm', '.webp', '.ogv', '.mp3', '.wav', '.ogg', '.txt', '.ini', '.ttf', '.otf')):
            name = rpa
            archive = rpa.rsplit('/', 1)[0].replace("/", "_")
            if archive not in existingArchives:
                existingArchives.append(archive)
                build.archive (archive, "all")
            build.classify ("**/" + rpa, archive)
    build.archive ("scripts", "all")
    build.classify ('game/**.rpy', 'scripts')
    build.classify ('game/**.rpyc', 'scripts')
    build.classify ('game/**.rpym', 'scripts')
    build.classify ('game/**.rpymc', 'scripts')
    build.classify ('game/**.rpyb', 'scripts')
yeah, something like that :unsure:
 

molitar

Engaged Member
Sep 22, 2016
3,236
3,180
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

Active Member
Dec 17, 2017
838
487
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

Active Member
Dec 17, 2017
838
487
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

Active Member
Dec 17, 2017
838
487

Sancho1969

Message Maven
Modder
Donor
Jan 19, 2020
12,382
48,810
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

Engaged Member
Modder
Donor
Mar 22, 2020
3,960
9,742
I must have missed something. What's going on when the decompile script runs and now it prints a bunch of "False" lines?
 

Madeddy

Active Member
Dec 17, 2017
838
487
... 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
2,932
3,973
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

Engaged Member
Modder
Donor
Mar 22, 2020
3,960
9,742
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,210
3,328
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
 
5.00 star(s) 3 Votes