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

5.00 star(s) 9 Votes

moskyx

Forum Fanatic
Jun 17, 2019
4,169
13,750
Yes, I already know that, you said it before. By the way, still with my thanks to you, Vepsp. I dont said yours is bad, i just said yours is unsolve my asking... Just make this clear to understand why i need an version that not deleted comment line just cause :
- 1st : some variables in game that creator put note, when playing i can trace to game proccess
- 2nd : some game're not english base creator (example : russian language) in "tl" folder that files has comment line which russian language and next is translate into english. Now, all of'em are blank so it make hard to me to cheat, hack, trace game process etc... And if you said i cheat game is bad, so tell me this tool decomplie is using for what? I'm not a coder, I'm not progamer, all i use this tool is just simple cheat or trace.
I just tried to open unren.bat to find a way for myself but my tiny limited knowlegde on progames language, I give up, i just ask for a way to solve my wanna. If not have a way, so be it
For the translation files, you can copy first the TL folder to somewhere else, this will let you preserve those comment lines. Then you run UnRen and, after that, you can paste back the TL folder
 

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,384
Yes, I already know that, you said it before. By the way, still with my thanks to you, Vepsp. I dont said yours is bad, i just said yours is unsolve my asking... Just make this clear to understand why i need an version that not deleted comment line just cause :
- 1st : some variables in game that creator put note, when playing i can trace to game proccess
- 2nd : some game're not english base creator (example : russian language) in "tl" folder that files has comment line which russian language and next is translate into english. Now, all of'em are blank so it make hard to me to cheat, hack, trace game process etc... And if you said i cheat game is bad, so tell me this tool decomplie is using for what? I'm not a coder, I'm not progamer, all i use this tool is just simple cheat or trace.
I just tried to open unren.bat to find a way for myself but my tiny limited knowlegde on progames language, I give up, i just ask for a way to solve my wanna. If not have a way, so be it
In general, to be honest, programmers write comments for themselves or other programmers(who do they trust with their sources). The compiler, when analyzing the code for further conversion, skips these lines. Technically, he doesn't see them. Therefore, if there was no source code in the game, then it remains only to analyze the code yourself. Regarding empty lines - If during decompilation you specify saving the dump, instead of decompiling itself (possible only with the original unrpyc tool), then you can see that their position is saved for each line of code, so the decompiler simply writes code only in those lines where it was originally, so empty lines remain where there was no code, and there were comments not saved during compilation (normal practice for compilers).
 

eike2000

Member
May 9, 2017
151
79
Actually at past, which if i don't wrong remember that older version don't deleted comment lines after decomplie rpyc file into rpy. Today I was try 1 little example : I find out a unren 8.0 in my old lap and i make to decomple game LongLiveThePrincess-0.39.1-pc. Now, I gave this general.rpy file after decomplie'em one by unren 8.0 (all comment lines are still) and one by unren 9.1 (also same as your unren 11 : all comment lines are blank), you can view'em if you care and of couse unren 8.0 is make game come broken cause it make a lot of error after python v2.7, I also tried some other game, unren 8.0 cannot total decomplie. Then repeat I dont said your is bad, I confirm yours is good, it can unrpa and decomplie good at all. Helpful in a lot of game. I was try to have a way that i can have comment lines that i can trace game process or cheat or hack for myself, and if dont have a way, so be it, i will find out another way, that's all.
 

Boehser Onkel

Forum Fanatic
Modder
Feb 20, 2021
4,088
6,078
Actually at past, which if i don't wrong remember that older version don't deleted comment lines after decomplie rpyc file into rpy. Today I was try 1 little example : I find out a unren 8.0 in my old lap and i make to decomple game LongLiveThePrincess-0.39.1-pc. Now, I gave this general.rpy file after decomplie'em one by unren 8.0 (all comment lines are still) and one by unren 9.1 (also same as your unren 11 : all comment lines are blank), you can view'em if you care and of couse unren 8.0 is make game come broken cause it make a lot of error after python v2.7, I also tried some other game, unren 8.0 cannot total decomplie. Then repeat I dont said your is bad, I confirm yours is good, it can unrpa and decomplie good at all. Helpful in a lot of game. I was try to have a way that i can have comment lines that i can trace game process or cheat or hack for myself, and if dont have a way, so be it, i will find out another way, that's all.
if its to track progress, cheat etc maybe try this thing out
Link

cant play anymore without looking at var´s etc :ROFLMAO:
 
  • Like
Reactions: giqui and eike2000

eike2000

