# Icons set here are the ones show in the actual slot. The reason is so that we can support different icons for different sizes.

#############
# UTILITIES #
#############

# Deflectors
utility_component_template = {
	key = "SMALL_SHIELD_1"
	size = small
	icon = "GFX_ship_part_shield_1"
	icon_frame = 1
	power = @power_S1
	resources = {
		category = ship_components
		cost = {
			alloys = @shield_s_t1_cost
		}
		upkeep = {
			energy = @defense_s_t1_upkeep_energy
			alloys = @defense_s_t1_upkeep_alloys
		}
	}
	modifier = {
		ship_shield_add = @shield_S1
		ship_shield_regen_add_static = @regen_S1 #Regeneration per day
	}
	prerequisites = { "tech_shields_1" }
	component_set = "SHIELD_1"
	upgrades_to = "SMALL_SHIELD_2"

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	ai_weight = {
		weight = @T1_weight
		inline_script = {
			script = ship_components/weights/roles_stealth
			MULT = 0
		}
	}
}

utility_component_template = {
	key = "MEDIUM_SHIELD_1"
	size = medium
	icon = "GFX_ship_part_shield_1"
	icon_frame = 1
	power = @power_M1
	resources = {
		category = ship_components
		cost = {
			alloys = @shield_m_t1_cost
		}
		upkeep = {
			energy = @defense_m_t1_upkeep_energy
			alloys = @defense_m_t1_upkeep_alloys
		}
	}
	modifier = {
		ship_shield_add = @shield_M1
		ship_shield_regen_add_static = @regen_M1 #Regeneration per day
	}
	prerequisites = { "tech_shields_1" }
	component_set = "SHIELD_1"
	upgrades_to = "MEDIUM_SHIELD_2"

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	ai_weight = {
		weight = @T1_weight
		inline_script = {
			script = ship_components/weights/roles_stealth
			MULT = 0
		}
	}
}

utility_component_template = {
	key = "LARGE_SHIELD_1"
	size = large
	icon = "GFX_ship_part_shield_1"
	icon_frame = 1
	power = @power_L1
	resources = {
		category = ship_components
		cost = {
			alloys = @shield_l_t1_cost
		}
		upkeep = {
			energy = @defense_l_t1_upkeep_energy
			alloys = @defense_l_t1_upkeep_alloys
		}
	}
	modifier = {
		ship_shield_add = @shield_L1
		ship_shield_regen_add_static = @regen_L1 #Regeneration per day
	}
	prerequisites = { "tech_shields_1" }
	component_set = "SHIELD_1"
	upgrades_to = "LARGE_SHIELD_2"

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	ai_weight = {
		weight = @T1_weight
		inline_script = {
			script = ship_components/weights/roles_stealth
			MULT = 0
		}
	}
}

# Advanced Deflectors
utility_component_template = {
	key = "SMALL_SHIELD_2"
	size = small
	icon = "GFX_ship_part_shield_2"
	icon_frame = 1
	power = @power_S2
	resources = {
		category = ship_components
		cost = {
			alloys = @shield_s_t2_cost
		}
		upkeep = {
			energy = @defense_s_t2_upkeep_energy
			alloys = @defense_s_t2_upkeep_alloys
		}
	}
	modifier = {
		ship_shield_add = @shield_S2
		ship_shield_regen_add_static = @regen_S2 #Regeneration per day
	}
	ship_modifier = {
		ship_shield_hardening_add = @hardening_T2
	}
	prerequisites = { "tech_shields_2" }
	component_set = "SHIELD_2"
	upgrades_to = "SMALL_SHIELD_3"

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	ai_weight = {
		weight = @T2_weight
		inline_script = {
			script = ship_components/weights/roles_stealth
			MULT = 0
		}
	}
}

utility_component_template = {
	key = "MEDIUM_SHIELD_2"
	size = medium
	icon = "GFX_ship_part_shield_2"
	icon_frame = 1
	power = @power_M2
	resources = {
		category = ship_components
		cost = {
			alloys = @shield_m_t2_cost
		}
		upkeep = {
			energy = @defense_m_t2_upkeep_energy
			alloys = @defense_m_t2_upkeep_alloys
		}
	}
	modifier = {
		ship_shield_add = @shield_M2
		ship_shield_regen_add_static = @regen_M2 #Regeneration per day
	}
	ship_modifier = {
		ship_shield_hardening_add = @hardening_T2
	}
	prerequisites = { "tech_shields_2" }
	component_set = "SHIELD_2"
	upgrades_to = "MEDIUM_SHIELD_3"

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	ai_weight = {
		weight = @T2_weight
		inline_script = {
			script = ship_components/weights/roles_stealth
			MULT = 0
		}
	}
}

