These are updated versions of my earlier events, minus the disease/stress ones that are no longer needed:
The last event is a "generic" death from illness event that does not take into account presence or absence of "saintly" traits. Since there is a generic death from old age event, there should be a generic death from illness event too.
EDIT: corrected a few errors
Code:
character_event = {
id = 20005
picture = "event_madness"
name = "Ruler kills his own son in a fit of madness"
trigger = {
condition = { type = trait value = maniac }
condition = { type = gender value = male }
condition = { type = ruler }
condition = {
type = any_child
condition = { type = gender value = male }
}
}
mean_time_to_happen = {
months = 240
modifier = {
condition = { type = trait value = arbitrary }
factor = 0.9
}
modifier = {
condition = { type = trait value = cruel }
factor = 0.9
}
modifier = {
condition = { type = trait value = reckless }
factor = 0.9
}
modifier = {
condition = { type = trait value = vengeful }
factor = 0.9
}
modifier = {
condition = { type = trait value = kinslayer }
factor = 0.5
}
}
immidiate = {
effect = {
type = random
chance = 50
effect = { type = add_trait value = cruel }
}
effect = { type = add_trait value = kinslayer }
effect = { type = prestige scale = -0.5 }
effect = { type = piety scale = -0.5 }
effect = { type = death value = random_son }
}
}
character_event = {
id = 20006
picture = "event_madness"
name = "Ruler kills his own wife in a fit of madness"
trigger = {
condition = { type = trait value = maniac }
condition = { type = gender value = male }
condition = { type = is_married }
condition = { type = ruler }
}
mean_time_to_happen = {
months = 240
modifier = {
condition = { type = trait value = arbitrary }
factor = 0.9
}
modifier = {
condition = { type = trait value = cruel }
factor = 0.9
}
modifier = {
condition = { type = trait value = reckless }
factor = 0.9
}
modifier = {
condition = { type = trait value = vengeful }
factor = 0.9
}
modifier = {
condition = { type = trait value = kinslayer }
factor = 0.5
}
}
immidiate = {
effect = {
type = random
chance = 50
effect = { type = add_trait value = cruel }
}
effect = { type = add_trait value = kinslayer }
effect = { type = prestige scale = -0.5 }
effect = { type = piety scale = -0.5 }
effect = { type = death value = spouse }
}
}
character_event = {
id = 20007
picture = "event_plague"
name = "Ruler is poisoned"
trigger = {
condition = { type = ruler }
}
mean_time_to_happen = {
months = 960
modifier = {
condition = { type = trait value = arbitrary }
factor = 0.9
}
modifier = {
condition = { type = trait value = cruel }
factor = 0.9
}
modifier = {
condition = { type = trait value = coward }
factor = 0.9
}
modifier = {
condition = { type = trait value = indulgent }
factor = 0.7
}
modifier = {
condition = { type = trait value = reckless }
factor = 0.9
}
modifier = {
condition = { type = trait value = trusting }
factor = 0.9
}
modifier = {
condition = { type = trait value = vengeful }
factor = 0.9
}
modifier = {
condition = { type = trait value = suspicious }
factor = 1.5
}
modifier = {
condition = { type = trait value = temperate }
factor = 1.2
}
modifier = {
condition = { type = trait value = illness }
factor = 0.9
}
}
immidiate = {
effect = {
type = random
chance = 80
effect = { type = death }
}
effect = {
type = random
chance = 50
effect = { type = add_trait value = suspicious }
}
effect = {
type = random
chance = 90
effect = { type = add_trait value = illness }
}
}
}
character_event = {
id = 20008
picture = "event_intrigue"
name = "Ruler is forced to abdicate"
trigger = {
condition = { type = ruler }
}
mean_time_to_happen = {
months = 960
modifier = {
condition = { type = trait value = arbitrary }
factor = 0.9
}
modifier = {
condition = { type = trait value = cruel }
factor = 0.9
}
modifier = {
condition = { type = trait value = coward }
factor = 0.9
}
modifier = {
condition = { type = trait value = lazy }
factor = 0.9
}
modifier = {
condition = { type = trait value = inbred }
factor = 0.8
}
modifier = {
condition = { type = trait value = maniac }
factor = 0.8
}
modifier = {
condition = { type = trait value = schizofrenia }
factor = 0.8
}
modifier = {
condition = { type = trait value = excommunicated }
factor = 0.7
}
modifier = {
condition = { type = trait value = heretic }
factor = 0.7
}
modifier = {
condition = { type = trait value = energetic }
factor = 1.2
}
modifier = {
condition = { type = trait value = generous }
factor = 1.2
}
modifier = {
condition = { type = trait value = just }
factor = 1.2
}
modifier = {
condition = { type = trait value = valorous }
factor = 1.2
}
modifier = {
condition = { type = trait value = wise }
factor = 1.2
}
modifier = {
condition = {
type = not
value = { type = stewardship value = 5 }
}
factor = 0.9
}
modifier = {
condition = { type = stewardship value = 7 }
condition = {
type = not
value = { type = stewardship value = 10 }
}
factor = 1.2
}
modifier = {
condition = { type = stewardship value = 10}
factor = 1.5
}
modifier = {
condition = {
type = not
value = { type = intrigue value = 5 }
}
factor = 0.9
}
modifier = {
condition = { type = intrigue value = 7 }
condition = {
type = not
value = { type = intrigue value = 10 }
}
factor = 1.2
}
modifier = {
condition = { type = intrigue value = 10}
factor = 1.5
}
}
action_a = { # Resist the usurpers!
ai_chance = 50
#start AI modifier block
modifier = {
condition = { type = trait value = coward }
factor = 0.1
}
modifier = {
condition = { type = trait value = energetic }
factor = 1.25
}
modifier = {
condition = { type = trait value = lazy }
factor = 0.1
}
modifier = {
condition = { type = trait value = proud }
factor = 1.25
}
modifier = {
condition = { type = trait value = reckless }
factor = 1.5
}
modifier = {
condition = { type = trait value = selfish }
factor = 1.25
}
modifier = {
condition = { type = trait value = valorous }
factor = 1.5
}
modifier = {
condition = { type = trait value = vengeful }
factor = 1.25
}
#end AI modifier block
effect = {
type = random
chance = 10
effect = { type = death }
}
effect = {
type = random
chance = 25
effect = { type = add_trait value = vengeful }
}
effect = { type = death value = random_courtier }
effect = { type = prestige scale = 0.1 }
}
action_b = { # Step down peacefully
ai_chance = 50
effect = { type = death }
}
}
character_event = {
id = 20009
picture = "event_intrigue"
name = "Young ruler is pressured by courtiers"
trigger = {
condition = { type = ruler }
condition = { type = age value = 5 }
condition = {
type = not
value = { type = age value = 16 }
}
}
mean_time_to_happen = {
months = 240
}
immidiate = {
effect = {
type = random
chance = 10
effect = { type = add_trait value = stress_symptom }
}
}
}
character_event = {
id = 20010
picture = "event_education"
name = "Your son is interested in other boys"
trigger = {
condition = { type = ruler_child }
condition = { type = gender value = male }
condition = { type = age value = 12 }
condition = {
type = not
value = {
type = age
value = 20
}
}
condition = {
type = not
value = {
type = trait
value = lustful
}
}
}
mean_time_to_happen = {
months = 960
}
action_a = { # Nothing can be done
ai_chance = 20
#start AI modifier block
modifier = {
condition = { type = father_trait value = merciful }
factor = 2
}
modifier = {
condition = { type = father_trait value = forgiving }
factor = 2
}
modifier = {
condition = { type = father_trait value = zealous }
factor = 0.25
}
modifier = {
condition = { type = father_trait value = cruel }
factor = 0.5
}
#end AI modifier block
effect = { type = fertility value = -7 }
effect = { type = piety value = -100 }
effect = {
type = random
chance = 50
effect = { type = add_trait for = father value = merciful }
}
effect = {
type = random
chance = 5
effect = { type = add_trait for = father value = sceptical }
}
}
action_b = { # Disown him
ai_chance = 80
effect = { type = add_trait value = bastard }
effect = { type = fertility value = -7 }
effect = { type = piety value = -100 }
effect = { type = loyalty value = -0.3 }
effect = {
type = random
chance = 25
effect = { type = add_trait value = stress_symptom }
}
effect = {
type = random
chance = 25
effect = { type = courtier_defect value = none }
}
effect = {
type = random
chance = 50
effect = { type = add_trait for = father value = cruel }
}
effect = {
type = random
chance = 10
effect = { type = add_trait for = father value = zealous }
}
}
}
###########################
#Death - Illness (generic)#
###########################
character_event = {
id = 20011
picture = "event_sickness"
name = "Death from Illness"
trigger = {
condition = {
type = or
condition = { type = trait value = illness }
condition = { type = trait value = plagueinfested }
condition = { type = trait value = leper }
condition = { type = trait value = pneumonia }
condition = { type = trait value = intestinal_worm }
}
}
mean_time_to_happen = {
months = 480
modifier = {
condition = { type = health value = 10 }
factor = 1.5
}
modifier = {
condition = { type = health value = 7 }
factor = 1.0
}
modifier = {
condition = { type = health value = 6 }
factor = 0.9
}
modifier = {
condition = { type = health value = 5 }
factor = 0.9
}
modifier = {
condition = { type = health value = 4 }
factor = 0.8
}
modifier = {
condition = { type = health value = 3 }
factor = 0.75
}
modifier = {
condition = { type = health value = 2 }
factor = 0.7
}
modifier = {
condition = { type = health value = 1 }
factor = 0.1
}
modifier = {
condition = { type = trait value = illness }
factor = 1.2
}
modifier = {
condition = { type = trait value = plagueinfested }
factor = 0.3
}
modifier = {
condition = { type = trait value = pneumonia }
factor = 0.5
}
modifier = {
condition = { type = trait value = intestinal_worm }
condition = {
type = not
value = { type = age value = 11 }
}
factor = 0.6
}
}
immidiate = {
effect = { type = death }
}
}
The last event is a "generic" death from illness event that does not take into account presence or absence of "saintly" traits. Since there is a generic death from old age event, there should be a generic death from illness event too.
EDIT: corrected a few errors
Last edited: