• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Dr. Intolerance

Colonel
14 Badges
Dec 9, 2011
814
54
  • Darkest Hour
  • For The Glory
  • Arsenal of Democracy
  • Crusader Kings II
  • Rome Gold
  • Rome: Vae Victis
  • Hearts of Iron III Collection
Tell me what all the possible ways to express genetics.

From what I see, there is "birth =," which is a fraction based on every 10,000 characters, "inherit_chance =" which is a percent chance of the child receiving the trait from a parent and another modifier can be written to increase, or even decrease, the chance of inheritance if both parents have that trait.

What I really want more than anything is to have "genetic clumping" of keeping track of what traits a dynasty has had in each member and increasing - or decreasing, or setting back to default, or many other variations - the "birth =" chance for children born to that dynasty, because without the parents having those traits even when their own had them, those kids are back at square one with default birth chances.

The only thing I can think of that might be possible is to create bloodlines for every single dynasty and dynasties created later on, to compile a script of what traits every character in that dynasty had and to do some trigonometry or something to slightly alter "birth =" for each kid born to that dynasty.

Take the noble dwarf as an example, a long unbroken line of rulers, some patrilineally, some matrilineally, leading a great rock on the mount in some remote neck of the woods in fealty to the Germans, who, after many centuries of a prestigious line of rulers, many of them dwarfs, meet their sudden and viscious end in an ominously messianicaly named "World War," or something of that sort, just for perspective.

Here's the dwarf code from the base game, no dlcs.
Code:
dwarf = {
    birth = 25
    inherit_chance = 25
    both_parent_has_trait_inherit_chance = 50

    sex_appeal_opinion = -30
    same_opinion = 5
   
    opposites =  {
        giant
    }
   
    martial = -1
   
    combat_rating = -15 #old value: -3
   
    male_insult = INSULT_DWARF
    female_insult = INSULT_DWARF
    male_insult_adj = INSULT_LITTLE
    female_insult_adj = INSULT_LITTLE
    child_insult_adj = INSULT_STUPID
}

So, what I'd like to be able to accomplish, is a scripted bloodline, that compiles traits and sets the the "birth =" higher for children born into that dynasty. So, for instance, maybe, say a hundred people are born into a dynasty that are dwarfs and they also marry a hundred dwarfs by the time the game ends. If the children near the very end of the game fail to receive the trait through their parents, then when the game reads their "birth =" chance, it should be higher than 25, maybe 1,000 even, considering how prevalent so many dwarfs within an entire game's worth of a dynasty should influence the genetics of that family.
 
Last edited:
So, what I'd like to be able to accomplish, is a scripted bloodline, that compiles traits and sets the the "birth =" higher for children born into that dynasty.
Cant be done, traits are static, you would have to pretty much write all your logic in events fired on birth that check for whatever flags or bloodlines you have added and add the traits manually.
 
Cant be done, traits are static, you would have to pretty much write all your logic in events fired on birth that check for whatever flags or bloodlines you have added and add the traits manually.
Oh well. It would be really cool to adapt this for the AI, and quite an achievement to make something that isn't totally broken or op. I wouldn't want something where the AI is fixed on collecting traits, or have it be aware of collecting a bonus to itself. There could be so much dynamic stuff going on, like opposite traits null the bonus, and cross culture marriages take into account "of group" effects and "not of" effects.

I'd have to freshen up on math to decide what smooth increments to use, either making a trait more accessible to the dynasty or less.