﻿### skill Traits

#Commander Skills
resupply_commander = {
	type = skill
	texture = gfx/interface/icons/character_trait_icons/resupply_commander.dds

	command_modifier = {
		unit_supply_consumption_mult = -0.1
		# character_supply_route_cost_mult = -0.1
		character_battle_condition_logistics_secured_mult = 1
		character_battle_condition_broken_supply_line_mult = -0.9
	}

	possible = {
		has_role = general
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = {
		value = 10
		if = {
			limit = {
				owner ?= {
					has_technology_researched = logistics
				}
			}
			multiply = 2
		}
		if = {
			limit = {
				has_trait = meticulous
			}
			multiply = 3
		}
	}

	replace = {
	}

	value = 2
}

pillager = {
	type = skill
	texture = gfx/interface/icons/character_trait_icons/pillager.dds

	command_modifier = {
		character_supply_route_cost_mult = -0.5
		unit_devastation_mult = 0.25
	}

	possible = {
		has_role = general
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = 10

	replace = {
	}

	value = 2
}

surveyor = {
	type = skill
	texture = gfx/interface/icons/character_trait_icons/surveyor.dds

	command_modifier = {
		battle_offense_owned_province_mult = 0.1
		battle_defense_owned_province_mult = 0.1
		character_battle_condition_charted_terrain_mult = 2
		character_battle_condition_good_visibility_mult = 1
	}

	possible = {
		has_role = general
	}

	weight = 10

	replace = {
	}

	value = 2
}

forest_commander = {
	type = skill
	texture = gfx/interface/icons/character_trait_icons/forest_commander.dds

	command_modifier = {
		unit_defense_forested_mult = 0.2
	}

	possible = {
		has_role = general
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = 10

	replace = {
	}

	value = 2
}

plains_commander = {
	type = skill
	texture = gfx/interface/icons/character_trait_icons/plains_commander.dds

	command_modifier = {
		unit_offense_flat_mult = 0.2
	}

	possible = {
		has_role = general
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = 10

	replace = {
	}

	value = 2
}

mountain_commander = {
	type = skill
	texture = gfx/interface/icons/character_trait_icons/mountain_commander.dds

	command_modifier = {
		unit_defense_elevated_mult = 0.2
	}

	possible = {
		has_role = general
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = 10

	replace = {
	}

	value = 2
}

basic_artillery_commander = {
 	type = skill
	texture = gfx/interface/icons/character_trait_icons/basic_artillery_commander.dds

 	command_modifier = {
 		unit_combat_unit_type_cannon_artillery_offense_mult = 0.05
		unit_combat_unit_type_mobile_artillery_offense_mult = 0.05
		unit_combat_unit_type_shrapnel_artillery_offense_mult = 0.05
		unit_combat_unit_type_siege_artillery_offense_mult = 0.05
		unit_combat_unit_type_heavy_tank_offense_mult = 0.05
 		character_battle_condition_aggressive_maneuver_mult = 1
 		character_battle_condition_mud_mult = 0.2
 	}

 	possible = {
 		has_role = general
 		owner ?= {
 			has_technology_researched = artillery
 		}
 		NOR = {
 			has_trait = experienced_artillery_commander
 			has_trait = expert_artillery_commander
 		}
 		NOT = { age < define:NCharacters|ADULT_AGE }
 	}

 	weight = {
 		value = 2
		if = {
			limit = {
				owner = {
					any_military_formation = {
						is_army = yes
						any_scope_general = {
							this = root
						}
						formation_army_unit_type_fraction = {  
							target = unit_type:combat_unit_type_cannon_artillery  
							value >= 0.20  
						}  
					}
				}
			}
			multiply = 2
		}
		if = {
			limit = {
				owner = {
					any_military_formation = {
						is_army = yes
						any_scope_general = {
							this = root
						}
						formation_army_unit_type_fraction = {  
							target = unit_type:combat_unit_type_mobile_artillery  
							value >= 0.20  
						}  
					}
				}
			}
			multiply = 5
		}
		if = {
			limit = {
				owner = {
					any_military_formation = {
						is_army = yes
						any_scope_general = {
							this = root
						}
						formation_army_unit_type_fraction = {  
							target = unit_type:combat_unit_type_shrapnel_artillery  
							value >= 0.20  
						}  
					}
				}
			}
			multiply = 10
		}
		if = {
			limit = {
				owner = {
					any_military_formation = {
						is_army = yes
						any_scope_general = {
							this = root
						}
						formation_army_unit_type_fraction = {  
							target = unit_type:combat_unit_type_siege_artillery
							value >= 0.20  
						}  
					}
				}
			}
			multiply = 20
		}
		if = {
			limit = {
				owner = {
					any_military_formation = {
						is_army = yes
						any_scope_general = {
							this = root
						}
						formation_army_unit_type_fraction = {  
							target = unit_type:combat_unit_type_heavy_tank
							value >= 0.20  
						}  
					}
				}
			}
			multiply = 50
		}
 	}

 	replace = {
		inexperienced
 	}

 	value = 1
}

experienced_artillery_commander = {
	type = skill
	texture =gfx/interface/icons/character_trait_icons/experienced_artillery_commander.dds

	command_modifier = {
		unit_combat_unit_type_cannon_artillery_offense_mult = 0.1
		unit_combat_unit_type_mobile_artillery_offense_mult = 0.1
		unit_combat_unit_type_shrapnel_artillery_offense_mult = 0.1
		unit_combat_unit_type_siege_artillery_offense_mult = 0.1
		unit_combat_unit_type_heavy_tank_offense_mult = 0.1
		character_battle_condition_aggressive_maneuver_mult = 2
		character_battle_condition_mud_mult = 0.1
	}

	possible = {
		has_trait = basic_artillery_commander
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = {
		value = 5
		if = {
			limit = {
				owner = {
					any_military_formation = {
						is_army = yes
						any_scope_general = {
							this = root
						}
						formation_army_unit_type_fraction = {  
							target = unit_type:combat_unit_type_mobile_artillery  
							value >= 0.20  
						}  
					}
				}
			}
			multiply = 5
		}
		if = {
			limit = {
				owner = {
					any_military_formation = {
						is_army = yes
						any_scope_general = {
							this = root
						}
						formation_army_unit_type_fraction = {  
							target = unit_type:combat_unit_type_shrapnel_artillery  
							value >= 0.20  
						}  
					}
				}
			}
			multiply = 10
		}
		if = {
			limit = {
				owner = {
					any_military_formation = {
						is_army = yes
						any_scope_general = {
							this = root
						}
						formation_army_unit_type_fraction = {  
							target = unit_type:combat_unit_type_siege_artillery
							value >= 0.20  
						}  
					}
				}
			}
			multiply = 20
		}
		if = {
			limit = {
				owner = {
					any_military_formation = {
						is_army = yes
						any_scope_general = {
							this = root
						}
						formation_army_unit_type_fraction = {  
							target = unit_type:combat_unit_type_heavy_tank
							value >= 0.20  
						}  
					}
				}
			}
			multiply = 50
		}
	}

	replace = {
		basic_artillery_commander
	}

	value = 2
}

expert_artillery_commander = {
	type = skill
	texture =gfx/interface/icons/character_trait_icons/expert_artillery_commander.dds

	command_modifier = {
		unit_combat_unit_type_cannon_artillery_offense_mult = 0.15
		unit_combat_unit_type_mobile_artillery_offense_mult = 0.15
		unit_combat_unit_type_shrapnel_artillery_offense_mult = 0.15
		unit_combat_unit_type_siege_artillery_offense_mult = 0.15
		unit_combat_unit_type_heavy_tank_offense_mult = 0.15
		character_battle_condition_aggressive_maneuver_mult = 3
		character_battle_condition_mud_mult = 0.5
	}

	possible = {
		has_trait = experienced_artillery_commander
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = {
		value = 5
		if = {
			limit = {
				owner = {
					any_military_formation = {
						is_army = yes
						any_scope_general = {
							this = root
						}
						formation_army_unit_type_fraction = {  
							target = unit_type:combat_unit_type_shrapnel_artillery  
							value >= 0.20  
						}  
					}
				}
			}
			multiply = 10
		}
		if = {
			limit = {
				owner = {
					any_military_formation = {
						is_army = yes
						any_scope_general = {
							this = root
						}
						formation_army_unit_type_fraction = {  
							target = unit_type:combat_unit_type_siege_artillery
							value >= 0.20  
						}  
					}
				}
			}
			multiply = 20
		}
		if = {
			limit = {
				owner = {
					any_military_formation = {
						is_army = yes
						any_scope_general = {
							this = root
						}
						formation_army_unit_type_fraction = {  
							target = unit_type:combat_unit_type_heavy_tank
							value >= 0.20  
						}  
					}
				}
			}
			multiply = 50
		}
	}

	replace = {
		experienced_artillery_commander
	}

	value = 3
}

stalwart_defender = {
	type = skill
	texture =gfx/interface/icons/character_trait_icons/stalwart_defender.dds

	command_modifier = {
		unit_defense_mult = 0.1
	}

	possible = {
		has_role = general
		owner ?= {
			has_technology_researched = field_works
		}
		NOR = {
			has_trait = trench_rat
			has_trait = defense_in_depth_specialist
		}
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = 10

	replace = {
		
	}

	value = 1
}

trench_rat = {
	type = skill
	texture =gfx/interface/icons/character_trait_icons/trench_rat.dds

	command_modifier = {
		unit_defense_mult = 0.05
		character_battle_condition_careful_maneuver_mult = 1
		character_battle_condition_surprise_maneuver_mult = 1
	}

	possible = {
		has_trait = stalwart_defender
		owner ?= {
			has_technology_researched = trench_works
		}
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = {
		value = 10
		if = {
			limit = {
				commander_military_formation = {
					OR = {
						formation_army_unit_type_fraction = {
							target = unit_type:combat_unit_type_trench_infantry
							value >= 0.25
						}
						formation_army_unit_type_fraction = {
							target = unit_type:combat_unit_type_squad_infantry
							value >= 0.25
						}
					}
				}
			}
			multiply = 5
		}
	}

	replace = {
		stalwart_defender
	}

	value = 2
}

defense_in_depth_specialist = {
	type = skill
	texture =gfx/interface/icons/character_trait_icons/defense_in_depth_specialist.dds

	command_modifier = {
		unit_defense_mult = 0.1
		character_battle_condition_careful_maneuver_mult = 2
		character_battle_condition_surprise_maneuver_mult = 2
	}

	possible = {
		has_trait = trench_rat
		owner ?= {
			has_technology_researched = defense_in_depth
		}
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = {
		value = 10
		if = {
			limit = {
				commander_military_formation = {
					OR = {
						formation_army_unit_type_fraction = {
							target = unit_type:combat_unit_type_trench_infantry
							value >= 0.25
						}
						formation_army_unit_type_fraction = {
							target = unit_type:combat_unit_type_squad_infantry
							value >= 0.25
						}
					}
				}
			}
			multiply = 5
		}
	}

	replace = {
		trench_rat
	}

	value = 3
}

basic_offensive_planner = {
	type = skill
	texture =gfx/interface/icons/character_trait_icons/basic_offensive_planner.dds

	command_modifier = {
		unit_offense_mult = 0.05
		character_battle_condition_surprise_maneuver_mult = 1
	}

	possible = {
		has_role = general
		owner ?= {
			has_technology_researched = napoleonic_warfare
		}
		NOR = {
			has_trait = experienced_offensive_planner
			has_trait = expert_offensive_planner
		}
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = 20

	replace = {
		inexperienced
	}

	value = 1
}

experienced_offensive_planner = {
	type = skill
	texture =gfx/interface/icons/character_trait_icons/experienced_offensive_planner.dds

	command_modifier = {
		unit_offense_mult = 0.1
		character_battle_condition_surprise_maneuver_mult = 2
	}

	possible = {
		has_trait = basic_offensive_planner
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = 50

	replace = {
		basic_offensive_planner
	}

	value = 2
}

expert_offensive_planner = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/expert_offensive_planner.dds"

	command_modifier = {
		unit_offense_mult = 0.15
		character_battle_condition_surprise_maneuver_mult = 3
	}

	possible = {
		has_trait = experienced_offensive_planner
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = 50

	replace = {
		experienced_offensive_planner
	}

	value = 3
}

basic_defensive_strategist = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/basic_defensive_strategist.dds"

	command_modifier = {
		unit_defense_mult = 0.05
		character_battle_condition_dug_in_mult = 1
		character_battle_condition_camouflaged_mult = 1
	}

	possible = {
		has_role = general
		owner ?= {
			has_technology_researched = military_drill
		}
		NOR = {
			has_trait = experienced_defensive_strategist
			has_trait = expert_defensive_strategist
		}
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = 20

	replace = {
		inexperienced
	}

	value = 1
}

experienced_defensive_strategist = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/experienced_defensive_strategist.dds"

	command_modifier = {
		unit_defense_mult = 0.1
		character_battle_condition_dug_in_mult = 2
		character_battle_condition_camouflaged_mult = 2
	}

	possible = {
		has_trait = basic_defensive_strategist
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = 50

	replace = {
		basic_defensive_strategist
	}

	value = 2
}

expert_defensive_strategist = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/expert_defensive_strategist.dds"

	command_modifier = {
		unit_defense_mult = 0.15
		character_battle_condition_dug_in_mult = 3
		character_battle_condition_camouflaged_mult = 3
	}

	possible = {
		has_trait = experienced_defensive_strategist
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = 50

	replace = {
		experienced_defensive_strategist
	}

	value = 3
}

#Admiral Skills

basic_naval_commander = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/basic_naval_commander.dds"

	command_modifier = {
		unit_offense_mult = 0.05
		unit_defense_mult = 0.05
	}

	possible = {
		has_role = admiral
		owner ?= {
			has_technology_researched = admiralty
		}
		NOR = {
			has_trait = experienced_naval_commander
			has_trait = expert_naval_commander
		}
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = 20

	replace = {
		inexperienced
	}

	value = 1
}

experienced_naval_commander = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/experienced_naval_commander.dds"

	command_modifier = {
		unit_offense_mult = 0.1
		unit_defense_mult = 0.1
		character_battle_condition_rough_waters_mult = -0.25
	}

	possible = {
		has_trait = basic_naval_commander
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = 50

	replace = {
		basic_naval_commander
	}

	value = 2
}

expert_naval_commander = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/expert_naval_commander.dds"

	command_modifier = {
		unit_offense_mult = 0.15
		unit_defense_mult = 0.15
		character_battle_condition_rough_waters_mult = -0.5
	}

	possible = {
		has_trait = experienced_naval_commander
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = 50

	replace = {
		experienced_naval_commander
	}

	value = 3
}

convoy_raider_commander = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/convoy_raider_commander.dds"

	command_modifier = {
		character_convoy_raiding_mult = 0.1
		unit_combat_unit_type_submarine_offense_mult = 0.1
	}

	possible = {
		has_role = admiral
		owner ?= {
			has_technology_researched = admiralty
		}
		NOR = {
			has_trait = experienced_convoy_raider
			has_trait = expert_convoy_raider
		}
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = {
		value = 10
		if = {
			limit = {
				OR = {
					has_trait = persistent
					has_trait = reckless
					has_trait = cruel
				}
			}
			multiply = 2
		}
	}

	replace = {
	}

	value = 1
}

experienced_convoy_raider = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/experienced_convoy_raider.dds"

	command_modifier = {
		character_convoy_raiding_mult = 0.5
		unit_combat_unit_type_submarine_offense_mult = 0.15
	}

	possible = {
		has_trait = convoy_raider_commander
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = {
		value = 20
		if = {
			limit = {
				OR = {
					has_trait = persistent
					has_trait = reckless
					has_trait = cruel
				}
			}
			multiply = 2
		}
	}

	replace = {
		convoy_raider_commander
	}

	value = 2
}

expert_convoy_raider = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/expert_convoy_raider.dds"

	command_modifier = {
		character_convoy_raiding_mult = 1.5
		unit_combat_unit_type_submarine_offense_mult = 0.25
	}

	possible = {
		has_trait = experienced_convoy_raider
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = {
		value = 20
		if = {
			limit = {
				OR = {
					has_trait = persistent
					has_trait = reckless
					has_trait = cruel
				}
			}
			multiply = 2
		}
	}

	replace = {
		experienced_convoy_raider
	}

	value = 3
}

traditionalist_commander = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/traditionalist_commander.dds"

	command_modifier = {
		character_command_limit_mult = 0.1
		unit_combat_unit_type_carrier_offense_mult = -0.1
	}

	# Reminder: this would only come into effect if this Commander is or becomes a Ruler
	country_modifier = {
		country_prestige_mult = 0.05
	}

	possible = {
		NOR = {
			has_trait = popular_commander
			has_trait = celebrity_commander
		}
		interest_group ?= {
			OR = {
				is_interest_group_type = ig_devout
				is_interest_group_type = ig_landowners
				is_interest_group_type = ig_armed_forces
				is_powerful = yes
			}
		}
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = {
		value = 10
		if = {
			limit = {
				OR = {
					is_interest_group_type = ig_devout
					is_interest_group_type = ig_landowners
					is_interest_group_type = ig_armed_forces
				}
			}
			multiply = 2
		}
	}

	replace = {
	}

	value = 1
}

popular_commander = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/popular_commander.dds"

	character_modifier = {
		character_command_limit_mult = 0.2
	}

	# Reminder: this would only come into effect if this Commander is or becomes a Ruler
	country_modifier = {
		country_prestige_mult = 0.10
	}

	agitator_modifier = {
		interest_group_pol_str_mult = 0.01
	}

	# Reminder: this would only come into effect if this Commander is or becomes an Interest Group Leader
	interest_group_modifier = {
		interest_group_pol_str_mult = 0.02
	}

	possible = {
		OR = {
			popularity > 10
			AND = {
				has_trait = traditionalist_commander
				popularity > 0
			}
		}
		NOT = {
			has_trait = celebrity_commander
		}
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = {
		value = 10
		if = {
			limit = {
				OR = {
					is_interest_group_type = ig_devout
					is_interest_group_type = ig_landowners
					is_interest_group_type = ig_armed_forces
				}
			}
			multiply = 2
			add = popularity
		}
	}

	replace = {
		traditionalist_commander
	}

	value = 2
}

celebrity_commander = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/celebrity_commander.dds"

	character_modifier = {
		character_command_limit_mult = 0.3
		character_popularity_add = 25	# More popularity for being popular is intentional
	}

	# Reminder: this would only come into effect if this Commander is or becomes a Ruler
	country_modifier = {
		country_prestige_mult = 0.15
	}

	agitator_modifier = {
		interest_group_pol_str_mult = 0.025
	}

	# Reminder: this would only come into effect if this Commander is or becomes an Interest Group Leader
	interest_group_modifier = {
		interest_group_pol_str_mult = 0.05
	}

	possible = {
		has_trait = popular_commander
		popularity > 30
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = {
		value = 10
		add = popularity
	}

	replace = {
		popular_commander
	}

	value = 3
}

dockyard_master = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/drydock_repairs.dds"

	command_modifier = {
		unit_supply_consumption_mult = -0.25
		# repair speed
	}

	possible = {
		has_role = admiral
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = {
		value = 10
		if = {
			limit = {
				owner ?= {
					has_technology_researched = logistics
				}
			}
			multiply = 2
		}
		if = {
			limit = {
				has_trait = meticulous
			}
			multiply = 3
		}
	}

	replace = {
	}

	value = 2

}

# Politician Skills

basic_diplomat = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/basic_diplomat.dds"

	character_modifier = {
		character_popularity_add = 10
	}

	command_modifier = {
		unit_morale_recovery_mult = 0.25
	}

	country_modifier = {
		country_influence_mult = 0.05
	}

	possible = {
		NOR = {
			has_trait = experienced_diplomat
			has_trait = masterful_diplomat
		}
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = {
		value = 5
		if = {
			limit = {
				has_role = politician
			}
			multiply = 4
		}
		if = {
			limit = {
				OR = {
					has_trait = tactful
					has_trait = charismatic
					has_trait = direct
				}
			}
			multiply = 2
		}
		if = {
			limit = {
				OR = {
					has_trait = imperious
					has_trait = wrathful
					has_trait = reckless
				}
			}
			divide = 4
		}
	}

	replace = {
		inexperienced
	}

	value = 1
}

experienced_diplomat = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/experienced_diplomat.dds"

	character_modifier = {
		character_popularity_add = 25
	}

	command_modifier = {
		unit_morale_recovery_mult = 0.5
	}

	country_modifier = {
		country_influence_mult = 0.1
	}

	possible = {
		has_trait = basic_diplomat
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = {
		value = 20
		if = {
			limit = {
				OR = {
					has_trait = tactful
					has_trait = charismatic
					has_trait = direct
				}
			}
			multiply = 3
		}
		if = {
			limit = {
				OR = {
					has_trait = imperious
					has_trait = wrathful
					has_trait = reckless
				}
			}
			divide = 2
		}
	}

	replace = {
		basic_diplomat
	}

	value = 2
}

masterful_diplomat = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/masterful_diplomat.dds"

	character_modifier = {
		character_popularity_add = 50
	}

	command_modifier = {
		unit_morale_recovery_mult = 1
	}

	country_modifier = {
		country_influence_mult = 0.2
	}

	possible = {
		has_trait = experienced_diplomat
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = {
		value = 20
		if = {
			limit = {
				OR = {
					has_trait = tactful
					has_trait = charismatic
					has_trait = direct
				}
			}
			multiply = 3
		}
		if = {
			limit = {
				OR = {
					has_trait = imperious
					has_trait = wrathful
					has_trait = reckless
				}
			}
			divide = 2
		}
	}

	replace = {
		experienced_diplomat
	}

	value = 3
}

basic_colonial_administrator  = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/basic_colonial_administrator.dds"

	country_modifier = {
		state_colony_growth_speed_mult = 0.1
	}

	possible = {
		is_ruler = yes
		NOT = { age < define:NCharacters|ADULT_AGE }
		owner ?= {
			has_colonial_growth = yes
		}
		NOR = {
			has_trait = experienced_colonial_administrator
			has_trait = expert_colonial_administrator
		}
	}

	weight = {
		value = 50
		if = {
			limit = {
				OR = {
					has_trait = ambitious
					has_trait = persistent
					has_trait = meticulous
				}
			}
			multiply = 2
		}
	}

	replace = {
		inexperienced
	}

	value = 1
}

experienced_colonial_administrator  = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/experienced_colonial_administrator.dds"

	country_modifier = {
		state_colony_growth_speed_mult = 0.2
	}

	possible = {
		has_trait = basic_colonial_administrator
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = {
		value = 50
		if = {
			limit = {
				OR = {
					has_trait = ambitious
					has_trait = persistent
					has_trait = meticulous
				}
			}
			multiply = 2
		}
	}

	replace = {
		basic_colonial_administrator
	}

	value = 2
}

expert_colonial_administrator  = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/expert_colonial_administrator.dds"

	country_modifier = {
		state_colony_growth_speed_mult = 0.4
	}

	possible = {
		has_trait = experienced_colonial_administrator
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = {
		value = 50
		if = {
			limit = {
				OR = {
					has_trait = ambitious
					has_trait = persistent
					has_trait = meticulous
				}
			}
			multiply = 2
		}
	}

	replace = {
		experienced_colonial_administrator
	}

	value = 3
}

basic_political_operator = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/basic_political_operator.dds"

	country_modifier = {
		country_authority_mult = 0.05
	}

	agitator_modifier = {
		interest_group_pol_str_mult = 0.025
	}

	interest_group_modifier = {
		interest_group_pol_str_mult = 0.05
	}

	possible = {
		has_role = politician # ruler, heir, or IG leader
		NOT = { age < define:NCharacters|ADULT_AGE }
		NOR = {
			has_trait = experienced_political_operator
			has_trait = expert_political_operator
		}
	}

	weight = {
		value = 50
		if = {
			limit = {
				OR = {
					has_trait = cautious
					has_trait = charismatic
					has_trait = ambitious
					has_trait = reserved
				}
			}
			multiply = 2
		}
		if = {
			limit = {
				OR = {
					has_trait = arrogant
					has_trait = wrathful
				}
			}
			divide = 2
		}
	}

	replace = {
		inexperienced
	}

	value = 1
}

experienced_political_operator = {
		type = skill
	texture = "gfx/interface/icons/character_trait_icons/experienced_political_operator.dds"

	country_modifier = {
		country_authority_mult = 0.1
	}

	agitator_modifier = {
		interest_group_pol_str_mult = 0.05
	}

	interest_group_modifier = {
		interest_group_pol_str_mult = 0.1
	}

	possible = {
		has_role = politician
		NOT = { age < define:NCharacters|ADULT_AGE }
		has_trait = basic_political_operator
	}

	weight = {
		value = 50
		if = {
			limit = {
				OR = {
					has_trait = cautious
					has_trait = charismatic
					has_trait = ambitious
					has_trait = reserved
				}
			}
			multiply = 2
		}
		if = {
			limit = {
				OR = {
					has_trait = arrogant
					has_trait = wrathful
				}
			}
			divide = 2
		}
	}

	replace = {
		basic_political_operator
	}

	value = 2
}

expert_political_operator = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/expert_political_operator.dds"

	country_modifier = {
		country_authority_mult = 0.2
	}

	agitator_modifier = {
		interest_group_pol_str_mult = 0.1
	}

	interest_group_modifier = {
		interest_group_pol_str_mult = 0.2
	}

	possible = {
		has_role = politician
		NOT = { age < define:NCharacters|ADULT_AGE }
		has_trait = experienced_political_operator
	}

	weight = {
		value = 50
		if = {
			limit = {
				OR = {
					has_trait = cautious
					has_trait = charismatic
					has_trait = ambitious
					has_trait = reserved
				}
			}
			multiply = 2
		}
		if = {
			limit = {
				OR = {
					has_trait = arrogant
					has_trait = wrathful
				}
			}
			divide = 2
		}
	}

	replace = {
		experienced_political_operator
	}

	value = 3
}

inspirational_orator = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/inspirational_orator1.dds"

	character_modifier = {
		character_popularity_add = 25
	}

	agitator_modifier = {
		interest_group_pol_str_mult = 0.025
		interest_group_pop_attraction_mult = 0.05
	}

	interest_group_modifier = {
		interest_group_pol_str_mult = 0.05
		interest_group_pop_attraction_mult = 0.1
	}

	possible = {
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = {
		value = 1
		if = {
			limit = {
				has_role = agitator
			}
			multiply = 3
		}
	}

	value = 1
}

demagogue = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/demagogue_orator2.dds"

	character_modifier = {
		character_popularity_add = 35
	}

	agitator_modifier = {
		interest_group_pol_str_mult = 0.05
		interest_group_pop_attraction_mult = 0.075
	}

	interest_group_modifier = {
		interest_group_pol_str_mult = 0.1
		interest_group_pop_attraction_mult = 0.15
	}

	possible = {
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = {
		value = 1
		if = {
			limit = {
				has_role = agitator
			}
			multiply = 3
		}
	}

	value = 2
}

firebrand = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/firebrand_orator3.dds"

	character_modifier = {
		character_popularity_add = 50
	}

	agitator_modifier = {
		interest_group_pol_str_mult = 0.075
		interest_group_pop_attraction_mult = 0.125
	}

	interest_group_modifier = {
		interest_group_pol_str_mult = 0.15
		interest_group_pop_attraction_mult = 0.25
	}

	possible = {
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = {
		value = 1
		if = {
			limit = {
				has_role = agitator
			}
			multiply = 3
		}
	}

	value = 3
}

# Multiclass Skills

explorer = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/explorer.dds"

	character_modifier = {
		character_popularity_add = 15
		character_expedition_events_explorer_mult = 2
	}

	country_modifier = {
		country_prestige_add = 10
		country_expedition_events_explorer_mult = 0.5
	}

	possible = {
		OR = {
			is_commander = yes
			is_ruler = yes
			is_heir = yes
		}
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = {
		value = 1	# low base weight, since any character other than IG leaders can qualify for this trait
		if = {
			limit = {
				is_commander = yes
			}
			multiply = 4
		}
		if = {
			limit = {
				OR = {
					has_trait = persistent
					has_trait = romantic
					has_trait = brave
				}
			}
			multiply = 2
		}
		if = {
			limit = {
				OR = {
					has_trait = cautious
				}
			}
			divide = 2
		}
	}

	replace = {
	}

	value = 2
}

bandit = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/bandit.dds"

	character_modifier = {
		character_popularity_add = -50
	}

	command_modifier = {
		unit_morale_damage_mult = 0.1
	}

	agitator_modifier = {
		interest_group_in_government_approval_add = 1
		interest_group_in_opposition_approval_add = -1
	}

	interest_group_modifier = {
		interest_group_in_government_approval_add = 2
		interest_group_in_opposition_approval_add = -2
	}

	country_modifier = {
		country_prestige_mult = -0.05
		country_infamy_decay_mult = -0.5
		country_authority_add = 100
	}

	possible = {
		NOT = { age < define:NCharacters|ADULT_AGE }
		NOT = { has_role = agitator }
	}

	weight = {
		value = 1	# low base weight, since any character can qualify for this trait
		if = {
			limit = {
				OR = {
					has_trait = cruel
					has_trait = hedonist
				}
			}
			multiply = 3
		}
		if = {
			limit = {
				OR = {
					has_trait = pious
				}
			}
			divide = 3
		}
	}

	replace = {
	}

	value = 2
}

erudite = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/erudite.dds"

	character_modifier = {
	}

	country_modifier = {
		country_academics_pol_str_mult = 0.20
		country_bureaucrats_pol_str_mult = 0.10
	}

	agitator_modifier = {
		country_academics_pol_str_mult = 0.10
		country_bureaucrats_pol_str_mult = 0.05
	}

	# I AM THE VERY MODEL OF A MODERN MAJOR GENERAL
	# I'VE INFORMATION ANIMAL, VEGETABLE, AND MINERAL
	command_modifier = {
		character_supply_route_cost_mult = -0.25
		character_command_limit_mult = -0.1
	}

	interest_group_modifier = {
		interest_group_pop_attraction_mult = -0.1 # this nerd won't stop giving lectures, ahhhhh
	}

	possible = {
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = {
		value = 1
		if = {
			limit = {
				has_trait = innovative
			}
			multiply = 3
		}
		if = {
			limit = {
				has_role = agitator
				interest_group = {
					is_interest_group_type = ig_intelligentsia
				}
			}
			multiply = 2
		}
	}

	replace = {
	}
}

literary = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/literary.dds"

	character_modifier = {
		character_popularity_add = 10
	}

	country_modifier = {
		country_prestige_mult = 0.05
		country_infamy_decay_mult = 0.25
	}

	agitator_modifier = {
		interest_group_in_government_approval_add = 1
		interest_group_in_opposition_approval_add = -1
	}

	command_modifier = {
	}

	interest_group_modifier = {
		interest_group_pop_attraction_mult = 0.1
	}

	possible = {
		NOR = {
			is_commander = yes
			is_ruler = yes
			is_heir = yes
		}
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = {
		value = 1
		if = {
			limit = {
				has_role = agitator
			}
			multiply = 3
		}
	}

	replace = {
		inexperienced
	}
}

engineer = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/engineer.dds"

	command_modifier = {
		character_battle_condition_dug_in_mult = 1
		character_battle_condition_logistics_secured_mult = 1
	}

	country_modifier = {
		country_construction_add = 5
		country_engineers_pol_str_mult = 0.20
		country_machinists_pol_str_mult = 0.10
	}

	agitator_modifier = {
		interest_group_pol_str_mult = 0.05
	}

	interest_group_modifier = {
		# Nothing
	}

	possible = {
		owner ?= { NOT = { is_country_type = decentralized } }
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = {
		value = 1
		if = {
			limit = {
				has_role = agitator
				interest_group = {
					is_interest_group_type = ig_trade_unions
				}
			}
			multiply = 3
		}
	}

	replace = {
	}

	value = 3
}

master_bureaucrat = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/master_bureaucrat.dds"

	character_modifier = {
	}

	country_modifier = {
		country_bureaucracy_mult = 0.1
		country_bureaucrats_pol_str_mult = 0.10
	}

	agitator_modifier = {
		interest_group_pol_str_mult = 0.05
	}

	command_modifier = {
		character_supply_route_cost_mult = -0.25
	}

	interest_group_modifier = { # not colorful, but capable
		interest_group_pop_attraction_mult = -0.05
		interest_group_pol_str_mult = 0.05
	}

	weight = {
		value = 1
		if = {
			limit = {
				has_trait = meticulous
			}
			multiply = 3
		}
		if = {
			limit = {
				has_role = agitator
				interest_group = {
					is_interest_group_type = ig_petty_bourgeoisie
				}
			}
			multiply = 3
		}
	}

	possible = {
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	replace = {
		inexperienced
	}
}

political_appointee = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/political_appointee.dds"

	character_modifier = {
		character_popularity_add = -10	# We didn't ask for you!
	}

	country_modifier = {
		country_legitimacy_base_add = -5
		interest_group_in_government_attraction_mult = -0.1
	}

	agitator_modifier = {
		interest_group_in_government_approval_add = 1
		interest_group_in_opposition_approval_add = -1
	}

	command_modifier = {
	}

	interest_group_modifier = {
		interest_group_pol_str_mult = -0.05 # Appointees are not popular
	}

	weight = {
		value = 0 # This should not be randomized
	}

	possible = {
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	replace = {
	}
}

inept = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/inept.dds"

	character_modifier = {
		character_popularity_add = -15
	}

	country_modifier = {
		country_legitimacy_base_add = -5
	}

	agitator_modifier = {
		political_movement_pop_attraction_mult = -0.1
	}

	command_modifier = {
		unit_morale_recovery_mult = -0.25
		unit_defense_mult = -0.1
		unit_offense_mult = -0.1
	}

	interest_group_modifier = {
		interest_group_pol_str_mult = -0.1
	}

	executive_modifier = {
		building_throughput_add = -0.05
	}

	weight = {
		value = 1
	}

	possible = {
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	replace = {
	}
}


inexperienced = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/inexperienced.dds"

	character_modifier = {
		character_popularity_add = 10 # Has youthful energy
	}

	country_modifier = {
		country_legitimacy_base_add = -5
	}

	agitator_modifier = {
		political_movement_pop_attraction_mult = -0.05
	}

	command_modifier = {
		unit_morale_recovery_mult = 0.10
		unit_defense_mult = -0.05
		unit_offense_mult = -0.05
	}

	interest_group_modifier = {
		interest_group_pol_str_mult = -0.05
	}

	weight = {
		value = 1
		if = {
			limit = {
				age <= 30
			}
			multiply = 2
		}
		else_if = {
			limit = {
				age <= 28
			}
			multiply = 3
		}
		else_if = {
			limit = {
				age <= 26
			}
			multiply = 4
		}
		else_if = {
			limit = {
				age <= 24
			}
			multiply = 5
		}
	}

	possible = {
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	replace = {
	}
}

social_bandit = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/social_banditry.dds"

	character_modifier = {
		character_popularity_add = 25
	}

	command_modifier = {
		unit_morale_damage_mult = 0.1
	}

	agitator_modifier = {
		political_movement_radicalism_add = 0.15
	}

	interest_group_modifier = {
		interest_group_in_government_approval_add = 2
		interest_group_in_opposition_approval_add = -2
	}

	country_modifier = {
		country_prestige_mult = -0.05
		country_infamy_decay_mult = -0.5
		country_authority_add = 100
	}

	possible = {
		NOT = { age < define:NCharacters|ADULT_AGE }
		OR = {
			has_role = agitator
			this.interest_group = {
				OR = {
					is_interest_group_type = ig_rural_folk
					is_interest_group_type = ig_trade_unions
				}
			}
		}
	}

	weight = {
		value = 0.25
		if = {
			limit = {
				owner ?= {
					is_country_type = unrecognized
				}
			}
			multiply = 2
		}
		if = {
			limit = {
				has_role = agitator
			}
			multiply = 4
		}
	}

	replace = {
	}

	value = 2
}

# Executive Skills

basic_entrepreneur = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/basic_entrepreneur.dds"

	character_modifier = {
		character_popularity_add = 10
	}

	executive_modifier = {
		building_throughput_add = 0.05
	}

	# Reminder: this would only come into effect if this Executive is or becomes an Interest Group Leader
	interest_group_modifier = {
		interest_group_pol_str_mult = 0.02
	}

	possible = {
		NOR = {
			has_trait = experienced_entrepreneur
			has_trait = expert_entrepreneur
		}
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = {
		value = 5
		if = {
			limit = {
				has_role = executive
			}
			multiply = 4
		}
		if = {
			limit = {
				OR = {
					has_trait = innovative
					has_trait = persistent
					has_trait = ambitious
					has_trait = tactful
					has_trait = charismatic
					has_trait = inspirational_orator
				}
			}
			multiply = 2
		}
		if = {
			limit = {
				OR = {
					has_trait = inept
					has_trait = reckless
					has_trait = cautious
					has_trait = compliant
				}
			}
			divide = 4
		}
	}

	replace = {
		inexperienced
	}

	value = 1
}

experienced_entrepreneur = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/experienced_entrepreneur.dds"

	character_modifier = {
		character_popularity_add = 15
	}

	executive_modifier = {
		building_throughput_add = 0.075
	}

	# Reminder: this would only come into effect if this Executive is or becomes a Ruler
	country_modifier = {
		country_company_throughput_bonus_add = 0.05
		country_influence_mult = 0.05
	}

	# Reminder: this would only come into effect if this Executive is or becomes an Interest Group Leader
	interest_group_modifier = {
		interest_group_pol_str_mult = 0.10
	}

	possible = {
		has_trait = basic_entrepreneur
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = {
		value = 20
		if = {
			limit = {
				OR = {
					has_trait = innovative
					has_trait = persistent
					has_trait = ambitious
					has_trait = tactful
					has_trait = charismatic
					has_trait = inspirational_orator
				}
			}
			multiply = 3
		}
		if = {
			limit = {
				OR = {
					has_trait = inept
					has_trait = reckless
					has_trait = cautious
					has_trait = compliant
				}
			}
			divide = 2
		}
	}

	replace = {
		basic_entrepreneur
	}

	value = 2
}

expert_entrepreneur = {
	type = skill
	texture = "gfx/interface/icons/character_trait_icons/expert_entrepreneur.dds"

	character_modifier = {
		character_popularity_add = 25
	}

	executive_modifier = {
		building_throughput_add = 0.10
		building_economy_of_scale_level_cap_add = 10
	}

	# Reminder: this would only come into effect if this Executive is or becomes a Ruler
	country_modifier = {
		country_influence_mult = 0.10
		country_free_charters_add = 1
		country_company_throughput_bonus_add = 0.10
		country_company_construction_efficiency_bonus_add = 0.10
	}

	# Reminder: this would only come into effect if this Executive is or becomes an Interest Group Leader
	interest_group_modifier = {
		interest_group_pol_str_mult = 0.15
	}

	possible = {
		has_trait = experienced_entrepreneur
		NOT = { age < define:NCharacters|ADULT_AGE }
	}

	weight = {
		value = 20
		if = {
			limit = {
				OR = {
					has_trait = innovative
					has_trait = persistent
					has_trait = ambitious
					has_trait = tactful
					has_trait = charismatic
					has_trait = inspirational_orator
				}
			}
			multiply = 3
		}
		if = {
			limit = {
				OR = {
					has_trait = inept
					has_trait = reckless
					has_trait = cautious
					has_trait = compliant
				}
			}
			divide = 2
		}
	}

	replace = {
		experienced_entrepreneur
	}

	value = 3
}