
##########################
# BLOCKED IN PARAGON DLC #
##########################

trait_ruler_corvette_focus = {
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_corvette_focus
		RARITY = common
		COUNCIL = yes
		TIER = none
	}
	councilor_modifier = {
		ship_corvette_cost_mult = -0.3
	}
	leader_potential_add = {
		has_paragon_dlc = no
	}
	leader_class = { commander }
	prerequisites = { tech_destroyers } # 'corvette focus' is a bit silly when it's the only available ship
	opposites = {
		trait_ruler_destroyer_focus
		trait_ruler_cruiser_focus
		trait_ruler_battleship_focus
	}
	selectable_weight = {
		weight = @class_trait_weight
		inline_script = paragon/council_weight_mult
	}
}

trait_ruler_destroyer_focus = {
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_destroyer_focus
		RARITY = common
		COUNCIL = yes
		TIER = none
	}
	councilor_modifier = {
		ship_destroyer_cost_mult = -0.3
	}
	leader_potential_add = {
		has_paragon_dlc = no
	}
	leader_class = { commander }
	prerequisites = { tech_destroyers }
	opposites = {
		trait_ruler_corvette_focus
		trait_ruler_cruiser_focus
		trait_ruler_battleship_focus
	}
	selectable_weight = {
		weight = @class_trait_weight
		inline_script = paragon/council_weight_mult
	}
}

trait_ruler_cruiser_focus = {
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_cruiser_focus
		RARITY = common
		COUNCIL = yes
		TIER = none
	}
	councilor_modifier = {
		ship_cruiser_cost_mult = -0.3
	}
	leader_potential_add = {
		has_paragon_dlc = no
	}
	leader_class = { commander }
	prerequisites = { tech_cruisers }
	opposites = {
		trait_ruler_corvette_focus
		trait_ruler_destroyer_focus
		trait_ruler_battleship_focus
	}
	selectable_weight = {
		weight = @class_trait_weight
		inline_script = paragon/council_weight_mult
	}
}

trait_ruler_battleship_focus = {
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_battleship_focus
		RARITY = common
		COUNCIL = yes
		TIER = none
	}
	councilor_modifier = {
		ship_battleship_cost_mult = -0.3
	}
	leader_potential_add = {
		has_paragon_dlc = no
	}
	leader_class = { commander }
	prerequisites = { tech_battleships }
	opposites = {
		trait_ruler_corvette_focus
		trait_ruler_destroyer_focus
		trait_ruler_cruiser_focus
	}
	selectable_weight = {
		weight = @class_trait_weight
		inline_script = paragon/council_weight_mult
	}
}

leader_trait_fleet_logistician = {
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_fleet_logistician
		RARITY = common
		COUNCIL = no
		TIER = none
	}
	leader_potential_add = {
		has_paragon_dlc = no
	}
	triggered_fleet_modifier = {
		potential = { trait_is_nomad_check = no }
		ship_orbit_upkeep_mult = -0.15
	}
	triggered_fleet_modifier = {
		potential = { trait_is_nomad_check = yes }
		ships_upkeep_mult = -0.075
	}
	leader_class = { commander }
	selectable_weight = {
		weight = @class_trait_weight
		inline_script = paragon/pilot_weight_mult
	}
}

#################
# SHARED TRAITS #
#################

###################
leader_trait_skirmisher = {
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_skirmisher
		RARITY = common
		COUNCIL = yes
		TIER = 1
	}
	councilor_modifier = {
		ship_fire_rate_mult = 0.05
		ship_speed_mult = 0.1
	}
	leader_class = { commander }
	leader_potential_add = {
		OR = {
			is_gestalt = no
			AND = {
				is_gestalt = yes
				is_councilor = yes
			}
		}
	}
	selectable_weight = {
		weight = @class_trait_weight
		inline_script = paragon/council_weight_mult
	}
}

###################
leader_trait_aggressive = {
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_aggressive
		RARITY = common
		COUNCIL = no
		TIER = 1
	}
	fleet_modifier = {
		ship_fire_rate_mult = 0.05
		ship_weapon_damage = 0.05
	}
	triggered_army_modifier = {
		potential = { 	exists = owner
						owner? = { is_nomadic = no } }
		army_damage_mult = 0.15
	}
	leader_class = { commander }
	opposites = {
		leader_trait_cautious
	}
	selectable_weight = {
		weight = @class_trait_weight
		inline_script = paragon/pilot_weight_mult
	}
}

###################
leader_trait_cautious = {
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_cautious
		RARITY = common
		COUNCIL = no
		TIER = 1
	}
	triggered_modifier = {
		potential = { 	exists = owner
						owner? = { is_nomadic = yes } }
		ship_anomaly_generation_chance_mult = 0.2
	}
	triggered_fleet_modifier = {
		potential = { 	exists = owner
						owner? = { is_nomadic = no } }
		ship_orbital_bombardment_pop_damage_mult = -0.2
	}
	fleet_modifier = {
		ship_weapon_range_mult = 0.2
	}
	triggered_army_modifier = {
		potential = { 	exists = owner
						owner? = { is_nomadic = no } }
		army_damage_taken_mult = -0.2
	}
	leader_class = { commander }
	opposites = {
		leader_trait_aggressive
	}
	selectable_weight = {
		weight = @class_trait_weight
		inline_script = paragon/pilot_weight_mult
	}
}

###################
leader_trait_unyielding = {
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_unyielding
		RARITY = common
		COUNCIL = no
		TIER = 1
	}
	fleet_modifier = {
		ship_hull_mult = 0.2
		ship_disengage_chance_mult = -0.2
	}
	triggered_army_modifier = {
		potential = { 	exists = owner
						owner? = { is_nomadic = no } }
		army_health = 0.2
	}
	leader_class = { commander }
	opposites = {
		leader_trait_nervous
		leader_trait_nervous_2
		leader_trait_slipshod
		leader_trait_slipshod_2
		leader_trait_trickster
	}
	selectable_weight = {
		weight = @class_trait_weight
		inline_script = paragon/pilot_weight_mult
	}
}

###################
leader_trait_engineer = {
	inline_script = {
		script = trait/icon
		CLASS = leader
		ICON = GFX_leader_trait_engineer
		RARITY = common
		COUNCIL = no
		TIER = 1
	}
	triggered_background_planet_modifier = {
		potential = {	leader_class = scientist
						exists = FROM
						FROM = { 	exists = owner
									owner = { 	is_same_value = root.owner
												is_nomadic = no } }
						trait_is_gestalt_check = no }
		job_foundry_add = 50
		planet_metallurgists_engineering_research_produces_add = 0.05
	}
	triggered_background_planet_modifier = {
		potential = {	leader_class = scientist
						exists = FROM
						FROM = { 	exists = owner
									owner = { 	is_same_value = root.owner
												is_nomadic = no } }
						trait_is_gestalt_check = yes }
		job_fabricator_add = 50
		planet_metallurgists_engineering_research_produces_add = 0.05
	}
	triggered_planet_modifier = {
		potential = { 	leader_class = commander
						trait_is_gestalt_check = no 
						exists = owner
						owner? = { is_nomadic = no }}
		planet_enforcers_engineering_research_produces_add = 0.5
		planet_enforcers_consumer_goods_upkeep_add = 0.1
	}
	triggered_planet_modifier = {
		potential = { 	leader_class = commander
						trait_is_gestalt_check = yes 
						exists = owner
						owner? = { is_nomadic = no }}
		planet_soldiers_engineering_research_produces_add = 0.5
		planet_soldiers_alloys_upkeep_add = 0.05
	}
	triggered_sector_modifier = {
		potential = { 	leader_class = commander
						trait_is_gestalt_check = no 
						exists = owner
						owner? = { is_nomadic = no }}
		planet_enforcers_engineering_research_produces_add = 0.25
		planet_enforcers_consumer_goods_upkeep_add = 0.05
	}
	triggered_sector_modifier = {
		potential = { 	leader_class = commander
						trait_is_gestalt_check = yes 	
						exists = owner
						owner? = { is_nomadic = no }}
		planet_soldiers_engineering_research_produces_add = 0.25
		planet_soldiers_alloys_upkeep_add = 0.025
	}
	triggered_fleet_modifier = {
		potential = {
			leader_class = commander
		}
		ship_hull_regen_add_perc = 0.015
		ship_armor_regen_add_perc = 0.015
		ship_armor_mult = 0.05
		ship_armor_hardening_add = 0.05
	}
	triggered_modifier = {
		potential = {
			leader_class = scientist
		}
		ship_hull_regen_add_perc = 0.025
		ship_armor_regen_add_perc = 0.025
		ship_armor_mult = 0.25
		ship_armor_hardening_add = 0.25
	}
	triggered_modifier = {
		potential = { 	exists = owner
						owner? = { is_nomadic = yes } }
		create_debris_chance = 0.25
	}
	triggered_modifier = {
		potential = { 	leader_class = scientist
						exists = owner
						owner? = { is_nomadic = yes } }
		ship_science_upkeep_mult = -0.5
	}
	triggered_self_modifier = {
		potential = { 	leader_class = commander
						exists = owner
						owner? = { is_nomadic = yes } }
		commander_exp_gain = 0.05
	}
	triggered_self_modifier = {
		potential = { 	leader_class = scientist
						exists = owner
						owner? = { is_nomadic = yes } }
		scientist_exp_gain = 0.05
	}
	leader_class = { commander scientist }
	selectable_weight = {
		weight = @class_trait_weight
		inline_script = paragon/pilot_weight_mult
	}
}

