RimWorld

RimWorld

Not enough ratings
Random Genetics Framework
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.5, 1.6
File Size
Posted
Updated
1.248 MB
Jul 4, 2024 @ 4:44am
Jun 24 @ 1:42pm
10 Change Notes ( view )
You need DLC to use this item.

Subscribe to download
Random Genetics Framework

Description
Random Genetics Framework is designed to generate random genes for pawns based on your own conditions. All created through XML.

Related mods
Random genes
Femboy Xenotype

Things You Can Do
  • Have a pawn receive 1 of multiple choices of genes. Or even multiple genes all at random.
  • Generate a random gene based on various conditions like metabolism, exclusionTag, or if it has an ability or prerequisite.
  • Generate random hair or skin colors that are all similar by RGB, Hue, Saturation, or Value.
  • Have a set of genes that will only be used if a certain mod is active.
  • Adjust weights and fillers so certain selections are more common than others or prevent a selection from even occurring.
  • After the gene is added to a pawn, it will assign all the genes it was told to and then remove itself.

Why use?
  • You want a Xenotype to be more diverse in genetics being chosen.
  • You can't make up which gene you want to add to a Xenotype and want to add both.
  • You want to add a gene to a xenotype but only when another mod is available, but you want to use another gene if it's not available.
  • You like diversity and are tired of your Xenoptypes all having the same shade of green hair when there are over 300 different genetic hair colors
  • You don't want to create an entirely new Xenotype to give a pawn a super special ultra instincts gene.

How to use?
Documentation is provided inside the mods documentation. It includes examples for all the different kinds of creations you can make.
Source code is available on github.
By default, the framework does not contain anything. Only some abstract GeneDefs and an empty category you can use to store your random genes.

Compatibility
  • I didn't test with every gene, but every gene I've tested hasn't given me an error.
  • Did a quick check with performance mods and didn't have any issue.
  • This is compatible with Big and Small - Framework. Any genes that have prerequisites it this will apply to a filter if you use one.
  • Compatible with HAR. Any genes that can't be added to a race simply won't be added.
  • Compatible with Cherry Picker. if you remove a gene that is added through this, it will not be added to your pawn.
Errors
I'm sure I missed a null check or something somewhere. Let me know in comments what you were trying to do.
If you have an issue with another mod, I need a log as well as a mod list so I can see what's wrong. Getting a log with Hugslib helps a lot!

Links
github https://github.com/Halicade/RandomGenetics

Thanks
Goji's Fantasy Race: Merren
Det's Xenotypes - Avaloi
These two mods were my main influence in creating this.

Big and Small - Framework
RedMattis gave me permission to use their code for gene better gene prerequisites to ensure compatibility.

Bradson - Showed me how to edit the gene menu so that you actually see what genes are possible in game!
5 Comments
arget03 May 17 @ 7:43pm 
Thank you for this. I've finally got it to where I made some random genes, that will choose from a set of 3-4, to help with my avian chick xenotypes. It makes it much easier. I also don't need as many separate xenotypes.
Halicade  [author] May 5 @ 7:13pm 
I should be able to do a hidden option. Will probably push something out this weekend.
Dr Jimothy May 5 @ 6:31pm 
Is there any, say, "hidden" option for making it the case that a player can't see what genes they might get from a gene?
I'm interested in the idea of 2 identical "mystery" genes that players can't tell apart.
One gene can turn into any random non-archite gene. I can kinda see that already with the gambling gene.
The other can turn into any of a collection of purely harmful (like inbred) genes.
You see, I like my gambling high-stakes.

I love the idea that one or both of these genes could randomly appear in genepacks and pawns on gene extraction (gene-extracting baseliners goes brr), xenogerms on creation, and genepacks used to make xenogerms (encouraging player to have "spares" in case of mutations rather than extra copies of genes being worthless).
For now tho, I'll enjoy making them and other random genes the only ones I find in Alpha Genes biotech labs, using the Inject Genes mod, and self-discipline enough not to look at gene descs lmao.
Halicade  [author] May 5 @ 6:00pm 
@Dr Jimothy Could have sworn I uploaded pictures with examples for it. Uploaded some now!
Yes, clicking on a genes info tab will display what genes are possible as well as their weights/possibilities.
Dr Jimothy May 5 @ 9:33am 
"how to edit the gene menu so that you actually see what genes are possible in game!"
Does this mean when the player hovers their mouse over the mutating/randomizing gene, they can see the possible resulting genes?