####################
# Reactor Booster #
####################
utility_component_template = {
	key = "REACTOR_BOOSTER_1"
	size = aux
	icon = "GFX_ship_part_reactor_booster_1"
	icon_frame = 1
	resources = {
		category = ship_components
		cost = {
			alloys = 5
		}
	}

	prerequisites = { "tech_reactor_boosters_1" }
	component_set = "REACTOR_BOOSTER_1"
	upgrades_to = "REACTOR_BOOSTER_2"

	modifier = {
		ship_reactor_power_mult = 0.20
	}

	ai_weight = {
		weight = 1
	}
}

utility_component_template = {
	key = "REACTOR_BOOSTER_2"
	size = aux
	icon = "GFX_ship_part_reactor_booster_2"
	icon_frame = 1
	resources = {
		category = ship_components
		cost = {
			alloys = 10
		}
	}

	prerequisites = { "tech_reactor_boosters_2" }
	component_set = "REACTOR_BOOSTER_2"
	upgrades_to = "REACTOR_BOOSTER_3"

	modifier = {
		ship_reactor_power_mult = 0.33
	}

	ai_weight = {
		weight = 3
	}
}

utility_component_template = {
	key = "REACTOR_BOOSTER_3"
	size = aux
	icon = "GFX_ship_part_reactor_booster_3"
	icon_frame = 1
	resources = {
		category = ship_components
		cost = {
			alloys = 15
		}
	}

	prerequisites = { "tech_reactor_boosters_3" }
	component_set = "REACTOR_BOOSTER_3"

	modifier = {
		ship_reactor_power_mult = 0.50
	}

	ai_weight = {
		weight = 5
	}
}

####################
# Shield Recharger #
####################

utility_component_template = {
	key = "SHIELD_BOOSTER"
	size = aux
	icon = "GFX_ship_part_shield_recharger"
	icon_frame = 1
	power = -20
	resources = {
		category = ship_components
		cost = {
			alloys = 10
			exotic_gases = 1
		}
	}

	prerequisites = { "tech_shield_rechargers_1" }
	component_set = "SHIELD_BOOSTER"

	modifier = {
		ship_shield_mult = 0.1
	}

	ai_weight = {
		weight = 10
		inline_script = "ai/shield_preference_weight"

		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = exotic_gases }
		}
	}
}

#############################
# Regenerative Hull Tissue #
#############################

utility_component_template = {
	key = "AUTO_REPAIR"
	size = aux
	icon = "GFX_ship_part_auto_repair"
	icon_frame = 1
	power = -10
	resources = {
		category = ship_components
		cost = {
			alloys = 20
		}
	}

	modifier = {
		ship_hull_regen_add_perc = 0.05
		ship_armor_regen_add_perc = 0.1
	}

	prerequisites = { tech_regenerative_hull_tissue }
	component_set = "AUTO_REPAIR"

	ai_weight = {
		weight = 10

		inline_script = "ai/armor_preference_weight"
	}
}

#############################
# Auxiliary Fire-control	#
#############################

utility_component_template = {
	key = "FIRE_CONTROL_1"
	size = aux
	icon = "GFX_ship_part_computer_default"
	icon_frame = 1
	power = -10
	resources = {
		category = ship_components
		cost = {
			alloys = 10
		}
	}

	ship_modifier = {
		ship_accuracy_add = 5
	}

	prerequisites = { tech_auxiliary_fire_control }
	component_set = "FIRE_CONTROL_1"

	ai_weight = {
		weight = 10
		modifier = {
			factor = 3.0
			is_preferred_weapons = weapon_type_kinetic
		}
	}
}

############
# HARDENERS
############

utility_component_template = {
	key = "SHIELD_HARDENER_1"
	size = aux
	icon = "GFX_ship_part_shield_hardener_1"
	icon_frame = 1
	power = -15
	resources = {
		category = ship_components
		cost = {
			alloys = 10
			exotic_gases = 1
		}
	}

	prerequisites = { "tech_shield_hardeners_1" }
	component_set = "SHIELD_HARDENER_1"
	upgrades_to = "SHIELD_HARDENER_2"

	ship_modifier = {
		ship_shield_hardening_add = @hardening_hardener_1
	}

	ai_weight = {
		weight = 10

		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = exotic_gases }
		}

		inline_script = "ai/shield_preference_weight"
	}
}

utility_component_template = {
	key = "SHIELD_HARDENER_2"
	size = aux
	icon = "GFX_ship_part_shield_hardener_2"
	icon_frame = 1
	power = -25
	resources = {
		category = ship_components
		cost = {
			alloys = 30
			sr_zro = 1
		}
	}

	prerequisites = { "tech_shield_hardeners_2" }
	component_set = "SHIELD_HARDENER_2"

	ship_modifier = {
		ship_shield_hardening_add = @hardening_hardener_2
	}

	ai_weight = {
		weight = 10

		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_zro }
		}

		inline_script = "ai/shield_preference_weight"
	}
}

utility_component_template = {
	key = "ARMOR_HARDENER_1"
	size = aux
	icon = "GFX_ship_part_armor_hardener_1"
	icon_frame = 1
	power = -15
	resources = {
		category = ship_components
		cost = {
			alloys = 10
			rare_crystals = 1
		}
	}

	prerequisites = { "tech_armor_hardeners_1" }
	component_set = "ARMOR_HARDENER_1"
	upgrades_to = "ARMOR_HARDENER_2"

	ship_modifier = {
		ship_armor_hardening_add = @hardening_hardener_1
	}

	ai_weight = {
		weight = 10

		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}

		inline_script = "ai/armor_preference_weight"
	}
}