utility_component_template = {
	key = "LARGE_SHIELD_2"
	size = large
	icon = "GFX_ship_part_shield_2"
	icon_frame = 1
	power = @power_L2
	resources = {
		category = ship_components
		cost = {
			alloys = @shield_l_t2_cost
		}
		upkeep = {
			energy = @defense_l_t2_upkeep_energy
			alloys = @defense_l_t2_upkeep_alloys
		}
	}
	modifier = {
		ship_shield_add = @shield_L2
		ship_shield_regen_add_static = @regen_L2 #Regeneration per day
	}
	ship_modifier = {
		ship_shield_hardening_add = @hardening_T2
	}
	prerequisites = { "tech_shields_2" }
	component_set = "SHIELD_2"
	upgrades_to = "LARGE_SHIELD_3"

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	ai_weight = {
		weight = @T2_weight
		inline_script = {
			script = ship_components/weights/roles_stealth
			MULT = 0
		}
	}
}

# Shields
utility_component_template = {
	key = "SMALL_SHIELD_3"
	size = small
	icon = "GFX_ship_part_shield_3"
	icon_frame = 1
	power = @power_S3
	resources = {
		category = ship_components
		cost = {
			alloys = @shield_s_t3_cost
		}
		upkeep = {
			energy = @defense_s_t3_upkeep_energy
			alloys = @defense_s_t3_upkeep_alloys
		}
	}
	modifier = {
		ship_shield_add = @shield_S3
		ship_shield_regen_add_static = @regen_S3 #Regeneration per day
	}
	ship_modifier = {
		ship_shield_hardening_add = @hardening_T3
	}
	prerequisites = { "tech_shields_3" }
	component_set = "SHIELD_3"
	upgrades_to = "SMALL_SHIELD_4"

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	ai_weight = {
		weight = @T3_weight
		inline_script = {
			script = ship_components/weights/roles_stealth
			MULT = 0
		}
	}
}

utility_component_template = {
	key = "MEDIUM_SHIELD_3"
	size = medium
	icon = "GFX_ship_part_shield_3"
	icon_frame = 1
	power = @power_M3
	resources = {
		category = ship_components
		cost = {
			alloys = @shield_m_t3_cost
		}
		upkeep = {
			energy = @defense_m_t3_upkeep_energy
			alloys = @defense_m_t3_upkeep_alloys
		}
	}
	modifier = {
		ship_shield_add = @shield_M3
		ship_shield_regen_add_static = @regen_M3 #Regeneration per day
	}
	ship_modifier = {
		ship_shield_hardening_add = @hardening_T3
	}
	prerequisites = { "tech_shields_3" }
	component_set = "SHIELD_3"
	upgrades_to = "MEDIUM_SHIELD_4"

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	ai_weight = {
		weight = @T3_weight
		inline_script = {
			script = ship_components/weights/roles_stealth
			MULT = 0
		}
	}
}

utility_component_template = {
	key = "LARGE_SHIELD_3"
	size = large
	icon = "GFX_ship_part_shield_3"
	icon_frame = 1
	power = @power_L3
	resources = {
		category = ship_components
		cost = {
			alloys = @shield_l_t3_cost
		}
		upkeep = {
			energy = @defense_l_t3_upkeep_energy
			alloys = @defense_l_t3_upkeep_alloys
		}
	}
	modifier = {
		ship_shield_add = @shield_L3
		ship_shield_regen_add_static = @regen_L3 #Regeneration per day
	}
	ship_modifier = {
		ship_shield_hardening_add = @hardening_T3
	}
	prerequisites = { "tech_shields_3" }
	component_set = "SHIELD_3"
	upgrades_to = "LARGE_SHIELD_4"

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	ai_weight = {
		weight = @T3_weight
		inline_script = {
			script = ship_components/weights/roles_stealth
			MULT = 0
		}
	}
}