###################
leader_trait_trickster = {
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_trickster
		RARITY = common
		COUNCIL = no
		TIER = 1
	}

	fleet_modifier = {
		ship_emergency_ftl_mult = -0.2
		ship_engagement_range_mult = 0.2
		ship_disengage_chance_mult = 0.2
	}
	triggered_army_modifier = {
		potential = { 	exists = owner
						owner? = { is_nomadic = no } }
		army_morale_damage_mult = 0.2
	}
	leader_class = { commander }
	opposites = {
		leader_trait_unyielding
		leader_trait_reckless
		leader_trait_reckless_2
	}
	selectable_weight = {
		weight = @class_trait_weight
		inline_script = paragon/pilot_weight_mult
	}
}

#############
# AGGRESSOR #
#############

leader_trait_wrecker = {
	leader_trait_type = veteran
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_wrecker
		RARITY = veteran
		COUNCIL = no
		TIER = 1
	}
	leader_potential_add = {
		has_paragon_dlc = yes
		has_trait = subclass_commander_admiral
	}
	fleet_modifier = {
		ship_weapon_damage = 0.15
		create_debris_chance = -0.5
		ships_alloys_upkeep_mult = 0.05
	}
	leader_class = { commander }
	opposites = {
		leader_trait_shipbreaker
		leader_trait_shipbreaker_2
	}
	selectable_weight = {
		weight = @subclass_trait_weight
		inline_script = paragon/pilot_weight_mult
		inline_script = {
			script = paragon/subclass_weight_mult
			SUBCLASS = commander_admiral
		}
	}
}

leader_trait_wrecker_2 = {
	replace_traits = { leader_trait_wrecker }
	leader_trait_type = veteran
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_wrecker
		RARITY = veteran
		COUNCIL = no
		TIER = 2
	}
	fleet_modifier = {
		ship_weapon_damage = 0.3
		create_debris_chance = -1
		ships_alloys_upkeep_mult = 0.1
	}
	leader_class = { commander }
	opposites = {
		leader_trait_shipbreaker
		leader_trait_shipbreaker_2
	}
}

###################
leader_trait_annihilator = {
	leader_trait_type = veteran
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_annihilator
		RARITY = veteran
		COUNCIL = no
		TIER = 1
	}
	fleet_modifier = {
		ship_orbital_bombardment_mult = 0.5
		ship_weapon_damage = 0.1
	}
	leader_potential_add = {
		has_paragon_dlc = yes
		has_trait = subclass_commander_general
	}
	leader_class = { commander }
	selectable_weight = {
		weight = @subclass_trait_weight
		inline_script = paragon/pilot_weight_mult
		inline_script = {
			script = paragon/subclass_weight_mult
			SUBCLASS = commander_general
		}
	}
}

leader_trait_annihilator_2 = {
	replace_traits = { leader_trait_annihilator }
	leader_trait_type = veteran
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_annihilator
		RARITY = veteran
		COUNCIL = no
		TIER = 2
	}
	fleet_modifier = {
		ship_orbital_bombardment_mult = 1
		ship_weapon_damage = 0.2
	}
	leader_class = { commander }
}

###################
leader_trait_artillerist = {
	leader_trait_type = veteran
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_artillerist
		RARITY = veteran
		COUNCIL = no
		TIER = 1
	}
	leader_potential_add = {
		has_paragon_dlc = yes
		has_trait = subclass_commander_admiral
	}
	fleet_modifier = {
		ship_weapon_damage = 0.05
		ship_weapon_range_mult = 0.05
		ship_accuracy_add = 5
		ship_tracking_add = 5
	}
	leader_class = { commander }
	selectable_weight = {
		weight = @subclass_trait_weight
		inline_script = paragon/pilot_weight_mult
		inline_script = {
			script = paragon/subclass_weight_mult
			SUBCLASS = commander_admiral
		}
	}
}

leader_trait_artillerist_2 = {
	leader_trait_type = veteran
	replace_traits = { leader_trait_artillerist }
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_artillerist
		RARITY = veteran
		COUNCIL = no
		TIER = 2
	}
	fleet_modifier = {
		ship_weapon_damage = 0.1
		ship_weapon_range_mult = 0.1
		ship_accuracy_add = 10
		ship_tracking_add = 10
	}
	leader_class = { commander }
}

###################
leader_trait_commanding_presence = {
	leader_trait_type = veteran
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_commanding_presence
		RARITY = veteran
		COUNCIL = no
		TIER = 1
	}
	leader_potential_add = {
		has_paragon_dlc = yes
		has_trait = subclass_commander_admiral
	}
	fleet_modifier = {
		command_limit_add = 50
		ship_experience_gain_mult = 0.5
	}
	triggered_fleet_modifier = {
		potential = { trait_is_nomad_check = no }
		ship_orbit_upkeep_mult = -0.05
	}
	triggered_fleet_modifier = {
		potential = { trait_is_nomad_check = yes }
		ships_upkeep_mult = -0.025
	}
	leader_class = { commander }
	selectable_weight = {
		weight = @subclass_trait_weight
		inline_script = paragon/pilot_weight_mult
		inline_script = {
			script = paragon/subclass_weight_mult
			SUBCLASS = commander_admiral
		}
	}
}

leader_trait_commanding_presence_2 = {
	leader_trait_type = veteran
	replace_traits = { leader_trait_commanding_presence }
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_commanding_presence
		RARITY = veteran
		COUNCIL = no
		TIER = 2
	}
	fleet_modifier = {
		command_limit_add = 100
		ship_experience_gain_mult = 1
	}
	triggered_fleet_modifier = {
		potential = { trait_is_nomad_check = no }
		ship_orbit_upkeep_mult = -0.1
	}
	triggered_fleet_modifier = {
		potential = { trait_is_nomad_check = yes }
		ships_upkeep_mult = -0.05
	}
	leader_class = { commander }
}

###################
leader_trait_corsair = {
	leader_trait_type = veteran
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_corsair
		RARITY = veteran
		COUNCIL = no
		TIER = 1
	}
	# Effect in paragon_2.1005 event.
	leader_potential_add = {
		has_paragon_dlc = yes
		has_trait = subclass_commander_admiral
	}
	fleet_modifier = {
		ships_upkeep_mult = -0.05
	}
	triggered_modifier = {
		potential = { has_first_contact_dlc = yes }
		ship_cloaking_strength_add = 1
	}
	leader_class = { commander }
	custom_tooltip_with_modifiers = leader_trait_corsair_effect
	initial = no
	randomized = no
}

