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,371
VepsrP have you tried extracting and decompiling Straitened Times? It is from Renpy v7.3.5.
So I tried with your unren-old.bat (converted your base64 and with -O) to my bash version but didn't succeed... :LOL:
I'm just wondering if its fine on windows or not...
By the way, why do you use Base64 code when you can take standart code from my GitHub? :unsure:
 

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,371
Found it. Oh yeah. Lets play find the error:

Python:
def revertable_switch(raw_dat):
    """Switches in a way between two instances of cls_factory. If a error from possible old code appears, it uses renpy.python instead of the new renpy.revertable module name."""
    try:
        _, stmts = magic.safe_loads(raw_dat, cls_factory_74, {
            "_ast", "collections"})
    except TypeError as err:
        if 'Revertable' in err.args[0]:
            _, stmts = magic.safe_loads(raw_dat, cls_factory_75, {
                "_ast", "collections"})
    return stmts
So, who wins todays surprise emoji for seeing the problem in the code? :giggle: It's in there...
What's the difference? You just don't return one variable:unsure:
 

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,371
Because I thought it is a different version of unrpyc n rpatool.... which apparently it is the same? lol
They are the same, first I upload there, and then I assemble them into scripts. The dev branch may be slightly different, but main is exactly the same.
 

dikau

Member
Dec 16, 2019
315
274
Can you add the scripts of this? Curious.
Using system's python and latest UncensoredName version is just fine decompiling that game... I just wondering if its okay with the VepsrP version on windows...
Edit: did you mean my script? it is on :
 

Madeddy

Active Member
Dec 17, 2017
814
470
...
Edit: did you mean my script? it is on :
No, i meant of the game you have problems with. Straitened times...
What's the difference? You just don't return one variable:unsure:
No, that's unimportant. The first part of the "ast" isn't used anywhere and was stored to "data" to get it divided from the "stmts" name. I replaced it just with underline.

Python:
    try:
        _, stmts = magic.safe_loads(raw_dat, cls_factory_75, {
            "_ast", "collections"})
    except TypeError as err:
        if 'Revertable' in err.args[0]:
            _, stmts = magic.safe_loads(raw_dat, cls_factory_74, {
                "_ast", "collections"})
That's how it must be done to work correct. See the diff? I used accidentally the instance with renpy.python first and switched after the TypeError to renpy.revertable. It must be reverse in order. *Shaking head* Such a tiny difference.... emoji-head-wall.gif
 

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,371
No, i meant of the game you have problems with. Straitened times...
No, that's unimportant. The first part of the "ast" isn't used anywhere and was stored to "data" to get it divided from the "stmts" name. I replaced it just with underline.

Python:
    try:
        _, stmts = magic.safe_loads(raw_dat, cls_factory_75, {
            "_ast", "collections"})
    except TypeError as err:
        if 'Revertable' in err.args[0]:
            _, stmts = magic.safe_loads(raw_dat, cls_factory_74, {
                "_ast", "collections"})
That's how it must be done to work correct. See the diff? I used accidentally the instance with renpy.python first and switched after the TypeError to renpy.revertable. It must be reverse in order. *Shaking head* Such a tiny difference.... View attachment 2178059
I have it in this order, but in theory there should be no difference which type of Revertable to check first, old or new. :unsure:
 

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,371
VepsrP have you tried extracting and decompiling Straitened Times? It is from Renpy v7.3.5.
So I tried with your unren-old.bat (converted your base64 and with -O) to my bash version but didn't succeed... :LOL:
I'm just wondering if its fine on windows or not...
Everything was unpacked and decompiled.(y)
 

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,371
Ah okay, thanks!

I guess the problem is with my system env or something.... :confused:
I took your version of the tool, cut out everything unnecessary for testing on Linux. If I'm lucky, then everything should work, if not, I'll ask for help.
 

Walter Victor

Forum Fanatic
Dec 27, 2017
5,713
19,718
Sorry to bother you guys, but I received an error while trying to extract the RPA in the "v0.16.1 patreon" release of the game Indecent Wife Hana. Here's what happened:

Creating rpatool...

Remove RPA archives after extraction?
. Enter (y/n):n
+ RPA archives won't be deleted

Searching for RPA packages
+ Unpacking "archive.rpa" - 269876717 bytes
Traceback <most recent call last>:
File "F:\Games\IndecentWifeHana\Indecent-Wife-Hana-0.16.1-patreon-cracked-pc\rpatool.py", line 88, in <module>
contents = archive.read<filename>
File "F:\Games\IndecentWifeHana\Indecent-Wife-Hana-0.16.1-patreon-cracked-pc\rpatool.py", line 42, in read
<offset, length> = self.indexes[filename][0]
ValueError: too many values to unpack <Expected 2>

Cleaning up temporary files...


Forgive me it you see some spelling errors, but I copied this out as best I could.

