title_succession_laws = {
	#Default Feudal Elective
	feudal_elective_succession_law = {
		can_have = {
			OR = {
				has_government = feudal_government
				AND = {
					has_game_rule = allow_unplayables
					NOT = { has_government = tribal_government }
				}
			}
			highest_held_title_tier >= tier_duchy
			NOR = { #Cultures have their special flavor.
				culture = culture:anglo_saxon
				has_culture_group = culture_group:north_germanic_group
			}
		}
		can_pass = {
			can_change_title_law_trigger = yes
		}
		can_title_have = {
			can_title_have_law_general_trigger = yes
		}
		succession = {
			order_of_succession = election
			election_type = feudal_elective
		}
		flag = elective_succession_law
		title_allegiance_opinion = 10
		revoke_cost = {
			prestige = change_title_succession_law_prestige_cost
		}
		pass_cost = {
			prestige = change_title_succession_law_prestige_cost
		}
	}

	#HRE Succession
	princely_elective_succession_law = {
		can_have = {
			has_government = feudal_government
			highest_held_title_tier = tier_empire
		}
		can_pass = {
			can_change_title_law_trigger = yes
		}
		can_title_have = {
			this = title:e_hre
			can_title_have_law_general_trigger = yes
		}
		succession = {
			order_of_succession = election
			election_type = princely_elective
		}
		flag = elective_succession_law
		title_allegiance_opinion = 10
		modifier = {
			vassal_limit = 20
		}
		revoke_cost = {
			prestige = change_hre_title_succession_law_prestige_cost
		}
		pass_cost = {
			prestige = change_title_succession_law_prestige_cost
		}
	}

	#Witenagemot
	saxon_elective_succession_law = {
		can_have = {
			OR = {
				has_government = feudal_government
				has_government = tribal_government
				has_game_rule = allow_unplayables
			}
			highest_held_title_tier >= tier_kingdom
		}
		can_pass = {
			can_change_title_law_trigger = yes
			culture = culture:anglo_saxon
		}
		can_title_have = {
			can_title_have_law_general_trigger = yes
		}
		succession = {
			order_of_succession = election
			election_type = saxon_elective
		}
		flag = elective_succession_law
		title_allegiance_opinion = 5
		revoke_cost = {
			prestige = change_title_succession_law_prestige_cost
		}
		pass_cost = {
			prestige = change_title_succession_law_prestige_cost
		}
	}
	#Thing
	scandinavian_elective_succession_law = {
		can_have = {
			OR = {
				has_government = feudal_government
				has_government = tribal_government
				has_game_rule = allow_unplayables
			}
			highest_held_title_tier >= tier_duchy
		}
		can_pass = {
			can_change_title_law_trigger = yes
			has_culture_group = culture_group:north_germanic_group
		}
		can_title_have = {
			can_title_have_law_general_trigger = yes
		}
		succession = {
			order_of_succession = election
			election_type = scandinavian_elective
		}
		flag = elective_succession_law
		title_allegiance_opinion = 5
		revoke_cost = {
			prestige = change_title_succession_law_prestige_cost
		}
		pass_cost = {
			prestige = change_title_succession_law_prestige_cost
		}
	}
	#Tanistry
	gaelic_elective_succession_law = {
		can_have = {
			OR = {
				has_government = feudal_government
				has_government = tribal_government
				has_game_rule = allow_unplayables
			}
			highest_held_title_tier >= tier_duchy
		}
		can_pass = {
			can_change_title_law_trigger = yes
			custom_description = {
				OR = {
					has_culture_group = culture_group:brythonic_group
					has_culture_group = culture_group:goidelic_group
				}
				text = succession_laws_must_have_valid_tanistry_culture
			}
		}
		can_title_have = {
			can_title_have_law_general_trigger = yes
		}
		succession = {
			order_of_succession = election
			election_type = gaelic_elective
		}
		flag = elective_succession_law
		title_allegiance_opinion = 5
		revoke_cost = {
			prestige = change_title_succession_law_prestige_cost
		}
		pass_cost = {
			prestige = change_title_succession_law_prestige_cost
		}
	}
	
	#Player Heir
	temporal_head_of_faith_succession_law = {
		can_title_have = {
			is_temporal_head_of_faith_trigger = yes
		}
		should_show_for_title = { # Never show this in the UI, just apply it through script
			always = no
		}
		can_remove_from_title = {
			custom_description = {
				text = succession_laws_must_not_be_temporal
				is_temporal_head_of_faith_trigger = no
			}
		}
		succession = {
			order_of_succession = player_heir
		}
	}
}