Vanilla-Expanded / VanillaExpandedFramework

Vanilla Expanded Framework for RimWorld
Other
73 stars 37 forks source link

[Feature Request] Gender-exclusive gene effects #73

Open kaedys opened 10 months ago

kaedys commented 10 months ago

So, what I'd like to do is make a gene that applies a forced body shape, but forces a different body shape depending on the gender of the pawn (ex. hulk if male, normal if female, or something similar), to be able to have some sexual dimorphism in the xenotype. I could see there being benefit to having that available beyond just body type, however, so a <maleBodyType> and <femaleBodyType>, while it would solve this ask, may not be as flexible as it could be. I'm not sure if this makes more sense to implement just this specific thing I'm looking for, gender-specific forced body types, or have a more generalized way of handling similar asks.

For a more generalized solution, my proposal is to add onlyIfMale and onlyIfFemale boolean parameters (or something equivalent) to the GeneExtension, where the gene is entirely deactivated if the pawn is not the specific gender, in the same way a gene is deactivated if another conflicting gene is active (so, no metabolic effect as well). This would allow all of the normal gene code to work as is, without having to ad-hoc gender-specific effects as they are asked for or y'all come up with genes for them. I could just make a Body_HulkMale gene that's identical to the regular Body_Hulk, except set as onlyIfMale, and the same for a Body_StandardFemale or w/e, and throw them both on the xenotype, with only the one matching the pawn's gender actually taking effect (rather than it being random, as it is with the vanilla body type genes).