leader_trait_corsair_2 = {
	leader_trait_type = veteran
	replace_traits = { leader_trait_corsair }
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_corsair
		RARITY = veteran
		COUNCIL = no
		TIER = 2
	}
	# Effect in paragon_2.1005 event.
	#triggered_fleet_modifier = {
		#potential = { trait_is_nomad_check = no }
		#ship_orbit_upkeep_mult = -0.2
	#}
	fleet_modifier = {
		ships_upkeep_mult = -0.10
	}
	triggered_modifier = {
		potential = { has_first_contact_dlc = yes }
		ship_cloaking_strength_add = 2
	}
	leader_class = { commander }
	custom_tooltip_with_modifiers = leader_trait_corsair_2_effect
}

###################
leader_trait_demolisher = {
	leader_trait_type = veteran
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_demolisher
		RARITY = veteran
		COUNCIL = no
		TIER = 1
	}
	fleet_modifier = {
		ship_damage_against_starbases_mult = 0.2
		ship_armor_damage_mult = 0.2
		ship_hull_damage_mult = 0.1
	}
	leader_potential_add = {
		has_paragon_dlc = yes
		has_trait = subclass_commander_general
	}
	leader_class = { commander }
	selectable_weight = {
		weight = @subclass_trait_weight
		inline_script = paragon/pilot_weight_mult
		inline_script = {
			script = paragon/subclass_weight_mult
			SUBCLASS = commander_general
		}
	}
}

leader_trait_demolisher_2 = {
	leader_trait_type = veteran
	replace_traits = { leader_trait_demolisher }
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_demolisher
		RARITY = veteran
		COUNCIL = no
		TIER = 2
	}
	fleet_modifier = {
		ship_damage_against_starbases_mult = 0.4
		ship_armor_damage_mult = 0.4
		ship_hull_damage_mult = 0.2
	}
	leader_class = { commander }
}

###################
leader_trait_shipbreaker = {
	leader_trait_type = veteran
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_shipbreaker
		RARITY = veteran
		COUNCIL = no
		TIER = 1
	}
	# Effect in paragon_2.1005 event.
	leader_potential_add = {
		has_paragon_dlc = yes
		OR = {
			has_trait = subclass_commander_admiral
			has_trait = subclass_commander_general
		}
	}
	fleet_modifier = {
		create_debris_chance = 0.25
		ship_armor_hardening_add = 0.05
		ship_armor_mult = 0.05
	}
	leader_class = { commander }
	opposites = {
		leader_trait_wrecker
		leader_trait_wrecker_2
	}
	custom_tooltip_with_modifiers = leader_trait_shipbreaker_effect
	selectable_weight = {
		weight = @subclass_trait_weight
		inline_script = paragon/pilot_weight_mult
	}
}

leader_trait_shipbreaker_2 = {
	leader_trait_type = veteran
	replace_traits = { leader_trait_shipbreaker }
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_shipbreaker
		RARITY = veteran
		COUNCIL = no
		TIER = 2
	}
	# Effect in paragon_2.1005 event.
	fleet_modifier = {
		create_debris_chance = 0.5
		ship_armor_hardening_add = 0.1
		ship_armor_mult = 0.1
	}
	leader_class = { commander }
	opposites = {
		leader_trait_wrecker
		leader_trait_wrecker_2
	}
	custom_tooltip_with_modifiers = leader_trait_shipbreaker_2_effect
}


#############
# TACTICIAN #
#############

#####################
# Speciality Traits #
#####################
leader_trait_archaeo_specialization = {
	leader_trait_type = veteran
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_expertise_archaeostudies
		RARITY = veteran
		COUNCIL = no
		TIER = 1
	}
	leader_potential_add = {
		has_ancrel = yes
		OR = {
			has_paragon_dlc = no
			has_trait = subclass_commander_admiral
		}
		exists = owner
		owner = {
			has_ascension_perk = ap_archaeoengineers
		}
	}
	fleet_modifier = {
		weapon_archaeotech_weapon_damage_mult = 0.15
		weapon_archaeotech_weapon_fire_rate_mult = 0.15
	}
	leader_class = { commander }
	selectable_weight = {
		weight = @subclass_trait_weight
		inline_script = paragon/pilot_weight_mult
		inline_script = {
			script = paragon/subclass_weight_mult
			SUBCLASS = commander_admiral
		}
	}
}

leader_trait_archaeo_specialization_2 = {
	leader_trait_type = veteran
	replace_traits = { leader_trait_archaeo_specialization }
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_expertise_archaeostudies
		RARITY = veteran
		COUNCIL = no
		TIER = 2
	}
	fleet_modifier = {
		weapon_archaeotech_weapon_damage_mult = 0.3
		weapon_archaeotech_weapon_fire_rate_mult = 0.3
	}
	leader_class = { commander }
}

###################
leader_trait_artillery_specialization = {
	leader_trait_type = veteran
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_artillery_specialization
		RARITY = veteran
		COUNCIL = no
		TIER = 1
	}
	fleet_modifier = {
		weapon_role_artillery_weapon_damage_mult = 0.2
		ship_weapon_range_mult = 0.2
	}
	leader_potential_add = {
		has_paragon_dlc = yes
		has_any_admiral_speciality = no
		has_trait = subclass_commander_admiral
	}
	prerequisites = {
		OR = {
			tech_destroyers
			tech_stingers
		}
	}
	leader_class = { commander }
	fleet_specialization_tag = artillery
	custom_tooltip_with_modifiers = only_one_admiral_focus
	selectable_weight = {
		weight = @subclass_trait_weight
		inline_script = paragon/pilot_weight_mult
		inline_script = {
			script = paragon/subclass_weight_mult
			SUBCLASS = commander_admiral
		}
	}
}

leader_trait_artillery_specialization_2 = {
	leader_trait_type = veteran
	replace_traits = { leader_trait_artillery_specialization }
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_artillery_specialization
		RARITY = veteran
		COUNCIL = no
		TIER = 2
	}
	fleet_modifier = {
		weapon_role_artillery_weapon_damage_mult = 0.4
		ship_weapon_range_mult = 0.4
	}
	prerequisites = {
		OR = {
			tech_destroyers
			tech_stingers
		}
	}
	leader_class = { commander }
	fleet_specialization_tag = artillery
	custom_tooltip_with_modifiers = only_one_admiral_focus
}

###################
leader_trait_carrier_specialization = {
	leader_trait_type = veteran
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_carrier_specialization
		RARITY = veteran
		COUNCIL = no
		TIER = 1
	}
	fleet_modifier = {
		weapon_type_strike_craft_weapon_damage_mult = 0.15
		weapon_type_strike_craft_weapon_fire_rate_mult = 0.15
		ship_engagement_range_mult = 0.2
	}
	leader_potential_add = {
		has_paragon_dlc = yes
		has_any_admiral_speciality = no
		has_trait = subclass_commander_admiral
	}
	prerequisites = {
		OR = {
			tech_cruisers
			tech_harbingers
		}
		tech_strike_craft_1
	}
	leader_class = { commander }
	fleet_specialization_tag = carrier
	custom_tooltip_with_modifiers = only_one_admiral_focus
	selectable_weight = {
		weight = @subclass_trait_weight
		inline_script = paragon/pilot_weight_mult
		inline_script = {
			script = paragon/subclass_weight_mult
			SUBCLASS = commander_admiral
		}
	}
}

leader_trait_carrier_specialization_2 = {
	leader_trait_type = veteran
	replace_traits = { leader_trait_carrier_specialization }
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_carrier_specialization
		RARITY = veteran
		COUNCIL = no
		TIER = 2
	}
	fleet_modifier = {
		weapon_type_strike_craft_weapon_damage_mult = 0.3
		weapon_type_strike_craft_weapon_fire_rate_mult = 0.3
		ship_engagement_range_mult = 0.4
	}
	prerequisites = {
		OR = {
			tech_cruisers
			tech_harbingers
		}
		tech_strike_craft_1
	}
	leader_class = { commander }
	fleet_specialization_tag = carrier
	custom_tooltip_with_modifiers = only_one_admiral_focus
}