I have been using v6 of Ultrahack. What you see above is what happened when I downloaded and tried v12.
 

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,371
Sorry to bother you guys, but I received an error while trying to extract the RPA in the "v0.16.1 patreon" release of the game Indecent Wife Hana. Here's what happened:

Creating rpatool...

Remove RPA archives after extraction?
. Enter (y/n):n
+ RPA archives won't be deleted

Searching for RPA packages
+ Unpacking "archive.rpa" - 269876717 bytes
Traceback <most recent call last>:
File "F:\Games\IndecentWifeHana\Indecent-Wife-Hana-0.16.1-patreon-cracked-pc\rpatool.py", line 88, in <module>
contents = archive.read<filename>
File "F:\Games\IndecentWifeHana\Indecent-Wife-Hana-0.16.1-patreon-cracked-pc\rpatool.py", line 42, in read
<offset, length> = self.indexes[filename][0]
ValueError: too many values to unpack <Expected 2>

Cleaning up temporary files...


Forgive me it you see some spelling errors, but I copied this out as best I could.

I have been using v6 of Ultrahack. What you see above is what happened when I downloaded and tried v12.
Try this option, I have unpacked. The author has again increased the amount of data output in this place.
 
  • Like
Reactions: Walter Victor

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,371
Madeddy, dikau, in general, I figured out your Linux. The problem is that if you run it even through *.sh, python still does not reset the values of variables, as if the script execution did not end, although in theory the script should have been initialized anew every time. It turns out that with my code, when the Revertable of the old version was encountered, class_factory was reinitialized, the file was stolen, and then, when a new one was submitted, this variable was still in the renpy.python state and if the renpy.revertable state was needed, then there is no reverse reinitialization.
I figured it out - I'm attaboy.:BootyTime: The fixes are already in the dev branch. But in general it is not needed, because it almost copy the code of Madeddy.
 
  • Red Heart
Reactions: dikau

Sancho1969

Message Maven
Modder
Donor
Jan 19, 2020
12,382
48,055
VepsrP FYI: ultrahack is fucked up when it's converting python code that contains asterisks in the code.

For example:
You don't have permission to view the spoiler content. Log in or register now.
is being converted this way (note that "message(*m)" is now "message(m)", also there's no need to force "has vbox/hbox"):
You don't have permission to view the spoiler content. Log in or register now.

It borked... and the forced "has vbox/hbox" doesn't work in many situations as well, had to recode several scripts due to ultrahack converting the original rules and spacing incorrectly.
 

Madeddy

Active Member
Dec 17, 2017
814
470
It borked... and the forced "has vbox/hbox" doesn't work in many situations as well, had to recode several scripts due to ultrahack converting the original rules and spacing incorrectly.
This isn't the fault of his batch tool, it's the decompiler's(unrpyc) fault I think. Its for some time not really updated and fixed. We few people here do just what we can to fix some errors and keep it running. This problems of yours look like some deeper code stuff with the AST.

You should make a report at the of unrpyc. When the tool dev there at some point takes the time, he will fix it surely.

VepsrP will surely tomorrow get back at you. Where he lives its after 2AM.
 
Last edited:

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,371
VepsrP FYI: ultrahack is fucked up when it's converting python code that contains asterisks in the code.

For example:
You don't have permission to view the spoiler content. Log in or register now.
is being converted this way (note that "message(*m)" is now "message(m)", also there's no need to force "has vbox/hbox"):
You don't have permission to view the spoiler content. Log in or register now.

It borked... and the forced "has vbox/hbox" doesn't work in many situations as well, had to recode several scripts due to ultrahack converting the original rules and spacing incorrectly.
It would be better to name the game or provide files for testing. It is simply impossible to understand from pieces of code where and how it is worth correcting the processing, given that even with these it is not always possible.
 

Sancho1969

Message Maven
Modder
Donor
Jan 19, 2020
12,382
48,055
It would be better to name the game or provide files for testing. It is simply impossible to understand from pieces of code where and how it is worth correcting the processing, given that even with these it is not always possible.
Bud, I reckon you're missing the point. Doesn't matter a game or files... it's a basic Python language operator used anywhere, anytime. In the case above it's simply using the asterisk (as common) to pass a variable number of arguments to a function. The operator can also used to pass a variable length argument list or a non-key argument. It's basic Python language syntax, just as double-asterisk is. Think also along other uses such as iterable unpacking syntax.
 
Last edited:

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,371
Bud, I reckon you're missing the point. Doesn't matter a game or files... it's a basic Python language operator used anywhere, anytime. In the case above it's simply using the asterisk (as common) to pass a variable number of arguments to a function. The operator can also used to pass a variable length argument list or a non-key argument. It's basic Python language syntax, just as double-asterisk is. Think also along other uses such as iterable unpacking syntax.
And how should I solve the problem and test without files and preferably a reference for reconciliation?
 
5.00 star(s) 3 Votes