Tool Ren'Py UnRen.bat v1.0.11d - RPA Extractor, RPYC Decompiler, Console/Developer Menu Enabler

5.00 star(s) 8 Votes

rexharbinger

Member
Sep 15, 2017
221
326
When trying to decompile Innocent Witches 0.6 beta I get about half the files returning this error:

Code:
      Decompilation of 0 script file successful
   + Decompiling "hermi_dialogues.rpyc" - 684014 bytes
Error while decompiling D:\Temp\Innocent_Witches-0.6-beta-pc\game\scripts\plot\act_2\chapter_1\hermi_dialogues.rpyc:
Traceback (most recent call last):
  File "D:\Temp\Innocent_Witches-0.6-beta-pc\game\..\unrpyc.py", line 139, in worker
    no_pyexpr=args.no_pyexpr, comparable=args.comparable, translator=translator, init_offset=args.init_offset)
  File "D:\Temp\Innocent_Witches-0.6-beta-pc\game\..\unrpyc.py", line 105, in decompile_rpyc
    ast = read_ast_from_file(in_file)
  File "D:\Temp\Innocent_Witches-0.6-beta-pc\game\..\unrpyc.py", line 86, in read_ast_from_file
    data, stmts = magic.safe_loads(raw_contents, class_factory, {"_ast", "collections"})
  File "D:\Temp\Innocent_Witches-0.6-beta-pc\decompiler\magic.py", line 599, in safe_loads
    encoding=encoding, errors=errors).load()
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 858, in load
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/pickle.py", line 1217, in load_build
  File "D:\Temp\Innocent_Witches-0.6-beta-pc\decompiler\magic.py", line 127, in __setstate__
    raise FakeUnpicklingError("{0}.__setstate__() got unexpected arguments {1}".format(self.__class__, state))
FakeUnpicklingError: <class 'renpy.python.RevertableSet'>.__setstate__() got unexpected arguments ({u'give_present': True, u'back_button': True},)
I've tried both the regular and the dev version with the same results.

I've noticed that some of the extracted files had russian characters in them, so there may be some sort of russian character that currently breaks the decompiling process.
 
Last edited:

ADIDAS

Member
Feb 3, 2018
317
300
If you clicked on either the UnRen.bat file or the UnRen-dev.bat file, you should have received a menu with numbered options. If you got something else, you may have clicked on the wrong .bat file, or perhaps you are in the wrong thread here.
Capture.PNG
I placed the downloaded UnRen file in the LittleMan game folder which I was wanting to use the tool on, as you can see the .bat file has no default program to run it. That's why in my previous post I said when I double click the file I am prompted to select a program to run the file. That's my question, should this file automatically open with the menu options and since it isn't in my case which program do I need to associate it with to get it to run?
 

Walter Victor

Forum Fanatic
Dec 27, 2017
5,563
19,330
View attachment 845275
I placed the downloaded UnRen file in the LittleMan game folder which I was wanting to use the tool on, as you can see the .bat file has no default program to run it. That's why in my previous post I said when I double click the file I am prompted to select a program to run the file. That's my question, should this file automatically open with the menu options and since it isn't in my case which program do I need to associate it with to get it to run?
UnRen.bat is a stand-alone executable. Double-clicking on it or Opening it is supposed to run the file. There is no program associated with it.

I would suggest re-downloading UnRen.bat. You might also try downloading UnRen-dev.bat, which I now use with all of my Ren'Py games. The only other thing that I can think of is that there is something missing in the Little Man download. Since I haven't played that game, I can't tell you from personal experience if there is some problem with its download and UnRen.

But perhaps someone with more expertise than I have needs to help you if my suggestions don't work.
 
  • Thinking Face
Reactions: ADIDAS

Meushi

Well-Known Member
Aug 4, 2017
1,146
12,688
I placed the downloaded UnRen file in the LittleMan game folder which I was wanting to use the tool on, as you can see the .bat file has no default program to run it. That's why in my previous post I said when I double click the file I am prompted to select a program to run the file. That's my question, should this file automatically open with the menu options and since it isn't in my case which program do I need to associate it with to get it to run?
Not sure how you broke file associations for .bat files, but a bit of googling suggests would need to alter the registry to fix it.

If you know what you're doing you can do this yourself, otherwise describes how to fix it, including providing registry fix downloads for various versions of Windows.

UnRen.bat is a stand-alone executable. Double-clicking on it or Opening it is supposed to run the file. There is no program associated with it.
Windows batch files aren't executables, they're script files which are associated with and run via the command-line interpreter (cmd.exe).
 

MG_

Newbie
May 14, 2020
37
44
How about packing contents into rpa? May be some workaround with the original devkit or Python but, I mean standalone like this one
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,132
14,815
After decompile archive game not started:
A well known bug, normally solved with the 0.9-dev. A quick (less than 10 seconds) search in this thread give a lot of answers, among which this one by example.


How about packing contents into rpa? May be some workaround with the original devkit or Python but, I mean standalone like this one
You can use by example. It's a Python script dedicated to rpa manipulations.
 

kanatik_

