Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
I love this mod, btw. It's so essential to me, that I feel like it should just be in the base game more than any other mod I've used.
I was wondering - I get a lot of pawn spawn issues with the game trying to spawn pawns incapable of violence. It doesn't have much of an effect outside of throwing the error, but just curious if having a higher chance of random mutations and hybrids could be causing this by selecting the violence disabled gene?
Thanks for any insight!
Custom xenotypes are stored in the Xenotypes folder in the same place. The files can be passed around and don't contain anything hardware specific
if (Rand.Range(0f, 1f) <= xenotypeChances.GetCustomXenotypeChanceValueSum()
|| baseliner% == 0
I'll try code it myself tommorow.
private static bool TryGetCustomXenotypeByWeight<T>(string defName, out CustomXenotype? result)
where T : Def
{
var xenotypeChances = XenotypeChanceDatabase<T>.For(defName);
- if (Rand.Range(0f, 1f) <= xenotypeChances.GetCustomXenotypeChanceValueSum()
- && xenotypeChances.CustomXenotypeChances.TryRandomElementByWeight(chance => chance.RawValue, out var randomResult))
+ // If there are any positive weights, draw directly by weight (no extra gate).
+ // TryRandomElementByWeight handles normalization internally.
+ if (xenotypeChances.CustomXenotypeChances != null
+ && xenotypeChances.CustomXenotypeChances.Any(c => c.RawValue > 0f)
+ && xenotypeChances.CustomXenotypeChances.TryRandomElementByWeight(c => c.RawValue, out var randomResult))
{
1. the mod rolls vanilla xentoypes, no custom xenotypes, those are pseudo baseliners on this step
2. then it runs a second roll in TryGetCustomXenotypeByWeight, here it gets the chances for the custom xentypes and trys to reroll the baseliners.
3. if in both step 1 and step 2 we rolled into baseliner, then it stays like that and the bug appears.
with pseudo numbers, impid 50%, custom race 50%.
1. we roll 50% impid, 50% custom kept as psuedo baseliner - lets assume we rolled baseliner here
2. we roll 50% custom race: 50% not custom race - lets assume we rolled not custom race here
3. the pawn turns out with a 50% x 50% = 25% chance as baseliner
i dont know how to fix it yet, but i understand the issue a bit now
In summary, if you don't want to see baseliners either use all premade xenotypes or use all custom xenotypes. Mixing and matching causes baseliners to spawn when they shouldn't.
For now, I have made it so that 100% of the faction No Faction are insectors, but not sure if that is the right approach!
After restarting the game, they were correct in the mod
(not sure if this only applies during setup)
Could add option for 'default genotype' that's the fallback if failure happens and have an internal fallback for that to baseliner?
Because setting exact ratios for specific genos is incredibly hard otherwise.