Hello !
I have a quick question that have probably been already asked but I didn't go trhough the 1544 pages...
My question is, I have created on_birth event, that seems to trigger correctly. The aim is to set a flag onto the child :
- If the father has a certain trait, then the child as certain chance to get the flag
- If the father has a certain other trait, then the child as a certain another chance to get the flag
- If the mother has a certain trait, then the child as certain chance to get the flag
- If the father has a certain other trait, then the child as a certain another chance to get the flag
- (you can have the flag only if one of the parents has a trait, so no trait, no flag for the child)
So here's the code, mainly copied from JonStryker's Witcher Kings Mod (who I thank for) :
Code:
character_event = {
id = big.1
hide_window = yes
is_triggered_only = yes
option = {
name = OK
if = {
limit = { trait {father = big1 } }
random = {chance = 15 set_character_flag = hidden_big_potential }
}
if = {
limit = { trait {father = big2 } }
random = {chance = 17 set_character_flag = hidden_big_potential }
}
if = {
limit = { trait {mother = big1 } }
random = {chance = 15 set_character_flag = hidden_big_potential }
}
if = {
limit = { trait {mother = big2 } }
random = {chance = 17 set_character_flag = hidden_big_potential }
}
}
}
The problem is that every newborn seems to possess the hidden_big_potential flag. But i want them to get that potential only if one or more of the IF are true.
So does the sum of "chances" has to be below 100 ?
What should i do to make sure only a fraction of the population would get the flag ?
Thanks in advance for your answer !