﻿court_librarian_position = {
	sort_order = 190
	max_available_positions = 1
	minimum_rank = duchy
	skill = learning
	
	court_position_asset = {
		animation = reading
		background = "gfx/interface/illustrations/event_scenes/bp1_relaxing_room_western.dds"
	}

	opinion = {	scope:liege = 		{ value = regular_court_position_opinion	}
				scope:employee = 	{ value = regular_court_position_opinion	}	}
	
	aptitude_level_breakpoints = { 20 40 60 80 }
	aptitude = court_position_aptitude_courtlibrarian_base

	is_shown = { 
		highest_held_title_tier >= tier_county 
	}
	valid_position = {
		highest_held_title_tier >= tier_duchy
	}

	is_shown_character = {
		scope:employee = {
			is_courtier_of = scope:liege
		}
	}

	valid_character = {
		scope:employee = {	court_librarian_validity_trigger = { EMPLOYER = scope:liege }	}
	}
	
	revoke_cost = {
		gold =  {
			value = small_court_position_gold_revoke_cost
			# Set to 0 with Dynasty Perk Inner Circle
			if = {
				limit = {
					exists = dynasty
					dynasty = { has_dynasty_perk = fp2_coterie_legacy_1 }

					employs_court_position = court_librarian_position
					any_court_position_holder = {
				        type = lord_sheriff_position
						exists = dynasty
						house = prev.house
					}
				}
				multiply = 0
			}
		}
		prestige =  {
			value = minor_court_position_prestige_revoke_cost

			# Set to 0 with Dynasty Perk Inner Circle
			if = {
				limit = {
					exists = dynasty
					dynasty = { has_dynasty_perk = fp2_coterie_legacy_1 }

					employs_court_position = court_librarian_position
					any_court_position_holder = {
				        type = court_librarian_position
						exists = dynasty
						house = prev.house
					}
				}
				multiply = 0
			}
		}
	}

	salary = {
		round = no
		gold = {
			value = minor_court_position_salary
			# Set to 0 with Dynasty Perk Inner Circle
			if = {
				limit = {
					scope:liege = {
						exists = dynasty
						dynasty = { has_dynasty_perk = fp2_coterie_legacy_1 }

						employs_court_position = court_librarian_position
						any_court_position_holder = {
					        type = court_librarian_position
							exists = dynasty
							house = prev.house
						}
					}
				}
				multiply = {
					value = 0.0
					desc = inner_circle_salary_mod
					format = "BASE_VALUE_FORMAT_DECIMALS_MINUS_POSITIVE"
				}
			}
		}
	}
	
	base_employer_modifier = {
		monthly_prestige = 0.05
	}

	modifier = {
		learning = 1
		monthly_learning_lifestyle_xp_gain_mult = 0.3
		monthly_prestige = 0.5
		monthly_dread = 0.0
		monthly_piety = 0.0
	}

	scaling_employer_modifiers = {
		terrible = {
			cultural_head_fascination_mult = 0.03
		}
		poor = {
			cultural_head_fascination_mult = 0.06
		}
		average = {
			cultural_head_fascination_mult = 0.09
		}
		good = {
			cultural_head_fascination_mult = 0.12
		}
		excellent = {
			cultural_head_fascination_mult = 0.15
		}
	}

	custom_scaling_employer_modifier_description = {		
		terrible = 	desc_courtlibrarian_terrible
		poor = 		desc_courtlibrarian_poor
		average = 	desc_courtlibrarian_average
		good = 		desc_courtlibrarian_good
		excellent = desc_courtlibrarian_excellent
		range = 	desc_courtlibrarian_range
	}

	on_court_position_received = {
		basic_gained_court_position_effect = yes
	}
	on_court_position_revoked = { 
		basic_revoked_court_position_effect = yes
	}
	on_court_position_invalidated = {
		basic_invalidated_court_position_effect = yes
	}
	on_court_position_vacated = {		court_position_vacated_event_effect = {	COURT_POSITION_TYPE = court_librarian_position	}	}

	candidate_score = {
		value = 50
		add = scope:base_value
		add = court_position_candidate_score_ket_base_value
		add = court_position_candidate_aptitude_ket_value
		add = court_position_debt_considerations_ket_value
		add = court_position_royal_advantage_ket_value
	}
}