Member
May 9, 2017
151
79
if its to track progress, cheat etc maybe try this thing out
Link

cant play anymore without looking at var´s etc :ROFLMAO:
@Boehser Onkel : ah! it's so good it make lots of useful things to hack, cheat, trace propress game playing. Just question unren9.0 ++ delete comment line because code of unren make it? i mean before (older version) they dont have some code that clean up comment lines after decomplie and now, after ver9.0 they put it in .bat file, right?
 

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,384
Actually at past, which if i don't wrong remember that older version don't deleted comment lines after decomplie rpyc file into rpy. Today I was try 1 little example : I find out a unren 8.0 in my old lap and i make to decomple game LongLiveThePrincess-0.39.1-pc. Now, I gave this general.rpy file after decomplie'em one by unren 8.0 (all comment lines are still) and one by unren 9.1 (also same as your unren 11 : all comment lines are blank), you can view'em if you care and of couse unren 8.0 is make game come broken cause it make a lot of error after python v2.7, I also tried some other game, unren 8.0 cannot total decomplie. Then repeat I dont said your is bad, I confirm yours is good, it can unrpa and decomplie good at all. Helpful in a lot of game. I was try to have a way that i can have comment lines that i can trace game process or cheat or hack for myself, and if dont have a way, so be it, i will find out another way, that's all.
Can you throw off the tool of the 8 version? I'll see what the difference is.
 

Boehser Onkel

Forum Fanatic
Modder
Feb 20, 2021
4,088
6,078
@Boehser Onkel : ah! it's so good it make lots of useful things to hack, cheat, trace propress game playing. Just question unren9.0 ++ delete comment line because code of unren make it? i mean before (older version) they dont have some code that clean up comment lines after decomplie and now, after ver9.0 they put it in .bat file, right?
i have no idea about the unren.bat tool
im not a programmer
i know how to use it , but that its ...

i remember i did a proofread on a script , and the dev asked me why i removed or added lines , which i didnt
it was added/removed while decompiling

Orginal rpy

menu:
"blaa":

Decompiled

menu:
"blaa": if true
 

eike2000

Member
May 9, 2017
151
79
Here is unren8.0. Recomment : as example i tried LongLiveThePrincess-0.39.1-pc unrenv9.1++ and yours work smoothly, but unren8.0 is notice wrong. So i got an older game for 2 years ago and copy root folder/lib and /renpy folder (I mean using renpy include older game, i think it NOT renpy v2.7) into a new folder, create a folder "game", then copy all .rpy file (which extracted rpa by your tool unren 11) into game folder. Bang! it work, copy back to orginal game folder game gone error.

But with Boehser Onkel help I have way solve i want, this request just forgive it. VepsrP
@Boehser Onkel : i was wonder too,
menu:
"blaa": if true
"if true" is what for? cause when i try mod game I am playing, I add a menu choice without if true and game still work. But who care
 
  • Like
Reactions: Boehser Onkel

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,384
Here is unren8.0. Recomment : as example i tried LongLiveThePrincess-0.39.1-pc unrenv9.1++ and yours work smoothly, but unren8.0 is notice wrong. So i got an older game for 2 years ago and copy root folder/lib and /renpy folder (I mean using renpy include older game, i think it NOT renpy v2.7) into a new folder, create a folder "game", then copy all .rpy file (which extracted rpa by your tool unren 11) into game folder. Bang! it work, copy back to orginal game folder game gone error.

But with Boehser Onkel help I have way solve i want, this request just forgive it. VepsrP
@Boehser Onkel : i was wonder too,
menu:
"blaa": if true
"if true" is what for? cause when i try mod game I am playing, I add a menu choice without if true and game still work. But who care
I didn't really understand about the first point. Especially about renpy 2.7, probably meant python 2.7
Regarding the second question, I assume that the menu used to be a static element, and later it became possible to dynamically change it - the menu item is displayed only if the condition is true. I assume that for universality, the condition is always set in the decompiler, and if it is not set, then the default value is set to true. As for the original sources, most likely this is the standard description given in the instructions for RenPy, which is used by novice developers.
 

eike2000