# Advanced Shields
utility_component_template = {
	key = "SMALL_SHIELD_4"
	size = small
	icon = "GFX_ship_part_shield_4"
	icon_frame = 1
	power = @power_S4
	resources = {
		category = ship_components
		cost = {
			alloys = @shield_s_t4_cost
			exotic_gases = 0.25
		}
		upkeep = {
			energy = @defense_s_t4_upkeep_energy
			alloys = @defense_s_t4_upkeep_alloys
		}
	}
	modifier = {
		ship_shield_add = @shield_S4
		ship_shield_regen_add_static = @regen_S4 #Regeneration per day
	}
	ship_modifier = {
		ship_shield_hardening_add = @hardening_T4
	}
	prerequisites = { "tech_shields_4" }
	component_set = "SHIELD_4"
	upgrades_to = "SMALL_SHIELD_5"

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	ai_weight = {
		weight = @T4_weight
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = exotic_gases }
		}
		inline_script = {
			script = ship_components/weights/roles_stealth
			MULT = 0
		}
	}
}

utility_component_template = {
	key = "MEDIUM_SHIELD_4"
	size = medium
	icon = "GFX_ship_part_shield_4"
	icon_frame = 1
	power = @power_M4
	resources = {
		category = ship_components
		cost = {
			alloys = @shield_m_t4_cost
			exotic_gases = 0.50
		}
		upkeep = {
			energy = @defense_m_t4_upkeep_energy
			alloys = @defense_m_t4_upkeep_alloys
		}
	}
	modifier = {
		ship_shield_add = @shield_M4
		ship_shield_regen_add_static = @regen_M4 #Regeneration per day
	}
	ship_modifier = {
		ship_shield_hardening_add = @hardening_T4
	}
	prerequisites = { "tech_shields_4" }
	component_set = "SHIELD_4"
	upgrades_to = "MEDIUM_SHIELD_5"

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	ai_weight = {
		weight = @T4_weight
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = exotic_gases }
		}
		inline_script = {
			script = ship_components/weights/roles_stealth
			MULT = 0
		}
	}
}

utility_component_template = {
	key = "LARGE_SHIELD_4"
	size = large
	icon = "GFX_ship_part_shield_4"
	icon_frame = 1
	power = @power_L4
	resources = {
		category = ship_components
		cost = {
			alloys = @shield_l_t4_cost
			exotic_gases = 1
		}
		upkeep = {
			energy = @defense_l_t4_upkeep_energy
			alloys = @defense_l_t4_upkeep_alloys
		}
	}
	modifier = {
		ship_shield_add = @shield_L4
		ship_shield_regen_add_static = @regen_L4 #Regeneration per day
	}
	ship_modifier = {
		ship_shield_hardening_add = @hardening_T4
	}
	prerequisites = { "tech_shields_4" }
	component_set = "SHIELD_4"
	upgrades_to = "LARGE_SHIELD_5"

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	ai_weight = {
		weight = @T4_weight
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = exotic_gases }
		}
		inline_script = {
			script = ship_components/weights/roles_stealth
			MULT = 0
		}
	}
}

# Hyper Shields
utility_component_template = {
	key = "SMALL_SHIELD_5"
	size = small
	icon = "GFX_ship_part_shield_5"
	icon_frame = 1
	power = @power_S5
	resources = {
		category = ship_components
		cost = {
			alloys = @shield_s_t5_cost
			exotic_gases = 0.333
		}
		upkeep = {
			energy = @defense_s_t5_upkeep_energy
			alloys = @defense_s_t5_upkeep_alloys
		}
	}
	modifier = {
		ship_shield_add = @shield_S5
		ship_shield_regen_add_static = @regen_S5 #Regeneration per day
	}
	ship_modifier = {
		ship_shield_hardening_add = @hardening_T5
	}
	prerequisites = { "tech_shields_5" }
	upgrades_to = "SMALL_DARK_MATTER_DEFLECTOR"
	component_set = "SHIELD_5"

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	ai_weight = {
		weight = @T5_weight
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = exotic_gases }
		}
		inline_script = {
			script = ship_components/weights/roles_stealth
			MULT = 0
		}
	}
}

