RimWorld

RimWorld

Xenotype Spawn Control
Alexolas 3 Dec, 2022 @ 1:58pm
Bug report (warning: giant wall of text)
Alright, over the past hour, I invented a new warcrime by reloading the save right before Alla gave birth, forcing her to undergo labor dozens of times to give birth to all manner of otherworldly mutants, in the name of Science. Here are my findings.

I am 100% certain that the bug is caused by this mod: Specifically, when altering its mod options for the player's own faction type (in my case, PlayerTribe) to be anything other than 100% vanilla and mod-added xenotypes (hereafter called "Old xenotypes"), or more than 0% Hybrid, Random Genes, and custom xenotypes made by the player (hereafter called "New xenotypes"), any newly born baby may or will have a New xenogerm.

My experiment was simple: Change this mod's settings for PlayerTribe, reload the save right before Alla gives birth, and note the baby's xenogerm after it is born. I found that it makes no difference if the settings are changed before or after loading the file, only if the settings are changed before Alla gives birth.

When I changed the settings to guarantee a New xenotype, Alla's baby would be bizarrely altered to become the promoted type of New xenotype. When I set the settings to 100% Random Genes, Alla always gave birth to a new type of xenohuman I had never seen before. When I set it to 100% Toxoid or 100% Photoan (two custom xenotypes I made and saved), Alla always gave birth to a toxoid or photoan. When I set it to 100% Hybrid, Alla always gave birth to a hybrid seemingly combining the genes of two Old xenotypes.

However, this was not true when changing the settings to promote Old xenotypes. In that case, Alla's child always had the xenogerm the "Inspect baby genes..." button said it would; a baseliner with mid-black hair and light skin. When I set it to 100% Sanguophage, Alla always gave birth to the expected baseliner. When I set it to 100% Impid, Alla always gave birth to the expected baseliner. When I set it to 100% Saurid, Alla always gave birth to the expected baseliner.

In conclusion, there is definitely something off about the way this mod handles childbirth and New xenotypes. I can speculate a bit about how this mod works: Whenever a new pawn (called "Alice") is created by an event (such as raiders, caravans, drop pods, or childbirth), the mod checks Alice's faction type and creates a random number. If the random number is above a certain value N, and the mod settings specify that Alice's faction type should have N portion of xenotypes, it replaces Alice's genome with that of the specific xenotype. There might be a check in place to make sure this process doesn't complete if the event that created Alice was a childbirth. However, this check only works in suppressing Old xenotypes, and doesn't work with New xenotypes.
< >
Showing 1-5 of 5 comments
Viciousbunny 3 Dec, 2022 @ 8:26pm 
I'd love to hear how this works out, I've experienced a bug that I believe relates to this. I also edited PlayerTribe to have different "new xenotypes", and when I started a new scenario with a tribal start, my starting pawns to choose from were Baseliners by default, but they had a random xenotype that I did not give 0% chance to in the settings. When I chose which xenotype I wanted them to be, they changed to that xenotype, but choosing Baseliner was always random. My prediction is that Baseliners are given a random xenotype according to the percentages assigned in the options, but other xenotypes are working correctly. For example, if I set my PlayerTribe options to the following:

Baseliner: 60%
Xenotype A: 20%
XenoType B: 20%

The real % chance is actually
Baseliner: 20%
Xenotype A: 40%
Xenotype B: 40%

Since Baseliners have a 33.3% chance of being any xenotype. I'm not certain the chance is equal across the board, but maybe it will help the debugging process. Love the mod regardless, keep up the good work.
Delta1138 4 Dec, 2022 @ 3:59am 
Sounds like Alexolas when you modify the setting for the player colony % of a xenotype it overrides all pawn spawning in that regard. Would the solution to be to remove the option to change the players colony xenotype % so pawns spawn as they should?
bradson  [developer] 4 Dec, 2022 @ 4:53am 
Thanks for the detailed report! Yea you're right, custom xenotypes process in a different step from premade variants and this step does lack some checks. Looks like there's a fun interaction here though considering the amount of time that went into those tests, so I'm guessing I'll have to add xenotype chances on pregnancies as another feature to keep in mind for future updates then.
Viciousbunny 4 Dec, 2022 @ 2:30pm 
Fixed my issue, turns out it was a problem on my end. I had set the percentages of every faction and pawn type, I did not realize that both values were being used, figured it was a priority thing. I set all of my pawn types back to 100% baseliner and it appears to work fine now. Turns out it was not related to the main topic of this thread!
Gacha Pawn 25 Dec, 2022 @ 12:57pm 
I was also having what seems to be this same issue — my tribe was a custom xeno, and my pawns that had kids would end up passing on random genes that neither parent had. Wondering if this is still a WIP or if there's a workaround, or if maybe I'm missing something about how it's supposed to work?
Last edited by Gacha Pawn; 25 Dec, 2022 @ 12:59pm
< >
Showing 1-5 of 5 comments
Per page: 1530 50