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

5.00 star(s) 9 Votes

srksrk 68

Forum Fanatic
Modder
Sep 17, 2018
4,394
5,611
It's the forum again. Tiring... Did try like 10 times and it errors. Used external now. Just a shot of a running unren 2 in pure python and everything working - so far.
Hehe, I am quite confident you guys all make it happen once Summertime Saga new version is out :D
 

Madeddy

Active Member
Dec 17, 2017
814
468
Update2: Well, judging by what I see, in any case, need a separate python, which is only suitable for enthusiasts like us, and ordinary users are left out.
Yes we need a installed python. And? Point? On linux its even there already... on win its even from the MS store available ...
Needs and facts:
Current Unren:
  • Two separate versions needed for Windows and Linux/MAC (both maintainers absent/missing...)
  • Dependent on Renpy's python and this is a castrated variant (See multiprocessing issue, missing encodings etc.)
  • Needs powershell installed
  • Four languages: Code mingle-mangle consistent of batch + powershell + python (win) or shell + python (*nix)
Pure python Unren:
  • One version for all OS
  • Needs a native python install
  • One language: Python
So. Now tell which one of them looks like ... good, bad, ugly? Easier or not, pro and contra...
 
Last edited:

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,366
Yes we need a installed python. And? Point? On linux its even there already... on win its even from the MS store available ...
Needs and facts:
Current Unren:
  • Two separate versions needed for Windows and Linux/MAC (both maintainers absent/missing...)
  • Dependent on Renpy's python and this is a castrated variant (See multiprocessing issue, missing encodings etc.)
  • Needs powershell installed
  • Four languages: Code mingle-mangle consistent of batch + powershell + python (win) or shell + python (*nix)
Pure python Unren:
  • One version for all OS
  • Needs a native python install
  • One language: Python
So. Now tell which one of them looks like ... ?
I am the norm.But I want to clarify, we need to specify the folder with the game only on the second python or on the third, too? since I did not see any work in the third python. If so, then apart from enthusiasts, it is unlikely that anyone will want to work with this. This is from the point of view of the writers of the current UnRen crutch to the core, and for ordinary people it is a tool that does not require any special features and requires minimal body movements. But if don't need to pass the path to the game as a parameter, it will be more interesting. (y)
 

Madeddy

Active Member
Dec 17, 2017
814
468
I am the norm.But I want to clarify, we need to specify the folder with the game only on the second python or on the third, too? since I did not see any work in the third python. ...
I cannot understand this part of your post? Second python...third...? Huh? o_O
...
But if don't need to pass the path to the game as a parameter, it will be more interesting.
Yes. There is no need.
The user has two ways (basically 2 with 2 variants each) to run it:
  • Put it in the games ../base directory or in ../base/game
  • Start it with your target directory as argument passed (again these 2 dirs possible) like in the screenshot up there
Isn't this nice and convenient?

 

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,366
I cannot understand this part of your post? Second python...third...? Huh? o_O
Yes. There is no need.
The user has two ways (basically 2 with 2 variants each) to run it:
  • Put it in the games ../base directory or in ../base/game
  • Start it with your target directory as argument passed (again these 2 dirs possible) like in the screenshot up there
Isn't this nice and convenient?

Well, while researching your code, I saw that there are still problems with the third python - the decompiler doesn't work. That way I know what I'm going to do tomorrow after work. And if you thought I was going to make this shit work in all conditions, then you think too much of me. :HideThePain: I just want to see how it won't work. No spoilers!
 

Madeddy

Active Member
Dec 17, 2017
814
468
Oh. You mean Python version 3 (like current 3.8...)? If so, then yes.
The py3 version of unren2 will also use RPAkit as unpacker and unrpyc is missing, like said. Unrpyc has so far no support for py3 because the devs waiting for renpy to make the step first.

Good look if you play on unrpyc... i did try last year and got stuck on all the fake classes and fake factory functions this thing uses. And the code formating there sometimes.... Headache... endless. :HideThePain:
 

fried

Almost
Moderator
Donor
Nov 11, 2017
2,311
6,080
Nice we have some movement. :)