utility_component_template = {
	key = "MEDIUM_SHIELD_5"
	size = medium
	icon = "GFX_ship_part_shield_5"
	icon_frame = 1
	power = @power_M5
	resources = {
		category = ship_components
		cost = {
			alloys = @shield_m_t5_cost
			exotic_gases = 0.666
		}
		upkeep = {
			energy = @defense_m_t5_upkeep_energy
			alloys = @defense_m_t5_upkeep_alloys
		}
	}
	modifier = {
		ship_shield_add = @shield_M5
		ship_shield_regen_add_static = @regen_M5 #Regeneration per day
	}
	ship_modifier = {
		ship_shield_hardening_add = @hardening_T5
	}
	prerequisites = { "tech_shields_5" }
	upgrades_to = "MEDIUM_DARK_MATTER_DEFLECTOR"
	component_set = "SHIELD_5"

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	ai_weight = {
		weight = @T5_weight
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = exotic_gases }
		}
		inline_script = {
			script = ship_components/weights/roles_stealth
			MULT = 0
		}
	}
}

utility_component_template = {
	key = "LARGE_SHIELD_5"
	size = large
	icon = "GFX_ship_part_shield_5"
	icon_frame = 1
	power = @power_L5
	resources = {
		category = ship_components
		cost = {
			alloys = @shield_l_t5_cost
			exotic_gases = 1.333
		}
		upkeep = {
			energy = @defense_l_t5_upkeep_energy
			alloys = @defense_l_t5_upkeep_alloys
		}
	}
	modifier = {
		ship_shield_add = @shield_L5
		ship_shield_regen_add_static = @regen_L5 #Regeneration per day
	}
	ship_modifier = {
		ship_shield_hardening_add = @hardening_T5
	}
	prerequisites = { "tech_shields_5" }
	upgrades_to = "LARGE_DARK_MATTER_DEFLECTOR"
	component_set = "SHIELD_5"

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	ai_weight = {
		weight = @T5_weight
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = exotic_gases }
		}
		inline_script = {
			script = ship_components/weights/roles_stealth
			MULT = 0
		}
	}
}

####################
# Engimatic Shields
####################

# Enigmatic Deflectors
utility_component_template = {
	key = "SMALL_DARK_MATTER_DEFLECTOR"
	size = small
	icon = "GFX_ship_part_dark_matter_shield"
	icon_frame = 1
	power = @power_S6
	resources = {
		category = ship_components
		cost = {
			alloys = @shield_s_t6_cost
			sr_dark_matter = 0.25
		}
		upkeep = {
			energy = @defense_s_t6_upkeep_energy
			alloys = @defense_s_t6_upkeep_alloys
		}
	}
	modifier = {
		ship_shield_add = @shield_S6
		ship_shield_regen_add_static = @regen_S6 #Regeneration per day
	}
	ship_modifier = {
		ship_shield_hardening_add = @hardening_T6
	}
	prerequisites = { "tech_dark_matter_deflector" }
	upgrades_to = "SMALL_PSI_SHIELD"
	component_set = "DARK_MATTER_DEFLECTOR"

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	ai_weight = {
		weight = @T5_weight
		modifier = {
			factor = 0
			no_resource_for_component = { RESOURCE = sr_dark_matter }
		}
		modifier = {
			factor = 0.0
			is_ai = yes
		}
		inline_script = {
			script = ship_components/weights/roles_stealth
			MULT = 0
		}
	}
}

utility_component_template = {
	key = "MEDIUM_DARK_MATTER_DEFLECTOR"
	size = medium
	icon = "GFX_ship_part_dark_matter_shield"
	icon_frame = 1
	power = @power_M6
	resources = {
		category = ship_components
		cost = {
			alloys = @shield_m_t6_cost
			sr_dark_matter = 0.5
		}
		upkeep = {
			energy = @defense_m_t6_upkeep_energy
			alloys = @defense_m_t6_upkeep_alloys
		}
	}
	modifier = {
		ship_shield_add = @shield_M6
		ship_shield_regen_add_static = @regen_M6 #Regeneration per day
	}
	ship_modifier = {
		ship_shield_hardening_add = @hardening_T6
	}
	prerequisites = { "tech_dark_matter_deflector" }
	upgrades_to = "MEDIUM_PSI_SHIELD"
	component_set = "DARK_MATTER_DEFLECTOR"

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	ai_weight = {
		weight = @T5_weight
		modifier = {
			factor = 0
			no_resource_for_component = { RESOURCE = sr_dark_matter }
		}
		modifier = {
			factor = 0.0
			is_ai = yes
		}
		inline_script = {
			script = ship_components/weights/roles_stealth
			MULT = 0
		}
	}
}

