﻿#By Uber (KOH)
# COURT POSITIONS
# Co-Emperor

King_of_the_germans_court_position = {
	skill = martial
	max_available_positions = 1
	sort_order = 333
	minimum_rank = empire

	court_position_asset = {
		animation = marshal
		background = "gfx/interface/illustrations/event_scenes/throneroom_west.dds"
	}

	opinion = {
		value = King_of_the_germans_court_position_opinion 
	}
	
	# How high the aptitude has to be to reach the 5 different modifier levels
	aptitude_level_breakpoints = { 20 40 60 80 }
	
	# How good is this character in this position? root scope is the holder of the court position
	aptitude = {
		value = King_of_the_germans_court_position_aptitude_value
	}
	
	# Is this an available position for this court? (root is court owner)
	is_shown = {
		is_ai = no
		has_title = title:e_hre
		faith = faith:catholic
		OR = {
			has_trait = HRT_emperor
			has_trait = COR_crowned_by_myself
		}
	}
	
	is_shown_character = {
		is_shown_character_King_of_the_germans_candidate = yes
	}

	# Is this a valid position for this character? Also checks the scripted rule "is_eligible_for_court_positions" in code. (root is potential position holder)
	valid_character = {
		scope:employee = {
			is_shown_character_King_of_the_germans_candidate = yes
		}
	}
	
	revoke_cost = {
		prestige = King_of_the_germans_court_position_prestige_revoke_cost
	}
	
	salary = {
		round = no
		prestige = major_court_position_salary  
	}

	# These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints) 
	scaling_employer_modifiers = {
		terrible = {
			vassal_opinion = -15
			stress_gain_mult = 0.2
		}
		poor = {
			vassal_opinion = -10
			stress_gain_mult = 0.1
		}
		average = {
			vassal_opinion = 0
			#stress_gain_mult = 0
		}
		good = {
			vassal_opinion = 5
			stress_gain_mult = -0.1
		}
		excellent = {
			vassal_opinion = 10
			stress_gain_mult = -0.2
		}
	}

	custom_employer_modifier_description = King_of_the_germans_employer_custom_effect_description
		
	modifier = {
		monthly_prestige = King_of_the_germans_court_position_prestige_salary
		fellow_vassal_opinion = 15
		enemy_hostile_scheme_phase_duration_add = medium_scheme_phase_duration_malus_value

	}
	
	on_court_position_received = {
		basic_gained_court_position_effect = yes
		King_of_the_germans_gained_court_position_effect = yes
	}
	on_court_position_revoked = {
		basic_revoked_court_position_effect = yes
		King_of_the_germans_revoked_court_position_effect = yes
	}
	on_court_position_invalidated = {
		King_of_the_germans_invalidated_court_position_effect = yes
	}
	candidate_score = {
		value = King_of_the_germans_court_position_candidate_score_value
	}
}