
Originally Posted by
Asmodeous
Is there a way to generate events based on age of ruler?
Let me specify the kind of event I'm trying to portray here. King dies, King's 4 year old son steps into reign.
Is there a way that when they step in, you can cause it (based on his age) to trigger an event to give the Child-King an "Underage" or "Child King" flag, that would then work as a trigger to other events within the kingdom?
For instance, say you have a very popular governor that has Loyalty < 50% to begin with, and the Child-King rises to power, the Governor/General/Whatever is insulted that he would then have to work for such an inept child, and it would allow for a series of events that would reduce his loyalty further, spark rebellions, civil war, etc?
Me.
Edit: Oh, and then when the child-king comes of age (say 16-17), another event would trigger automatically that would remove the flag....
Glancing over the childhood events, yes ^_^ .
To code an example of the event you have in mind...
Code:
character_event = {
id = 80040
triggers = {
NOT = { loyalty = 50 }
popularity = 75
is_governor = yes
country = {
any_child = {
is_ruler = yes
NOT = { age = 14 }
}
}
}
mean_time_to_happen = {
months = 24
modifier = { factor = .5
traits = proud }
}
title = "I won't serve a sniveling whelp!"
desc = "My pride compels me to disloyalty."
option = {
name = "Just try and order me!"
ai chance = { factor = 100 }
loyalty = -10
}
}
Alternately, you could do this...
Code:
character_event = {
id = 80041
trigger = {
is_ruler = yes
age = 14
}
mean_time_to_happen = {
months = 1
}
title = "I am a child king."
desc = "I am too young to know any know better."
option = {
name = "Poor me"
clr_character_flag = childking
}
}
character_event = {
id = 80042
trigger = {
any_child = {
is_ruler = yes
NOT = { age = 14 }
}
mean_time_to_happen = {
months = 1
}
title = "I am no longer a child king."
desc = "I know better now."
option = {
name = "Poor me"
set_character_flag = childking
}
}
To get your tag for events. Essentially, you can check for the tag, or is_ruler and age.
I don't think the any_child scope is necessary, but I threw it in anyway.
A Child King trait would be handy, though, to have a penalty to ruler popularity; you could have a similar tag for a senile king.