Simple implementation of a Rut gene

This commit is contained in:
Vegapnk 2024-07-17 22:01:31 +02:00
parent 8d1d43b691
commit 35d9662663
8 changed files with 140 additions and 3 deletions

View File

@ -128,6 +128,8 @@ Because this is the genes mod, and I find things here quite robust.
- Gene: Blocked Masturbation. Pawns cannot masturbate. - Gene: Blocked Masturbation. Pawns cannot masturbate.
- {Sexperience} Gene: Living Cumbucket. Pawns with this Gene get "filled" upon sex, and slowly disperse usable gathered cum. - {Sexperience} Gene: Living Cumbucket. Pawns with this Gene get "filled" upon sex, and slowly disperse usable gathered cum.
- Disease Gene: Infectious Blocked Masturbation - Disease Gene: Infectious Blocked Masturbation
- Gene: Rut. Pawns have a chance to go into heat and need more sex for a day. (Default: 5% chance per day, to go 1 day in heat).
- Disease Gene: Infectious Rut.
- Pawns will have negative thoughts about pawns with more genetic diseases than themselves. - Pawns will have negative thoughts about pawns with more genetic diseases than themselves.
- Faction Penalties for spreading diseases, stealing genes and aging pawns with age transfer - Faction Penalties for spreading diseases, stealing genes and aging pawns with age transfer
- Patch for [Imphilee Xeno](https://steamcommunity.com/sharedfiles/filedetails/?id=2990674516) by @Bunuffin - Patch for [Imphilee Xeno](https://steamcommunity.com/sharedfiles/filedetails/?id=2990674516) by @Bunuffin
@ -179,6 +181,7 @@ Its just meant if you want to drop me a tip.
- Made the Feminizer and Twinkifier configurable with XML. - Made the Feminizer and Twinkifier configurable with XML.
- Typos in the Hediff Defs, tweaking of some values. - Typos in the Hediff Defs, tweaking of some values.
- Living Cum-Bucket & Rut Genes
# 2.1.0 (27-06-2024) # 2.1.0 (27-06-2024)

View File

@ -41,7 +41,8 @@
<GeneDef ParentName="BreedingBase"> <GeneDef ParentName="BreedingBase">
<defName>rjw_genes_fertile_anus</defName> <defName>rjw_genes_fertile_anus</defName>
<label>fertile anus</label> <label>fertile anus</label>
<description>Xenotypes with this gene have a functional uterus if they do not possess one by means of their vagina. <description>Xenotypes with this gene have a functional uterus if they do not possess one by
means of their vagina.
For males, it is connected to the anal cavity and leads to a normal pregnancy.</description> For males, it is connected to the anal cavity and leads to a normal pregnancy.</description>
<iconPath>Genes/Icons/Fertile_anus</iconPath> <iconPath>Genes/Icons/Fertile_anus</iconPath>
<displayOrderInCategory>54</displayOrderInCategory> <displayOrderInCategory>54</displayOrderInCategory>
@ -115,7 +116,8 @@
<GeneDef ParentName="BreedingBase"> <GeneDef ParentName="BreedingBase">
<defName>rjw_genes_hardwired_progenity</defName> <defName>rjw_genes_hardwired_progenity</defName>
<label>Hardwired Progenity</label> <label>Hardwired Progenity</label>
<description>Carriers of this gene need to procreate. They suffer negative effects if they are childless, and have increased capabilities if they reach a high amount of offsprings.</description> <description>Carriers of this gene need to procreate. They suffer negative effects if they are
childless, and have increased capabilities if they reach a high amount of offsprings.</description>
<iconPath>Genes/Icons/RJW_Genes_PheromoneSpit</iconPath> <iconPath>Genes/Icons/RJW_Genes_PheromoneSpit</iconPath>
<displayOrderInCategory>70</displayOrderInCategory> <displayOrderInCategory>70</displayOrderInCategory>
@ -150,4 +152,23 @@
<biostatMet>0</biostatMet> <biostatMet>0</biostatMet>
</GeneDef> </GeneDef>
<GeneDef ParentName="BreedingBase">
<defName>rjw_genes_basic_rut</defName>
<label>Rut</label>
<description>Carriers of this gene can enter a state of heat, resulting in drastically higher
sexual activity.</description>
<iconPath>UI/Icons/ColonistBar/Idle</iconPath>
<biostatCpx>1</biostatCpx>
<biostatMet>1</biostatMet>
<displayOrderInCategory>11</displayOrderInCategory>
<geneClass>RJW_Genes.Gene_Rut</geneClass>
<modExtensions>
<li Class="RJW_Genes.TickBasedChanceExtension">
<!-- 60k = 1 days -->
<tickInterval>60000</tickInterval>
<eventChance>0.05</eventChance>
</li>
</modExtensions>
</GeneDef>
</Defs> </Defs>

View File

@ -304,4 +304,28 @@
</modExtensions> </modExtensions>
</GeneDef> </GeneDef>
<GeneDef ParentName="BreedingBase">
<defName>rjw_genes_infectious_rut</defName>
<label>Rut</label>
<description>Carriers of this gene can enter a state of heat, resulting in drastically higher
sexual activity.</description>
<iconPath>UI/Icons/ColonistBar/Idle</iconPath>
<biostatCpx>1</biostatCpx>
<biostatMet>2</biostatMet>
<displayOrderInCategory>11</displayOrderInCategory>
<geneClass>RJW_Genes.Gene_Rut</geneClass>
<modExtensions>
<li Class="RJW_Genes.TickBasedChanceExtension">
<!-- 60k = 1 days -->
<tickInterval>60000</tickInterval>
<eventChance>0.05</eventChance>
</li>
<li Class="RJW_Genes.GeneticDiseaseExtension">
<infectionChance>0.1</infectionChance>
</li>
</modExtensions>
</GeneDef>
</Defs> </Defs>

View File

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<Defs>
<HediffDef>
<defName>rjw_genes_genetic_rut</defName>
<hediffClass>HediffWithComps</hediffClass>
<label>Rut</label>
<description>Based on genetics, this pawn is in heat.</description>
<defaultLabelColor>(240,200,110)</defaultLabelColor>
<scenarioCanAdd>false</scenarioCanAdd>
<maxSeverity>1.0</maxSeverity>
<isBad>false</isBad>
<tendable>false</tendable>
<comps>
<li Class="HediffCompProperties_SeverityPerDay">
<severityPerDay>-1.00</severityPerDay>
</li>
</comps>
<stages>
<li>
<label>calming down</label>
<statOffsets>
<SexFrequency>0.50</SexFrequency>
</statOffsets>
<capMods>
<li>
<capacity>BloodPumping</capacity>
<offset>0.1</offset>
</li>
</capMods>
</li>
<li>
<label>in heat</label>
<minSeverity>0.4</minSeverity>
<statOffsets>
<SexFrequency>2.00</SexFrequency>
</statOffsets>
<capMods>
<li>
<capacity>Moving</capacity>
<offset>0.1</offset>
</li>
<li>
<capacity>BloodPumping</capacity>
<offset>0.15</offset>
</li>
</capMods>
</li>
</stages>
</HediffDef>
</Defs>

View File

@ -75,6 +75,7 @@ namespace RJW_Genes
public static readonly GeneDef rjw_genes_insectincubator; public static readonly GeneDef rjw_genes_insectincubator;
public static readonly GeneDef rjw_genes_hardwired_progenity; public static readonly GeneDef rjw_genes_hardwired_progenity;
public static readonly GeneDef rjw_genes_blocked_masturbation; public static readonly GeneDef rjw_genes_blocked_masturbation;
public static readonly GeneDef rjw_genes_basic_rut;
// Cum // Cum
public static readonly GeneDef rjw_genes_no_cum; public static readonly GeneDef rjw_genes_no_cum;
@ -142,6 +143,7 @@ namespace RJW_Genes
public static readonly GeneDef rjw_genes_infectious_hypersexuality; public static readonly GeneDef rjw_genes_infectious_hypersexuality;
public static readonly GeneDef rjw_genes_stretcher; public static readonly GeneDef rjw_genes_stretcher;
public static readonly GeneDef rjw_genes_infectious_blocked_masturbation; public static readonly GeneDef rjw_genes_infectious_blocked_masturbation;
public static readonly GeneDef rjw_genes_infectious_rut;
//Other Defs //Other Defs
public static readonly XenotypeDef rjw_genes_succubus; public static readonly XenotypeDef rjw_genes_succubus;

View File

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
namespace RJW_Genes
{
public class Gene_Rut : Gene
{
public override void Tick()
{
base.Tick();
if (pawn == null || pawn.genes == null)
return;
var chanceExtension = this.def.GetModExtension<TickBasedChanceExtension>();
if (chanceExtension == null) return;
if (pawn.IsHashIntervalTick(chanceExtension.tickInterval)){
Random r = new Random();
if (r.NextDouble() < chanceExtension.eventChance)
{
Hediff rut = pawn.health.GetOrAddHediff(HediffDefOf.rjw_genes_genetic_rut);
rut.Severity = 1;
ModLog.Debug($"Pawn {pawn} gained rjw_genes_genetic_rut based on chance.");
}
}
}
}
}

View File

@ -23,6 +23,8 @@ namespace RJW_Genes
public static readonly HediffDef rjw_genes_twinkification_progress; public static readonly HediffDef rjw_genes_twinkification_progress;
public static readonly HediffDef rjw_genes_feminization_progress; public static readonly HediffDef rjw_genes_feminization_progress;
public static readonly HediffDef rjw_genes_genetic_rut;
// Note: Counter does meant it counters it, not it's counting // Note: Counter does meant it counters it, not it's counting
[MayRequire("LustLicentia.RJWLabs")] public static readonly HediffDef rjw_genes_cumstuffed_counter; [MayRequire("LustLicentia.RJWLabs")] public static readonly HediffDef rjw_genes_cumstuffed_counter;
[MayRequire("LustLicentia.RJWLabs")] public static readonly HediffDef rjw_genes_cumflation_counter; [MayRequire("LustLicentia.RJWLabs")] public static readonly HediffDef rjw_genes_cumflation_counter;

View File

@ -81,6 +81,7 @@
<Compile Include="Genes\Breeding\ConditionalStatAffecters\ConditionalStatAffecter_VeryManyChildren.cs" /> <Compile Include="Genes\Breeding\ConditionalStatAffecters\ConditionalStatAffecter_VeryManyChildren.cs" />
<Compile Include="Genes\Breeding\Genes\Gene_FerventOvipositor.cs" /> <Compile Include="Genes\Breeding\Genes\Gene_FerventOvipositor.cs" />
<Compile Include="Genes\Breeding\Genes\Gene_InsectIncubator.cs" /> <Compile Include="Genes\Breeding\Genes\Gene_InsectIncubator.cs" />
<Compile Include="Genes\Breeding\Genes\Gene_Rut.cs" />
<Compile Include="Genes\Breeding\Patches\Patch_BlockedMasturbation.cs" /> <Compile Include="Genes\Breeding\Patches\Patch_BlockedMasturbation.cs" />
<Compile Include="Genes\Cum\HediffComp_ProcessCumbucket.cs" /> <Compile Include="Genes\Cum\HediffComp_ProcessCumbucket.cs" />
<Compile Include="Genes\Cum\HediffsCompProperties_ProcessCumbucketMTB.cs" /> <Compile Include="Genes\Cum\HediffsCompProperties_ProcessCumbucketMTB.cs" />