####################Addons to ship parts
###################Tier1#############
################Aterburner

utility_component_template = {
	key = "AFTERBURNER_IC"
	size = aux
	icon = "GFX_ship_part_afterburner_ic"
	icon_frame = 1
	power = -25
	resources = {
		category = ship_components
		cost = {
			alloys = 8
		}
	}
	modifier = {
		ship_speed_mult = 0.20
		ship_evasion_mult = 0.10
		ship_evasion_add = 4
	}
	prerequisites = { "tech_afterburner_ic" }
	component_set = "AFTERBURNER_IC"
	upgrades_to = "LEA_AFTERBURNER_TIER2"

	ai_weight = {
		weight = 2
	}
}

############Aura
utility_component_template = {
	key = "SHIP_AURA_IC_1"
	size = medium
	icon = "GFX_ship_part_aura_fire_IC"
	icon_frame = 1
	power = -50

	size_restriction = { titan juggernaut }
	component_set = "ship_aura_components"
	prerequisites = { "tech_aura_ic_1" }

	hostile_aura = {
		name = "Defensive Aura"
		radius = 80
		apply_on = ships

		stack_info = {			#A ship can only be affected by one aura of a certain id. If multiple auras have the same ID the one with the highest priority will be applied.
			id = hostile_shield_dampener_ic
			priority = 1
		}

		modifier = {
			ship_fire_rate_mult = -0.15
		}

		graphics = {
			area_effect = {
				entity = "circle_area_entity"
				dynamic_scale = yes
			}
			ship_effect = {
				entity = "ship_aura_negative_entity"
				dynamic_scale = no
			}
		}
	}

	ai_weight = {
		weight = 0
	}
}


utility_component_template = {
	key = "SHIP_AURA_IC_2"
	size = medium
	icon = "GFX_ship_part_aura_fire_IC"
	icon_frame = 1
	power = -200

	size_restriction = { lea_large_basic_ship }
	component_set = "ship_aura_components"
	prerequisites = { "tech_aura_ic_1" }

	hostile_aura = {
		name = "Defensive Aura"
		radius = 120
		apply_on = ships

		stack_info = {			#A ship can only be affected by one aura of a certain id. If multiple auras have the same ID the one with the highest priority will be applied.
			id = hostile_shield_dampener
			priority = 200
		}

		modifier = {
			ship_fire_rate_mult = -0.25
		}

		graphics = {
			area_effect = {
				entity = "circle_area_entity"
				dynamic_scale = yes
			}
			ship_effect = {
				entity = "ship_aura_negative_entity"
				dynamic_scale = no
			}
		}
	}

	ai_weight = {
		weight = 0
	}
}

utility_component_template = {
	key = "SHIP_AURA_IC_3"
	size = medium
	icon = "GFX_ship_part_aura_fire_IC"
	icon_frame = 1
	power = -200

	size_restriction = { lea_large_basic_ship }
	component_set = "ship_aura_components"
	prerequisites = { "tech_aura_ic_1" }

	friendly_aura = {
		name = "aura_inspiring_presence"
		radius = 120
		apply_on = ships

		stack_info = {			#A ship can only be affected by one aura of a certain id. If multiple auras have the same ID the one with the highest priority will be applied.
			id = friendly_inspiring_presence
			priority = 220
		}

		modifier = {
			ship_fire_rate_mult = 0.15
		}

		graphics = {
			area_effect = {
				entity = "circle_area_entity"
				dynamic_scale = yes
			}
			ship_effect = {
				entity = "ship_aura_positive_entity"
				dynamic_scale = no
			}
		}
	}

	ai_weight = {
		weight = 0
	}
}

##########################Boosters

utility_component_template = {
	key = "REACTOR_BOOSTER_IC"
	size = aux
	icon = "GFX_ship_part_reactor_booster_ic"
	icon_frame = 1
	power = 140
	resources = {
		category = ship_components
		cost = {
			alloys = 15
		}
	}

	prerequisites = { "tech_reactor_boosters_ic" }
	upgrades_to = "LEA_REACTOR_BOOSTER_TIER2"
	component_set = "REACTOR_BOOSTER_IC"

	ai_weight = {
		weight = 0
	}
}