Member
May 9, 2017
151
79
Sorry my bad vocabulary and gramma. Let me explain :
- I downloaded an old game (2-3 years ago) it contain "game", "lib" and "renpy" folder, then create another empty folder in D drive, then create a empty "game"folder in new one. Copy "lib" (contain python folder this is point i always get mistake i consider python platform as like as renpy) and "renpy" olds into new folder, copy file.rpy in to new empty "game" folder then run unren 8.0. it work (not probaly but i dont know, it may crash or something). Result file rpyc after decomplie is not be deleted comment lines. YES, JUST ONLY THAT
- And when try unren8.0 in normal way in current version python game, it sure will be unwork. And if you try unren 9.0++ with current version of python platform (I mean python 2.7++) it work but all comment lines is gone
- So, when compare 2 resuts : I think comment lines be deleted by unren tool, and it base on version of unren tool, I just think that some code put in unren 9.0+ is had function to clear comment line
- What you said : I gonna deaf and dumb, fooly my mind. So, you can pass this request, It too complicate in this time
 

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,384
Sorry my bad vocabulary and gramma. Let me explain :
- I downloaded an old game (2-3 years ago) it contain "game", "lib" and "renpy" folder, then create another empty folder in D drive, then create a empty "game"folder in new one. Copy "lib" (contain python folder this is point i always get mistake i consider python platform as like as renpy) and "renpy" olds into new folder, copy file.rpy in to new empty "game" folder then run unren 8.0. it work (not probaly but i dont know, it may crash or something). Result file rpyc after decomplie is not be deleted comment lines. YES, JUST ONLY THAT
- And when try unren8.0 in normal way in current version python game, it sure will be unwork. And if you try unren 9.0++ with current version of python platform (I mean python 2.7++) it work but all comment lines is gone
- So, when compare 2 resuts : I think comment lines be deleted by unren tool, and it base on version of unren tool, I just think that some code put in unren 9.0+ is had function to clear comment line
- What you said : I gonna deaf and dumb, fooly my mind. So, you can pass this request, It too complicate in this time
I finally figured out what your problem is. I really hope so. If I didn't mess up anything, then before compiling you already had .rpy files with comments inside, after which you try to enable decompilation. The only question is, why decompile if there are already source code files? The old version of UnRen does not delete comments, because there is no data overwriting key there. As a result, the program just does all the work, but does not save the result, since the file with the desired name already exists. If you have a situation where not all sources with code are available, but only a part (for some reason), I can add an additional item that will decompile only files without source code.
 

moskyx

Forum Fanatic
Jun 17, 2019
4,169
13,750
I finally figured out what your problem is. I really hope so. If I didn't mess up anything, then before compiling you already had .rpy files with comments inside, after which you try to enable decompilation. The only question is, why decompile if there are already source code files? The old version of UnRen does not delete comments, because there is no data overwriting key there. As a result, the program just does all the work, but does not save the result, since the file with the desired name already exists. If you have a situation where not all sources with code are available, but only a part (for some reason), I can add an additional item that will decompile only files without source code.
Let's see if I can explain it better. There are some games that pack both .rpy and .rpyc files in the .rpa. Choosing the classical UnRen option #1, extract, those files are extracted. So if dev had included some comments when defining variables, or explaining menus and game paths or whatever, those comments should be there after extracting.

In those cases when the .rpy come packed in the .rpa and we have extracted them with option #1, if we then choose option #2 (decompile), or if we just choose "all of the above" UnRen functions (option #9), those .rpy are overwritten by the result of decompiling the .rpyc. As a result, he says all those original comments are lost (and I can confirm that). I'm not sure if previous versions of UnRen did this too. He says they didn't, but I'm almost 100% sure that, at least the .rpy files in the tl folder were always overwritten too by the decompilation of their .rpyc

Of course, if the original .rpa pack only contains .rpyc files, comments are never generated. But, as I said, I'm almost certain that using UnRen over a game with a tl folder (that always include .rpy files) have always deleted the commented lines in those files within the tl folder
 

Meushi

Well-Known Member
Aug 4, 2017
1,146
12,748
I think comment lines be deleted by unren tool, and it base on version of unren tool
The old version of UnRen does not delete comments
I'm almost certain that using UnRen over a game with a tl folder (that always include .rpy files) have always deleted the commented lines in those files within the tl folder
My limited testing suggests using UnRen 0.8 Option 2 to decompile rpyc files also results in rpy files without comments.

UnRen uses un.rpyc to decompile rpyc files. Using the via game injection also results in rpy files without comments.

I don't know if un.rpyc is actually stripping comments from rpyc files, or Ren'Py itself strips comments when generating the rpyc files in the first place.
 

eike2000

Member
May 9, 2017
151
79
Let's see if I can explain it better. There are some games that pack both .rpy and .rpyc files in the .rpa. Choosing the classical UnRen option #1, extract, those files are extracted. So if dev had included some comments when defining variables, or explaining menus and game paths or whatever, those comments should be there after extracting.

