RimWorld

RimWorld

706 ratings
Better Gene Inheritance
3
6
2
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.4, 1.5
File Size
Posted
Updated
5.182 MB
Oct 6, 2023 @ 12:31pm
Mar 29 @ 7:02am
19 Change Notes ( view )

Subscribe to download
Better Gene Inheritance

In 2 collections by RedMattis
Red's Workshop Mods
37 items
Quality of Life & Base Pack
44 items
Description
Much improved gene inheritance for Biotech.

I made this mod because I wasn't quite satisfied with the various gene inheritance mods already on the workshop.

With this mod you will get less babies skipping most of their parents genes and overall more logical inheritance.



Settings





You can set xenogene inheritance, archite gene inheritance, amount inherited from the (random) secondary parent, etc.


Details



Unlike vanilla this mod will not give you a bunch of babies with 20% of their parents genes and a metabolism of 225%.

It will build up a list of semi-random genes to inherit, this list will also always include every shared by both parents. If the metabolism ends up too high it will remove genes with a metabolism cost; preferring those not shared by both parents.

If one parent has no genes with metabolism and are flagged as a baseliner then they will by default be used as the primary parent, meaning a random % of the other parent will be migrated over, this is to avoid combinations with baseliners sometimes creating babies with 100% of the other parent's genes.


Additonal Features



By popular request there are now a few genes that modify how inheritance works.

Recessive and Dominant Genes
If a parent has dominant genes only their genes will be passed out and vice versa for recessive genes. If both have dominant/recessive genes it is random as usual.

Compatible with the genes from Vanilla Races Expanded - Highmate

Primary and Secondary Genes
Similar to the above, except instead of passing on only one set of genes, the genes of a character with "Primary Genes" will be considered the primary parent, and unless metabolism is too high all valid genes will try to be passed on. Note that genes from the other parent can still overwrite genes from the primary parent.

Secondary Genes of course does the opposite.

Binary Inheritance
The Binary Inheritance gene, if applied to BOTH parents will make it so an entire gene set from one parent will be picked at random. Suitable for xenotypes with castes or extreme sexual dimorphism.


Final Word


Let me know if you have thoughts, feedback, any kind of issues, and so on.

Mod Discord
[discord.gg][ko-fi.com]
211 Comments
μuKnew Jun 9 @ 2:22pm 
Does the archite inheritance slider determine the final likelyhood of archite inheritance, or is it affected by the secondary parent modifer? For example, if I have a 50% chance per gene on secondary parent, and a 100% modifer on archite inheritance, does it result in a 50% chance overall, or a 100% chance?

Also, two minor suggestions:
1. Customizable primary parent values for inheritance, as right now inheritance appears to be either: both parents' genes are inherited at 100%, or one parent disproportionately affects the child's genome (100% for primary parent, barring overrides from secondary that are randomly inherited?), based on config.
μuKnew Jun 9 @ 2:22pm 
For example, I would like a 65-75% inheritance from both parents, as 50% would be realistic, but likely to extinct exotic genes over a few generations due to the low population size of a colony. At the same time, I don't want every colonist to have nearly every gene in the colony after a few generations either as a result of, effectively, everybody being related.

2. An FAQ would be nice

That all being said, great job making a mod that fixes a lot of the issues with inheritance in vanilla.
RedMattis  [author] May 31 @ 4:16am 
@GladioSanctus, Vampire
Just set the mod config to inherit 100% of both.

Keep in mind that unless you're using mods that reduce gene costs it may run over budget. Also conflicting genes will always get overwritten (E.g. Strong Immunity + Perfect Immunity)
Kaedys May 30 @ 12:26am 
Sanguophage are a xenogerm type, so they're not inheritable by default. This mod has an option to allow xenogenes to be inherited, so disabling that will prevent the sanguophage genes from being passed on (you can use the sanguophage's Gene Implanter to injected them to a pawn, though). Alternatively, applying any xenogerm to the pawn, even if it has only a single trivial gene in it (I believe even hair and skin color genes qualify, but I'd have to test it), will completely overwrite the xenogenes of the target pawn, erasing their Sanguophage heritage.
Evono May 29 @ 10:28am 
Will sangouphage genes be inherites too ? or can i filter genes ? dont want to end up with hundreds of vampires haha
GladioSanctus May 19 @ 10:47am 
Is there any way to make it so a child will 100 percent inherit both parents genes? Especially if im playing with archite and some genes from mods that makes metabolism cost nothing?
Vampire May 16 @ 4:59pm 
So if I wanted children to inherit 100% of the genes from both parents, what would the ideal configuration for that be?
Kaedys May 14 @ 11:41am 
Ya, the game determines genotype not by the combination of genes, but by very specific logic. A pawn only has a specific genotype if that genotype was directly applied to them (ex. a xenogerm), or if the genotype is considered inheritable (vanilla, only germlines, with this mod, optionally xenotypes as well) and BOTH parents are of that exact genotype. If the parents differ on genotype, even if the child ends up with all of the genes from one genotype and none from the other, the game still considers them a "hybrid". This mod would have to Harmony patch that method (PregnancyUtility.ShouldBeHybrid()) to make the dominant and recessive genes avoid that. I noted that issue here a couple years ago, but it didn't really go anywhere.
Meikai May 12 @ 7:15pm 
Hmmmmm. So dominant genes on a custom germline xenotype will make it so any offspring they have with baseliners will come out with only the custom xenotype's genes... but as far as I can tell, they won't technically be of that xenotype? Like if you made Asari from Mass Effect and wanted them to be able to mate with baseliners, their kids would come out blue with squigly heads but the game would still consider them baseliners instead of Asari.

Is there a way to make it so the dominant gene xenotype is inherited along with everything else when using dominant genes? I mean I can just use character editor to fix any kids who come out baseliner, but it'd be cool to not need to do that.
Momon May 5 @ 10:06am 
But seeing the baby's genetics should already tell you enough.