Ren'Py How do I recompile a patch file?

SpeedZoner

Newbie
May 31, 2022
15
17
Short version: I decompiled an incest patch file to edit it and now I want to recompile it, how?

Long version:

Ok so I was jacking off to some game after installing the patch but I noticed that when the MC says "my father" he always capitalize it to "My Father", it was weird but who cares, after a while I noticed that he capitalized "My Mother" and "My Sister" and "Sis" and "Brother" and it got really annoying for some reason, I know it sounds so minor but I fucking hated it especially when its in the middle of a sentence, what an asshole dude ruined my jacking off session! Gotta fix it ..

So I tried editing the patch file with an editor, but its all gibberish, apparently there's something called compiling and when a file is compiled you can't view its content, so I wasted the next 3 hours learning how to decompile a file and I finally did it, I finally know for sure that it was that jerk (who wasted hours of his time to satisfy my incest fetish lol) who capitalized every word! Ok now I proceeded to fix it but that apparently doesn't work, I need to recompile the file I think. This is where I got stuck, I tried learning how to compile it and make it work again after editing but I couldn't. So you guys are my last option, please, help a brother with his sister fetish!
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,576
2,204
You don't need to recompile things... RenPy does that automatically when the game is next run.

The source is stored in an .rpy file.
The compiled version of that source is stored in an .rpyc file.

Sometimes either (or both) of the .rpy and .rpyc files will be stored within a RenPy archive .rpa file.

RenPy "runs" the .rpyc files. It's pretty much all RenPy needs.

When you next run a RenPy game, the .rpyc and .rpy files are compared. If for whatever reason, RenPy decides they don't match, it recompiles the .rpy file to create an updated version of the .rpyc file. Then the game starts. If the .rpy equivalent of the .rpyc doesn't exists (and it doesn't need to), RenPy just runs the .rpyc without worrying about the comparison.

If you have an .rpyc file in the /game/ folder AND within an .rpa archive, RenPy will run the one that isn't in the archive (I think it just compares the timestamps and runs the newest one).

As a complete aside... NEVER, EVER delete any .rpyc files. It's the sort of mistake that is easy to make when you're in "it won't compile" hell. The .rpyc files contain a complex cross reference of every single line of code in the game. The changes to the cross reference are cumulative and reflect recent changes to the source code. It's how save files still work when you add or remove lines of code from the script. If you ever delete a .rpyc file, it will completely rebuild that cross reference from scratch and NONE of the data will match any more. Suddenly all the game's saves are very unlikely to work any more. (For more information, see: )

And yeah, I feel your pain about capitalization. When you're swapping her name for her title, then it's capitalized (because her name is capitalized). But if you're using her title as a description, it's not. "This is my mom, Sandy.", "Hi, Mom.". Straight up replacement text doesn't know this sort of context and so as a programmer, you have to be very careful.
 
Last edited:

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,576
2,204
Out of curiosity... which game? And which patch?
Extra points if you can attach your patched .rpy to this thread.

Even if we can't find a simple solution, perhaps we can share some extra coding tips to make your attempts easier later.
 

SpeedZoner

Newbie
May 31, 2022
15
17
Out of curiosity... which game? And which patch?
Extra points if you can attach your patched .rpy to this thread.

Even if we can't find a simple solution, perhaps we can share some extra coding tips to make your attempts easier later.
Dude you're a life saver, editing files is much easier than I thought then, thank you so much it worked.

The game is Savior, I'll link my uncapitalized patch here and in the main thread of the game if someone else wanted it.