Explanation of TS4 genetics system (trying to post new content) (Patreon)
Content
Hi everyone! Well, I promised to try explaining game mechanics here. And I'd like to explain today why it's impossible to pass grandparents genetics without my genetics overhaul collection.
Genetics creation process insides
The CAS functions are not accessible to modders for reading or editing, but in this case we don’t need to know the internal code. We’re interested in what input data the function that determines the child’s genetics.
generate_offspring(parent_a._base, parent_b._base, self._base, **kwargs)
You don't need to understand whole code. It's enough to notice that the CAS function accepts only the _base data instead of accepting the sim data entirely. The base data is the core data, such as first and last name, age, appearance and traits.
And most importantly: it does not contain the genealogy data. It means, that it's impossible for the CAS function to retrieve the genealogy from the _base field and, particularly, the grandparents appearance.
Moreover: in some cases you could face the Last Exception using my mod which pointed out to non existence of the genealogy data. That's because sometimes the game passes only the base data right from the start, so even my mod can't retrieve genealogy. Now, in such cases the EA genetics is applied and you'll be notified about that.
But what if sims look similar to grandparents?
First, we should separate several appearance attributes.
When we're talking about hair and eye color, it's a plain coincidence, which is caused either by EA bug or incorrect color tags on your CC.
If we're talking about face presets, situation becomes more interesting. You may think that a CAS preset has its own unique forms on each age stage, and thus presets inheritance works strictly. That's not true. Instead, various presets have multiple versions based on age and gender. Let's look at the presets map by age and gender:
The first ID is for the adult female version, the last one - for the male one. Between them there are presets for different age stages. You can notice here, that one preset has two versions of children presets (compare columns 3-5). And the same children presets may represent other similar adult presets. That's why you can think a child inherited the grandparent preset.
Another reason is the sliders values. They can change the preset appearance so much it resembles another preset. I come across this all the time, because the twins check algorithm compares the appearance of two Sims who look identical, yet the values of some sliders differ by 50% or more, and vice versa.
I mean, it's not obvious at all how various mix of appearance attributs can look, yet we tend to remember such coincidences because we love the idea having a child which resembles their grandma or grandpa. But nah, the Sims 4 genetics system sucks.
I hope it was interesting to read. I'd love to see your reaction and questions if you have any! I did my best to investigate how genetics works and explain it to you.