Ren'Py Looking for a howto on making an incest patch for ren'py

John Walker Black

Member
Game Developer
Feb 17, 2018
235
440
Hello Guys
As the title suggests I'm trying to find a tutorial to make an incest patch for a game.
I did a search here and didn't find just actual patches themselves.
any guidance will be appreciated.
 
  • Like
Reactions: Gurumurthy

studiololipop

New Member
Jun 12, 2017
14
8
Take part of the code of Milfy City 0.3 for example:
the simplest way to do it to make a incest patch:
if renpy.loadable("patch.rpy"):
Caroline "Getting, all hard and horny, because of your older sister."
if not renpy.loadable("patch.rpy"):
Caroline "Getting, all hard and horny, because of your older friend."

And you just need to create a "patch.rpy" using any text editor an put it in the game root directory
 
  • Like
Reactions: Gurumurthy

bas

retired
Donor
Respected User
Former Staff
May 6, 2017
3,988
30,554
Hello Guys
As the title suggests I'm trying to find a tutorial to make an incest patch for a game.
I did a search here and didn't find just actual patches themselves.
any guidance will be appreciated.
What game are you trying to patch?
 

John Walker Black

Member
Game Developer
Feb 17, 2018
235
440
Take part of the code of Milfy City 0.3 for example:
the simplest way to do it to make a incest patch:
if renpy.loadable("patch.rpy"):
Caroline "Getting, all hard and horny, because of your older sister."
if not renpy.loadable("patch.rpy"):
Caroline "Getting, all hard and horny, because of your older friend."

And you just need to create a "patch.rpy" using any text editor an put it in the game root directory
Ahhh thank you thank you
Oh, this may be way simpler than I thought. but I have two questions.
1 Does the patch script need to be defined? like pics and sound do?
2 What if any text or code needs to exist in the patch.rpy or does an empty file work.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,963
16,201
Take part of the code of Milfy City 0.3 for example:
the simplest way to do it to make a incest patch:
if renpy.loadable("patch.rpy"):
Caroline "Getting, all hard and horny, because of your older sister."
if not renpy.loadable("patch.rpy"):
Caroline "Getting, all hard and horny, because of your older friend."
Why so complicated ?
patch.rpy:
Code:
init 1 python:
   incestMode = True
script.rpy:
Code:
init python:
    incestMode = False
then :
Code:
if incestMode is True:
        Caroline "Getting, all hard and horny, because of your older sister."
else:
        Caroline "Getting, all hard and horny, because of your older friend."

This said, it's one among the many way to do it, and it's effectively reliable only if it's your own game. For me, it's the less reliable one since looking at the code is enough to know that the author try to bypass Patreon ban and in fact created an incest game.
Another way to do it with your own game is to use a string patching method, like used by at least two games here. It present the advantage to be less visible. You can have used dynamically defined string because you aren't sure of the relation ship and she can become a coworker or a roommate in the future :
patch.rpy:
Code:
init 1:
   defineDynamicName carolineName:
       sheIs "sister"
script.rpy:
Code:
init:
   defineDynamicName carolineName:
       sheIs "friend"
then :
Code:
    Caroline "Getting, all hard and horny, because of your older [carolineName.sheIs]."
If there isn't many things to define and/or it don't need randomization and/or complex nesting, you can even do it with a regular variable :
patch.rpy:
Code:
init 1 python:
   carolineIs = "sister"
script.rpy:
Code:
init python:
   carolineIs = "friend"
then :
Code:
    Caroline "Getting, all hard and horny, because of your older [carolineIs]."
Now, if you try to mod a game made by someone else, the best way to do it is to use Ren'py's callbacks. Take a look at the mods made by @bossapplesauce to have a practical example of how to do this.
You can also use the Ren'py translation feature and create a "incest english" translation of the sentences which need to be changed. And there's probably other way to do it.
 

John Walker Black

Member
Game Developer
Feb 17, 2018
235
440
Thank you . ,
with the example that you all have given me, I now understand.

Thanks again.
 

hakarlman

Engaged Member
Jul 30, 2017
2,130
3,346
Now, if you try to mod a game made by someone else, the best way to do it is to use Ren'py's callbacks. Take a look at the mods made by @bossapplesauce to have a practical example of how to do this.
You can also use the Ren'py translation feature and create a "incest english" translation of the sentences which need to be changed. And there's probably other way to do it.
Can someone link to the mods or a guide that explains this last part? This last paragraph was the most important part, but I have no idea what it means to use Ren'py callbacks. Not sure how to access the mods.

How do you create an actual patch that changes a line of code in an RPYC file?
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,963
16,201
Can someone link to the mods or a guide that explains this last part?
For the mod it's easy, you go to and you filter by the right author. For the guide it will depend of the callback, since they don't all works in the same way.


How do you create an actual patch that changes a line of code in an RPYC file?
There's more than one way to do this. One imply the use of the scriptEdit module, another to change directly the object in the AST. Both works, but none are for you, they need a deep knowledge of how the core of Ren'py works, while you clearly seem to have really few knowledge about Ren'py.

Therefore, according to somewhere else, what you need is the say/menu callback. And like I said, you'll find an example of use in a @bossapplesauce 's mod, like .
 
  • Like
Reactions: Rich

Rich