Lets see:
It would be new to me that after the number 9 the 91 comes. :rolleyes: (0.9-dev -> 0.91) [Yes, that's me being pedantic...]
- IF we have a slight change, then it would be 0.9.1. Means basically just a bugfix.
- In this case however we have the changes for python 64bit windows lib's and a important tool update.
So please go with version 0.10 or better with v0.11, because i used v0.10 already a ~year ago for a short lived unren update(Some RenPy changes did kill it).

More gruesome code stuff in "mod 5 0.91":
  • Nobody noticed i guess: In the line set "version=... the last number (191007) is just the release date of v0.9-dev. -> Invalid here.
  • Ever case of set "renpydir=%... is unneeded in UnRen. The var was and is never used.
  • There are two checks for the "python.exe" now.
  • Same for the other directory check "sets"(base & game dir)
Just saying. Works so far. For now...
I consider .9 -> .91 a minor update representation (i.e., small enhancements, backwards compatibility, etc.) and didn't call it 0.9.1. So, I CHEATED in that respect and don't feel guilty.

Honestly, it was originally an internal update for some of the small fixes mentioned in the changelog (i.e., so more of a patch), then some new features (i.e., minor update), then added in much of VepsrP's mod. But I never changed the version number after the bugfix changes.

I kept any unused vars around on purpose: it was unknown to me if there were plans to use them, so I didn't see a reason to optimize the file yet. Heck, I have extra binaries in there not being called at the moment.

I'll look at the release date and minor things you mentioned and then consider updating the OP, thanks ... maybe with 0.91.1, just for you :)
 

GreenGobbo

Member
Oct 18, 2018
453
1,225
Didn't realize how old the version of UnRen I've been running was until I stumbled across this thread (was still using 0.6) so thanks for the continued work on it. (y)
 

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,366
Didn't realize how old the version of UnRen I've been running was until I stumbled across this thread (was still using 0.6) so thanks for the continued work on it. (y)
Dude, you're scaring me.:WutFace: Did you use it just for the sake of unpacking games and adding commands to the console?
 
  • Haha
Reactions: yoyomistro

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,366
Well, I tried. I stopped at the error "The object does not have the attribute 'location' " :unsure: Fuck knows, why it does not exist and where it should come from. I only know that this is most likely due to the fake renpy module, which is needed for some reason and somehow is formed. One evening is not enough, I will think tomorrow what to do with it.:HideThePain:
 

Baddog-11

Member
Jul 6, 2017
123
248
I found a small thing that could be changed but it's not really that important.

When running the Quick Save/Load Option the Console returns that the Default hotkeys are F5 & F9 but since you can change them in the Configuration, I thought it would be nice if the console would show the keys that have actually been set.
(Even though I don't think that many people even change those keys hence why I don't see it as important.)

One would just need to replace F5 & F9 with %quicksavekey% & %quickloadkey%.
echo Default hotkeys:
echo + Quick Save: F5
echo + Quick Load: F9
echo.
echo Hotkeys:
echo + Quick Save: %quicksavekey%
echo + Quick Load: %quickloadkey%
echo.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,290
15,149
When running the Quick Save/Load Option the Console returns that the Default hotkeys are F5 & F9 but since you can change them in the Configuration, I thought it would be nice if the console would show the keys that have actually been set.
What imply that unRen have to :
  1. Unpack the rpa ;
  2. Uncompress the rpyc files ;
  3. Parse the 00keymap.rpy file to see if the default haven't changed ;
  4. Parse all the rpy files in the /game/ directory in search of a change in the value ;
  5. Then finally define %quicksavekey% & %quickloadkey% for the case they need to be displayed.

This with the point 4 being not limited to pure text parsing, since something like getattr( config, kmDictName )[kmQuickLoadKey] = kmQuickLoadValue, is a weird by still totally valid way to change the key for the quick load action.
 

Madeddy

Active Member
Dec 17, 2017
814
468
...
When running the Quick Save/Load Option ... ... I thought it would be nice if the console would show the keys that have actually been set.
(Even though I don't think that many people even change those keys hence why I don't see it as important.)
...
I have this in the python rewrite already integrated for simple writing of the wanted cfg setting. However there is no changing of the keys from F5/F9. No need imho. Also, there are so far no checks if the cfg settings are already elsewhere set. This can get complex.
Edit: Yeah, anne O'nymous said it already...
Even for just unpacking it will fail on a lot of games made since late 2019, I'm surprised you were still able to use .6 with no issues.
Ergh... no, thats incorrect.
Writing the snipped's(dev console, quick...etc) does not depend on RenPy/Python and unpacking respectively the RPA format was not changed. Only issue was the decompiling. I do not wonder v0.6 worked for him till now.

Unpacking works, if the game dev didn't play with some stuff like we all experienced already. For this float in this thread already like 20 different modified "rpatool" variants around.
 
Last edited:
  • Like
Reactions: yoyomistro

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,366
Ergh... no, thats incorrect.
Writing the snippeds(dev console, quick...etc) does not depend on RenPy/Python and unpacking respectively the RPA format was not changed. Only issue was the decompiling. I do not wonder v0.6 worked for him till now.

Unpacking works, if the game dev did'n play with some stuff like we all experienced allready. For this float in this thread already like 20 differnet modified "rpatool" varaints around.
But the fact that he used version 0.6 is surprising. I got acquainted with this tool when it was already 0.8, and possibly 0.9 although it was a year and a half or two ago, I'm afraid to imagine since when 0.6 was used:eek: :BootyTime:
 

J2400

Newbie
Aug 27, 2018
52
46
If I get a "the given file is not a valid Ren'Py archive, or an unsupported version" error when trying to extract RPA packages, which version would it be, and how would I go about extracting it a different way? I have some experience with different coding languages, but no other experience with .rpa files than simply pressing "1" in UnRen.
 

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,366
If I get a "the given file is not a valid Ren'Py archive, or an unsupported version" error when trying to extract RPA packages, which version would it be, and how would I go about extracting it a different way? I have some experience with different coding languages, but no other experience with .rpa files than simply pressing "1" in UnRen.
Well, there are versions 1, 2, 3 and the latest like 3.2, but I saw information about some unofficial 4, so that's it.
 

yoyomistro

Engaged Member
Jan 15, 2017
2,728
3,452
I have this in the python rewrite already integrated for simple writing of the wanted cfg setting. However there is no changing of the keys from F5/F9. No need imho. Also, there are so far no checks if the cfg settings are already elsewhere set. This can get complex.
Edit: Yeah, anne O'nymous said it already...
Ergh... no, thats incorrect.
Writing the snippeds(dev console, quick...etc) does not depend on RenPy/Python and unpacking respectively the RPA format was not changed. Only issue was the decompiling. I do not wonder v0.6 worked for him till now.

Unpacking works, if the game dev did'n play with some stuff like we all experienced allready. For this float in this thread already like 20 differnet modified "rpatool" varaints around.
Sorry, yea I meant decompiling, you start to get errors with converting rpycs to rpys, indentation issues, etc. I guess if you're only after the console and assets it's not a big deal.
 
  • Hey there
Reactions: Madeddy
5.00 star(s) 9 Votes