RimWorld

RimWorld

48 ratings
Random Spawning Genes
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.5, 1.6
File Size
Posted
Updated
275.285 KB
Mar 2 @ 12:32pm
Aug 19 @ 12:49pm
16 Change Notes ( view )
You need DLC to use this item.

Subscribe to download
Random Spawning Genes

Description
Random spawning genes!

So many mods add genes and only so many are on pawns. I wanted more variety on them and didn't like the current options available.

This mod will make all pawns spawn with an additional random assortment of genes.
In order to prevent a bunch of pawns spawning with extremely high or low metabolism, this uses a "super advanced AI logic" to try and get to the metabolism requested by the player.

Genes added can be a consistent amount (for example 4) or a random range between two numbers (from 0~64). There are options for where genes are placed, and what to do with genes that have prerequisites. The first gene given will be entirely random to throw some variation into the mix. Subsequent genes added will try to reach the ideal metabolism provided. When at or near this metabolism (±1), random single metabolism or zero metabolism (as set in the options) genes will be added.

You can provide a filter that will exclude any genes that contain the same defname as provided in the text box. There is an option to add in recomended exclusions. These are genes that would automatically down or otherwise incapacitate a pawn on spawn. A longer, more in-depth list is also provided in the about folder "PossibleExclusions.xml", containing the reason these genes are on this list.
Note these filters are case sensitive.
Babies - Babies can be given genes as well. However there is an option to turn this setting off.

Compatibility
For modders: There is a def included in this mod that you can patch to exclude your genes from appearing. This can be done through single genes, exclusionTags, or the intire mod itself. There are example patches included in the About folder.
Big and small framework: If a gene has prerequisites from using this framework, they will be taken into account with adding genes.
HAR: Genes should only be added if the race allows it. This works in both directions
VRE Insectors & VRE Androids: This will not use custom "genes" from these mods or any other mods that subclass Genedefs.
Androids will not be given genes.
Insectors can still receive genes.

Errors
I've tried testing this with a couple hundred gene mods. Sent some errors in compatibility of certain genes to their respective authors in the process as well. However I obviously can't guarantee every gene mod works with every other gene. There are options in the mod to turn on logging so you can determine what combination of genes are causing errors and report it to their mod authors. Additionally, be sure to check "PossibleExclusions.xml" located in the about folder for genes that may cause issue.
If there is an error with my mod specifically, please provide me a Hugs Log so I can fix the issue.

Credits
RimWorld discord for helping me learn how to make a UI and not just cry in a corner (thanks Telardo and Arquebus!).
Steve who made my code look less ugly.
Redmattis who let me steal the code he uses for big and small better prerequisites so I could write my compatibility with it.
64 Comments
Halicade  [author] Aug 29 @ 7:42am 
If a xenotype genes are germline genes (Like an impid, they get inherited) then the genes from this mod will go in the same place.
If they are xenogenes (like a sanguophage) then the genes from this mod will get generated as xenogenes
Futstub Aug 29 @ 6:52am 
Could you explain the mod option "Follow Xenotype Inheritance" for me, please? :)

This is an absolute amazing mod btw, and I seriously don't understand how it doesn't have dozens of thousands of downloads...
Futstub Aug 27 @ 6:58am 
Mind blown. :D
Halicade  [author] Aug 27 @ 6:32am 
All the options in the preview images are all the options. Only way to restrict to a specific xenotype is to exclude all other xenotypes.
Futstub Aug 27 @ 4:01am 
Any chance there is a mod option that makes this only trigger on baseliners?
Halicade  [author] Aug 19 @ 4:06am 
@Geojak maybe in another mod at some point. I really don't want to add more features to this one
Geojak Aug 19 @ 1:51am 
could their be an option for randomly disapearing genes, for exaple a pigkin randomly not having trotter hand
Halicade  [author] Jul 21 @ 1:30pm 
@numa.ec If the mod was active while they were spawned, yes
numa.ec Jul 21 @ 12:44pm 
Does it affect starting pawns?
Halicade  [author] Jul 15 @ 3:34pm 
@TheAsh Recommended is for genes that can break if placed on incorrect pawns only.
The summoning genes have been on the possible exclusions list since I made it though