In those cases when the .rpy come packed in the .rpa and we have extracted them with option #1, if we then choose option #2 (decompile), or if we just choose "all of the above" UnRen functions (option #9), those .rpy are overwritten by the result of decompiling the .rpyc. As a result, he says all those original comments are lost (and I can confirm that). I'm not sure if previous versions of UnRen did this too. He says they didn't, but I'm almost 100% sure that, at least the .rpy files in the tl folder were always overwritten too by the decompilation of their .rpyc

Of course, if the original .rpa pack only contains .rpyc files, comments are never generated. But, as I said, I'm almost certain that using UnRen over a game with a tl folder (that always include .rpy files) have always deleted the commented lines in those files within the tl folder
Okey, it could be one case. I dont know, so, if you right that mean i wrong and my request is unreasonable in this case because all rpy files I watched is contain in rpa not decomplie form rpyc. This make me confuse but it ok, just only find out a way to make easy while playing. Ahh. Thanks. Point this view
 

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,384
Let's see if I can explain it better. There are some games that pack both .rpy and .rpyc files in the .rpa. Choosing the classical UnRen option #1, extract, those files are extracted. So if dev had included some comments when defining variables, or explaining menus and game paths or whatever, those comments should be there after extracting.

In those cases when the .rpy come packed in the .rpa and we have extracted them with option #1, if we then choose option #2 (decompile), or if we just choose "all of the above" UnRen functions (option #9), those .rpy are overwritten by the result of decompiling the .rpyc. As a result, he says all those original comments are lost (and I can confirm that). I'm not sure if previous versions of UnRen did this too. He says they didn't, but I'm almost 100% sure that, at least the .rpy files in the tl folder were always overwritten too by the decompilation of their .rpyc

Of course, if the original .rpa pack only contains .rpyc files, comments are never generated. But, as I said, I'm almost certain that using UnRen over a game with a tl folder (that always include .rpy files) have always deleted the commented lines in those files within the tl folder
I have already understood this, and I have written about it. I am now more interested in the question of what kind of games are these, where only part of the source code files are left, or since when information about variables is stored in translation files, if I understand you correctly, now. :unsure: :BootyTime: In any case, if there is a need to decompile only files without sources, then I have already offered the opportunity to add decompilation of only missing files.
 

VepsrP

Well-Known Member
Modder
Dec 13, 2017
1,387
1,384
My limited testing suggests using UnRen 0.8 Option 2 to decompile rpyc files also results in rpy files without comments.

UnRen uses un.rpyc to decompile rpyc files. Using the via game injection also results in rpy files without comments.

I don't know if un.rpyc is actually stripping comments from rpyc files, or Ren'Py itself strips comments when generating the rpyc files in the first place.
Compilers don't hide them. They don't see them, these are lines only for developers. It would be more correct to say that compiler developers hide comments from the compilers themselves so that they do not inadvertently give away development secrets.:LUL: But seriously, comments cannot be part of the compiled code, so they are omitted during compilation.
 

moskyx

Forum Fanatic
Jun 17, 2019
4,169
13,750
I have already understood this, and I have written about it. I am now more interested in the question of what kind of games are these, where only part of the source code files are left, or since when information about variables is stored in translation files, if I understand you correctly, now. :unsure: :BootyTime: In any case, if there is a need to decompile only files without sources, then I have already offered the opportunity to add decompilation of only missing files.
Here's a typical translation script file, generated by Ren'Py SDK. If you unRen a game with these kind of files in the tl folder, all the commented lines (the ones that let you know where that exact line is located in the original file and what's the original text) are lost. This can be useful not only for translation purposes: think in a game originally written in a language you don't understand, but with a translation into English: you could search in the tl file for the English line, and learn where the original line is located, so you then can go to the original .rpy file in the game folder and see which variables are needed to get to that point, for instance.
 
Last edited:

Rancioman

Newbie
Jun 17, 2017
55
184
Unren 0.91 doesn't work for me anymore, not even in abandoned games like "Estate dominate" (I put that game just as an example) many of the mod creators asked us to decript the rpa files for the mod to work, and because you used the new renpy they stopped updating the mods because it's not compatible with unren 0.91. I don't understand why you discriminate us instead of being inclusive, in my humble opinion either you make us a tutorial so that we all learn to use the new unren decripter, or you are going to have to see many modifiers stop updating their works. It's just my opinion, you do what you think is right.
 
5.00 star(s) 9 Votes