Current Version: 3.0 (Feb. 17, 2019) for Patch 3.0+.
This mod aims to make the effects of inbreeding more realistic and transparent by taking a thorough account of a character's genealogy.
The effects of inbreeding are now more strongly felt after generations of inbreeding and less so during the first few generations.
This mod extends genetic checks to characters deemed unrelated by the base game, such as great-aunts/uncles/nieces/nephews, great-great grandparents/children, first cousins once-removed and more. Further, "partial" relationships are now included, such as half-uncles/aunts/cousins, double cousins, sibling cousins and the like.
The following additional relationships are checked by this mod:
This mod does not alter any of the original game files and is only a script mod, so it should be compatible with any future versions of CK2 and most mods.
This mod currently has built-in support for genetic traits introduced in HIP, CK2+, and AGOT. If you'd like to see built-in support for genetic traits introduced in other mods - let me know and I'll be glad to make it so!
Characters who are born of parents who share some coancestry (or are somewhat inbred themselves) now obtain a trait that measures how inbred or "consanginous" they are.
The percentage value in this trait represents half the chance of that person being born as an inbred and/or lunatic as a result of inbreeding and how inbred their own children could be. It also increases the odds for inheriting genetic traits from parents who are close - for example two cousins with "Strong" are more likely to produce a child with that trait than two unrelated parents who are also both strong.
It is also possible for a character to be so inbred that further inbreeding has no effect. Characters whose parents are closely related and have 100% consanguinity obtain the "Purebred" trait, making them immune to random mutations and ensuring that traits shared by both parents are always inherited. The trait is also passed on when two characters who are purebred have children. Modders can also add this trait to characters as a means to disable harmful effects from inbreeding.
You may freely incorporate and make modifications to this mod. All I ask is that you give me some credit if you choose to do so.
To do:
Update history:
This mod aims to make the effects of inbreeding more realistic and transparent by taking a thorough account of a character's genealogy.
The effects of inbreeding are now more strongly felt after generations of inbreeding and less so during the first few generations.
This mod extends genetic checks to characters deemed unrelated by the base game, such as great-aunts/uncles/nieces/nephews, great-great grandparents/children, first cousins once-removed and more. Further, "partial" relationships are now included, such as half-uncles/aunts/cousins, double cousins, sibling cousins and the like.
The following additional relationships are checked by this mod:
Standard:
self
parents
children
siblings
uncle/aunt
niece/nephew
grandparents
grandchildren
cousin
half sibling
NEW:
sibling-cousin
sibling-half-cousin
double cousin
three quarter double cousin
great grandparents
great grandchildren
half uncle/aunt/niece/nephew
great uncle/aunt/niece/nephew
half cousin
great half-uncle/aunt/niece/nephew
great great grandparents
great great grandchildren
great great uncle/aunt/niece/nephew
first cousin once removed
self
parents
children
siblings
uncle/aunt
niece/nephew
grandparents
grandchildren
cousin
half sibling
NEW:
sibling-cousin
sibling-half-cousin
double cousin
three quarter double cousin
great grandparents
great grandchildren
half uncle/aunt/niece/nephew
great uncle/aunt/niece/nephew
half cousin
great half-uncle/aunt/niece/nephew
great great grandparents
great great grandchildren
great great uncle/aunt/niece/nephew
first cousin once removed
This mod does not alter any of the original game files and is only a script mod, so it should be compatible with any future versions of CK2 and most mods.
This mod currently has built-in support for genetic traits introduced in HIP, CK2+, and AGOT. If you'd like to see built-in support for genetic traits introduced in other mods - let me know and I'll be glad to make it so!
Consanguinity
Characters who are born of parents who share some coancestry (or are somewhat inbred themselves) now obtain a trait that measures how inbred or "consanginous" they are.
The percentage value in this trait represents half the chance of that person being born as an inbred and/or lunatic as a result of inbreeding and how inbred their own children could be. It also increases the odds for inheriting genetic traits from parents who are close - for example two cousins with "Strong" are more likely to produce a child with that trait than two unrelated parents who are also both strong.
It is also possible for a character to be so inbred that further inbreeding has no effect. Characters whose parents are closely related and have 100% consanguinity obtain the "Purebred" trait, making them immune to random mutations and ensuring that traits shared by both parents are always inherited. The trait is also passed on when two characters who are purebred have children. Modders can also add this trait to characters as a means to disable harmful effects from inbreeding.
You may freely incorporate and make modifications to this mod. All I ask is that you give me some credit if you choose to do so.
To do:
Expand checks to include the (quadruple-/triple-/double-) second cousins, first cousins twice-removed, half great-great uncle/aunt/niece/nephews.
Update history:
3.0:
Major code rewrite and optimizations
Added checks for sibling-halfcousins, half-great avunculars, great-great avunculars, and first cousins once removed
Homozygosity decreases faster if parents are not of the same race
Fixed an issue where homozygosity wasn't properly inherited if the father died prior to childbirth
Renamed "Homozygosity" in localisation to "Consanguinity" for improved immersion
Added a game rule to control GIS behavior
- Show Consanguinity
-- Controls whether consanguinity traits are visible. Defaults to ON
2.1:
-Fixed some typos resulting in imbecile being given out improperly
-The initial event now triggers for characters on their birth, to save on processing costs and so that stillborn and babies who die in less than a week will still get evaluated.
-Added several very specific flags mentioning exactly how the child's parents are related. Mostly of use to modders.
-Fixed some logic causing incorrect values of homozygosity to be given out.
-Reduced heritability of lunatic and inbred (the former has become way more prolific in the base game...)
-Added a case for when a woman impregnates herself...
2.0:
-Fix for homozygosity not being added to characters whose parents were avuncularly related or cousins when a link was dead.
-Homozygosity is now calculated using variables rather than traits.
-Discrete traits still exist, and now give players an estimated (to 2.5%) rather than exact value of homozygosity.
-Homozygosity gain has been reworked to be more realistic.
-Localisation tags added to events just in case.
-Removed the negative trait mutation chance.
-It is now possible for a character to be born with both the lunatic and inbred trait rather than one or the other.
-Reduced heritability of lunatic/inbred traits for unrelated parents (from 50%/parent to 25% as in vanilla).
-If a character is affected by an increase in homozygosity the odds of inheriting genetic traits increase as well, depending on how high homozygosity is.
--This means that if two cousins both have the "Strong" trait their children are much more likely to inherit it than if it were two unrelated parents instead.
--Purebreds always inherit any and all genetic traits that parents share (affects vanilla CK2 and HIP traits).
-Purebred now only requires both of a character's parents to be at 50% homozygous. This trait is now achievable by the 4th generation at the earliest rather than the 5th.
-Purebreds are now immune to mutation (ie they will not inherit traits that their parents don't have). Only checks vanilla CK2 and HIP traits for now.
-More complicated fractional relationships (ie half-cousins, 3/4 siblings, etc) are now checked.
1.02:
-Characters that born to parents that are ethnically Iranian (or West/High Valyrian for AGOT) are more likely to obtain the lunatic trait instead of the inbred trait.
-Relationships between double cousins are now checked.
-Added the 'Purebred' trait.
--This trait is given to characters whose parents and grandparents are all 50% homozygous.
--Purebreds do not spontaneously obtain negative genetic traits from inbreeding (though they can still inherit them if their parents have them)
1.01:
-Genealogy checks are much more comprehensive and checks the hidden genealogy of all characters involved.
-Character flags are now set on any characters whenever homozygosity increases due to close relations.
-Great-grandparent/child and grand/great aunt/niece/nephew/uncle relationships are now checked for inbreeding.
1.00:
-First public release
Potential/Known Bugs:
Major code rewrite and optimizations
Added checks for sibling-halfcousins, half-great avunculars, great-great avunculars, and first cousins once removed
Homozygosity decreases faster if parents are not of the same race
Fixed an issue where homozygosity wasn't properly inherited if the father died prior to childbirth
Renamed "Homozygosity" in localisation to "Consanguinity" for improved immersion
Added a game rule to control GIS behavior
- Show Consanguinity
-- Controls whether consanguinity traits are visible. Defaults to ON
2.1:
-Fixed some typos resulting in imbecile being given out improperly
-The initial event now triggers for characters on their birth, to save on processing costs and so that stillborn and babies who die in less than a week will still get evaluated.
-Added several very specific flags mentioning exactly how the child's parents are related. Mostly of use to modders.
-Fixed some logic causing incorrect values of homozygosity to be given out.
-Reduced heritability of lunatic and inbred (the former has become way more prolific in the base game...)
-Added a case for when a woman impregnates herself...
2.0:
-Fix for homozygosity not being added to characters whose parents were avuncularly related or cousins when a link was dead.
-Homozygosity is now calculated using variables rather than traits.
-Discrete traits still exist, and now give players an estimated (to 2.5%) rather than exact value of homozygosity.
-Homozygosity gain has been reworked to be more realistic.
-Localisation tags added to events just in case.
-Removed the negative trait mutation chance.
-It is now possible for a character to be born with both the lunatic and inbred trait rather than one or the other.
-Reduced heritability of lunatic/inbred traits for unrelated parents (from 50%/parent to 25% as in vanilla).
-If a character is affected by an increase in homozygosity the odds of inheriting genetic traits increase as well, depending on how high homozygosity is.
--This means that if two cousins both have the "Strong" trait their children are much more likely to inherit it than if it were two unrelated parents instead.
--Purebreds always inherit any and all genetic traits that parents share (affects vanilla CK2 and HIP traits).
-Purebred now only requires both of a character's parents to be at 50% homozygous. This trait is now achievable by the 4th generation at the earliest rather than the 5th.
-Purebreds are now immune to mutation (ie they will not inherit traits that their parents don't have). Only checks vanilla CK2 and HIP traits for now.
-More complicated fractional relationships (ie half-cousins, 3/4 siblings, etc) are now checked.
1.02:
-Characters that born to parents that are ethnically Iranian (or West/High Valyrian for AGOT) are more likely to obtain the lunatic trait instead of the inbred trait.
-Relationships between double cousins are now checked.
-Added the 'Purebred' trait.
--This trait is given to characters whose parents and grandparents are all 50% homozygous.
--Purebreds do not spontaneously obtain negative genetic traits from inbreeding (though they can still inherit them if their parents have them)
1.01:
-Genealogy checks are much more comprehensive and checks the hidden genealogy of all characters involved.
-Character flags are now set on any characters whenever homozygosity increases due to close relations.
-Great-grandparent/child and grand/great aunt/niece/nephew/uncle relationships are now checked for inbreeding.
1.00:
-First public release
Potential/Known Bugs:
-No bugs so far
Attachments
Last edited:
- 4
- 3