Skip to content

Disease Genes, Immunity and Infector Genes

vegapnk edited this page Jul 24, 2024 · 2 revisions

Disease Genes, Immunity and Infector Genes

What?

Genetic Diseases:

RJW-Genes 2.2.0 introduces genetic diseases that are shared on sex.

Every gene has a chance to be spread on sex towards any pawn that is not immune against it. The current default chances are between 2% and 10%.

Genetic Infectors:

These Genes can apply a genetic disease, but are not genetic diseases themselves. The infectionGenes can be any gene, this is not limited to genetic diseases (e.g. ugly or something).

Infectors are always applied even if the genetic disease spread is turned off. The created genetic diseases will follow the logic as you configured.

Disease Immunity:

Pawns can be immune to genetic diseases.

This is either done with a specialised gene (rjw_genes_genetic_disease_immunity) or by genes giving specific immunities.

The genetic immunity is also used against some other genes, e.g. Genetic Immunity shields against Twinkification too.

Why???

Most of the genes so far were positive or neutral, so I got some fair requests to introduce negative genes to keep xenotypes balanced.

I know that this is some overlap with the STD mod, but well ... you are free to turn things off?

How ?

  • When two Pawns have Sex, there is a check if one (or both) have a genetic disease.
  • For every disease, it is checked if
    • the pawn is not immune
    • the infection chance is met
  • then, the gene is added to the infected

For infector style genes, the same pattern is followed.

Good to Know

  • Infection is handled when sex finishes, so a coitus-interruptus will not result in infections.
  • The ModExtension that handles immunity against certain genes can be added to any Gene, and not only to disease-genes
  • Dead pawns can spread diseases, but cannot receive them. For all you necros out there.
  • Animals (currently) cannot get or spread diseases.
  • Multiple infections can happen on a single sex.

Configuration

Infections can be

  • {Settings} Turned off entirely (default off - diseases are "on")
  • {Settings} Spread only on penetrative sex (default on)
  • {Settings} Whether the Genes should be added as Xenogenes or Endogenes (default Endogenes)
  • {XML} Infection-Chance Adjusted per XML
  • {XML} Immunity for and against Genes

By turning their spread off, you effectively have a set of normal negative genes.

For Modders & The Curious

Disease Genes

The "only" difference between a Gene and a Disease Gene is the following Mod Extension:

<modExtensions>
    <li Class="RJW_Genes.GeneticDiseaseExtension">
        <infectionChance>0.05</infectionChance>
    </li>
</modExtensions>

Once this extension is present, the disease logic will be applied on Sex-Finish. This extension can be added to any gene, including from other mods or the base game. You could make a "Infectious Ugly" gene easily with this.

I have made extra genes for them because I think being infectious justifies a higher metabolic change. But that is just me and my opinion.

Gene-specific Immunity Any gene can give immunity against any genetic disease using an extension:

<li Class="RJW_Genes.ImmunityAgainstGenesExtension">
    <givesImmunityAgainst>
        <li>rjw_genes_size_blinded</li>
    </givesImmunityAgainst>
</li>

Such immunities can also be added via patches to non-rjw-genes-genes. But then I guess the load order is important.

They are meant mostly to have infectors immune against their own diseases.

Using the Infector Genes & Templates

A single infector gene can have multiple resulting diseases, see this extension example:

<li Class="RJW_Genes.GeneticInfectorExtension">
    <infectionChance>0.05</infectionChance>
    <infectionGenes>
        <li>rjw_genes_size_blinded</li>
        <li>rjw_genes_infectious_bisexuality</li>
    </infectionGenes>
</li>

The infection-chance is applied per gene - for the example above there would be a 5% chance to apply size_blinded and 5% chance to apply infectious_bisexuality.

Clone this wiki locally