CK2Plus_Rewrite icon indicating copy to clipboard operation
CK2Plus_Rewrite copied to clipboard

Core: Legitimacy/Control Mechanic

Open schwarherz opened this issue 6 years ago • 8 comments

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).

schwarherz avatar Nov 19 '19 12:11 schwarherz

For which title tiers do we want to implement these two mechanics?

Whizzer avatar Nov 19 '19 18:11 Whizzer

I was thinking of making them universal

schwarherz avatar Nov 19 '19 20:11 schwarherz

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.

Whizzer avatar Nov 19 '19 20:11 Whizzer

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

schwarherz avatar Nov 19 '19 20:11 schwarherz

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.

Whizzer avatar Nov 19 '19 20:11 Whizzer

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)

schwarherz avatar Nov 19 '19 21:11 schwarherz

The simpler this can be, the better. I'll leave you to it.

Whizzer avatar Nov 19 '19 21:11 Whizzer

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

	}
}

schwarherz avatar Nov 21 '19 22:11 schwarherz