###################
leader_trait_rocketry_specialization = {
	leader_trait_type = veteran
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_rocketry_specialization
		RARITY = veteran
		COUNCIL = no
		TIER = 1
	}
	fleet_modifier = {
		weapon_type_explosive_weapon_fire_rate_mult = 0.15
		weapon_type_explosive_weapon_damage_mult = 0.15
	}
	leader_potential_add = {
		has_paragon_dlc = yes
		has_any_admiral_speciality = no
		has_trait = subclass_commander_admiral
	}
	prerequisites = {
		tech_missiles_1
	}
	leader_class = { commander }
	fleet_specialization_tag = explosive
	custom_tooltip_with_modifiers = only_one_admiral_focus
	selectable_weight = {
		weight = @subclass_trait_weight
		inline_script = paragon/pilot_weight_mult
		inline_script = {
			script = paragon/subclass_weight_mult
			SUBCLASS = commander_admiral
		}
	}
}

leader_trait_rocketry_specialization_2 = {
	leader_trait_type = veteran
	replace_traits = { leader_trait_rocketry_specialization }
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_rocketry_specialization
		RARITY = veteran
		COUNCIL = no
		TIER = 2
	}
	fleet_modifier = {
		weapon_type_explosive_weapon_fire_rate_mult = 0.3
		weapon_type_explosive_weapon_damage_mult = 0.3
	}
	prerequisites = {
		tech_missiles_1
	}
	leader_class = { commander }
	fleet_specialization_tag = explosive
	custom_tooltip_with_modifiers = only_one_admiral_focus
}

###################
leader_trait_gunship_specialization = {
	leader_trait_type = veteran
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_gunship_specialization
		RARITY = veteran
		COUNCIL = no
		TIER = 1
	}
	fleet_modifier = {
		s_slot_weapon_fire_rate_mult = 0.15
		s_slot_weapon_damage_mult = 0.15
		m_slot_weapon_fire_rate_mult = 0.15
		m_slot_weapon_damage_mult = 0.15
	}
	leader_potential_add = {
		has_paragon_dlc = yes
		has_any_admiral_speciality = no
		has_trait = subclass_commander_admiral
	}
	leader_class = { commander }
	fleet_specialization_tag = gunship
	custom_tooltip_with_modifiers = only_one_admiral_focus
	selectable_weight = {
		weight = @subclass_trait_weight
		inline_script = paragon/pilot_weight_mult
		inline_script = {
			script = paragon/subclass_weight_mult
			SUBCLASS = commander_admiral
		}
	}
}

leader_trait_gunship_specialization_2 = {
	leader_trait_type = veteran
	replace_traits = { leader_trait_gunship_specialization }
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_gunship_specialization
		RARITY = veteran
		COUNCIL = no
		TIER = 2
	}
	fleet_modifier = {
		s_slot_weapon_fire_rate_mult = 0.3
		s_slot_weapon_damage_mult = 0.3
		m_slot_weapon_fire_rate_mult = 0.3
		m_slot_weapon_damage_mult = 0.3
	}
	leader_class = { commander }
	fleet_specialization_tag = gunship
	custom_tooltip_with_modifiers = only_one_admiral_focus
}


###################
leader_trait_juryrigger = {
	leader_trait_type = veteran
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_juryrigger
		RARITY = veteran
		COUNCIL = no
		TIER = 1
	}
	leader_potential_add = {
		has_paragon_dlc = yes
		has_trait = subclass_commander_admiral
	}
	fleet_modifier = {
		ship_armor_regen_add_perc = 0.01
		ships_alloys_upkeep_mult = -0.1
		# Effect in paragon_2.1005 event.
	}
	leader_class = { commander }
	custom_tooltip_with_modifiers = leader_trait_juryrigger_effect
	selectable_weight = {
		weight = @subclass_trait_weight
		inline_script = paragon/pilot_weight_mult
		inline_script = {
			script = paragon/subclass_weight_mult
			SUBCLASS = commander_admiral
		}
	}
}

leader_trait_juryrigger_2 = {
	leader_trait_type = veteran
	replace_traits = { leader_trait_juryrigger }
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_juryrigger
		RARITY = veteran
		COUNCIL = no
		TIER = 2
	}
	fleet_modifier = {
		ship_armor_regen_add_perc = 0.02
		ships_alloys_upkeep_mult = -0.2
		# Effect in paragon_2.1005 event.
	}
	leader_class = { commander }
	custom_tooltip_with_modifiers = leader_trait_juryrigger_2_effect
}


###################
leader_trait_surgical_bombardment = {
	leader_trait_type = veteran
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_surgical_bombardment
		RARITY = veteran
		COUNCIL = no
		TIER = 1
	}
	leader_potential_add = {
		has_paragon_dlc = yes
		has_trait = subclass_commander_general
	}
	fleet_modifier = {
		ship_orbital_bombardment_army_damage_mult = 0.25
		ship_orbital_bombardment_pop_damage_mult = -0.25
		ship_weapon_damage = 0.25
		ship_fire_rate_mult = -0.15
	}
	leader_class = { commander }
	selectable_weight = {
		weight = @subclass_trait_weight
		inline_script = paragon/pilot_weight_mult
		inline_script = {
			script = paragon/subclass_weight_mult
			SUBCLASS = commander_general
		}
	}
}

leader_trait_surgical_bombardment_2 = {
	leader_trait_type = veteran
	replace_traits = { leader_trait_surgical_bombardment }
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_surgical_bombardment
		RARITY = veteran
		COUNCIL = no
		TIER = 2
	}
	fleet_modifier = {
		ship_orbital_bombardment_army_damage_mult = 0.5
		ship_orbital_bombardment_pop_damage_mult = -0.5
		ship_weapon_damage = 0.5
		ship_fire_rate_mult = -0.3
	}
	leader_class = { commander }
}


###################
leader_trait_scout = {
	leader_trait_type = veteran
	inline_script = {
		script = trait/icon
		CLASS = leader
		ICON = GFX_leader_trait_scout
		RARITY = free_or_veteran
		COUNCIL = no
		TIER = 1
	}
	leader_potential_add = {
		OR = {
			has_paragon_dlc = no
			has_trait = subclass_commander_admiral
			has_trait = subclass_scientist_explorer
		}
	}
	triggered_modifier = {
		potential = {
			leader_class = commander
			owner? = {
				is_nomadic = yes
			}
		}
		science_ship_survey_speed = 0.15
	}
	triggered_fleet_modifier = {
		potential = {
			leader_class = scientist
			owner? = {
				is_nomadic = yes
			}
		}
		ship_weapon_range_mult = 0.15
		ship_tracking_mult = 0.15
	}
	triggered_modifier = {
		potential = {
			owner? = {
				is_nomadic = no
			}
		}
		ship_speed_mult = 0.15
	}
	self_modifier = {
		leaders_upkeep_mult = -0.15
	}
	modifier = {
		ship_windup_mult = -0.15
		fleet_mia_time_mult = -0.15
	}

	leader_class = { commander scientist }
	selectable_weight = {
		inline_script = paragon/subclass_free_trait_weight
		inline_script = paragon/pilot_weight_mult
		inline_script = {
			script = paragon/dual_subclass_weight_mult
			SUBCLASS_1 = commander_admiral
			SUBCLASS_2 = scientist_explorer
		}
	}
}