Newbie
Oct 13, 2019
39
43
all hi who can help me everything worked fine then in 1H beautiful day just stopped and vylaziet here is this error thanks in advance
Гуглтранслейт или что-то так перевело, что лучше бы не переводило.

Если эта ошибка вылетает еще при даблклике по .бат файлу, проверь, что какой-нибудь антивирус не спихнул его в карантин или что-нибудь подобное.

Можно еще попробовать запустить не даблкликом, а сразу через консоль. В эксплорере в кнопке Файл должен быть хоткей по запуску консоли в текущей папке. Или Win+R → cmd, чтобы открыть ее, там вводишь G:, чтобы прыгнуть на диск, и дальше cd "под папка\Сохранялки\....." и так пока не дойдешь до своей папки. Tab делает автодополнение введенных путей. и как дойдешь, там уже ввести unren-dev.bat для запуска.

Если это вылетает уже во время работы, то прога может не пережевывать нормально как пути с пробелами, так и русские буквы в пути, перемести куда-нибудь в корень G временно и попробуй там.
 

rayminator

Engaged Member
Respected User
Sep 26, 2018
3,040
3,115
After decompile archive game not started:
View attachment 847105

with this error you will need to edit those files

here what you need to find any screen looks like this with the tag menu in the wrong spot
Code:
init -501 screen main_menu() tag menu:
you would need to move tag menu out of that line so it would look like this

Code:
init -501 screen main_menu():

    tag menu

    style_prefix "main_menu"

hope this helps
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,132
14,815
anne O'nymous I know, I don't want to mess with Python directly (likewise with a real python :D)
Well, unren use rpatool directly with the embedded version of Python, so there's still hope. I'll try to remember that I'll have to look at this once back at home.


is there any other app? this app is not working
Well, if we known what is the problem, we could potentially help you to fix it. What would have been way better. But well, yes, there's others app : , , and a way to enable the console.
 

taki :::

Member
Sep 11, 2020
147
108
Well, unren use rpatool directly with the embedded version of Python, so there's still hope. I'll try to remember that I'll have to look at this once back at home.
Well, if we known what is the problem, we could potentially help you to fix it. What would have been way better. But well, yes, there's others app : , , and a way to enable the console.
After using this game, the game stop working. Extracted files are damaged, cant open with any app. I tried almost all apps i found on this website. I can not extract any audio file.

Is here any normal app, it can be paid, dont really care about money, which can give me an option to extract from all files:
  • assests <-- always error, that c:\projects\ dont have some files but I have it. After using UnRen.bat, i can not extract any file from assests. feels like, those files were damaged
  • unity3d
  • renpy
  • cpk <-- this file, i cant find any working app
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,132
14,815
After using this game, the game stop working. Extracted files are damaged, cant open with any app.
Er...


assests <-- always error, that c:\projects\ dont have some files but I have it. After using UnRen.bat, i can not extract any file from assests. feels like, those files were damaged
Er again... You mean Daz3D assets ? They aren't games at all.
There's some exceptions, but mostly they are either plain text files, GZiped text files, or one of the many supported image format ; but the said images have absolutely no interest, they are just textures, nothing more.
And, obviously, unren will not works with those files. As said by the title of the thread, unRen is a tool for Ren'py files, those aren't Ren'py files.


Unity not being Ren'py, a tool designed for Ren'py games and files formats will not works more here than with Daz3D assets.
Plus Unity do not have unified file format ; it's up to the game author to decide which one(s) he'll use. Therefore, there isn't an universal tool and you have to choose the one(s) you'll need according to the format(s) used by a given game.


Here, unren works perfectly fine ; it's what it's made for.


cpk <-- this file, i cant find any working app
It's just an extension, used by too many software to mean anything.
Since you ask here, I assume that one of the game engine used by indie adult games author use it. But it's mostly used as extension for console games compressed files, reason why none of the software you found works ; you have to search for tools made for this engine, not just CPK unpackers.
 
  • Like
Reactions: yoyomistro

taki :::

Member
Sep 11, 2020
147
108
It's just an extension, used by too many software to mean anything.
Since you ask here, I assume that one of the game engine used by indie adult games author use it. But it's mostly used as extension for console games compressed files, reason why none of the software you found works ; you have to search for tools made for this engine, not just CPK unpackers.
My main language is Japanese, so i f* with my post. I am really sorry about that.

I was talking about "School Days HQ" game and it has many ".gpk" files. No idea how to extract them, tried many apps. Files like "Movie04.GPK", "Backgrounds.GPK".

Next. Let's take other game "DATE A LIVE: Rio Reincarnation". it has ". pck" files like "Voice.pck", "cg.pck". Any ideas, how to extract them?

Thanks for your help. Sorry to bother you. I've never tried to extract anything from games, so this is all new for me.
 

Walter Victor

Forum Fanatic
Dec 27, 2017
5,563
19,330
How do I put Unren in the exe folder to extract the rpa images?
What I did was download the zip file to a folder that I could readily access. Then unzipped the downloaded file. [I used 7-zip.] Then all you have to do is copy the .bat file that is produced by the unzip, into any Ren'Py game's folder where the game's .exe exists. Open (double-click) the .bat file and it will bring up a menu that is self-explanatory.
 
5.00 star(s) 8 Votes