When a father of an unborn child dies before the child is born, the child takes the mother's dynasty regardless of whether the marriage was matrilineal. #635
This is a well-known vanilla ragequit bug. Let's fix it. I think it's actually simpler to fix than I previously thought:
on_death of a father who has any_spouse that's is_pregnant = yes, flag that / those spouse(s) as being subject to the bug, so long as the marriage isn't matrilineal. The "flag" will actually be a saved persistent event target pointing at the father.
on_birth of a child whom has a mother so flagged (i.e., the saved event target exists), set the dynasty of the child to the dynasty of the dead father.
Defer an event by one day triggered upon the mother to clear said saved event target (she might have had twins or something, hence the delay to be able to handle that).
Since a woman cannot become pregnant again once she's already pregnant, there is no risk of multiple fathers needing to be saved and thus that source of ambiguity is eliminated.
This is a well-known vanilla ragequit bug. Let's fix it. I think it's actually simpler to fix than I previously thought:
on_death
of a father who hasany_spouse
that'sis_pregnant = yes
, flag that / those spouse(s) as being subject to the bug, so long as the marriage isn't matrilineal. The "flag" will actually be a saved persistent event target pointing at the father.on_birth
of a child whom has a mother so flagged (i.e., the saved event target exists), set the dynasty of the child to the dynasty of the dead father.Since a woman cannot become pregnant again once she's already pregnant, there is no risk of multiple fathers needing to be saved and thus that source of ambiguity is eliminated.