utility_component_template = {
	key = "SHIELD_BOOSTER_IC"
	size = aux
	icon = "GFX_ship_part_durability_booster_ic"
	icon_frame = 1
	power = -30
	resources = {
		category = ship_components
		cost = {
			alloys = 30
			exotic_gases = 5
			rare_crystals = 5
		}
	}

	prerequisites = { "tech_shield_boosters_ic" }
	upgrades_to = "LEA_DURABILITY_BOOSTER_TIER2"
	component_set = "SHIELD_BOOSTER_IC"

	modifier = {
		ship_hull_mult = 0.06
		ship_armor_mult = 0.06
		ship_shield_mult = 0.06
	}

	
	ai_weight = {
		weight = 0
	}
}

utility_component_template = {
	key = "AUTO_REPAIR_IC"
	size = aux
	icon = "GFX_ship_part_adv_repair_ic"
	icon_frame = 1
	power = 0
	prerequisites = { "tech_nanites_repair_ic" }
	upgrades_to = "LEA_AUTO_REPAIR_TIER2"
	component_set = "AUTO_REPAIR_IC"
	
	resources = {
		category = ship_components
		cost = {
			alloys = 2
			nanites = 10
		}
	}
	

	modifier = {
		ship_hull_regen_add_perc = 0.3
		ship_armor_regen_add_perc = 0.15
	}

	ai_weight = {
			weight = 0
	}
}		
##################Other
utility_component_template = {
	key = "FIRE_CONTROL_IC"
	size = aux
	icon = "GFX_ship_part_fire_control_ic"
	icon_frame = 1
	power = -15
	prerequisites = { "tech_fire_control_ic" }
	upgrades_to = "LEA_FIRE_CONTROL_TIER2"
	component_set = "FIRE_CONTROL_IC"
	resources = {
		category = ship_components
		cost = {
			alloys = 10
			exotic_gases = 1
		}
	}

	ship_modifier = {
		ship_accuracy_add = 8
		ship_fire_rate_mult = 0.05
	}

	ai_weight = {
		weight = 0
	}
}


##############Tier 2
utility_component_template = {
	key = "LEA_AFTERBURNER_TIER2"
	size = aux
	icon = "GFX_ship_part_lea_afterburner_tier2"
	icon_frame = 1
	power = -40
	resources = {
		category = ship_components
		cost = {
			alloys = 8
			nanites = 1
		}
	}
	modifier = {
		ship_speed_mult = 0.30
		ship_evasion_mult = 0.15
		ship_evasion_add = 4
	}
	prerequisites = { "tech_afterburner_tier2" }
	component_set = "LEA_AFTERBURNER_TIER2"

	ai_weight = {
		weight = 0
	}
}

############Aura
utility_component_template = {
	key = "LEA_SHIP_AURA_SMALL_TIER2"
	size = medium
	icon = "GFX_ship_part_lea_ship_aura_goliath_2_tier2"
	icon_frame = 1
	power = -60

	size_restriction = { titan juggernaut }
	component_set = "ship_aura_components"
	prerequisites = { "tech_aura_tier2" }

	hostile_aura = {
		name = "Defensive Aura"
		radius = 80
		apply_on = ships

		stack_info = {			#A ship can only be affected by one aura of a certain id. If multiple auras have the same ID the one with the highest priority will be applied.
			id = hostile_shield_dampener_ic
			priority = 1
		}

		modifier = {
			ship_fire_rate_mult = -0.20
		}

		graphics = {
			area_effect = {
				entity = "circle_area_entity"
				dynamic_scale = yes
			}
			ship_effect = {
				entity = "ship_aura_negative_entity"
				dynamic_scale = no
			}
		}
	}

	ai_weight = {
		weight = 0
	}
}


utility_component_template = {
	key = "LEA_SHIP_AURA_GOLIATH_1_TIER2"
	size = medium
	icon = "GFX_ship_part_lea_ship_aura_goliath_2_tier2"
	icon_frame = 1
	power = -250

	size_restriction = { lea_large_basic_ship }
	component_set = "ship_aura_components"
	prerequisites = { "tech_aura_tier2" }

	hostile_aura = {
		name = "Defensive Aura"
		radius = 120
		apply_on = ships

		stack_info = {			#A ship can only be affected by one aura of a certain id. If multiple auras have the same ID the one with the highest priority will be applied.
			id = hostile_shield_dampener
			priority = 200
		}

		modifier = {
			ship_fire_rate_mult = -0.30
		}

		graphics = {
			area_effect = {
				entity = "circle_area_entity"
				dynamic_scale = yes
			}
			ship_effect = {
				entity = "ship_aura_negative_entity"
				dynamic_scale = no
			}
		}
	}

	ai_weight = {
		weight = 0
	}
}

