
##########################
# 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_weapon_damage = 0.05
		ship_speed_mult = 0.15
	}
	leader_class = { commander }
	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
	}
	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
	}
	fleet_modifier = {
		ship_weapon_range_mult = 0.2
		ship_disengage_chance_mult = 0.05
	}
	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
	}
	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
	}
	# We do these so the tooltip displays correctly
	triggered_fleet_modifier = {
		potential = {
			leader_class = commander
		}
		ship_hull_regen_add_perc = 0.005
		ship_armor_regen_add_perc = 0.01
	}
	triggered_modifier = {
		potential = {
			leader_class = scientist
		}
		ship_hull_regen_add_perc = 0.005
		ship_armor_regen_add_perc = 0.01
	}
	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_disengage_chance_mult = 0.4
	}
	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.35
	}
	leader_class = { commander }
	opposites = {
		leader_trait_juryrigger
		leader_trait_juryrigger_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.25
		create_debris_chance = -0.5
	}
	leader_class = { commander }
	opposites = {
		leader_trait_juryrigger
		leader_trait_juryrigger_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 = 1.0
		ship_weapon_damage = 0.05
	}
	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 = 2.0
		ship_weapon_damage = 0.10
	}
	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.1
		ship_tracking_mult = 0.075
	}
	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.15
		ship_tracking_mult = 0.1
		ship_accuracy_mult = 0.075
	}
	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
	}
	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 = 80
	}
	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
	}
	leader_class = { commander }
	custom_tooltip = 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
	}
	triggered_fleet_modifier = {
		potential = { trait_is_nomad_check = yes }
		ships_upkeep_mult = -0.10
	}
	triggered_modifier = {
		potential = { has_first_contact_dlc = yes }
		ship_cloaking_strength_add = 1
	}
	leader_class = { commander }
	custom_tooltip = 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.3
	}
	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.5
	}
	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
		}
	}
	leader_class = { commander }
	custom_tooltip = 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 = {
		ship_armor_hardening_add = 0.15
	}
	leader_class = { commander }
	custom_tooltip = 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.2
		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.35
		weapon_archaeotech_weapon_fire_rate_mult = 0.35
	}
	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.15
	}
	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.35
		ship_weapon_range_mult = 0.35
	}
	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.15
	}
	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.25
		weapon_type_strike_craft_weapon_fire_rate_mult = 0.25
		ship_engagement_range_mult = 0.25
	}
	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.25
		weapon_type_explosive_weapon_damage_mult = 0.25
	}
	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.25
		s_slot_weapon_damage_mult = 0.25
		m_slot_weapon_fire_rate_mult = 0.25
		m_slot_weapon_damage_mult = 0.25
	}
	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 = {
		create_debris_chance = -1
		# Effect in paragon_2.1005 event.
	}
	leader_class = { commander }
	custom_tooltip_with_modifiers = leader_trait_juryrigger_effect
	opposites = {
		leader_trait_wrecker
		leader_trait_wrecker_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_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 = {
		create_debris_chance = -1
		# Effect in paragon_2.1005 event.
	}
	leader_class = { commander }
	custom_tooltip_with_modifiers = leader_trait_juryrigger_2_effect
	opposites = {
		leader_trait_wrecker
		leader_trait_wrecker_2
	}
}


###################
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.33
		ship_orbital_bombardment_pop_damage_mult = -0.67
	}
	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.75
		ship_orbital_bombardment_pop_damage_mult = -0.80
	}
	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
		}
	}
	modifier = {
		ship_speed_mult = 0.15
		ship_hyperlane_range_add = 3
		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
	}
	modifier = {
		ship_speed_mult = 0.25
		ship_hyperlane_range_add = 4
		fleet_mia_time_mult = -0.25
	}

	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
	}
	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.15
	}
	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 = {
		starbase_upgrade_cost_mult = -0.075
		ship_military_station_small_cost_mult = -0.075
		shipclass_starbase_hull_mult = 0.05
		shipclass_military_station_hull_mult = 0.05
	}
	leader_potential_add = {
		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 = {
		starbase_upgrade_cost_mult = -0.10
		ship_military_station_small_cost_mult = -0.10
		shipclass_starbase_hull_mult = 0.10
		shipclass_military_station_hull_mult = 0.10
	}
	leader_potential_add = {
		FROM = { is_nomadic = no }
	}
	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.025
	}
	triggered_councilor_modifier = {
		potential = { trait_is_nomad_check = no }
		ship_orbit_upkeep_mult = -0.075
	}
	triggered_councilor_modifier = {
		potential = { trait_is_nomad_check = yes }
		ships_upkeep_mult = -0.0375
	}
	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.075
	}
	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.10
		starbase_upgrade_cost_mult = -0.075
	}
	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
	}
}

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.20
		starbase_upgrade_cost_mult = -0.10
	}
	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.5
	}
	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
	}
	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.15
		shipclass_starbase_damage_mult = 0.2
		shipclass_starbase_hull_mult = 0.25
	}
	leader_potential_add = {
		has_paragon_dlc = yes
		has_trait = subclass_commander_councilor
		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.3
		shipclass_starbase_damage_mult = 0.3
		shipclass_starbase_hull_mult = 0.35
	}
	leader_potential_add = {
		trait_is_nomad_check = no
	}
	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
		ship_starting_experience_add = 120
	}
	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
		ship_starting_experience_add = 200
	}
	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_range_mult = 0.3
		ship_tracking_mult = 0.3
		ship_accuracy_mult = 0.3
	}
	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 = 2
		shipclass_military_build_speed_mult = 0.25
		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 = 100
		ship_armor_add = 100
		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_mult = 0.25
		ship_hull_regen_add_perc = 0.02
	}
	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_fleet_modifier = {
		potential = { has_first_contact_dlc = no }
		ship_disengage_chance_mult = 0.5
	}
	triggered_fleet_modifier = {
		potential = { has_first_contact_dlc = yes }
		ship_cloaking_strength_add = 2
	}
	fleet_modifier = {
		ship_disengage_opportunities_add = 2
		ship_evasion_add = 10
		fleet_mia_time_mult = -0.5
		command_limit_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_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.45
		ship_friendly_territory_fire_rate_mult = 0.45
		ship_friendly_territory_shield_add = 300
	}
	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 = {
		ship_speed_mult = 0.15
		shipclass_military_build_speed_mult = 0.3
	}
	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 = 2
		# piracy_suppression_mult = 0.35
		planet_crime_add = -20
		pop_ethic_pacifist_attraction_mult = 0.40
	}
	leader_potential_add = {
		has_paragon_dlc = yes
		OR = {
			has_trait = subclass_official_economy_councilor
			has_trait = subclass_commander_councilor
		}
	}
	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.15
		ship_disengage_chance_mult = 0.15
	}
	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.05
		ship_speed_mult = -0.05
		ships_upkeep_mult  = -0.025
	}
	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.15
		ship_speed_mult = -0.15
		ships_upkeep_mult  = -0.05
	}
	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.3
	}
	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.2
	}
	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.6
	}
	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.1
		ship_fire_rate_mult = 0.1
	}
	army_modifier = {
		army_damage_mult = 0.1
		army_disengage_chance_mult = 0.1

	}
	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
	}
	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
	}
	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.35
		ship_weapon_range_mult = 0.20
	}
	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.2
		mult = trigger:has_total_skill
	}
	custom_tooltip_with_modifiers = leader_trait_tactical_algorithms_tt
	leader_class = { commander }
	initial = no
	randomized = no
	trade_acceptance_weight = -10
}