leader_trait_scout_2 = {
	leader_trait_type = veteran
	replace_traits = { leader_trait_scout }
	inline_script = {
		script = trait/icon
		CLASS = leader
		ICON = GFX_leader_trait_scout
		RARITY = free_or_veteran
		COUNCIL = no
		TIER = 2
	}
	triggered_modifier = {
		potential = {
			leader_class = commander
			owner? = {
				is_nomadic = yes
			}
		}
		science_ship_survey_speed = 0.3
	}
	triggered_fleet_modifier = {
		potential = {
			leader_class = scientist
			owner? = {
				is_nomadic = yes
			}
		}
		ship_weapon_range_mult = 0.3
		ship_tracking_mult = 0.3
	}
	triggered_modifier = {
		potential = {
			owner? = {
				is_nomadic = no
			}
		}
		ship_speed_mult = 0.3
	}
	self_modifier = {
		leaders_upkeep_mult = -0.3
	}
	fleet_modifier = {
		ship_windup_mult = -0.3
		fleet_mia_time_mult = -0.3
	}

	leader_class = { commander scientist }
}


##############
# STRATEGIST #
##############

leader_trait_gale_speed = {
	leader_trait_type = veteran
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_gale_speed
		RARITY = free_or_veteran
		COUNCIL = yes
		TIER = 1
	}
	councilor_modifier = {
		ship_speed_mult = 0.1
		ship_evasion_mult = 0.05
		fleet_mia_time_mult = -0.05
		category_propulsion_research_speed_mult = 0.05
		category_propulsion_draw_chance_mult = 0.1
	}
	leader_potential_add = {
		OR = {
			has_paragon_dlc = no
			has_trait = subclass_commander_councilor
			exists = event_target:officer
		}
	}
	leader_class = { commander }
	opposites = {
		leader_trait_lethargic
		leader_trait_lethargic_2
	}
	selectable_weight = {
		inline_script = paragon/subclass_free_trait_weight
		inline_script = paragon/council_weight_mult
	}
}

leader_trait_gale_speed_2 = {
	leader_trait_type = veteran
	replace_traits = { leader_trait_gale_speed }
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_gale_speed
		RARITY = free_or_veteran
		COUNCIL = yes
		TIER = 2
	}
	councilor_modifier = {
		ship_speed_mult = 0.2
		ship_evasion_mult = 0.1
		fleet_mia_time_mult = -0.1
		category_propulsion_research_speed_mult = 0.1
		category_propulsion_draw_chance_mult = 0.2
	}
	leader_class = { commander }
	opposites = {
		leader_trait_lethargic
		leader_trait_lethargic_2
	}
}

###################
trait_ruler_fortifier = {
	leader_trait_type = veteran
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_fortifier
		RARITY = free_or_veteran
		COUNCIL = yes
		TIER = 1
	}
	councilor_modifier = {
		shipclass_starbase_hull_mult = 0.15
		shipclass_starbase_damage_mult = 0.15
		starbase_upgrade_speed_mult = 0.15
	}
	triggered_councilor_modifier = {
		potential = {
			exists = owner
			owner = { NOT = { has_tradition = tr_unyielding_fortress_doctrine} }
		}
		starbase_upgrade_cost_mult = -0.075
	}
	triggered_councilor_modifier = {
		potential = {
			exists = owner
			owner = { has_tradition = tr_unyielding_fortress_doctrine }
		}
		starbases_upkeep_mult = -0.05
		category_military_theory_research_speed_mult = 0.05
		category_military_theory_draw_chance_mult = 0.15
	}
	leader_potential_add = {
		has_ethic = ethic_pacifist
		FROM = { is_nomadic = no }
		OR = {
			has_paragon_dlc = no
			has_trait = subclass_commander_councilor
		}
	}
	leader_class = { commander }
	selectable_weight = {
		inline_script = paragon/subclass_free_trait_weight
		inline_script = paragon/council_weight_mult
	}
}

trait_ruler_fortifier_2 = {
	leader_trait_type = veteran
	replace_traits = { trait_ruler_fortifier }
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_fortifier
		RARITY = free_or_veteran
		COUNCIL = yes
		TIER = 2
	}
	councilor_modifier = {
		shipclass_starbase_hull_mult = 0.3
		shipclass_starbase_damage_mult = 0.3
		starbase_upgrade_speed_mult = 0.3
	}
	triggered_councilor_modifier = {
		potential = {
			exists = owner
			owner = { NOT = { has_tradition = tr_unyielding_fortress_doctrine} }
		}
		starbase_upgrade_cost_mult = -0.15
	}
	triggered_councilor_modifier = {
		potential = {
			exists = owner
			owner = { has_tradition = tr_unyielding_fortress_doctrine }
		}
		starbases_upkeep_mult = -0.1
		category_military_theory_research_speed_mult = 0.1
		category_military_theory_draw_chance_mult = 0.3
	}
	leader_class = { commander }
}

###################
leader_trait_armada_logistician = {
	leader_trait_type = veteran
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_armada_logistician
		RARITY = free_or_veteran
		COUNCIL = yes
		TIER = 1
	}
	councilor_modifier = {
		country_naval_cap_mult = 0.05
		command_limit_mult = 0.05
	}
	triggered_councilor_modifier = {
		potential = { trait_is_nomad_check = no }
		ship_orbit_upkeep_mult = -0.05
	}
	triggered_councilor_modifier = {
		potential = { trait_is_nomad_check = yes }
		ships_upkeep_mult = -0.025
	}
	leader_potential_add = {
		OR = {
			has_paragon_dlc = no
			has_trait = subclass_commander_councilor
		}
	}
	leader_class = { commander }
	selectable_weight = {
		inline_script = paragon/subclass_free_trait_weight
		inline_script = paragon/council_weight_mult
	}
}

leader_trait_armada_logistician_2 = {
	leader_trait_type = veteran
	replace_traits = { leader_trait_armada_logistician }
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_armada_logistician
		RARITY = free_or_veteran
		COUNCIL = yes
		TIER = 2
	}
	councilor_modifier = {
		country_naval_cap_mult = 0.1
		command_limit_mult = 0.1
	}
	triggered_councilor_modifier = {
		potential = { trait_is_nomad_check = no }
		ship_orbit_upkeep_mult = -0.10
	}
	triggered_councilor_modifier = {
		potential = { trait_is_nomad_check = yes }
		ships_upkeep_mult = -0.05
	}
	leader_class = { commander }
}


###################
trait_ruler_military_pioneer = {
	leader_trait_type = veteran
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_military_pioneer
		RARITY = free_or_veteran
		COUNCIL = yes
		TIER = 1
	}
	councilor_modifier = {
		starbase_shipyard_build_speed_mult = 0.15
		starbase_upgrade_speed_mult = 0.15
	}
	triggered_councilor_modifier = {
		potential = {
			exists = owner
			owner = { NOT = { has_tradition = tr_unyielding_fortress_doctrine} }
		}
		starbase_upgrade_cost_mult = -0.075
	}
	triggered_councilor_modifier = {
		potential = {
			exists = owner
			owner = { has_tradition = tr_unyielding_fortress_doctrine }
		}
		starbases_upkeep_mult = -0.05
		category_military_theory_research_speed_mult = 0.05
		category_military_theory_draw_chance_mult = 0.15
	}
	leader_potential_add = {
		NOT = { has_ethic = ethic_pacifist }
		FROM = { is_nomadic = no }
		OR = {
			has_paragon_dlc = no
			has_trait = subclass_commander_councilor
		}
	}
	leader_class = { commander }
	selectable_weight = {
		inline_script = paragon/subclass_free_trait_weight
		inline_script = paragon/council_weight_mult
	}
}

trait_ruler_military_pioneer_2 = {
	leader_trait_type = veteran
	replace_traits = { trait_ruler_military_pioneer }
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_military_pioneer
		RARITY = veteran
		COUNCIL = yes
		TIER = 2
	}
	councilor_modifier = {
		starbase_shipyard_build_speed_mult = 0.3
		starbase_upgrade_speed_mult = 0.3
	}
	triggered_councilor_modifier = {
		potential = {
			exists = owner
			owner = { NOT = { has_tradition = tr_unyielding_fortress_doctrine} }
		}
		starbase_upgrade_cost_mult = -0.15
	}
	triggered_councilor_modifier = {
		potential = {
			exists = owner
			owner = { has_tradition = tr_unyielding_fortress_doctrine }
		}
		starbases_upkeep_mult = -0.1
		category_military_theory_research_speed_mult = 0.1
		category_military_theory_draw_chance_mult = 0.3
	}
	leader_class = { commander }
}


