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

5.00 star(s) 3 Votes
Jan 26, 2020
44
51
Hey there, sorry to bother but im trying to extract the rpas of a game called 'Blood Code', however whenever I try I get this error.

Searching for RPA packages
Python path configuration:
PYTHONHOME = 'C:\Users\Anem\Desktop\me when the\Blood Code v1.20\lib\py3-windows-x86_64\'
PYTHONPATH = (not set)
program name = 'C:\Users\Anem\Desktop\me when the\Blood Code v1.20\lib\py3-windows-x86_64\python.exe'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = 'C:\\Users\\Anem\\Desktop\\me when the\\Blood Code v1.20\\lib\\py3-windows-x86_64\\python.exe'
sys.base_prefix = 'C:\\Users\\Anem\\Desktop\\me when the\\Blood Code v1.20\\lib\\py3-windows-x86_64'
sys.base_exec_prefix = 'C:\\Users\\Anem\\Desktop\\me when the\\Blood Code v1.20\\lib\\py3-windows-x86_64'
sys.platlibdir = 'lib'
sys.executable = 'C:\\Users\\Anem\\Desktop\\me when the\\Blood Code v1.20\\lib\\py3-windows-x86_64\\python.exe'
sys.prefix = 'C:\\Users\\Anem\\Desktop\\me when the\\Blood Code v1.20\\lib\\py3-windows-x86_64'
sys.exec_prefix = 'C:\\Users\\Anem\\Desktop\\me when the\\Blood Code v1.20\\lib\\py3-windows-x86_64'
sys.path = [
'C:\\Users\\Anem\\Desktop\\me when the\\Blood Code v1.20\\lib\\py3-windows-x86_64\\lib\\python39.zip',
'C:\\Users\\Anem\\Desktop\\me when the\\Blood Code v1.20\\lib\\py3-windows-x86_64\\lib\\python3.9',
'C:\\Users\\Anem\\Desktop\\me when the\\Blood Code v1.20\\lib\\py3-windows-x86_64\\lib\\python3.9\\lib-dynload',
'',
]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00005968 (most recent call first):
<no Python frame>

Cleaning up temporary files...
 

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,384
Hey there, sorry to bother but im trying to extract the rpas of a game called 'Blood Code', however whenever I try I get this error.

Searching for RPA packages
Python path configuration:
PYTHONHOME = 'C:\Users\Anem\Desktop\me when the\Blood Code v1.20\lib\py3-windows-x86_64\'
PYTHONPATH = (not set)
program name = 'C:\Users\Anem\Desktop\me when the\Blood Code v1.20\lib\py3-windows-x86_64\python.exe'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = 'C:\\Users\\Anem\\Desktop\\me when the\\Blood Code v1.20\\lib\\py3-windows-x86_64\\python.exe'
sys.base_prefix = 'C:\\Users\\Anem\\Desktop\\me when the\\Blood Code v1.20\\lib\\py3-windows-x86_64'
sys.base_exec_prefix = 'C:\\Users\\Anem\\Desktop\\me when the\\Blood Code v1.20\\lib\\py3-windows-x86_64'
sys.platlibdir = 'lib'
sys.executable = 'C:\\Users\\Anem\\Desktop\\me when the\\Blood Code v1.20\\lib\\py3-windows-x86_64\\python.exe'
sys.prefix = 'C:\\Users\\Anem\\Desktop\\me when the\\Blood Code v1.20\\lib\\py3-windows-x86_64'
sys.exec_prefix = 'C:\\Users\\Anem\\Desktop\\me when the\\Blood Code v1.20\\lib\\py3-windows-x86_64'
sys.path = [
'C:\\Users\\Anem\\Desktop\\me when the\\Blood Code v1.20\\lib\\py3-windows-x86_64\\lib\\python39.zip',
'C:\\Users\\Anem\\Desktop\\me when the\\Blood Code v1.20\\lib\\py3-windows-x86_64\\lib\\python3.9',
'C:\\Users\\Anem\\Desktop\\me when the\\Blood Code v1.20\\lib\\py3-windows-x86_64\\lib\\python3.9\\lib-dynload',
'',
]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00005968 (most recent call first):
<no Python frame>

