RimWorld

RimWorld

774 ratings
Better Gene Inheritance
3
6
2
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.4, 1.5, 1.6
File Size
Posted
Updated
442.152 KB
6 Oct, 2023 @ 12:31pm
21 Jun @ 9:28am
20 Change Notes ( view )

Subscribe to download
Better Gene Inheritance

In 2 collections by RedMattis
Red's Workshop Mods
43 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.

In summary: better gene inheritance results.


Settings





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


Details

If you really want to know how it works...

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.


Inheritance Genes



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.


Other Features


The mod will automatically try to swap the displayed xenotype if enough genes are shared with either parent.
In middling situations they will be labeled a "hybrid [xenotype]" based on what they inherited most of, e.g. "Hybrid Nekomata", "Hybrid Yttakin", "Hyrid Impid", ...

This can be considered a fix to the dreaded "Baseliner" or "Hybrid" issue that happens a lot in vanilla


Final Word


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

Mod Discord
[discord.gg][ko-fi.com]
234 Comments
RedMattis  [author] 24 Jul @ 11:48pm 
The mod will now fake-apply xenotypes if enough genes are shared with a parent of that xenotype. In other words they will show a xenotype instead of the generic "Hybrid" or dreaded "Baseliner" (with a ton of genes).

Also, if not quite hitting that threshold they will be labeled a "hybrid [xenotype]" instead of just hybrid. E.g. "Hybrid Nekomata", "Hybrid Yttakin", ...

@Otoya
It already has settings for metabolism going all the way to 99.

@whitecloud67, abc
Looks like a mod setting is scribed to the wrong value. Probably from an old install of this mod. I tried swapping that save-key to fix it for people in the future.

@ShadowX116
The "Baseliner" issue should be fixed now.
Otoya 22 Jul @ 6:56am 
Can you allow for lower metabolism?
Otoya 22 Jul @ 6:53am 
Wyrd you probably want https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3460624058 - now I a not sure if its compatible, but the problem with this mod is that you don't get the xenotype inherited. This mod does not enforce xenotype, only gene inheritance. In other words, if an Impid has a child with a baseliner, the child could have all the Impid genes but not be considered an Impid xenotype by the game.

That's the problem you currently face with Rimdark, and so do I.
whitecloud67 21 Jul @ 6:21am 
I just installed Harmony, HugsLib, and this mod and ran the game, and immediately a debug log appeared. I don't know what the problem is, so I'm uploading the log file. https://gist.github.com/HugsLibRecordKeeper/ed0bb342b0a8b85d4c7d457c7393769f
ohluitvaenri 20 Jul @ 3:46am 
@ShadowX116 late response but theres a mod called Cyanobots Genes that has some caste related genes + combined with the custom xenotype exporter mod u can prolly make it work
abc 19 Jul @ 8:21am 
Getting an error on startup, I checked with just this mod and Harmony enabled so it's not a compatibility issue.
Here's the stack trace https://pastebin.com/5DhNF2fW
Wyrd 6 Jul @ 5:36am 
Any possibility of getting a gene that causes the child to either be the other parent or a Baseliner if both parents have the gene? Thinking it would be useful for patching into xenotypes that are applied via other means (specifically thinking of the Rimdark 40k marines here)
ShadowX116 3 Jul @ 5:53pm 
It also seems to be happening for other endo species I have that don't lay eggs.
In their case, it obeys the dominant gene set, but still labels the babies as Baseliners.
I've heard this might be a Character Editor issue, but switching to the other one (can't remember the name atm) has issues with some mods I have.

Any suggestions there, or am I just stuck reapplying genes thru Character Editor?
RedMattis  [author] 3 Jul @ 1:36pm 
@ShadowX116
Alpha Genes has their own logic for the eggs. Same with stuff like the AG parasitic implantation.
ShadowX116 1 Jul @ 8:39pm 
Hey so.. I'm running an Ant colony where I have a Queen ant (species) and a Drone ant (species).
The Queen has the recessive gene and set to not inheritable genes (xenogerm).
The Drone has the dominant gene and set to inheritable genes (endogerm).

The idea is that the Queen only produces Drones via eggs (alpha genes I think?), but the game is still throwing "baseliner" babies with genes that stray from my Drone species when they hatch. I've had to resort to using Character Editor to fix the genes.

This mod's settings are the following:
Min % from second parent: 0.10
Max % from second parent: 1.00
Xenogenes can be inherited: 0.00
Archite genes shared by both: (Yes)
Lowest permitted metabolism: 0 (Both parents have flat 0 metabolism)

How do I make the game understand I want the babies to be the Drone species only?