###################
leader_trait_intimidator = {
	leader_trait_type = veteran
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_intimidator
		RARITY = veteran
		COUNCIL = yes
		TIER = 1
	}
	councilor_modifier = {
		country_power_projection_influence_produces_add = 0.35
		country_naval_cap_mult = 0.035
		diplo_weight_naval_mult = 0.15
	}
	leader_potential_add = {
		has_paragon_dlc = yes
		has_trait = subclass_commander_councilor
	}
	leader_class = { commander }
	selectable_weight = {
		weight = @subclass_trait_weight
		inline_script = paragon/council_weight_mult
	}
}

leader_trait_intimidator_2 = {
	leader_trait_type = veteran
	replace_traits = { leader_trait_intimidator }
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_intimidator
		RARITY = veteran
		COUNCIL = yes
		TIER = 2
	}
	councilor_modifier = {
		country_power_projection_influence_produces_add = 0.75
		country_naval_cap_mult = 0.075
		diplo_weight_naval_mult = 0.3
	}
	leader_class = { commander }
}

###################
leader_trait_border_guard = {
	leader_trait_type = veteran
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_home_in_the_sky
		RARITY = veteran
		COUNCIL = yes
		TIER = 1
	}
	councilor_modifier = {
		shipsize_military_station_small_build_speed_mult = 0.1
		ship_military_station_small_cost_mult = -0.1
		shipclass_military_station_hull_mult = 0.2
		ship_military_station_small_upkeep_mult = -0.1
	}
	leader_potential_add = {
		has_paragon_dlc = yes
		has_trait = subclass_commander_councilor
		has_ethic = ethic_pacifist
		trait_is_nomad_check = no
	}
	leader_class = { commander }
	selectable_weight = {
		weight = @subclass_trait_weight
		inline_script = paragon/council_weight_mult
	}
}

leader_trait_border_guard_2 = {
	leader_trait_type = veteran
	replace_traits = { leader_trait_border_guard }
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_home_in_the_sky
		RARITY = veteran
		COUNCIL = yes
		TIER = 2
	}
	councilor_modifier = {
		shipsize_military_station_small_build_speed_mult = 0.2
		ship_military_station_small_cost_mult = -0.2
		shipclass_military_station_hull_mult = 0.4
		ship_military_station_small_upkeep_mult = -0.2
	}
	leader_class = { commander }
}

###################
leader_trait_crew_trainer = {
	leader_trait_type = veteran
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_destroyer_focus
		RARITY = veteran
		COUNCIL = yes
		TIER = 1
	}
	councilor_modifier = {
		country_naval_cap_add = 25
		command_limit_add = 5
		ship_starting_experience_add = 250
		ships_upkeep_mult  = -0.025
	}
	leader_potential_add = {
		has_paragon_dlc = yes
		has_trait = subclass_commander_councilor
	}
	leader_class = { commander }
	selectable_weight = {
		weight = @subclass_trait_weight
		inline_script = paragon/council_weight_mult
	}
}

leader_trait_crew_trainer_2 = {
	leader_trait_type = veteran
	replace_traits = { leader_trait_crew_trainer }
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_destroyer_focus
		RARITY = veteran
		COUNCIL = yes
		TIER = 2
	}
	councilor_modifier = {
		country_naval_cap_add = 50
		command_limit_add = 10
		ship_starting_experience_add = 500
		ships_upkeep_mult  = -0.05
	}
	leader_class = { commander }
}

###################
# DESTINY TRAITS  #
###################

leader_trait_master_gunner = {
	leader_trait_type = destiny
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_master_gunner
		RARITY = paragon
		COUNCIL = no
		TIER = none
	}
	on_gained_effect = {
		if = {
			limit = {
				exists = owner
			}
			owner = {
				country_event = { id = timeline.50 } # Timeline First Leader with Destiny Trait
			}
		}
	}
	fleet_modifier = {
		ship_weapon_damage = 0.05
		ship_weapon_range_mult = 0.25
		ship_tracking_mult = 0.25
		ship_accuracy_mult = 0.25
	}
	leader_potential_add = {
		has_paragon_dlc = yes
		has_trait = subclass_commander_admiral
	}
	leader_class = { commander }
	selectable_weight = {
		weight = @subclass_trait_weight
		inline_script = paragon/pilot_weight_mult
		inline_script = {
			script = paragon/subclass_weight_mult
			SUBCLASS = commander_admiral
		}
	}
	background_icon = GFX_leader_background_destiny_1
}

leader_trait_military_overseer = {
	leader_trait_type = destiny
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_military_overseer
		RARITY = paragon
		COUNCIL = yes
		TIER = none
	}
	on_gained_effect = {
		if = {
			limit = {
				exists = owner
			}
			owner = {
				country_event = { id = timeline.50 } # Timeline First Leader with Destiny Trait
			}
		}
	}
	councilor_modifier = {
		country_power_projection_influence_produces_add = 1.5
		shipclass_military_build_speed_mult = 0.3
		country_naval_cap_mult = 0.15
		ship_starting_experience_add = 500
	}
	leader_potential_add = {
		has_paragon_dlc = yes
		has_trait = subclass_commander_councilor
	}
	leader_class = { commander }
	selectable_weight = {
		weight = @subclass_trait_weight
		inline_script = paragon/council_weight_mult
	}
	background_icon = GFX_leader_background_destiny_1
}

leader_trait_armorer = {
	leader_trait_type = destiny
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_armorer
		RARITY = paragon
		COUNCIL = yes
		TIER = none
	}
	on_gained_effect = {
		if = {
			limit = {
				exists = owner
			}
			owner = {
				country_event = { id = timeline.50 } # Timeline First Leader with Destiny Trait
			}
		}
	}
	councilor_modifier = {
		ship_shield_add = 120
		ship_armor_add = 120
		ship_armor_hardening_add = 0.2
		ship_shield_hardening_add = 0.2
	}
	leader_potential_add = {
		has_paragon_dlc = yes
		has_trait = subclass_commander_councilor
	}
	leader_class = { commander }
	selectable_weight = {
		weight = @subclass_trait_weight
		inline_script = paragon/council_weight_mult
	}
	background_icon = GFX_leader_background_destiny_1
}

leader_trait_destiny_engineer = {
	leader_trait_type = destiny
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_engineer
		RARITY = paragon
		COUNCIL = no
		TIER = none
	}
	on_gained_effect = {
		if = {
			limit = {
				exists = owner
			}
			owner = {
				country_event = { id = timeline.50 } # Timeline First Leader with Destiny Trait
			}
		}
	}
	fleet_modifier = {
		ship_hull_add = 250
		ship_hull_mult = 0.25
		ship_hull_regen_add_perc = 0.05
		ship_damage_reduction_add = 5
	}
	leader_potential_add = {
		has_paragon_dlc = yes
		has_trait = subclass_commander_admiral
	}
	leader_class = { commander }
	selectable_weight = {
		weight = @subclass_trait_weight
		inline_script = paragon/pilot_weight_mult
		inline_script = {
			script = paragon/subclass_weight_mult
			SUBCLASS = commander_admiral
		}
	}
	background_icon = GFX_leader_background_destiny_1
}

