CK3 DatabaseCrusader Kings III · 1.20.1.2 “Crozier” · unofficial
Silk & Silverout Tue, Nov 17What's free, what needs the DLC, price →

Scripted effect

hre_assign_dynamic_prince_electors_effect

hre_assign_dynamic_prince_electors_effect = yes

game/common/scripted_effects/00_major_decisions_scripted_effects.txt, line 3612 (188 lines). No parameters.

hre_assign_dynamic_prince_electors_effect is a scripted effect in Crusader Kings III, written at line 3612 of its file. It takes no parameters: hre_assign_dynamic_prince_electors_effect = yes. The game's script calls it in 1 place, among them Restore the Holy Roman Empire (decision). Patch 1.20.1.2, from game/common/scripted_effects/00_major_decisions_scripted_effects.txt.

What it does

Every line of it is script with no tooltip text: the script is below.

The script as written (120 lines of game script)
hre_assign_dynamic_prince_electors_effect = {
	hidden_effect = {
		if = {
			limit = { has_global_variable_list = hre_elector_list }
			clear_global_variable_list = hre_elector_list
		}
		# First try to find 3 Prince-Bishoprics
		ordered_vassal = {
			limit = {
				hre_valid_prince_elector_trigger = yes
				# prince-bishopric
				government_has_flag = government_is_theocracy
				any_held_title = {
					tier >= tier_county
					is_landless_type_title = no
					has_clerical_region = no
				}
			}
			max = 3
			check_range_bounds = no
			order_by = {
				value = 1
				add = sub_realm_size # larger vassals heavily weighted
				if = { # powerful vassals heavily weighted
					limit = { is_powerful_vassal = yes }
					multiply = 10
				}
				if = { # councillors somewhat weighted
					limit = {
						is_powerful_vassal = no
						is_councillor = yes
					}
					multiply = 2
				}
				if = { # same culture as emperor highly preferred
					limit = { culture = root.culture }
					multiply = 4
				}
				if = { # same culture as emperor highly preferred
					limit = {
						culture != root.culture
						culture = { has_same_culture_heritage = root.culture }
					}
					multiply = 2
				}
				if = { # same culture as emperor highly preferred
					limit = {
						capital_province.barony ?= {
							OR = {
								target_is_de_jure_liege_or_above = title:k_bavaria
								target_is_de_jure_liege_or_above = title:k_east_francia
								target_is_de_jure_liege_or_above = title:k_frisia
								target_is_de_jure_liege_or_above = title:k_lotharingia
							}
						}
					}
					multiply = 1.5
				}
				if = {
					limit = {
						any_held_title = { has_clerical_region = yes }
					}
					multiply = 2
				}
			}
			hre_elector_list_save_title_effect = yes
		}
		# Then up to 7 duchies/prince-bishoprics
		while = {
			limit = {
				any_in_global_list = {
					variable = hre_elector_list
					count < 7
				}
			}
			count = 7
			ordered_vassal = {
				limit = {
					hre_valid_prince_elector_trigger = yes
					# prince-bishopric or duchy
					trigger_if = {
						limit = { government_has_flag = government_is_theocracy }
						any_held_title = {
							tier >= tier_county
							is_landless_type_title = no
							has_clerical_region = no
						}
					}
					trigger_else = {
						OR = {
							primary_title.tier >= tier_duchy
							has_character_flag = hre_kingdom_destroyed
						}
					}
				}
				order_by = {
					value = 1
					add = sub_realm_size # larger vassals heavily weighted
					if = { # illustrious houses are heavily weighted
						limit = { exists = dynasty }
						multiply = dynasty.dynasty_prestige_level
					}
					if = { # powerful vassals heavily weighted
						limit = { is_powerful_vassal = yes }
						multiply = 10
					}
					if = { # councillors somewhat weighted
						limit = {
							is_powerful_vassal = no
							is_councillor = yes
						}
						multiply = 2
					}
					if = { # same culture as emperor highly preferred
						limit = { culture = root.culture }
						multiply = 4
					}
					if = { # same culture as emperor highly preferred
						limit = {
							culture != root.culture

As written in game/common/scripted_effects/00_major_decisions_scripted_effects.txt.

The first 120 of its 188 lines; the rest is in game/common/scripted_effects/00_major_decisions_scripted_effects.txt from line 3612.

Where it is used

Every place in common/, events/ and history/ that calls hre_assign_dynamic_prince_electors_effect.

Source: game/common/scripted_effects/00_major_decisions_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.

Spotted a mistake on this page?