Inspired by a thread on collapsing AI realm in GD, I tried to script some AI-events to de-throne rulers with bad stats, i.e. madness, schizophrenia, heretic and excommunicated. These are first trials and the only test I performed was to load CK to see if I get an error message at start.
Currently, I have 3 events:
1) A palace revolt against a mad or schizophrenic ruler.
2) A palace revolt against a heretic or excommunicated ruler.
3) A vassal revolt against a heretic or excommunicated ruler.
I use low MTTH because these traits can ruin a Kingdom quite quickly. Also, I am not sure whether the law-change to elective works before the inheritance as I would want it.
Please comment.
Event 1:
Event 2:
Event 3:
Currently, I have 3 events:
1) A palace revolt against a mad or schizophrenic ruler.
2) A palace revolt against a heretic or excommunicated ruler.
3) A vassal revolt against a heretic or excommunicated ruler.
I use low MTTH because these traits can ruin a Kingdom quite quickly. Also, I am not sure whether the law-change to elective works before the inheritance as I would want it.
Please comment.
Event 1:
Code:
##############################################
# Mad ruler ousted by palace revolt #
##############################################
character_event = {
id = 90100
picture = "event_intrigue"
name = "He has gone mad. We have to get rid of him!"
trigger = {
condition = { type = ai }
condition = { type = ruler }
condition = {
type = or
condition = { type = trait value = maniac }
condition = { type = trait value = schizofrenia }
}
}
mean_time_to_happen = {
months = 12
}
immidiate = {
effect = { type = death }
}
}
Event 2:
Code:
##############################################
# Heretic ruler ousted by palace revolt #
##############################################
character_event = {
id = 90101
picture = "event_intrigue"
name = "God will punish us all if we do not act now!"
trigger = {
condition = { type = ai }
condition = { type = ruler }
condition = {
type = or
condition = { type = trait value = heretic }
condition = { type = trait value = excommunicated }
}
}
mean_time_to_happen = {
months = 36
modifier = {
condition = { type = intrigue value = 1 }
condition = {
type = not
value = {
type = intrigue
value = 2
}
}
factor = 0.6
}
modifier = {
condition = { type = intrigue value = 2 }
condition = {
type = not
value = {
type = intrigue
value = 3
}
}
factor = 0.7
}
modifier = {
condition = { type = intrigue value = 3 }
condition = {
type = not
value = {
type = intrigue
value = 4
}
}
factor = 0.8
}
modifier = {
condition = { type = intrigue value = 4 }
condition = {
type = not
value = {
type = intrigue
value = 5
}
}
factor = 0.9
}
modifier = {
condition = { type = intrigue value = 5 }
condition = {
type = not
value = {
type = intrigue
value = 6
}
}
factor = 1
}
modifier = {
condition = { type = intrigue value = 6 }
condition = {
type = not
value = {
type = intrigue
value = 7
}
}
factor = 1.1
}
modifier = {
condition = { type = intrigue value = 7 }
condition = {
type = not
value = {
type = intrigue
value = 8
}
}
factor = 1.2
}
modifier = {
condition = { type = intrigue value = 8 }
condition = {
type = not
value = {
type = intrigue
value = 9
}
}
factor = 1.3
}
modifier = {
condition = { type = intrigue value = 9 }
condition = {
type = not
value = {
type = intrigue
value = 10
}
}
factor = 1.4
}
modifier = {
condition = { type = intrigue value = 10 }
factor = 1.5
}
}
immidiate = {
effect = { type = death }
effect = { type = death value = random_courtier }
}
}
Event 3:
Code:
##############################################
# Heretic ruler ousted by vassal revolt #
##############################################
character_event = {
id = 90102
picture = "event_intrigue"
name = "The rule of the heretic is unbearable. We have to act know with the church at our side."
trigger = {
condition = { type = ai }
condition = { type = ruler }
condition = { type = religion value = catholic }
condition = { type = has_vassal }
condition = {
type = or
condition = { type = trait value = heretic }
condition = { type = trait value = excommunicated }
}
}
mean_time_to_happen = {
months = 60
modifier = {
condition = { type = intrigue value = 1 }
condition = {
type = not
value = {
type = intrigue
value = 2
}
}
factor = 0.6
}
modifier = {
condition = { type = intrigue value = 2 }
condition = {
type = not
value = {
type = intrigue
value = 3
}
}
factor = 0.7
}
modifier = {
condition = { type = intrigue value = 3 }
condition = {
type = not
value = {
type = intrigue
value = 4
}
}
factor = 0.8
}
modifier = {
condition = { type = intrigue value = 4 }
condition = {
type = not
value = {
type = intrigue
value = 5
}
}
factor = 0.9
}
modifier = {
condition = { type = intrigue value = 5 }
condition = {
type = not
value = {
type = intrigue
value = 6
}
}
factor = 1
}
modifier = {
condition = { type = intrigue value = 6 }
condition = {
type = not
value = {
type = intrigue
value = 7
}
}
factor = 1.1
}
modifier = {
condition = { type = intrigue value = 7 }
condition = {
type = not
value = {
type = intrigue
value = 8
}
}
factor = 1.2
}
modifier = {
condition = { type = intrigue value = 8 }
condition = {
type = not
value = {
type = intrigue
value = 9
}
}
factor = 1.3
}
modifier = {
condition = { type = intrigue value = 9 }
condition = {
type = not
value = {
type = intrigue
value = 10
}
}
factor = 1.4
}
modifier = {
condition = { type = intrigue value = 10 }
factor = 1.5
}
}
immidiate = {
effect = { type = set_law value = elective_law }
effect = { type = death }
effect = { type = loyalty for = worst_vassal value = 0.25 }
effect = { type = loyalty for = random_vassal value = 0.1 }
effect = { type = loyalty for = random_vassal value = -0.1 }
effect = { type = loyalty for = best_vassal value = -0.25 }
}
}