utility_component_template = {
	key = "LEA_SHIP_AURA_GOLIATH_2_TIER2"
	size = medium
	icon = "GFX_ship_part_lea_ship_aura_goliath_2_tier2"
	icon_frame = 1
	power = -250

	size_restriction = { lea_large_basic_ship }
	component_set = "ship_aura_components"
	prerequisites = { "tech_aura_tier2" }

	friendly_aura = {
		name = "aura_inspiring_presence"
		radius = 120
		apply_on = ships

		stack_info = {			#A ship can only be affected by one aura of a certain id. If multiple auras have the same ID the one with the highest priority will be applied.
			id = friendly_inspiring_presence
			priority = 220
		}

		modifier = {
			ship_fire_rate_mult = 0.20
		}

		graphics = {
			area_effect = {
				entity = "circle_area_entity"
				dynamic_scale = yes
			}
			ship_effect = {
				entity = "ship_aura_positive_entity"
				dynamic_scale = no
			}
		}
	}

	ai_weight = {
		weight = 0
	}
}

utility_component_template = {
	key = "LEA_REACTOR_BOOSTER_TIER2"
	size = aux
	icon = "GFX_ship_part_lea_reactor_booster_tier2"
	icon_frame = 1
	power = 250

	modifier = {
		ship_speed_mult = 0.10
	}

	resources = {
		category = ship_components
		cost = {
			alloys = 18
		}
	}

	prerequisites = { "tech_reactor_boosters_ic2" }
	component_set = "LEA_REACTOR_BOOSTER_TIER2"

	ai_weight = {
		weight = 0
	}
}

utility_component_template = {
	key = "LEA_DURABILITY_BOOSTER_TIER2"
	size = aux
	icon = "GFX_ship_part_lea_durability_booster_tier2"
	icon_frame = 1
	power = -35
	resources = {
		category = ship_components
		cost = {
			alloys = 30
			exotic_gases = 4
			rare_crystals = 4
			volatile_motes = 4
		}
	}

	prerequisites = { "tech_shield_boosters_ic2" }
	component_set = "LEA_DURABILITY_BOOSTER_TIER2"

	modifier = {
		ship_hull_mult = 0.12
		ship_armor_mult = 0.12
		ship_shield_mult = 0.12
		ship_hull_add = 100
	}

	
	ai_weight = {
		weight = 0
	}
}


utility_component_template = {
	key = "LEA_AUTO_REPAIR_TIER2"
	size = aux
	icon = "GFX_ship_part_lea_auto_repair_tier2"
	icon_frame = 1
	power = 0
	prerequisites = { "tech_nanites_repair_ic2" }
	component_set = "LEA_AUTO_REPAIR_TIER2"
	
	resources = {
		category = ship_components
		cost = {
			alloys = 2
			nanites = 14
		}
	}
	

	modifier = {
		ship_hull_regen_add_perc = 0.4
		ship_armor_regen_add_perc = 0.20
		ship_hull_mult = 0.2
	}

ai_weight = {
		weight = 0
	}
}		
##################Other
utility_component_template = {
	key = "LEA_FIRE_CONTROL_TIER2"
	size = aux
	icon = "GFX_ship_part_lea_fire_control_tier2"
	icon_frame = 1
	power = -20
	prerequisites = { "tech_fire_control_ic2" }
	component_set = "LEA_FIRE_CONTROL_TIER2"
	resources = {
		category = ship_components
		cost = {
			alloys = 10
			nanites = 1
			sr_living_metal = 1

		}
	}

	ship_modifier = {
		ship_accuracy_add = 12
		ship_tracking_add = 2
		ship_fire_rate_mult = 0.1
	}

	ai_weight = {
		weight = 0
	}
}