Old Fart
Modder
Donor
Respected User
Game Developer
Jun 25, 2017
2,566
7,381
To follow up on what @anne O'nymous said, there isn't universal advice about how to create patches to modify games (even just Ren'py games). A lot of what you need to do depends on how the author of the game structured the game. So in 99.999999% of the cases, the first thing to do is to decompile the game back to RPY's and study how the code in the RPY's work. Then you figure out how to intertwine the changes that you want to make into that code. Thus, every patch is specific to the game being patched, and sometimes to the version of the game.

Thus (if you'll pardon the observation) before charging into patching, first you should probably spend some time learning how to decompile existing code, and how Ren'py code works. Then you can start experimenting with altering an existing game "in place." Look at the source code for other patches and how they relate to the source code of the game. That'll give you an idea of the available techniques. From that knowledge, then you can pick the approach appropriate to a particular game.
 
  • Like
Reactions: anne O'nymous

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,963
16,201
Thus (if you'll pardon the observation) before charging into patching, first you should probably spend some time learning how to decompile existing code, and how Ren'py code works. Then you can start experimenting with altering an existing game "in place."
This is the most important advice. I make mods for Ren'py games since more or less two years now (most of them being messy and so for personal use) and the way I do it now have nothing in common with the way I did them at first.
It's by practicing that you'll learn to do it and also learn what's the better way for this case or this one. You need to know what you have to do, before you can search for how you can do it easily. And you can't know that if you haven't done it many times before.
 

hakarlman

Engaged Member
Jul 30, 2017
2,130
3,346
This is the most important advice. I make mods for Ren'py games since more or less two years now (most of them being messy and so for personal use) and the way I do it now have nothing in common with the way I did them at first.
It's by practicing that you'll learn to do it and also learn what's the better way for this case or this one. You need to know what you have to do, before you can search for how you can do it easily. And you can't know that if you haven't done it many times before.
I'm actually making the ren'py game, but I want to release a patch for the game, the same way you guys make that patch.

I'm thinking the easiest way to allow a patch to change a characters title is to just declare it in a single variable? Does that allow you to make a patch easily?
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,963
16,201
I'm actually making the ren'py game, but I want to release a patch for the game, the same way you guys make that patch.
Er... I don't want to be harsh, we all start one day and aren't really smart at this time. But if you didn't understood what I wrote for my thread about string patching, are you sure that you want to write your own game ? I'll not pretend to be good at writing documentation, but the use of the patcher is really basic and just looking at the example provided in the archive really should be enough to let you know how it must be used.


I'm thinking the easiest way to allow a patch to change a characters title is to just declare it in a single variable? Does that allow you to make a patch easily?
It's the easiest way, yes. To keep your initial example :
Code:
init python:
   $ thisCharacter = "teacher"

label somelabel:
   "Let me present you my [thisCharacter]."
and the patch:
Code:
init 1 python:
   $ thisCharacter = "gardenner"
But it's not the better looking way to patch since you don't always talk about it in passive way. By example, when you talk about a character, she's your "mother", but when you talk to her, you are less formal and say "mom". Also, you'll not talk the same way to your landlady (a classical) than you talk to your mother. In the first case you'll say something like, "Excuse-me miss, can you come in my room ?", while in the second you'll be more familiar and say "Mom, can you come in my room ?".
There's also the problem caused by derivatives subjects. In by example, the default context is that you are your father's son, your father have a new girlfriends, who have two daughters. You can redefine this to make the game become an incest game, but then when MC will talk to your, now mother, he will say things like, "your daughters", when he should say, "my sisters".

So, the better solution is either to use the string patcher (exactly like in the example code above), or the callback used by @bossapplesauce in the mod I linked above. Both will let you dynamically change every sentence you need to change, helping you to not only patch the relation between each characters, but also change sentence that are related to this relation, to keep the right feelings ; by example, changing "your daugthers" by "my sisters" when it's needed.
 

hakarlman

Engaged Member
Jul 30, 2017
2,130
3,346
Thanks for the reply, I completely understand now.

The information I was looking for is in this link you provided:

I didn't realize you could easily patch a renpy game by creating a patch.rpy file, that's what I didn't understand.

fast instructions for future reference
Code:
# scripts.rpy - MY GAME
init python:
# this variable can easily be changed in patch.rpy by the end user
  charTitle = "teacher"
Code:
# patch.rpy created by end user, which is then copied to renpy game folder
init 1 python:
  charTitle = "gardener"
I'll follow your advice in regards to the titles, formal, informal, etc, I appreciate that, thanks!
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,963
16,201
fast instructions for future reference
Code:
# scripts.rpy - MY GAME
label start:
# this variable can easily be changed in patch.rpy by the end user
$ charTitle = "teacher"
Code:
# patch.rpy created by end user, which is then copied to renpy game folder
init 1 python:
$ charTitle = "gardener"
It will not work if you write it this way. When you launch a Ren'py game, things goes in this order :
  • Ren'py execute the 'init' blocks, in their level order ;
  • Ren'py execute the standalone statement ('default', 'define', etc.) ;
  • Ren'py show you the main menu ;
  • Ren'py call the 'start' label.

So, wrote like you did, charTitle will be set at "gardener" by patch.rpy, then reverted back to "teacher" when the player will start the game.
Since it's a value that will not change during the game, you should do it like this :
[script.rpy]
Code:
init python:
    charTitle = "teacher"
[patch.rpy]
Code:
init 1 python:
    charTitle = "gardener"
Like I said, Ren'py execute the 'init' blocks according to their level. Therefore, the one in patch.rpy (level 1) will be executed after the one in script.rpy (level 0). That will effectively apply the patch by changing the value of charTitle.
In the same time, like variable declared in an 'init' block are not saved (unless their value change during the game), it offer to the player the possibility to remove patch.rpy and revert to a none patched game next time he will play.
 
  • Like
Reactions: hakarlman

Honey hunters

Member
Jan 23, 2020
118
26
Hello everyone I'm new to developing Ren'Py game, I made a game with incest patch , the incest patch with windows working good but when coming to android version the incest patch was not recognising the game....soo can anyone help me what should I do for android version to recognise the patch.rpy.....