utility_component_template = {
	key = "LARGE_DARK_MATTER_DEFLECTOR"
	size = large
	icon = "GFX_ship_part_dark_matter_shield"
	icon_frame = 1
	power = @power_L6
	resources = {
		category = ship_components
		cost = {
			alloys = @shield_l_t6_cost
			sr_dark_matter = 1
		}
		upkeep = {
			energy = @defense_l_t6_upkeep_energy
			alloys = @defense_l_t6_upkeep_alloys
		}
	}
	modifier = {
		ship_shield_add = @shield_L6
		ship_shield_regen_add_static = @regen_L6 #Regeneration per day
	}
	ship_modifier = {
		ship_shield_hardening_add = @hardening_T6
	}
	prerequisites = { "tech_dark_matter_deflector" }
	upgrades_to = "LARGE_PSI_SHIELD"
	component_set = "DARK_MATTER_DEFLECTOR"

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	ai_weight = {
		weight = @T5_weight
		modifier = {
			factor = 0
			no_resource_for_component = { RESOURCE = sr_dark_matter }
		}
		modifier = {
			factor = 0.0
			is_ai = yes
		}
		inline_script = {
			script = ship_components/weights/roles_stealth
			MULT = 0
		}
	}
}

####################
# Psionic Shields
####################

utility_component_template = {
	key = "SMALL_PSI_SHIELD"
	size = small
	icon = "GFX_ship_part_psi_shield"
	icon_frame = 1
	power = @power_S7
	resources = {
		category = ship_components
		cost = {
			alloys = @shield_s_t7_cost
			sr_zro = 0.111
		}
		upkeep = {
			energy = @defense_s_t7_upkeep_energy
			alloys = @defense_s_t7_upkeep_alloys
		}
	}
	modifier = {
		ship_shield_add = @shield_S7
		ship_shield_regen_add_static = @regen_S7 #Regeneration per day
	}
	ship_modifier = {
		ship_shield_hardening_add = @hardening_T6
	}
	prerequisites = { "tech_psionic_shield" }
	component_set = "PSI_SHIELD"

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	ai_weight = {
		weight = @T5_weight
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_zro }
		}
		inline_script = {
			script = ship_components/weights/roles_stealth_psionic
			MULT = 0
		}
	}
}

utility_component_template = {
	key = "MEDIUM_PSI_SHIELD"
	size = medium
	icon = "GFX_ship_part_psi_shield"
	icon_frame = 1
	power = @power_M7
	resources = {
		category = ship_components
		cost = {
			alloys = @shield_m_t7_cost
			sr_zro = 0.222
		}
		upkeep = {
			energy = @defense_m_t7_upkeep_energy
			alloys = @defense_m_t7_upkeep_alloys
		}
	}
	modifier = {
		ship_shield_add = @shield_M7
		ship_shield_regen_add_static = @regen_M7 #Regeneration per day
	}
	ship_modifier = {
		ship_shield_hardening_add = @hardening_T6
	}
	prerequisites = { "tech_psionic_shield" }
	component_set = "PSI_SHIELD"

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	ai_weight = {
		weight = @T5_weight
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_zro }
		}
		inline_script = {
			script = ship_components/weights/roles_stealth_psionic
			MULT = 0
		}
	}
}

utility_component_template = {
	key = "LARGE_PSI_SHIELD"
	size = large
	icon = "GFX_ship_part_psi_shield"
	icon_frame = 1
	power = @power_L7
	resources = {
		category = ship_components
		cost = {
			alloys = @shield_l_t7_cost
			sr_zro = 0.333
		}
		upkeep = {
			energy = @defense_l_t7_upkeep_energy
			alloys = @defense_l_t7_upkeep_alloys
		}
	}
	modifier = {
		ship_shield_add = @shield_L7
		ship_shield_regen_add_static = @regen_L7 #Regeneration per day
	}
	ship_modifier = {
		ship_shield_hardening_add = @hardening_T6
	}
	prerequisites = { "tech_psionic_shield" }
	component_set = "PSI_SHIELD"

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	ai_weight = {
		weight = @T5_weight
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_zro }
		}
		inline_script = {
			script = ship_components/weights/roles_stealth_psionic
			MULT = 0
		}
	}
}