Cleaning up temporary files...
Hi, with my unRen or with UnRen 1.0.11? And where can I find a game? the site does not find one with that name :unsure:
 
Jan 26, 2020
44
51
Hi, with my unRen or with UnRen 1.0.11? And where can I find a game? the site does not find one with that name :unsure:
Sorry for the late response! It's actually a game from steam. I'll leave the so you can see the files. I got this error with your Unren, with the other one I get a different error. I used to be able to extract the files in an older version (1.14), but it seems that they did something new with the latest version (1.20) that is making it hard to extract.

I'm trying to extract the rpa files to be able to access the code and remove the part that makes it a requirement to be opened with steam (I did it before with 1.14). But yeah, I'm having some trouble it seems.
 

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,384
Sorry for the late response! It's actually a game from steam. I'll leave the so you can see the files. I got this error with your Unren, with the other one I get a different error. I used to be able to extract the files in an older version (1.14), but it seems that they did something new with the latest version (1.20) that is making it hard to extract.

I'm trying to extract the rpa files to be able to access the code and remove the part that makes it a requirement to be opened with steam (I did it before with 1.14). But yeah, I'm having some trouble it seems.
They've made changes to the very heart of the RenPy engine: Python itself. Specifically, you can get rid of this error if you unpack the zip archive with python libraries into the correct folder, But this is only part of the changes, the second part is the libpye.pyd module (possibly commercial development), because of which the extension of compiled python files is now .pye instead of .pyc. I'll try to play with it a little bit, but I can't promise anything, it's still a little not my level.
 

SonsOfLiberty

Post Pro
Compressor
Sep 3, 2022
23,126
193,011
  • Like
Reactions: Eagle1900
Jan 26, 2020
44
51
They've made changes to the very heart of the RenPy engine: Python itself. Specifically, you can get rid of this error if you unpack the zip archive with python libraries into the correct folder, But this is only part of the changes, the second part is the libpye.pyd module (possibly commercial development), because of which the extension of compiled python files is now .pye instead of .pyc. I'll try to play with it a little bit, but I can't promise anything, it's still a little not my level.
Damn, it seems they really went for it this time. Thank you for even trying, no pressure if you can't do it, I appreciate your help nonetheless. Have a good day/evening/night!
 
  • Like
Reactions: VepsrP

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,384
Sorry for the late response! It's actually a game from steam. I'll leave the so you can see the files. I got this error with your Unren, with the other one I get a different error. I used to be able to extract the files in an older version (1.14), but it seems that they did something new with the latest version (1.20) that is making it hard to extract.

I'm trying to extract the rpa files to be able to access the code and remove the part that makes it a requirement to be opened with steam (I did it before with 1.14). But yeah, I'm having some trouble it seems.
Here is a version that can unpack and decompile, but the game does not start not only without steam, but also without archives, so you have to solve two problems.
 
Jan 26, 2020
44
51
Here is a version that can unpack and decompile, but the game does not start not only without steam, but also without archives, so you have to solve two problems.
TYSM! I really appreciate your help! I think I have a way around one of the 2 problems you mentioned and I'll see what I can do about the other. Again, thank you so much. Hope you have a wonderful day/evening/night!
 

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,384
As for the game Our Bright Days, to solve it's one (very important) problem, I'm going to create project unrpyc 2.0, in which I will try to rethink the way data is prepared for recording after the decompilation procedure itself. This is not a quick case, so origin one version of the tool will be used to solve more trivial issues. Then, if the idea succeeds, the two projects will be merged into one.
 

yoyomistro

Engaged Member
Jan 15, 2017
2,932
3,974
As for the game Our Bright Days, to solve it's one (very important) problem, I'm going to create project unrpyc 2.0, in which I will try to rethink the way data is prepared for recording after the decompilation procedure itself. This is not a quick case, so origin one version of the tool will be used to solve more trivial issues. Then, if the idea succeeds, the two projects will be merged into one.
Awesome, thanks I tried your scripts the other day, still ran into the issue.
 

calel

Member
Aug 19, 2021
341
566
https://f95zone.to/threads/the-shrink-r-r-v1-9-onemanvn.36610/page-178 cant extract rpa files
compressed

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

