﻿# Quartermaster Position
# This file adds the Quartermaster position to the game.
# It focuses on Stewardship and provides army supply, movement and travel speed bonuses.

quartermaster_court_position = { 
	sort_order = 260 
	max_available_positions = 1
	skill = stewardship 

	court_position_asset = {
		animation = survey_staff 
		background = "gfx/interface/illustrations/event_scenes/ep2_travel_bridge.dds" 
	}

	opinion = {
		value = regular_court_position_opinion
	}

	aptitude_level_breakpoints = { 20 40 60 80 }

	
	aptitude = {
		value = 20
		add = {
			value = stewardship 
			multiply = 3.0
			max = 60
			desc = court_position_skill_stewardship
		}
		# Pros
		if = {
			limit = { has_trait = brave }
			add = { value = 5  desc = court_position_brave_trait }
		}
		if = {
			limit = { has_trait = temperate } 
			add = { value = 20 desc = court_position_temperate_trait }
		}
		if = {
			limit = { has_trait = logistician  } 
			add = { value = 40 desc = court_position_logistician_trait }
		}
		if = {
			limit = { has_trait = diligent } 
			add = { value = 15 desc = court_position_diligent_trait }
		}
		if = {
			limit = { has_trait = organizer  } 
			add = { value = 15 desc = court_position_organizer_trait }
		}
		if = {
			limit = { has_trait = education_stewardship }
			add = {
				value = 4
				if = {
					limit = { has_trait = education_stewardship_2 }
					add = 4
				}
				else_if = {
					limit = { has_trait = education_stewardship_3 }
					add = 8
				}
				else_if = {
					limit = { has_trait = education_stewardship_4 }
					add = 12
				}
				else_if = {
					limit = { has_trait = education_stewardship_5 }
					add = 22
				}
				desc = education_stewardship
			}
		}
		if = {
			limit = {
				has_trait = intellect_good_3
			}
			add = {
				value = 40
				desc = court_position_intellect_good_3_trait
			}
		}
		else_if = {
			limit = {
				has_trait = intellect_good_2
			}
			add = {
				value = 20
				desc = court_position_intellect_good_2_trait
			}
		}
		else_if = {
			limit = {
				has_trait = intellect_good_1
			}
			add = {
				value = 10
				desc = court_position_intellect_good_1_trait
			}
		}

		# Cons
		if = {
			limit = { has_trait = drunkard  } 
			add = { value = -40 desc = court_position_drunkard_trait }
		}
		if = {
			limit = { has_trait = lazy } 
			add = { value = -20 desc = court_position_lazy_trait }
		}
		if = {
			limit = { has_trait = arbitrary }
			add = { value = -15 desc = court_position_arbitrary_trait }
		}
	}

	is_shown = {
		has_ep1_court_positions_dlc_trigger = yes
		highest_held_title_tier >= 3 
	}

	valid_position = {
		highest_held_title_tier >= 3
		is_landless_adventurer = no
	}

	valid_character = {
		scope:employee = {
			is_imprisoned = no
			is_adult = yes
			is_ruler = no
		}
	}

	revoke_cost = {
		prestige = {
			value = major_court_position_prestige_revoke_cost
		}
	}

	salary = {
		gold = 0.9 
		prestige = 0.3
	}

	scaling_employer_modifiers = {
		terrible = {
			supply_capacity_mult = 0.010			
			supply_duration = 0.010
			supply_capacity_add = 1
		}
		poor = {
			supply_capacity_mult = 0.050 			
			supply_duration = 0.050
			supply_capacity_add = 5
		}
		average = {
			supply_capacity_mult = 0.10			
			supply_duration = 0.10
			supply_capacity_add = 10
		}
		good = {
			supply_capacity_mult = 0.15			
			supply_duration = 0.15
			supply_capacity_add = 15
		}
		excellent = {
			supply_capacity_mult = 0.20 			
			supply_duration = 0.20
			supply_capacity_add = 20
		}
	}


	modifier = {
		stewardship = 2 
		monthly_prestige = 0.3
	}

	candidate_score = {
		value = 50
		add = scope:base_value
		add = court_position_candidate_score_base_value
		add = court_position_candidate_aptitude_value
		
		if = {
			limit = {
				scope:liege = {
					has_trait = scholar
				}
			}
			add = 30
		}
		
		add = court_position_debt_considerations_value
	}
}