leader_trait_guerilla_tactics = {
	leader_trait_type = destiny
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_guerilla_tactics
		RARITY = paragon
		COUNCIL = no
		TIER = none
	}
	on_gained_effect = {
		if = {
			limit = {
				exists = owner
			}
			owner = {
				country_event = { id = timeline.50 } # Timeline First Leader with Destiny Trait
			}
		}
	}
	triggered_modifier = {
		potential = { 	has_first_contact_dlc = no 
						has_trait = subclass_commander_admiral }
		ship_disengage_opportunities_add = 2
	}
	triggered_modifier = {
		potential = { has_first_contact_dlc = yes }
		ship_cloaking_strength_add = 2
	}
	modifier = {
		ship_evasion_add = 15
		ship_evasion_mult = 0.25
		ship_speed_mult = 0.25
		fleet_mia_time_mult = -0.5
	}
	triggered_fleet_modifier = {
		potential = { has_trait = subclass_commander_admiral }
			ship_disengage_chance_mult = 0.5
			ship_engagement_range_mult = 0.5
			ship_emergency_ftl_mult = -0.5
	}
	triggered_fleet_modifier = {
		potential = { has_trait = subclass_commander_general }
			command_limit_mult = -0.25
	}
	triggered_army_modifier = {
		potential = { has_trait = subclass_commander_general }
			armies_upkeep_mult = -0.5
			army_damage_taken_mult = -0.25
	}
	triggered_modifier = {
		potential = { 	has_trait = subclass_scientist_explorer
						owner? = { is_nomadic = no } }
		ship_emergency_ftl_mult = -0.5
	}
	triggered_modifier = {
		potential = { 	has_trait = subclass_scientist_explorer
						owner? = { is_nomadic = yes } }
		ship_engagement_range_mult = 0.5
	}
	triggered_background_planet_modifier = {
		potential = {	trait_is_gestalt_check = no
						has_trait = subclass_scientist_explorer
						exists = FROM
						FROM = {
							exists = owner
							owner = {
								is_same_value = root.owner } } }
		planet_enforcers_society_research_produces_add = 0.15
		planet_enforcers_engineering_research_produces_add = 0.15
		planet_enforcers_physics_research_produces_add = 0.15
	}
	triggered_background_planet_modifier = {
		potential = {	trait_is_gestalt_check = yes
						has_trait = subclass_scientist_explorer
						exists = FROM
						FROM = {
							exists = owner
							owner = {
								is_same_value = root.owner } } }
		planet_soldiers_society_research_produces_add = 0.15
		planet_soldiers_engineering_research_produces_add = 0.15
		planet_soldiers_physics_research_produces_add = 0.15
	}
	triggered_background_planet_modifier = {
		potential = {	trait_is_gestalt_check = no
						has_trait = subclass_scientist_explorer
						exists = FROM
						FROM = {
							exists = owner
							owner = {
								is_same_value = root.owner
								NOT = { has_origin = civic_dystopian_society } } } }
		job_enforcer_add = 150
	}
	triggered_background_planet_modifier = {
		potential = {	trait_is_gestalt_check = no
						has_trait = subclass_scientist_explorer
						exists = FROM
						FROM = {
							exists = owner
							owner = {
								is_same_value = root.owner
								has_origin = civic_dystopian_society } } }
		job_dystopian_enforcer_add = 150
	}
	triggered_background_planet_modifier = {
		potential = {	trait_is_gestalt_check = yes
						trait_is_wilderness_check = no
						has_trait = subclass_scientist_explorer
						exists = FROM
						FROM = {
							exists = owner
							owner = {
								is_same_value = root.owner } } }
		job_warrior_drone_add = 150
	}
	leader_potential_add = {
		has_paragon_dlc = yes
		OR = {
			has_trait = subclass_commander_general
			has_trait = subclass_commander_admiral
			has_trait = subclass_scientist_explorer
		}
	}
	leader_class = { commander scientist }
	selectable_weight = {
		weight = @subclass_trait_weight
		inline_script = paragon/pilot_weight_mult
		inline_script = {
			script = paragon/subclass_weight_mult
			SUBCLASS = commander_admiral
		}
	}
	background_icon = GFX_leader_background_destiny_1
}

leader_trait_survivalist = {
	leader_trait_type = destiny
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_survivalist
		RARITY = paragon
		COUNCIL = no
		TIER = none
	}
	on_gained_effect = {
		if = {
			limit = {
				exists = owner
			}
			owner = {
				country_event = { id = timeline.50 } # Timeline First Leader with Destiny Trait
			}
		}
	}
	fleet_modifier = {
		ship_friendly_territory_evasion_mult = 0.25
		ship_friendly_territory_tracking_mult = 0.25
		ship_friendly_territory_accuracy_mult = 0.25
		ship_friendly_territory_fire_rate_mult = 0.25
		ship_friendly_territory_shield_mult = 0.25
		ship_friendly_territory_shield_add = 250
	}
	leader_potential_add = {
		trait_is_nomad_check = no
		has_paragon_dlc = yes
		has_trait = subclass_commander_admiral
	}
	leader_class = { commander }
	selectable_weight = {
		weight = @subclass_trait_weight
		inline_script = paragon/pilot_weight_mult
		inline_script = {
			script = paragon/subclass_weight_mult
			SUBCLASS = commander_admiral
		}
	}
	background_icon = GFX_leader_background_destiny_1
}

leader_trait_maven_of_war = {
	leader_trait_type = destiny
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_maven_of_war
		RARITY = paragon
		COUNCIL = yes
		TIER = none
	}
	on_gained_effect = {
		if = {
			limit = {
				exists = owner
			}
			owner = {
				country_event = { id = timeline.50 } # Timeline First Leader with Destiny Trait
			}
		}
	}
	councilor_modifier = {
		starbase_shipyard_build_cost_mult = -0.05
		ship_speed_mult = 0.15
		shipclass_military_build_speed_mult = 0.15
	}
	triggered_councilor_modifier = {
		potential = {
			exists = owner
			owner = {
				country_uses_bio_ships = no
			}
		}
		category_voidcraft_research_speed_mult = 0.05
		category_voidcraft_draw_chance_mult = 0.25
	}
	triggered_councilor_modifier = {
		potential = {
			exists = owner
			owner = {
				country_uses_bio_ships = yes
			}
		}
		category_biology_research_speed_mult = 0.05
		category_biology_draw_chance_mult = 0.25
	}
	leader_potential_add = {
		has_paragon_dlc = yes
		has_trait = subclass_commander_councilor
	}
	leader_class = { commander }
	selectable_weight = {
		weight = @subclass_trait_weight
		inline_script = paragon/council_weight_mult
	}
	background_icon = GFX_leader_background_destiny_1
}

leader_trait_peacekeeper = {
	leader_trait_type = destiny
	inline_script = {
		script = trait/icon
		CLASS = leader
		ICON = GFX_leader_trait_peacekeeper
		RARITY = paragon
		COUNCIL = yes
		TIER = none
	}
	on_gained_effect = {
		if = {
			limit = {
				exists = owner
			}
			owner = {
				country_event = { id = timeline.50 } # Timeline First Leader with Destiny Trait
			}
		}
	}
	councilor_modifier = {
		planet_stability_add = 3
		planet_crime_add = -15
		pop_ethic_pacifist_attraction_mult = 0.45
		pop_factions_produces_mult = 0.15
		faction_approval = 0.03
	}
	leader_potential_add = {
		has_paragon_dlc = yes
		OR = {
			has_trait = subclass_official_economy_councilor
			has_trait = subclass_commander_councilor
		}
		has_ethic = ethic_pacifist
	}
	leader_class = { commander official }
	selectable_weight = {
		weight = @subclass_trait_weight
		inline_script = paragon/council_weight_mult
	}
	background_icon = GFX_leader_background_destiny_1
}

###################
# NEGATIVE TRAITS #
###################

leader_trait_nervous = {
	leader_trait_type = negative
	inline_script = {
		script = trait/icon_negative
		ICON = GFX_leader_trait_nervous
		COUNCIL = no
		TIER = 1
	}
	fleet_modifier = {
		ship_fire_rate_mult = -0.05
		ship_disengage_chance_mult = 0.05
	}
	leader_potential_add = {
		is_gestalt = no
	}
	leader_class = { commander }
	opposites = {
		leader_trait_unyielding
	}
	selectable_weight = {
		weight = @class_negative_trait_weight
		inline_script = paragon/pilot_weight_mult
	}
}

