Core: Legitimacy/Control Mechanic
Similar to old Imperial Decadence, add a system representing the Legitimacy and Control for each title. Legitimacy is how firm your hold is on the title (e.g. how contested your succession is/was and whether your title, overall, is seen as the legitimate ruler of the lands it controls) Control is how much control you have over your realm, overall and is heavily influenced by average vassal opinion (if that can be calculated).
For which title tiers do we want to implement these two mechanics?
I was thinking of making them universal
In that case, we'll no doubt have to keep performance in mind while implementing this. I'm fairly certain we can calculate a weighted average opinion of the top 10 or 20 vassals, possibly all of them. Probably best to do that on_yearly_pulse.
It could probably be calculated on the fly whenever we need it by manipulating realm_character_percent.
Legitimacy would likely be a bunch of math (still waking up for the day, haven't thought of all of the variables yet) divided by ruled_years.
Ideally, they'd both be variables that are only calculated when they're needed instead of having to be stored somewhere
That last part can be done if we recalculate upon game start and loading a save and set the variables to zero, so they won't be part of the save itself.
I'm thinking it shouldn't need to be stored at all. When we settle on a formula for them we can just have the engine do the math whenever it's needed. A succession/monthly pulse that influences revolt risk, for instance. They numbers themselves aren't important enough to save between calculations (besides, that tends to lead to a mana feeling and having to account for changing the number in nearly every event and that's just ugh annoying)
The simpler this can be, the better. I'll leave you to it.
So I think for control it should be something like this:
realm_control = {
# High Control
trigger_if = {
limit = {
realm_character_percent = {
target = 50.0
opinion = { who = ROOT value = 25 }
}
# Some Action Here
}
}
# Mid Control
trigger_else_if = {
limit = {
realm_character_percent = {
target = 25.0
opinion = { who = ROOT value = 25 }
}
}
# Some Action Here
}
# Low Control
trigger_else = {
# Some Action Here
}
}