utility_component_template = {
	key = "ARMOR_HARDENER_2"
	size = aux
	icon = "GFX_ship_part_armor_hardener_2"
	icon_frame = 1
	power = -25
	resources = {
		category = ship_components
		cost = {
			alloys = 30
			sr_living_metal = 1
		}
	}

	prerequisites = { "tech_armor_hardeners_2" }
	component_set = "ARMOR_HARDENER_2"

	ship_modifier = {
		ship_armor_hardening_add = @hardening_hardener_2
	}

	ai_weight = {
		weight = 10

		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_living_metal }
		}

		inline_script = "ai/armor_preference_weight"
	}
}

####################
# Covenant Uniques #
####################

utility_component_template = {
	key = "COMPOSER_MARK"
	size = aux
	icon = "GFX_ship_part_composer_covenant_aux"
	icon_frame = 1
	power = -20
	resources = {
		category = ship_components
		cost = {
			alloys = 20
			sr_zro = 2
		}
	}

	modifier = {
		ship_hull_regen_add_perc = 0.1
		ship_armor_regen_add_perc = 0.15
	}

	prerequisites = { tech_covenant_composer }
	component_set = "COMPOSER_MARK"

	ai_weight = {
		weight = 10
		modifier = {
			factor = 0
			has_country_resource = {
				type = sr_zro
				amount < 100
			}
		}
	}
}

utility_component_template = {
	key = "EATER_MARK"
	size = aux
	icon = "GFX_ship_part_eater_covenant_aux"
	icon_frame = 1
	power = -20
	resources = {
		category = ship_components
		cost = {
			alloys = 20
			sr_zro = 2
		}
	}

	ship_modifier = {
		ship_orbital_bombardment_mult = 0.2
		ship_accuracy_add = 5
	}

	prerequisites = { tech_covenant_eater }
	component_set = "EATER_MARK"

	ai_weight = {
		weight = 10
		modifier = {
			factor = 0
			has_country_resource = {
				type = sr_zro
				amount < 100
			}
		}
	}
}

utility_component_template = {
	key = "INSTRUMENT_MARK"
	size = aux
	icon = "GFX_ship_part_instrument_covenant_aux"
	icon_frame = 1
	power = -20
	resources = {
		category = ship_components
		cost = {
			alloys = 20
			sr_zro = 2
		}
	}

	modifier = {
		ship_speed_mult = 0.25
	}

	potential = {
		is_ship_class = shipclass_military
	}
	prerequisites = { tech_covenant_instrument }
	component_set = "INSTRUMENT_MARK"

	ai_weight = {
		weight = 10
		modifier = {
			factor = 0
			has_country_resource = {
				type = sr_zro
				amount < 100
			}
		}
	}
}

utility_component_template = {
	key = "CRADLE_MARK"
	size = aux
	icon = "GFX_ship_part_cradle_covenant_aux"
	icon_frame = 1
	power = -20
	resources = {
		category = ship_components
		cost = {
			alloys = 20
			sr_zro = 2
		}
	}

	ship_modifier = {
		diplo_weight_ship_mult = 0.5
		ship_shield_mult = 0.10
	}

	potential = {
		is_ship_class = shipclass_military
	}
	prerequisites = { tech_covenant_cradle }
	component_set = "CRADLE_MARK"

	ai_weight = {
		weight = 10
		modifier = {
			factor = 0
			has_country_resource = {
				type = sr_zro
				amount < 100
			}
		}
	}
}

utility_component_template = {
	key = "WHISPERERS_MARK"
	size = aux
	icon = "GFX_ship_part_whisperers_covenant_aux"
	icon_frame = 1
	power = -20
	resources = {
		category = ship_components
		cost = {
			alloys = 20
			sr_zro = 2
		}
	}

	modifier = {
		ship_evasion_mult = 0.15
	}

	prerequisites = { tech_covenant_whisperers }
	component_set = "WHISPERERS_MARK"

	ai_weight = {
		weight = 10
		modifier = {
			factor = 0
			has_country_resource = {
				type = sr_zro
				amount < 100
			}
		}
	}
}

#####################################
#	Synth Queen Auto-Repair Module	#
#####################################

utility_component_template = {
	key = "AUTO_REPAIR_3"
	size = aux
	icon = "GFX_ship_part_nanite_repair_system_synth_queen"
	icon_frame = 1
	power = -20
	resources = {
		category = ship_components
		cost = {
			alloys = 10
			nanites = 3
		}
	}

	modifier = {
		ship_hull_regen_add_perc = 0.25
		ship_armor_regen_add_perc = 0.2
	}

	prerequisites = { tech_nanite_repair_system_synth_queen }
	component_set = "AUTO_REPAIR_3"

	ai_weight = {
		weight = 15

		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = nanites }
		}
		modifier = {
			factor = 0.0
			is_ai = yes
		}

		inline_script = "ai/armor_preference_weight"
	}
}

########################
# Asteroidal Armor
########################

utility_component_template = {
	key = "ASTEROIDAL_CARAPACE_ARMOR"
	size = aux
	icon = "GFX_ship_part_asteroidal_carapace"
	icon_frame = 1
	power = -10

	modifier = {
		ship_armor_mult = 0.08
	}

	prerequisites = { "tech_asteroidal_carapace" }
	component_set = "ASTEROIDAL_CARAPACE_ARMOR"
	resources = {
		category = ship_components
		cost = {
			minerals = 40
		}
	}

	ai_weight = {
		weight = 10

		inline_script = "ai/armor_preference_weight"
	}
}