Searching for RPA packages
A rendszer nem találja a megadott elérési utat.
'R-Season-One-compressed\game\' is not recognized as an internal or external command,
operable program or batch file.
Unpacking "chapterone.rpa" acrhive.
Traceback (most recent call last):
File "C:\Users\User\Desktop\renpy-7.3.5-sdk\TheShrinkR&R-Season-One-compressed\rpatool.py", line 93, in <module>
archive = RenPyArchive(arch, archives.index(arch))
File "C:\Users\User\Desktop\renpy-7.3.5-sdk\TheShrinkR&R-Season-One-compressed\rpatool.py", line 21, in __init__
self.load(file, index)
File "C:\Users\User\Desktop\renpy-7.3.5-sdk\TheShrinkR&R-Season-One-compressed\rpatool.py", line 49, in load
self.handle = open(self.file, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'chapterone.rpa'

Cleaning up temporary files...
A rendszer nem találja a megadott elérési utat.
'R-Season-One-compressed' is not recognized as an internal or external command,
operable program or batch file.

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

Finished!

Enter "1" to go back to the menu, or any other
 

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,384
https://f95zone.to/threads/the-shrink-r-r-v1-9-onemanvn.36610/page-178 cant extract rpa files
compressed

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

Searching for RPA packages
A rendszer nem találja a megadott elérési utat.
'R-Season-One-compressed\game\' is not recognized as an internal or external command,
operable program or batch file.
Unpacking "chapterone.rpa" acrhive.
Traceback (most recent call last):
File "C:\Users\User\Desktop\renpy-7.3.5-sdk\TheShrinkR&R-Season-One-compressed\rpatool.py", line 93, in <module>
archive = RenPyArchive(arch, archives.index(arch))
File "C:\Users\User\Desktop\renpy-7.3.5-sdk\TheShrinkR&R-Season-One-compressed\rpatool.py", line 21, in __init__
self.load(file, index)
File "C:\Users\User\Desktop\renpy-7.3.5-sdk\TheShrinkR&R-Season-One-compressed\rpatool.py", line 49, in load
self.handle = open(self.file, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'chapterone.rpa'

Cleaning up temporary files...
A rendszer nem találja a megadott elérési utat.
'R-Season-One-compressed' is not recognized as an internal or external command,
operable program or batch file.

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

Finished!

Enter "1" to go back to the menu, or any other
Remove the "&" sign in the name of the game folder or use the PowerShell version.
 
  • Like
Reactions: giqui

gnadudu

Well-Known Member
Aug 31, 2018
1,895
2,798
Hi,

had an issue decompiling the scripts from LoSeSB. It had an issue by not recognizing starred_indexes again (It doesn't use doublestarred_indexes but I guess it would also affect those).
I changed the code in the util.py from this:
Code:
def reconstruct_arginfo(arginfo):
    arginfo = convert_ast(arginfo)
    if arginfo is None:
        return ""

    rv = []
    for i, (name, val) in enumerate(arginfo.arguments):

        if(hasattr(arginfo, "__starred_indexes__") and hasattr(arginfo.starred_indexes, "__iter__") and i in arginfo.starred_indexes):
            rv.append("*%s" % val)
        elif(hasattr(arginfo, "__doublestarred_indexes__") and hasattr(arginfo.doublestarred_indexes, "__iter__") and i in arginfo.doublestarred_indexes):
            rv.append("**%s" % val)
        elif name is not None:
            rv.append("{}={}".format(name, val))
        else:
            rv.append(val)
    if hasattr(arginfo, 'extrapos') and arginfo.extrapos:
        rv.append("*%s" % arginfo.extrapos)
    if hasattr(arginfo, 'extrakw') and arginfo.extrakw:
        rv.append("**%s" % arginfo.extrakw)

    return "(" + ", ".join(rv) + ")"
to this:
Code:
def reconstruct_arginfo(arginfo):
    arginfo = convert_ast(arginfo)
    if arginfo is None:
        return ""

    rv = []
    for i, (name, val) in enumerate(arginfo.arguments):

        if(hasattr(arginfo, "starred_indexes") and hasattr(arginfo.starred_indexes.name, "__iter__") and i in arginfo.starred_indexes.name):
            rv.append("*%s" % val)
        elif(hasattr(arginfo, "doublestarred_indexes") and hasattr(arginfo.doublestarred_indexes.name, "__iter__") and i in arginfo.doublestarred_indexes.name):
            rv.append("**%s" % val)
        elif(hasattr(arginfo, "__starred_indexes__") and hasattr(arginfo.starred_indexes, "__iter__") and i in arginfo.starred_indexes):
            rv.append("*%s" % val)
        elif(hasattr(arginfo, "__doublestarred_indexes__") and hasattr(arginfo.doublestarred_indexes, "__iter__") and i in arginfo.doublestarred_indexes):
            rv.append("**%s" % val)
        elif name is not None:
            rv.append("{}={}".format(name, val))
        else:
            rv.append(val)
    if hasattr(arginfo, 'extrapos') and arginfo.extrapos:
        rv.append("*%s" % arginfo.extrapos)
    if hasattr(arginfo, 'extrakw') and arginfo.extrakw:
        rv.append("**%s" % arginfo.extrakw)

    return "(" + ", ".join(rv) + ")"
(left the old stuff in, because I think older renpy versions still need to identify the starred and doublestarred indexes this way...)

because the dump gave me this:
1691735671626.png

And now it works fine.
You can check the file game/ac/watch.rpyc (line 102) for an instance which should be
Code:
call apply_movie_gain (genre, *people)
but your version decompiles it to

Code:
call apply_movie_gain (genre, people)
which leads to bugs ingame...

Thanks for looking into it. :)
 

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,384
Hi,

had an issue decompiling the scripts from LoSeSB. It had an issue by not recognizing starred_indexes again (It doesn't use doublestarred_indexes but I guess it would also affect those).
I changed the code in the util.py from this:
Code:
def reconstruct_arginfo(arginfo):
    arginfo = convert_ast(arginfo)
    if arginfo is None:
        return ""

    rv = []
    for i, (name, val) in enumerate(arginfo.arguments):

        if(hasattr(arginfo, "__starred_indexes__") and hasattr(arginfo.starred_indexes, "__iter__") and i in arginfo.starred_indexes):
            rv.append("*%s" % val)
        elif(hasattr(arginfo, "__doublestarred_indexes__") and hasattr(arginfo.doublestarred_indexes, "__iter__") and i in arginfo.doublestarred_indexes):
            rv.append("**%s" % val)
        elif name is not None:
            rv.append("{}={}".format(name, val))
        else:
            rv.append(val)
    if hasattr(arginfo, 'extrapos') and arginfo.extrapos:
        rv.append("*%s" % arginfo.extrapos)
    if hasattr(arginfo, 'extrakw') and arginfo.extrakw:
        rv.append("**%s" % arginfo.extrakw)

    return "(" + ", ".join(rv) + ")"
to this:
Code:
def reconstruct_arginfo(arginfo):
    arginfo = convert_ast(arginfo)
    if arginfo is None:
        return ""

    rv = []
    for i, (name, val) in enumerate(arginfo.arguments):

        if(hasattr(arginfo, "starred_indexes") and hasattr(arginfo.starred_indexes.name, "__iter__") and i in arginfo.starred_indexes.name):
            rv.append("*%s" % val)
        elif(hasattr(arginfo, "doublestarred_indexes") and hasattr(arginfo.doublestarred_indexes.name, "__iter__") and i in arginfo.doublestarred_indexes.name):
            rv.append("**%s" % val)
        elif(hasattr(arginfo, "__starred_indexes__") and hasattr(arginfo.starred_indexes, "__iter__") and i in arginfo.starred_indexes):
            rv.append("*%s" % val)
        elif(hasattr(arginfo, "__doublestarred_indexes__") and hasattr(arginfo.doublestarred_indexes, "__iter__") and i in arginfo.doublestarred_indexes):
            rv.append("**%s" % val)
        elif name is not None:
            rv.append("{}={}".format(name, val))
        else:
            rv.append(val)
    if hasattr(arginfo, 'extrapos') and arginfo.extrapos:
        rv.append("*%s" % arginfo.extrapos)
    if hasattr(arginfo, 'extrakw') and arginfo.extrakw:
        rv.append("**%s" % arginfo.extrakw)

    return "(" + ", ".join(rv) + ")"
(left the old stuff in, because I think older renpy versions still need to identify the starred and doublestarred indexes this way...)

because the dump gave me this:
View attachment 2843184

And now it works fine.
You can check the file game/ac/watch.rpyc (line 102) for an instance which should be
Code:
call apply_movie_gain (genre, *people)
but your version decompiles it to

Code:
call apply_movie_gain (genre, people)
which leads to bugs ingame...

Thanks for looking into it. :)
Yeah, It seems that the authors of the engine have finally decided to abandon meaningless underscores in variables:BootyTime:
Thanks for finding and solving the problem, I have already added a fix.
 

estrada777

Engaged Member
Modder
Donor
Mar 22, 2020
3,961
9,742
Hi,

had an issue decompiling the scripts from LoSeSB. It had an issue by not recognizing starred_indexes again (It doesn't use doublestarred_indexes but I guess it would also affect those).
I changed the code in the util.py from this:
Code:
def reconstruct_arginfo(arginfo):
    arginfo = convert_ast(arginfo)
    if arginfo is None:
        return ""

    rv = []
    for i, (name, val) in enumerate(arginfo.arguments):

        if(hasattr(arginfo, "__starred_indexes__") and hasattr(arginfo.starred_indexes, "__iter__") and i in arginfo.starred_indexes):
            rv.append("*%s" % val)
        elif(hasattr(arginfo, "__doublestarred_indexes__") and hasattr(arginfo.doublestarred_indexes, "__iter__") and i in arginfo.doublestarred_indexes):
            rv.append("**%s" % val)
        elif name is not None:
            rv.append("{}={}".format(name, val))
        else:
            rv.append(val)
    if hasattr(arginfo, 'extrapos') and arginfo.extrapos:
        rv.append("*%s" % arginfo.extrapos)
    if hasattr(arginfo, 'extrakw') and arginfo.extrakw:
        rv.append("**%s" % arginfo.extrakw)

    return "(" + ", ".join(rv) + ")"
to this:
Code:
def reconstruct_arginfo(arginfo):
    arginfo = convert_ast(arginfo)
    if arginfo is None:
        return ""

    rv = []
    for i, (name, val) in enumerate(arginfo.arguments):

        if(hasattr(arginfo, "starred_indexes") and hasattr(arginfo.starred_indexes.name, "__iter__") and i in arginfo.starred_indexes.name):
            rv.append("*%s" % val)
        elif(hasattr(arginfo, "doublestarred_indexes") and hasattr(arginfo.doublestarred_indexes.name, "__iter__") and i in arginfo.doublestarred_indexes.name):
            rv.append("**%s" % val)
        elif(hasattr(arginfo, "__starred_indexes__") and hasattr(arginfo.starred_indexes, "__iter__") and i in arginfo.starred_indexes):
            rv.append("*%s" % val)
        elif(hasattr(arginfo, "__doublestarred_indexes__") and hasattr(arginfo.doublestarred_indexes, "__iter__") and i in arginfo.doublestarred_indexes):
            rv.append("**%s" % val)
        elif name is not None:
            rv.append("{}={}".format(name, val))
        else:
            rv.append(val)
    if hasattr(arginfo, 'extrapos') and arginfo.extrapos:
        rv.append("*%s" % arginfo.extrapos)
    if hasattr(arginfo, 'extrakw') and arginfo.extrakw:
        rv.append("**%s" % arginfo.extrakw)

    return "(" + ", ".join(rv) + ")"
(left the old stuff in, because I think older renpy versions still need to identify the starred and doublestarred indexes this way...)

because the dump gave me this:
View attachment 2843184

And now it works fine.
You can check the file game/ac/watch.rpyc (line 102) for an instance which should be
Code:
call apply_movie_gain (genre, *people)
but your version decompiles it to

Code:
call apply_movie_gain (genre, people)
which leads to bugs ingame...

Thanks for looking into it. :)
I'd had this problem too, but I didn't know how to fix it so I stopped decompiling it!
 

trauts

Active Member
Aug 12, 2018
734
545
seems the latest unren-forall can't de-compile hard to love (HardtoLove-0.061) rpyc files
best way to describe it is it seems to cause unren process to terminate.
 
Last edited:
  • Thinking Face
Reactions: VepsrP
5.00 star(s) 3 Votes