Crusader Kings II

Crusader Kings II

Improved Genetics 2.0
Crimson7  [developer] Apr 12, 2019 @ 6:17am
Calculations and Trait distributions
Believe it or not, quite a bit of math modeling went into the making of this mod. I can't explain every decision I made, but ultimately the goal was to make the occurrence of a trait match that of vanilla.

Polygene Traits:

General population initial distribution: 1/6 receive AA, 4/6 receive Aa, 1/6 receive aa.

This gives a distribution of: (Numbers represent number of alleles, ex: aaBbCc = 2)

0 -- 0.46%
1 -- 5.56%
2 -- 23.61%
3 -- 40.74%
4 -- 23.61%
5 -- 5.56%
6 -- 0.46%

Trait chances:

At 0: 30% imbecile, 50% slow, 20% dim
At 1: 5% imbecile, 20% slow, 50% dim
At 2: 2% slow, 8% dim
At 3: Nothing
At 4: 2% quick, 8% bright
At 5: 5% genius, 20% quick, 50% bright
At 6: 30% genius, 50% quick, 20% bright

Multiplying the distribution with the chances gives:

Imbecile: 0.42% + 0.10% random chance + 0.10% from existing imbeciles = 0.62%
Slow: 1.83% + 0.25% random chance + 0.20% from existing slow = 2.28%
Dim: 5.561% + 1.00% random chance + 0.50% from existing dim = 7.16%
Bright: same as dim
Quick: same as Slow
Genius: Same as imbecile

The attractiveness, height, and strength trait groups are modeled in almost the exact same way.

Mendelian Traits:

Several of these have different trait chances. In terms of how common they are: Stutter = Lisp > Hunchback = Clubfoot = Harelip > Dwarfism

Anyway, for the deformities, the number of alleles are not relevant - the number of RECESSIVE alleles are. The presence of one dominant allele in the pair deactivates the possibility of the genotype.

So the distributiion is: (Numbers represent number of recessive alleles: AaBbcc = 1)

0: 72.90%
1: 24.30%
2: 2.70%
3: 0.10%

Trait chances:
0: N/A
1: 0.5% chance for, say, hunchback
2: 7.5% chance for hunchback
3: 75% chance for hunchback

Multiplying gives:

0.40% + 0.10% random chance + 0.10% existing trait = 0.60%
< >
Showing 1-8 of 8 comments
fedcba Jun 1, 2019 @ 3:56am 
Can you increase the likelihood of a person being 'normal'? I have far too many dwarves and giants, small and large people
Crimson7  [developer] Jun 1, 2019 @ 10:53am 
@fedscba

I don't.

You probably have many tall and short people sure. Thats what I want to reflect.

Remember traits like dim, delicate, short, tall, burly etc. are minor traits that just act as feedback to the gene system. They arent massive buffs or nerfs.

How many people irl are noticeably shorter than 'normal'? Think about that.

This is the way I've tuned the mod. It is very easy to tune it yourself though. Just change the genotype to phenotype conversion rates.
Star¤Dagger Jun 23, 2019 @ 9:35pm 
Originally posted by Crimson9:
@fedscba

I don't.

You probably have many tall and short people sure. Thats what I want to reflect.

Remember traits like dim, delicate, short, tall, burly etc. are minor traits that just act as feedback to the gene system. They arent massive buffs or nerfs.

How many people irl are noticeably shorter than 'normal'? Think about that.

This is the way I've tuned the mod. It is very easy to tune it yourself though. Just change the genotype to phenotype conversion rates.

People's biases play into this, they don't see the distribution curve. And when if affects their Dynasty they are happy/offended out of all proportion. The iron(centur)y is that they can take control of it by carefully watching who they marry their dynasty members to, I've been doing that and it is a full time job, lol.

I can't really thank you enough for making this mod.
Crimson7  [developer] Jun 24, 2019 @ 5:56pm 
Haha, thanks and no problem. Glad you enjoy it!
Teralitha Jul 3, 2024 @ 10:23am 
I think you missed something in your calculations. I tested this in a few different game strarts and I see the genius and other good traits far less frequently than in the vanilla game.

I summoned debaunte at least 100 times or more in each game and never once got genius or even bright or that other one that gives +3 to all. In the vanilla game i would get a few of those in a 100 tries. So far in 4 same tests I got zero of any of them. Character searches turned up no more than 1 of anything among the entire populace. General stats of any character seemed to be less as well. Lots of total garbage. So yea I think something is off about your math.
Last edited by Teralitha; Jul 3, 2024 @ 10:29am
KrustyTheKlown Aug 29, 2024 @ 12:21pm 
Originally posted by Teralitha:
I think you missed something in your calculations. I tested this in a few different game strarts and I see the genius and other good traits far less frequently than in the vanilla game.

I summoned debaunte at least 100 times or more in each game and never once got genius or even bright or that other one that gives +3 to all. In the vanilla game i would get a few of those in a 100 tries. So far in 4 same tests I got zero of any of them. Character searches turned up no more than 1 of anything among the entire populace. General stats of any character seemed to be less as well. Lots of total garbage. So yea I think something is off about your math.
I believe it's the testing method that is wrong actually. As far as I can tell the genetics event only fires on game creation, and birth. Meaning the characters spawned by events such as present debutante, or similar, won't have genetics at all. So calculations aren't done at all.
Teralitha Aug 29, 2024 @ 4:26pm 
There is no point then.
Crimson7  [developer] Sep 25, 2024 @ 4:24pm 
Play the HIP version. This mod is not being developed anymore.

Or better yet, improve it yourself. This is provided for free, let me remind you.
< >
Showing 1-8 of 8 comments
Per page: 1530 50