utility_component_template = { #Low power requirements, lower str. Maybe good regen.
	key = "SMALL_PSI_BARRIER"
	size = small
	icon = "GFX_ship_part_psi_shield"
	icon_frame = 1
	power = 0
	resources = {
		category = ship_components
		cost = {
			alloys = @shield_s_t2_cost
		}
		upkeep = {
			alloys = @defense_s_t2_upkeep_alloys
		}
	}
	modifier = {
		ship_shield_add = @shield_S2
		ship_shield_regen_add_static = @regen_S5 #Regeneration per day
	}
	ship_modifier = {
		ship_shield_hardening_add = @hardening_T6
	}
	prerequisites = { "tech_psionic_barrier" }
	upgrades_to = "SMALL_PSI_SHIELD"
	component_set = "PSI_BARRIER"

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	ai_weight = {
		weight = @T3_weight
		inline_script = {
			script = ship_components/weights/roles_stealth_psionic
			MULT = 0
		}
	}
}

utility_component_template = { #Low power requirements, lower str. Maybe good regen.
	key = "MEDIUM_PSI_BARRIER"
	size = medium
	icon = "GFX_ship_part_psi_shield"
	icon_frame = 1
	power = 0
	resources = {
		category = ship_components
		cost = {
			alloys = @shield_m_t2_cost
		}
		upkeep = {
			alloys = @defense_m_t2_upkeep_alloys
		}
	}
	modifier = {
		ship_shield_add = @shield_M2
		ship_shield_regen_add_static = @regen_M5 #Regeneration per day
	}
	ship_modifier = {
		ship_shield_hardening_add = @hardening_T6
	}
	prerequisites = { "tech_psionic_barrier" }
	upgrades_to = "MEDIUM_PSI_SHIELD"
	component_set = "PSI_BARRIER"

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	ai_weight = {
		weight = @T3_weight
		inline_script = {
			script = ship_components/weights/roles_stealth_psionic
			MULT = 0
		}
	}
}

utility_component_template = { #Low power requirements, lower str. Maybe good regen.
	key = "LARGE_PSI_BARRIER"
	size = large
	icon = "GFX_ship_part_psi_shield"
	icon_frame = 1
	power = 0
	resources = {
		category = ship_components
		cost = {
			alloys = @shield_l_t2_cost
		}
		upkeep = {
			alloys = @defense_l_t2_upkeep_alloys
		}
	}
	modifier = {
		ship_shield_add = @shield_L2
		ship_shield_regen_add_static = @regen_L5 #Regeneration per day
	}
	ship_modifier = {
		ship_shield_hardening_add = @hardening_T6
	}
	prerequisites = { "tech_psionic_barrier" }
	upgrades_to = "LARGE_PSI_SHIELD"
	component_set = "PSI_BARRIER"

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	ai_weight = {
		weight = @T3_weight
		inline_script = {
			script = ship_components/weights/roles_stealth_psionic
			MULT = 0
		}
	}
}

#######################
# Archaeotech Shields
#######################

utility_component_template = { # Small
	key = "SMALL_ARCHAEO_SHIELD"
	size = small
	icon = "GFX_ship_part_archaeo_shield"
	icon_frame = 1
	power = @power_S5
	resources = {
		category = ship_components
		cost = {
			alloys = @shield_s_t5_cost
			minor_artifacts = @minor_artifacts_cost_s
		}
		upkeep = {
			energy = @defense_s_t5_upkeep_energy
			alloys = @defense_s_t5_upkeep_alloys
		}
	}
	modifier = {
		ship_shield_add = @shield_S3
		ship_shield_regen_add_static = @regen_S6 #Regeneration per day
	}

	ship_modifier = {
		ship_shield_hardening_add = @hardening_archaeo
	}

	custom_tooltip = tt_SMALL_ARCHAEO_SHIELD_AP
	triggered_ship_design_modifier = {
		potential = {
			exists = from
			from = { has_ascension_perk = ap_archaeoengineers }
		}
		ship_shield_add = @shield_S1
	}
	prerequisites = { "tech_archaeoshield" }
	component_set = "ARCHAEO_SHIELD"

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	ai_weight = {
		weight = 0
		modifier = {
			add = @T5_weight
			owner = { has_ascension_perk = ap_archaeoengineers }
		}
		modifier = {
			factor = 0.0
			owner = {
				has_monthly_income = {
					resource = minor_artifacts
					value < 3
				}
			}
		}
		modifier = {
			factor = 1.3
			owner = {
				resource_stockpile_compare = {
					resource = minor_artifacts
					value > 250
				}
			}
		}
		inline_script = {
			script = ship_components/weights/roles_stealth
			MULT = 0
		}
	}
}