leader_trait_nervous_2 = {
	leader_trait_type = negative
	replace_traits = { leader_trait_nervous }
	inline_script = {
		script = trait/icon_negative
		ICON = GFX_leader_trait_nervous
		COUNCIL = no
		TIER = 2
	}
	fleet_modifier = {
		ship_fire_rate_mult = -0.1
		ship_disengage_chance_mult = 0.1
	}
	leader_class = { commander }
	opposites = {
		leader_trait_unyielding
	}
	selectable_weight = @tier2_negative_trait_weight
}

###################
leader_trait_lethargic = {
	leader_trait_type = negative
	inline_script = {
		script = trait/icon_negative
		ICON = GFX_leader_trait_lethargic
		COUNCIL = no
		TIER = 1
	}
	fleet_modifier = {
		ship_evasion_mult = -0.15
		ship_speed_mult = -0.15
	}
	leader_potential_add = {
		is_gestalt = no
	}
	leader_class = { commander }
	opposites = {
		leader_trait_gale_speed
		leader_trait_gale_speed_2
	}
	selectable_weight = {
		weight = @class_negative_trait_weight
		inline_script = paragon/pilot_weight_mult
	}
}

leader_trait_lethargic_2 = {
	leader_trait_type = negative
	replace_traits = { leader_trait_lethargic }
	inline_script = {
		script = trait/icon_negative
		ICON = GFX_leader_trait_lethargic
		COUNCIL = no
		TIER = 2
	}
	fleet_modifier = {
		ship_evasion_mult = -0.3
		ship_speed_mult = -0.3
	}
	leader_class = { commander }
	opposites = {
		leader_trait_gale_speed
		leader_trait_gale_speed_2
	}
	selectable_weight = @tier2_negative_trait_weight
}

###################
leader_trait_micromanager = {
	leader_trait_type = negative
	inline_script = {
		script = trait/icon_negative
		ICON = GFX_leader_trait_micromanager
		COUNCIL = no
		TIER = 1
	}
	fleet_modifier = {
		ships_upkeep_mult  = 0.1
	}
	leader_class = { commander }
	selectable_weight = {
		weight = @class_negative_trait_weight
		inline_script = paragon/pilot_weight_mult
	}
}

leader_trait_micromanager_2 = {
	leader_trait_type = negative
	replace_traits = { leader_trait_micromanager }
	inline_script = {
		script = trait/icon_negative
		ICON = GFX_leader_trait_micromanager
		COUNCIL = no
		TIER = 2
	}
	fleet_modifier = {
		ships_upkeep_mult  = 0.2
	}
	leader_class = { commander }
	selectable_weight = @tier2_negative_trait_weight
}

###################
leader_trait_reckless = {
	leader_trait_type = negative
	inline_script = {
		script = trait/icon_negative
		ICON = GFX_leader_trait_reckless
		COUNCIL = no
		TIER = 1
	}
	fleet_modifier = {
		ship_disengage_chance_mult  = -0.25
		ship_fire_rate_mult = 0.025
	}
	leader_class = { commander }
	opposites = {
		leader_trait_trickster
	}
	selectable_weight = {
		weight = @class_negative_trait_weight
		inline_script = paragon/pilot_weight_mult
		modifier = {
			species = {
				has_trait = trait_unruly
			}
			factor = @species_trait_weight_mult
		}
	}
}

leader_trait_reckless_2 = {
	leader_trait_type = negative
	replace_traits = { leader_trait_reckless }
	inline_script = {
		script = trait/icon_negative
		ICON = GFX_leader_trait_reckless
		COUNCIL = no
		TIER = 2
	}
	fleet_modifier = {
		ship_disengage_chance_mult  = -0.5
		ship_fire_rate_mult = 0.05
	}
	leader_class = { commander }
	opposites = {
		leader_trait_trickster
	}
	selectable_weight = @tier2_negative_trait_weight
}

###################
leader_trait_slipshod = {
	leader_trait_type = negative
	inline_script = {
		script = trait/icon_negative
		ICON = GFX_leader_trait_slipshod
		COUNCIL = no
		TIER = 1
	}
	fleet_modifier = {
		ship_armor_mult = -0.1
		ship_shield_mult = -0.1
	}
	leader_class = { commander }
	opposites = {
		leader_trait_unyielding
	}
	selectable_weight = {
		weight = @class_negative_trait_weight
		inline_script = paragon/pilot_weight_mult
		modifier = {
			species = {
				OR = {
					has_trait = trait_decadent
					has_trait = trait_robot_decadent
				}
			}
			factor = @species_trait_weight_mult
		}
	}
}

leader_trait_slipshod_2 = {
	leader_trait_type = negative
	replace_traits = { leader_trait_slipshod }
	inline_script = {
		script = trait/icon_negative
		ICON = GFX_leader_trait_slipshod
		COUNCIL = no
		TIER = 2
	}
	fleet_modifier = {
		ship_armor_mult = -0.2
		ship_shield_mult = -0.2
	}
	leader_class = { commander }
	opposites = {
		leader_trait_unyielding
	}
	selectable_weight = @tier2_negative_trait_weight
}

###########
# SPECIAL #
###########

leader_trait_dragonslayer = {
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_dragonslayer
		RARITY = common
		COUNCIL = no
		TIER = none
	}
	fleet_modifier = {
		ship_speed_mult = 0.15
		ship_fire_rate_mult = 0.15
	}
	army_modifier = {
		army_damage_mult = 0.35
		army_morale_damage_mult = 0.35
	}
	leader_class = { commander }
	initial = no
	randomized = no
}

leader_trait_clone_army_commander = {
	cost = 0
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_clone_soldier
		RARITY = common
		COUNCIL = no
		TIER = none
	}
	fleet_modifier = {
		ship_fire_rate_mult = 0.25
		ship_weapon_range_mult = 0.1
	}
	triggered_councilor_modifier = {
		potential = { is_ruler = yes }
		ship_fire_rate_mult = 0.05
		ship_weapon_range_mult = 0.05
	}
	leader_class = { commander }
	initial = no
	randomized = no
}

leader_trait_clone_army_fertile_commander = {
	cost = 0
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_clone_soldier_descendant
		RARITY = common
		COUNCIL = no
		TIER = none
	}
	fleet_modifier = {
		ship_fire_rate_mult = 0.15
		ship_weapon_range_mult = 0.05
	}
	triggered_councilor_modifier = {
		potential = { is_ruler = yes }
		ship_fire_rate_mult = 0.05
		ship_weapon_range_mult = 0.05
	}
	leader_class = { commander }
	initial = no
	randomized = no
}

leader_trait_clone_army_full_commander = {
	cost = 0
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_clone_soldier_ascendant
		RARITY = common
		COUNCIL = no
		TIER = none
	}
	fleet_modifier = {
		ship_fire_rate_mult = 0.3
		ship_weapon_range_mult = 0.2
	}
	triggered_councilor_modifier = {
		potential = { is_ruler = yes }
		ship_fire_rate_mult = 0.1
		ship_weapon_range_mult = 0.1
	}
	leader_class = { commander }
	initial = no
	randomized = no
}

leader_trait_tactical_algorithms = {
	cost = 0
	leader_trait_type = destiny
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = "GFX_leader_trait_tactical_algorithms"
		RARITY = veteran
		COUNCIL = no
		TIER = none
	}
	on_gained_effect = {
		if = {
			limit = {
				exists = owner
			}
			owner = {
				country_event = { id = timeline.50 } # Timeline First Leader with Destiny Trait
			}
		}
	}
	immortal_leaders = yes
	triggered_fleet_modifier = {
		potential = {
			always = yes
		}
		ship_military_alloys_upkeep_mult = -0.1
		ship_military_energy_upkeep_mult = 0.15
		mult = trigger:has_total_skill
	}
	triggered_councilor_modifier = {
		potential = { is_ruler = yes }
		commander_exp_gain = 0.15
	}
	custom_tooltip_with_modifiers = leader_trait_tactical_algorithms_tt
	leader_class = { commander }
	initial = no
	randomized = no
	trade_acceptance_weight = -10
}