utility_component_template = { # Medium
	key = "MEDIUM_ARCHAEO_SHIELD"
	size = medium
	icon = "GFX_ship_part_archaeo_shield"
	icon_frame = 1
	power = @power_M5
	resources = {
		category = ship_components
		cost = {
			alloys = @shield_m_t5_cost
			minor_artifacts = @minor_artifacts_cost_m
		}
		upkeep = {
			energy = @defense_m_t5_upkeep_energy
			alloys = @defense_m_t5_upkeep_alloys
		}
	}
	modifier = {
		ship_shield_add = @shield_M3
		ship_shield_regen_add_static = @regen_M6 #Regeneration per day
	}

	ship_modifier = {
		ship_shield_hardening_add = @hardening_archaeo
	}

	custom_tooltip = tt_MEDIUM_ARCHAEO_SHIELD_AP
	triggered_ship_design_modifier = {
		potential = {
			exists = from
			from = { has_ascension_perk = ap_archaeoengineers }
		}
		ship_shield_add = @shield_M1
	}
	prerequisites = { "tech_archaeoshield" }
	component_set = "ARCHAEO_SHIELD"

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	ai_weight = {
		weight = 0
		modifier = {
			add = @T5_weight
			owner = { has_ascension_perk = ap_archaeoengineers }
		}
		modifier = {
			factor = 0.0
			owner = {
				has_monthly_income = {
					resource = minor_artifacts
					value < 3
				}
			}
		}
		modifier = {
			factor = 1.3
			owner = {
				resource_stockpile_compare = {
					resource = minor_artifacts
					value > 250
				}
			}
		}
		inline_script = {
			script = ship_components/weights/roles_stealth
			MULT = 0
		}
	}
}

utility_component_template = { # Large
	key = "LARGE_ARCHAEO_SHIELD"
	size = large
	icon = "GFX_ship_part_archaeo_shield"
	icon_frame = 1
	power = @power_L5
	resources = {
		category = ship_components
		cost = {
			alloys = @shield_l_t5_cost
			minor_artifacts = @minor_artifacts_cost_l
		}
		upkeep = {
			energy = @defense_l_t5_upkeep_energy
			alloys = @defense_l_t5_upkeep_alloys
		}
	}
	modifier = {
		ship_shield_add = @shield_L3
		ship_shield_regen_add_static = @regen_L6 #Regeneration per day
	}

	ship_modifier = {
		ship_shield_hardening_add = @hardening_archaeo
	}


	custom_tooltip = tt_LARGE_ARCHAEO_SHIELD_AP
	triggered_ship_design_modifier = {
		potential = {
			exists = from
			from = { has_ascension_perk = ap_archaeoengineers }
		}
		ship_shield_add = @shield_L1
	}
	prerequisites = { "tech_archaeoshield" }
	component_set = "ARCHAEO_SHIELD"

	potential = {
		OR = {
			from = {
				country_uses_bio_ships = no
			}
			is_arkship_ship = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = no
	}

	ai_weight = {
		weight = 0
		modifier = {
			add = @T5_weight
			owner = { has_ascension_perk = ap_archaeoengineers }
		}
		modifier = {
			factor = 0.0
			owner = {
				has_monthly_income = {
					resource = minor_artifacts
					value < 3
				}
			}
		}
		modifier = {
			factor = 1.3
			owner = {
				resource_stockpile_compare = {
					resource = minor_artifacts
					value > 250
				}
			}
		}
		inline_script = {
			script = ship_components/weights/roles_stealth
			MULT = 0
		}
	}
}
