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

# ####################
# Mandibles
# ####################

weapon_component_template = {
	key = "MANDIBLE_1"
	size = torpedo
	entity = "invisible_turret_entity"

	icon = "GFX_ship_part_mandible_1"
	icon_frame = 1
	type = instant

	firing_arc = 25.0

	prerequisites = {
		tech_maulers
	}
	component_set = "MANDIBLE_1"
	projectile_gfx = "biogenesis_01_mandible_attack"
	tags = { weapon_type_mandible weapon_type_kinetic g_slot }
	ai_tags = { weapon_role_anti_armor }
	potential = {
		ship_uses_mauler_components = yes
	}
	upgrades_to = "MANDIBLE_2"
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t3_cost
		}
		upkeep = {
			food = @m_t3_upkeep_energy
			alloys = @m_t3_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 10
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
	}
}

weapon_component_template = {
	key = "MANDIBLE_2"
	size = torpedo
	entity = "invisible_turret_entity"

	icon = "GFX_ship_part_mandible_2"
	icon_frame = 1
	type = instant

	firing_arc = 25.0

	prerequisites = { "tech_mandibles_2" }
	component_set = "MANDIBLE_2"
	projectile_gfx = "biogenesis_01_mandible_attack"
	tags = { weapon_type_mandible weapon_type_kinetic g_slot }
	ai_tags = { weapon_role_anti_armor }
	potential = {
		ship_uses_mauler_components = yes
	}
	upgrades_to = "MANDIBLE_3"
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t4_cost
			rare_crystals = @m_t4_rare
		}
		upkeep = {
			food = @m_t4_upkeep_energy
			alloys = @m_t4_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
	}
}

weapon_component_template = {
	key = "MANDIBLE_3"
	size = torpedo
	entity = "invisible_turret_entity"

	icon = "GFX_ship_part_mandible_3"
	icon_frame = 1
	type = instant

	firing_arc = 25.0

	prerequisites = { "tech_mandibles_3" }
	component_set = "MANDIBLE_3"
	projectile_gfx = "biogenesis_01_mandible_attack"
	tags = { weapon_type_mandible weapon_type_kinetic g_slot }
	ai_tags = { weapon_role_anti_armor }
	potential = {
		ship_uses_mauler_components = yes
	}
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t5_cost
			rare_crystals = @m_t5_rare
		}
		upkeep = {
			food = @m_t5_upkeep_energy
			alloys = @m_t5_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
	}
}

# ####################
# BioPlasma Emitters
# ####################

# ## Bio-Plasma 1
weapon_component_template = {
	key = "SMALL_BIO_PLASMA_1"
	size = small
	type = instant

	icon = "GFX_mutation_bio_plasma_1"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_plasma_1" }
	component_set = "BIO_PLASMA_1"
	projectile_gfx = "plasma_thrower_s"
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	ai_tag_weight = 3
	upgrades_to = "SMALL_BIO_PLASMA_2"
	resources = {
		category = ship_components
		cost = {
			alloys = @s_t3_cost
		}
		upkeep = {
			food = @s_t3_upkeep_energy
			alloys = @s_t3_upkeep_alloys
		}
	}
}

weapon_component_template = {
	key = "MEDIUM_BIO_PLASMA_1"
	size = medium
	type = instant

	icon = "GFX_mutation_bio_plasma_1"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_plasma_1" }
	component_set = "BIO_PLASMA_1"
	projectile_gfx = "plasma_thrower_m"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	ai_tag_weight = 3
	upgrades_to = "MEDIUM_BIO_PLASMA_2"
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t3_cost
		}
		upkeep = {
			food = @m_t3_upkeep_energy
			alloys = @m_t3_upkeep_alloys
		}
	}
}

weapon_component_template = {
	key = "LARGE_BIO_PLASMA_1"
	size = large
	type = instant

	icon = "GFX_mutation_bio_plasma_1"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	min_range = 7 #45.0

	prerequisites = { "tech_plasma_1" }
	component_set = "BIO_PLASMA_1"
	projectile_gfx = "plasma_thrower_l"
	tags = { weapon_type_energy l_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	ai_tag_weight = 3
	upgrades_to = "LARGE_BIO_PLASMA_2"
	resources = {
		category = ship_components
		cost = {
			alloys = @l_t3_cost
		}
		upkeep = {
			food = @l_t3_upkeep_energy
			alloys = @l_t3_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = @cosmic_storm_gravity_ai_weight_factor
			has_country_flag = affected_by_gravity_storm
		}
	}
}

# ## Bio-Plasma 2
weapon_component_template = {
	key = "SMALL_BIO_PLASMA_2"
	size = small
	accuracy = 1
	type = instant

	icon = "GFX_mutation_bio_plasma_2"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_plasma_2" }
	component_set = "BIO_PLASMA_2"
	projectile_gfx = "plasma_accelerator_s"
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	ai_tag_weight = 3
	upgrades_to = "SMALL_BIO_PLASMA_3"
	resources = {
		category = ship_components
		cost = {
			alloys = @s_t4_cost
			exotic_gases = @s_t4_rare
		}
		upkeep = {
			food = @s_t4_upkeep_energy
			alloys = @s_t4_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = exotic_gases }
		}
	}
}

weapon_component_template = {
	key = "MEDIUM_BIO_PLASMA_2"
	size = medium
	type = instant

	icon = "GFX_mutation_bio_plasma_2"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_plasma_2" }
	component_set = "BIO_PLASMA_2"
	projectile_gfx = "plasma_accelerator_m"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	ai_tag_weight = 3
	upgrades_to = "MEDIUM_BIO_PLASMA_3"
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t4_cost
			exotic_gases = @m_t4_rare
		}
		upkeep = {
			food = @m_t4_upkeep_energy
			alloys = @m_t4_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = exotic_gases }
		}
	}
}

weapon_component_template = {
	key = "LARGE_BIO_PLASMA_2"
	size = large
	type = instant

	icon = "GFX_mutation_bio_plasma_2"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	min_range = 7 #45.0

	prerequisites = { "tech_plasma_2" }
	component_set = "BIO_PLASMA_2"
	projectile_gfx = "plasma_accelerator_l"
	tags = { weapon_type_energy l_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	ai_tag_weight = 3
	upgrades_to = "LARGE_BIO_PLASMA_3"
	resources = {
		category = ship_components
		cost = {
			alloys = @l_t4_cost
			exotic_gases = @l_t4_rare
		}
		upkeep = {
			food = @l_t4_upkeep_energy
			alloys = @l_t4_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = exotic_gases }
		}
		modifier = {
			factor = @cosmic_storm_gravity_ai_weight_factor
			has_country_flag = affected_by_gravity_storm
		}
	}
}

# ## Bio-Plasma 3
weapon_component_template = {
	key = "SMALL_BIO_PLASMA_3"
	size = small
	type = instant

	icon = "GFX_mutation_bio_plasma_3"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_plasma_3" }
	component_set = "BIO_PLASMA_3"
	projectile_gfx = "plasma_cannon_s"
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	ai_tag_weight = 3
	resources = {
		category = ship_components
		cost = {
			alloys = @s_t5_cost
			exotic_gases = @s_t5_rare
		}
		upkeep = {
			food = @s_t5_upkeep_energy
			alloys = @s_t5_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = exotic_gases }
		}
	}
}

weapon_component_template = {
	key = "MEDIUM_BIO_PLASMA_3"
	size = medium
	type = instant

	icon = "GFX_mutation_bio_plasma_3"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_plasma_3" }
	component_set = "BIO_PLASMA_3"
	projectile_gfx = "plasma_cannon_m"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	ai_tag_weight = 3
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t5_cost
			exotic_gases = @m_t5_rare
		}
		upkeep = {
			food = @m_t5_upkeep_energy
			alloys = @m_t5_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = exotic_gases }
		}
	}
}

weapon_component_template = {
	key = "LARGE_BIO_PLASMA_3"
	size = large
	type = instant

	icon = "GFX_mutation_bio_plasma_3"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	min_range = 7 #45.0

	prerequisites = { "tech_plasma_3" }
	component_set = "BIO_PLASMA_3"
	projectile_gfx = "plasma_cannon_l"
	tags = { weapon_type_energy l_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	ai_tag_weight = 3
	resources = {
		category = ship_components
		cost = {
			alloys = @l_t5_cost
			exotic_gases = @l_t5_rare
		}
		upkeep = {
			food = @l_t5_upkeep_energy
			alloys = @l_t5_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = exotic_gases }
		}
		modifier = {
			factor = @cosmic_storm_gravity_ai_weight_factor
			has_country_flag = affected_by_gravity_storm
		}
	}
}

# ####################
# Quill Battery
# ####################

# ## Quill Battery 1
weapon_component_template = {
	type = instant

	key = "SMALL_BIO_AUTOCANNON_1"
	size = small

	icon = "GFX_ship_part_bio_autocannon_1"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_autocannons_1" }
	component_set = "BIO_AUTOCANNON_1"
	projectile_gfx = "auto_cannons_s"
	tags = { weapon_type_kinetic s_slot }
	ai_tags = { weapon_role_anti_shield brawler brawler_stealth }
	upgrades_to = "SMALL_BIO_AUTOCANNON_2"
	resources = {
		category = ship_components
		cost = {
			alloys = @s_t3_cost
		}
		upkeep = {
			food = @s_t3_upkeep_energy
			alloys = @s_t3_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
		modifier = {
			factor = 10
			from = {
				ship_uses_mauler_components = yes
			}
		}
	}
}

weapon_component_template = {
	type = instant

	key = "MEDIUM_BIO_AUTOCANNON_1"
	size = medium

	icon = "GFX_ship_part_bio_autocannon_1"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_autocannons_1" }
	component_set = "BIO_AUTOCANNON_1"
	projectile_gfx = "auto_cannons_m"
	tags = { weapon_type_kinetic m_slot }
	ai_tags = { weapon_role_anti_shield brawler brawler_stealth }
	upgrades_to = "MEDIUM_BIO_AUTOCANNON_2"
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t3_cost
		}
		upkeep = {
			food = @m_t3_upkeep_energy
			alloys = @m_t3_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
	}
}

weapon_component_template = {
	type = instant

	key = "LARGE_BIO_AUTOCANNON_1"
	size = large

	icon = "GFX_ship_part_bio_autocannon_1"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_autocannons_1" }
	component_set = "BIO_AUTOCANNON_1"
	projectile_gfx = "auto_cannons_l"
	tags = { weapon_type_kinetic l_slot }
	ai_tags = { weapon_role_anti_shield brawler brawler_stealth }
	upgrades_to = "LARGE_BIO_AUTOCANNON_2"
	resources = {
		category = ship_components
		cost = {
			alloys = @l_t3_cost
		}
		upkeep = {
			food = @l_t3_upkeep_energy
			alloys = @l_t3_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
	}
}

# ## Quill Battery 2
weapon_component_template = {
	type = instant

	key = "SMALL_BIO_AUTOCANNON_2"
	size = small

	icon = "GFX_ship_part_bio_autocannon_2"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_autocannons_2" }
	component_set = "BIO_AUTOCANNON_2"
	projectile_gfx = "ripper_auto_cannons_s"
	tags = { weapon_type_kinetic s_slot }
	ai_tags = { weapon_role_anti_shield brawler brawler_stealth }
	upgrades_to = "SMALL_BIO_AUTOCANNON_3"
	resources = {
		category = ship_components
		cost = {
			alloys = @s_t4_cost
			volatile_motes = @s_t4_rare
		}
		upkeep = {
			food = @s_t4_upkeep_energy
			alloys = @s_t4_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
		modifier = {
			factor = 10
			from = {
				ship_uses_mauler_components = yes
			}
		}
	}
}

weapon_component_template = {
	type = instant

	key = "MEDIUM_BIO_AUTOCANNON_2"
	size = medium

	icon = "GFX_ship_part_bio_autocannon_2"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_autocannons_2" }
	component_set = "BIO_AUTOCANNON_2"
	projectile_gfx = "ripper_auto_cannons_m"
	tags = { weapon_type_kinetic m_slot }
	ai_tags = { weapon_role_anti_shield brawler brawler_stealth }
	upgrades_to = "MEDIUM_BIO_AUTOCANNON_3"
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t4_cost
			volatile_motes = @m_t4_rare
		}
		upkeep = {
			food = @m_t4_upkeep_energy
			alloys = @m_t4_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
	}
}

weapon_component_template = {
	type = instant

	key = "LARGE_BIO_AUTOCANNON_2"
	size = large

	icon = "GFX_ship_part_bio_autocannon_2"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_autocannons_2" }
	component_set = "BIO_AUTOCANNON_2"
	projectile_gfx = "ripper_auto_cannons_l"
	tags = { weapon_type_kinetic l_slot }
	ai_tags = { weapon_role_anti_shield brawler brawler_stealth }
	upgrades_to = "LARGE_BIO_AUTOCANNON_3"
	resources = {
		category = ship_components
		cost = {
			alloys = @l_t4_cost
			volatile_motes = @l_t4_rare
		}
		upkeep = {
			food = @l_t4_upkeep_energy
			alloys = @l_t4_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
	}
}

# ## Quill Battery 3
weapon_component_template = {
	type = instant

	key = "SMALL_BIO_AUTOCANNON_3"
	size = small

	icon = "GFX_ship_part_bio_autocannon_3"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_autocannons_3" }
	component_set = "BIO_AUTOCANNON_3"
	projectile_gfx = "stormfire_auto_cannons_s"
	tags = { weapon_type_kinetic s_slot }
	ai_tags = { weapon_role_anti_shield brawler brawler_stealth }
	upgrades_to = "SMALL_BIO_AUTOCANNON_4"
	resources = {
		category = ship_components
		cost = {
			alloys = @s_t5_cost
			volatile_motes = @s_t5_rare
		}
		upkeep = {
			food = @s_t5_upkeep_energy
			alloys = @s_t5_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
		modifier = {
			factor = 10
			from = {
				ship_uses_mauler_components = yes
			}
		}
	}
}

weapon_component_template = {
	type = instant

	key = "MEDIUM_BIO_AUTOCANNON_3"
	size = medium

	icon = "GFX_ship_part_bio_autocannon_3"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_autocannons_3" }
	component_set = "BIO_AUTOCANNON_3"
	projectile_gfx = "stormfire_auto_cannons_m"
	tags = { weapon_type_kinetic m_slot }
	ai_tags = { weapon_role_anti_shield brawler brawler_stealth }
	upgrades_to = "MEDIUM_BIO_AUTOCANNON_4"
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t5_cost
			volatile_motes = @m_t5_rare
		}
		upkeep = {
			food = @m_t5_upkeep_energy
			alloys = @m_t5_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
	}
}

weapon_component_template = {
	type = instant

	key = "LARGE_BIO_AUTOCANNON_3"
	size = large

	icon = "GFX_ship_part_bio_autocannon_3"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_autocannons_3" }
	component_set = "BIO_AUTOCANNON_3"
	projectile_gfx = "stormfire_auto_cannons_l"
	tags = { weapon_type_kinetic l_slot }
	ai_tags = { weapon_role_anti_shield brawler brawler_stealth }
	upgrades_to = "LARGE_BIO_AUTOCANNON_4"
	resources = {
		category = ship_components
		cost = {
			alloys = @l_t5_cost
			volatile_motes = @l_t5_rare
		}
		upkeep = {
			food = @l_t5_upkeep_energy
			alloys = @l_t5_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
	}
}

# ## Quill Battery 4
weapon_component_template = {
	type = instant

	key = "SMALL_BIO_AUTOCANNON_4"
	size = small

	icon = "GFX_ship_part_bio_autocannon_4"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_nanite_autocannon" }
	component_set = "BIO_AUTOCANNON_4"
	projectile_gfx = "stormfire_auto_cannons_s"
	tags = { weapon_type_kinetic }
	ai_tags = { weapon_role_anti_shield brawler brawler_stealth }
	resources = {
		category = ship_components
		cost = {
			alloys = @s_t6_cost
			nanites = @s_t6_rare
		}
		upkeep = {
			food = @s_t6_upkeep_energy
			alloys = @s_t6_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = nanites }
		}
		modifier = {
			factor = 0.0
			is_ai = yes
		}
	}
}

weapon_component_template = {
	type = instant

	key = "MEDIUM_BIO_AUTOCANNON_4"
	size = medium

	icon = "GFX_ship_part_bio_autocannon_4"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_nanite_autocannon" }
	component_set = "BIO_AUTOCANNON_4"
	projectile_gfx = "stormfire_auto_cannons_m"
	tags = { weapon_type_kinetic m_slot }
	ai_tags = { weapon_role_anti_shield brawler brawler_stealth }
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t6_cost
			nanites = @m_t6_rare
		}
		upkeep = {
			food = @m_t6_upkeep_energy
			alloys = @m_t6_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = nanites }
		}
		modifier = {
			factor = 0.0
			is_ai = yes
		}
	}
}

weapon_component_template = {
	type = instant

	key = "LARGE_BIO_AUTOCANNON_4"
	size = large

	icon = "GFX_ship_part_bio_autocannon_4"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_nanite_autocannon" }
	component_set = "BIO_AUTOCANNON_4"
	projectile_gfx = "stormfire_auto_cannons_l"
	tags = { weapon_type_kinetic l_slot }
	ai_tags = { weapon_role_anti_shield brawler brawler_stealth }
	resources = {
		category = ship_components
		cost = {
			alloys = @l_t6_cost
			nanites = @l_t6_rare
		}
		upkeep = {
			food = @l_t6_upkeep_energy
			alloys = @l_t6_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = nanites }
		}
		modifier = {
			factor = 0.0
			is_ai = yes
		}
	}
}


# ## Bio-Swarmer Missiles

### Bio-Swarmer Missile Launcher
weapon_component_template = {
	key = "TORPEDO_BIO_SWARMER_MISSILE_1"
	size = torpedo

	icon = "GFX_ship_part_bio_swarmer_missile_1"
	icon_frame = 1
	type = missile

	potential = {
		OR = {
			ship_uses_harbinger_components = yes
			is_ship_size = military_station_small
		}
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_swarmer_missiles_1" }
	component_set = "BIO_SWARMER_MISSILE_1"
	projectile_gfx = "swarmer_missiles"
	tags = { weapon_type_explosive g_slot }
	ai_tags = { weapon_role_artillery artillery artillery_stealth }
	ai_tag_weight = 0
	upgrades_to = "TORPEDO_BIO_SWARMER_MISSILE_2"
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t3_cost
		}
		upkeep = {
			food = @m_t3_upkeep_energy
			alloys = @m_t3_upkeep_alloys
		}
	}
}
weapon_component_template = {
	key = "MEDIUM_BIO_SWARMER_MISSILE_1"
	size = medium

	icon = "GFX_ship_part_bio_swarmer_missile_1"
	icon_frame = 1
	type = missile

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_swarmer_missiles_1" }
	component_set = "BIO_SWARMER_MISSILE_1"
	projectile_gfx = "swarmer_missiles"
	tags = { weapon_type_explosive m_slot }
	ai_tags = { weapon_role_artillery artillery artillery_stealth }
	ai_tag_weight = 0
	upgrades_to = "MEDIUM_BIO_SWARMER_MISSILE_2"
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t3_cost
		}
		upkeep = {
			food = @m_t3_upkeep_energy
			alloys = @m_t3_upkeep_alloys
		}
	}
}

### Bio-Advanced Swarmer Missile Launcher
weapon_component_template = {
	key = "TORPEDO_BIO_SWARMER_MISSILE_2"
	size = torpedo

	icon = "GFX_ship_part_bio_swarmer_missile_2"
	icon_frame = 1
	type = missile

	potential = {
		OR = {
			ship_uses_harbinger_components = yes
			is_ship_size = military_station_small
		}
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_swarmer_missiles_2" }
	component_set = "BIO_SWARMER_MISSILE_2"
	projectile_gfx = "swarmer_missiles_02"
	tags = { weapon_type_explosive g_slot }
	ai_tags = { weapon_role_artillery artillery artillery_stealth }
	ai_tag_weight = 0
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t5_cost
			volatile_motes = @m_t5_rare
		}
		upkeep = {
			food = @m_t5_upkeep_energy
			alloys = @m_t5_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
	}
}

weapon_component_template = {
	key = "MEDIUM_BIO_SWARMER_MISSILE_2"
	size = medium

	icon = "GFX_ship_part_bio_swarmer_missile_2"
	icon_frame = 1
	type = missile

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_swarmer_missiles_2" }
	component_set = "BIO_SWARMER_MISSILE_2"
	projectile_gfx = "swarmer_missiles_02"
	tags = { weapon_type_explosive m_slot }
	ai_tags = { weapon_role_artillery artillery artillery_stealth }
	ai_tag_weight = 0
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t5_cost
			volatile_motes = @m_t5_rare
		}
		upkeep = {
			food = @m_t5_upkeep_energy
			alloys = @m_t5_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
	}
}

### Red Lasers
weapon_component_template = {
	key = "SMALL_RED_BIO_LASER"
	size = small
	type = instant
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	icon = "GFX_mutation_eye_beam_1"
	icon_frame = 1
	prerequisites = { "tech_lasers_1" }
	component_set = "RED_BIO_LASER"
	projectile_gfx = "infrared_laser_s"
	tags = { weapon_type_energy s_slot }
	upgrades_to = "SMALL_BLUE_BIO_LASER"
	ai_tags = { weapon_role_anti_armor gunship }	#tags must be pre-registered in common/weapon_tags
	resources = {
		category = ship_components
		cost = {
			alloys = @s_t1_cost
		}
		upkeep = {
			food = @s_t1_upkeep_energy
			alloys = @s_t1_upkeep_alloys
		}
	}
}

weapon_component_template = {
	key = "MEDIUM_RED_BIO_LASER"
	size = medium
	type = instant
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	icon = "GFX_mutation_eye_beam_1"
	icon_frame = 1
	prerequisites = { "tech_lasers_1" }
	component_set = "RED_BIO_LASER"
	projectile_gfx = "infrared_laser_m"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	upgrades_to = "MEDIUM_BLUE_BIO_LASER"
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t1_cost
		}
		upkeep = {
			food = @m_t1_upkeep_energy
			alloys = @m_t1_upkeep_alloys
		}
	}
}

weapon_component_template = {
	key = "LARGE_RED_BIO_LASER"
	size = large
	type = instant
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	icon = "GFX_mutation_eye_beam_1"
	icon_frame = 1
	prerequisites = { "tech_lasers_1" }
	component_set = "RED_BIO_LASER"
	projectile_gfx = "infrared_laser_l"
	tags = { weapon_type_energy l_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	upgrades_to = "LARGE_BLUE_BIO_LASER"
	resources = {
		category = ship_components
		cost = {
			alloys = @l_t1_cost
		}
		upkeep = {
			food = @l_t1_upkeep_energy
			alloys = @l_t1_upkeep_alloys
		}
	}
}

### Blue Lasers
weapon_component_template = {
	key = "SMALL_BLUE_BIO_LASER"
	size = small
	type = instant
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	icon = "GFX_mutation_eye_beam_2"
	icon_frame = 1
	prerequisites = { "tech_lasers_2" }
	component_set = "BLUE_BIO_LASER"
	projectile_gfx = "blue_laser_s"
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	upgrades_to = "SMALL_UV_BIO_LASER"
	resources = {
		category = ship_components
		cost = {
			alloys = @s_t2_cost
		}
		upkeep = {
			food = @s_t2_upkeep_energy
			alloys = @s_t2_upkeep_alloys
		}
	}
}

weapon_component_template = {
	key = "MEDIUM_BLUE_BIO_LASER"
	size = medium
	type = instant
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	icon = "GFX_mutation_eye_beam_2"
	icon_frame = 1
	prerequisites = { "tech_lasers_2" }
	component_set = "BLUE_BIO_LASER"
	projectile_gfx = "blue_laser_m"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	upgrades_to = "MEDIUM_UV_BIO_LASER"
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t2_cost
		}
		upkeep = {
			food = @m_t2_upkeep_energy
			alloys = @m_t2_upkeep_alloys
		}
	}
}

weapon_component_template = {
	key = "LARGE_BLUE_BIO_LASER"
	size = large
	type = instant
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	icon = "GFX_mutation_eye_beam_2"
	icon_frame = 1
	prerequisites = { "tech_lasers_2" }
	component_set = "BLUE_BIO_LASER"
	projectile_gfx = "blue_laser_l"
	tags = { weapon_type_energy l_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	upgrades_to = "LARGE_UV_BIO_LASER"
	resources = {
		category = ship_components
		cost = {
			alloys = @l_t2_cost
		}
		upkeep = {
			food = @l_t2_upkeep_energy
			alloys = @l_t2_upkeep_alloys
		}
	}
}

### UV Lasers
weapon_component_template = {
	key = "SMALL_UV_BIO_LASER"
	size = small
	type = instant
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	icon = "GFX_mutation_eye_beam_3"
	icon_frame = 1
	#color = { 1.0 0.1 1.0 1 }
	prerequisites = { "tech_lasers_3" }
	component_set = "UV_BIO_LASER"
	projectile_gfx = "uv_laser_s"
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	upgrades_to = "SMALL_XRAY_BIO_LASER"
	resources = {
		category = ship_components
		cost = {
			alloys = @s_t3_cost
		}
		upkeep = {
			food = @s_t3_upkeep_energy
			alloys = @s_t3_upkeep_alloys
		}
	}
}

weapon_component_template = {
	key = "MEDIUM_UV_BIO_LASER"
	size = medium
	type = instant
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	icon = "GFX_mutation_eye_beam_3"
	icon_frame = 1
	#color = { 1.0 0.1 1.0 1 }
	prerequisites = { "tech_lasers_3" }
	component_set = "UV_BIO_LASER"
	projectile_gfx = "uv_laser_m"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	upgrades_to = "MEDIUM_XRAY_BIO_LASER"
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t3_cost
		}
		upkeep = {
			food = @m_t3_upkeep_energy
			alloys = @m_t3_upkeep_alloys
		}
	}
}

weapon_component_template = {
	key = "LARGE_UV_BIO_LASER"
	size = large
	accuracy = 1
	type = instant
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	icon = "GFX_mutation_eye_beam_3"
	icon_frame = 1
	#color = { 1.0 0.1 1.0 1 }
	prerequisites = { "tech_lasers_3" }
	component_set = "UV_BIO_LASER"
	projectile_gfx = "uv_laser_l"
	tags = { weapon_type_energy l_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	upgrades_to = "LARGE_XRAY_BIO_LASER"
	resources = {
		category = ship_components
		cost = {
			alloys = @l_t3_cost
		}
		upkeep = {
			food = @l_t3_upkeep_energy
			alloys = @l_t3_upkeep_alloys
		}
	}
}

### XRay Lasers
weapon_component_template = {
	key = "SMALL_XRAY_BIO_LASER"
	size = small
	type = instant
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	icon = "GFX_mutation_eye_beam_4"
	icon_frame = 1
	#color = { 1.0 1.0 1.0 1 }
	prerequisites = { "tech_lasers_4" }
	component_set = "XRAY_BIO_LASER"
	projectile_gfx = "xray_laser_s"
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	upgrades_to = "SMALL_GAMMA_BIO_LASER"
	resources = {
		category = ship_components
		cost = {
			alloys = @s_t4_cost
			rare_crystals = @s_t4_rare
		}
		upkeep = {
			food = @s_t4_upkeep_energy
			alloys = @s_t4_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

weapon_component_template = {
	key = "MEDIUM_XRAY_BIO_LASER"
	size = medium
	type = instant
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	icon = "GFX_mutation_eye_beam_4"
	icon_frame = 1
	#color = { 1.0 1.0 1.0 1 }
	prerequisites = { "tech_lasers_4" }
	component_set = "XRAY_BIO_LASER"
	projectile_gfx = "xray_laser_m"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	upgrades_to = "MEDIUM_GAMMA_BIO_LASER"
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t4_cost
			rare_crystals = @m_t4_rare
		}
		upkeep = {
			food = @m_t4_upkeep_energy
			alloys = @m_t4_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

weapon_component_template = {
	key = "LARGE_XRAY_BIO_LASER"
	size = large
	type = instant
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	icon = "GFX_mutation_eye_beam_4"
	icon_frame = 1
	#color = { 1.0 1.0 1.0 1 }

	prerequisites = { "tech_lasers_4" }
	component_set = "XRAY_BIO_LASER"
	projectile_gfx = "xray_laser_l"
	tags = { weapon_type_energy l_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	upgrades_to = "LARGE_GAMMA_BIO_LASER"
	resources = {
		category = ship_components
		cost = {
			alloys = @l_t4_cost
			rare_crystals = @l_t4_rare
		}
		upkeep = {
			food = @l_t4_upkeep_energy
			alloys = @l_t4_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

### Gamma Lasers
weapon_component_template = {
	key = "SMALL_GAMMA_BIO_LASER"
	size = small
	type = instant
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	icon = "GFX_mutation_eye_beam_5"
	icon_frame = 1
	#color = { 0.1 1.0 0.1 1 }

	prerequisites = { "tech_lasers_5" }
	component_set = "GAMMA_BIO_LASER"
	projectile_gfx = "gamma_laser_s"
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	resources = {
		category = ship_components
		cost = {
			alloys = @s_t5_cost
			rare_crystals = @s_t5_rare
		}
		upkeep = {
			food = @s_t5_upkeep_energy
			alloys = @s_t5_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

weapon_component_template = {
	key = "MEDIUM_GAMMA_BIO_LASER"
	size = medium
	type = instant
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	icon = "GFX_mutation_eye_beam_5"
	icon_frame = 1
	#color = { 0.1 1.0 0.1 1 }

	prerequisites = { "tech_lasers_5" }
	component_set = "GAMMA_BIO_LASER"
	projectile_gfx = "gamma_laser_m"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t5_cost
			rare_crystals = @m_t5_rare
		}
		upkeep = {
			food = @m_t5_upkeep_energy
			alloys = @m_t5_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

weapon_component_template = {
	key = "LARGE_GAMMA_BIO_LASER"
	size = large
	type = instant
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	icon = "GFX_mutation_eye_beam_5"
	icon_frame = 1
	#color = { 0.1 1.0 0.1 1 }

	prerequisites = { "tech_lasers_5" }
	component_set = "GAMMA_BIO_LASER"
	projectile_gfx = "gamma_laser_l"
	tags = { weapon_type_energy l_slot }
	ai_tags = { weapon_role_anti_armor gunship }
	resources = {
		category = ship_components
		cost = {
			alloys = @l_t5_cost
			rare_crystals = @l_t5_rare
		}
		upkeep = {
			food = @l_t5_upkeep_energy
			alloys = @l_t5_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

### Archaeo Lasers
weapon_component_template = {
	type = instant

	key = "SMALL_ARCHAEO_BIO_LASER"
	size = small
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	icon = "GFX_mutation_ancient_collapser_beam"
	icon_frame = 1

	prerequisites = { "tech_archaeo_lasers" }
	component_set = "ARCHAEO_BIO_LASER"
	projectile_gfx = "dark_matter_laser_s"
	tags = { weapon_type_energy weapon_archaeotech }
	ai_tags = { weapon_role_anti_armor gunship }
	resources = {
		category = ship_components
		cost = {
			alloys = @s_t3_cost
			minor_artifacts = @minor_artifacts_cost_s
		}
		upkeep = {
			food =  @s_t3_upkeep_energy
			alloys = @s_t3_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 0
		modifier = {
			add = 2.5
			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
				}
			}
		}
	}
}

weapon_component_template = {
	type = instant

	key = "MEDIUM_ARCHAEO_BIO_LASER"
	size = medium
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	icon = "GFX_mutation_ancient_collapser_beam"
	icon_frame = 1

	prerequisites = { "tech_archaeo_lasers" }
	component_set = "ARCHAEO_BIO_LASER"
	projectile_gfx = "dark_matter_laser_m"
	tags = { weapon_type_energy weapon_archaeotech }
	ai_tags = { weapon_role_anti_armor gunship }
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t3_cost
			minor_artifacts = @minor_artifacts_cost_m
		}
		upkeep = {
			food =  @m_t3_upkeep_energy
			alloys = @m_t3_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 0
		modifier = {
			add = 2.5
			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
				}
			}
		}
	}
}

weapon_component_template = {
	type = instant

	key = "LARGE_ARCHAEO_BIO_LASER"
	size = large
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	icon = "GFX_mutation_ancient_collapser_beam"
	icon_frame = 1

	prerequisites = { "tech_archaeo_lasers" }
	component_set = "ARCHAEO_BIO_LASER"
	projectile_gfx = "dark_matter_laser_l"
	tags = { weapon_type_energy weapon_archaeotech }
	ai_tags = { weapon_role_anti_armor gunship }
	resources = {
		category = ship_components
		cost = {
			alloys = @l_t3_cost
			minor_artifacts = @minor_artifacts_cost_l
		}
		upkeep = {
			food =  @l_t3_upkeep_energy
			alloys = @l_t3_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 0
		modifier = {
			add = 2.5
			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
				}
			}
		}
	}
}

weapon_component_template = {
	key = "SMALL_MINING_BIO_LASER"

	size = small
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	type = instant
	icon = "GFX_mutation_laser_1"
	icon_frame = 1
	projectile_gfx = "gamma_laser_s"
	tags = { weapon_type_energy }
	ai_tags = { weapon_role_anti_armor weapon_role_anti_hull brawler brawler_stealth }

	component_set = "MINING_BIO_LASER"
	prerequisites = { "tech_mining_drone_weapon_1" }
	resources = {
		category = ship_components
		cost = {
			alloys = @s_t2_cost
		}
		upkeep = {
			food = @s_t2_upkeep_energy
			alloys = @s_t2_upkeep_alloys
		}
	}
}

weapon_component_template = {
	key = "MEDIUM_MINING_BIO_LASER"

	size = medium
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	type = instant
	icon = "GFX_mutation_laser_1"
	icon_frame = 1
	projectile_gfx = "gamma_laser_m"
	tags = { weapon_type_energy }
	ai_tags = { weapon_role_anti_armor weapon_role_anti_hull brawler brawler_stealth }

	component_set = "MINING_BIO_LASER"
	prerequisites = { "tech_mining_drone_weapon_1" }
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t2_cost
		}
		upkeep = {
			food = @m_t2_upkeep_energy
			alloys = @m_t2_upkeep_alloys
		}
	}
}

# ####################
# Mass Drivers
# ####################

# ## Mass Drivers
weapon_component_template = {
	type = instant

	key = "SMALL_BIO_MASS_DRIVER_1"
	size = small

	icon = "GFX_mutation_shard_accelerator_1"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_mass_drivers_1" }
	component_set = "BIO_MASS_DRIVER_1"
	projectile_gfx = "mass_driver_s"
	tags = { weapon_type_kinetic s_slot }
	ai_tags = { weapon_role_anti_shield gunship }
	upgrades_to = "SMALL_BIO_MASS_DRIVER_2"
	resources = {
		category = ship_components
		cost = {
			alloys = @s_t1_cost
		}
		upkeep = {
			food =  @s_t1_upkeep_energy
			alloys = @s_t1_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
	}
}

weapon_component_template = {
	type = instant

	key = "MEDIUM_BIO_MASS_DRIVER_1"
	size = medium

	icon = "GFX_mutation_shard_accelerator_1"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_mass_drivers_1"}
	component_set = "BIO_MASS_DRIVER_1"
	projectile_gfx = "mass_driver_m"
	tags = { weapon_type_kinetic m_slot }
	ai_tags = { weapon_role_anti_shield gunship }
	upgrades_to = "MEDIUM_BIO_MASS_DRIVER_2"
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t1_cost
		}
		upkeep = {
			food =  @m_t1_upkeep_energy
			alloys = @m_t1_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
	}
}

weapon_component_template = {
	type = instant

	key = "LARGE_BIO_MASS_DRIVER_1"
	size = large

	icon = "GFX_mutation_shard_accelerator_1"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	min_range = 7 #45.0

	prerequisites = { "tech_mass_drivers_1" }
	component_set = "BIO_MASS_DRIVER_1"
	projectile_gfx = "mass_driver_l"
	tags = { weapon_type_kinetic l_slot }
	ai_tags = { weapon_role_anti_shield gunship }
	upgrades_to = "LARGE_BIO_MASS_DRIVER_2"
	resources = {
		category = ship_components
		cost = {
			alloys = @l_t1_cost
		}
		upkeep = {
			food =  @l_t1_upkeep_energy
			alloys = @l_t1_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
		modifier = {
			factor = @cosmic_storm_gravity_ai_weight_factor
			has_country_flag = affected_by_gravity_storm
		}
	}
}

# ## Coilguns
weapon_component_template = {
	type = instant

	key = "SMALL_BIO_MASS_DRIVER_2"
	size = small

	icon = "GFX_mutation_shard_accelerator_2"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_mass_drivers_2" }
	component_set = "BIO_MASS_DRIVER_2"
	projectile_gfx = "coilgun_s"
	tags = { weapon_type_kinetic s_slot }
	ai_tags = { weapon_role_anti_shield gunship }
	upgrades_to = "SMALL_BIO_MASS_DRIVER_3"
	resources = {
		category = ship_components
		cost = {
			alloys = @s_t2_cost
		}
		upkeep = {
			food =  @s_t2_upkeep_energy
			alloys = @s_t2_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
	}
}

weapon_component_template = {
	type = instant

	key = "MEDIUM_BIO_MASS_DRIVER_2"
	size = medium

	icon = "GFX_mutation_shard_accelerator_2"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_mass_drivers_2" }
	component_set = "BIO_MASS_DRIVER_2"
	projectile_gfx = "coilgun_m"
	tags = { weapon_type_kinetic m_slot }
	ai_tags = { weapon_role_anti_shield gunship }
	upgrades_to = "MEDIUM_BIO_MASS_DRIVER_3"
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t2_cost
		}
		upkeep = {
			food =  @m_t2_upkeep_energy
			alloys = @m_t2_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
	}
}

weapon_component_template = {
	type = instant

	key = "LARGE_BIO_MASS_DRIVER_2"
	size = large

	icon = "GFX_mutation_shard_accelerator_2"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	min_range = 7 #45.0

	prerequisites = { "tech_mass_drivers_2" }
	component_set = "BIO_MASS_DRIVER_2"
	projectile_gfx = "coilgun_l"
	tags = { weapon_type_kinetic l_slot }
	ai_tags = { weapon_role_anti_shield gunship }
	upgrades_to = "LARGE_BIO_MASS_DRIVER_3"
	resources = {
		category = ship_components
		cost = {
			alloys = @l_t2_cost
		}
		upkeep = {
			food =  @l_t2_upkeep_energy
			alloys = @l_t2_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
		modifier = {
			factor = @cosmic_storm_gravity_ai_weight_factor
			has_country_flag = affected_by_gravity_storm
		}
	}
}

# ## Railguns
weapon_component_template = {
	type = instant

	key = "SMALL_BIO_MASS_DRIVER_3"
	size = small

	icon = "GFX_mutation_shard_accelerator_3"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_mass_drivers_3" }
	component_set = "BIO_MASS_DRIVER_3"
	projectile_gfx = "railgun_s"
	tags = { weapon_type_kinetic s_slot }
	ai_tags = { weapon_role_anti_shield gunship }
	upgrades_to = "SMALL_BIO_MASS_DRIVER_4"
	resources = {
		category = ship_components
		cost = {
			alloys = @s_t3_cost
		}
		upkeep = {
			food =  @s_t3_upkeep_energy
			alloys = @s_t3_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
	}
}

weapon_component_template = {
	type = instant

	key = "MEDIUM_BIO_MASS_DRIVER_3"
	size = medium

	icon = "GFX_mutation_shard_accelerator_3"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_mass_drivers_3" }
	component_set = "BIO_MASS_DRIVER_3"
	projectile_gfx = "railgun_m"
	tags = { weapon_type_kinetic m_slot }
	ai_tags = { weapon_role_anti_shield gunship }
	upgrades_to = "MEDIUM_BIO_MASS_DRIVER_4"
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t3_cost
		}
		upkeep = {
			food =  @m_t3_upkeep_energy
			alloys = @m_t3_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
	}
}

weapon_component_template = {
	type = instant

	key = "LARGE_BIO_MASS_DRIVER_3"
	size = large

	icon = "GFX_mutation_shard_accelerator_3"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	min_range = 7 #45.0

	prerequisites = { "tech_mass_drivers_3" }
	component_set = "BIO_MASS_DRIVER_3"
	projectile_gfx = "railgun_l"
	tags = { weapon_type_kinetic l_slot }
	ai_tags = { weapon_role_anti_shield gunship }
	upgrades_to = "LARGE_BIO_MASS_DRIVER_4"
	resources = {
		category = ship_components
		cost = {
			alloys = @l_t3_cost
		}
		upkeep = {
			food =  @l_t3_upkeep_energy
			alloys = @l_t3_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
		modifier = {
			factor = @cosmic_storm_gravity_ai_weight_factor
			has_country_flag = affected_by_gravity_storm
		}
	}
}

# ## Advanced Railguns
weapon_component_template = {
	type = instant

	key = "SMALL_BIO_MASS_DRIVER_4"
	size = small

	icon = "GFX_mutation_shard_accelerator_4"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_mass_drivers_4" }
	component_set = "BIO_MASS_DRIVER_4"
	projectile_gfx = "advanced_railgun_s"
	tags = { weapon_type_kinetic s_slot }
	ai_tags = { weapon_role_anti_shield gunship }
	upgrades_to = "SMALL_BIO_MASS_DRIVER_5"
	resources = {
		category = ship_components
		cost = {
			alloys = @s_t4_cost
			volatile_motes = @s_t4_rare
		}
		upkeep = {
			food =  @s_t4_upkeep_energy
			alloys = @s_t4_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
	}
}

weapon_component_template = {
	type = instant

	key = "MEDIUM_BIO_MASS_DRIVER_4"
	size = medium

	icon = "GFX_mutation_shard_accelerator_4"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_mass_drivers_4" }
	component_set = "BIO_MASS_DRIVER_4"
	projectile_gfx = "advanced_railgun_m"
	tags = { weapon_type_kinetic m_slot }
	ai_tags = { weapon_role_anti_shield gunship }
	upgrades_to = "MEDIUM_BIO_MASS_DRIVER_5"
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t4_cost
			volatile_motes = @m_t4_rare
		}
		upkeep = {
			food =  @m_t4_upkeep_energy
			alloys = @m_t4_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
	}
}

weapon_component_template = {
	type = instant

	key = "LARGE_BIO_MASS_DRIVER_4"
	size = large

	icon = "GFX_mutation_shard_accelerator_4"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	min_range = 7 #45.0

	prerequisites = { "tech_mass_drivers_4" }
	component_set = "BIO_MASS_DRIVER_4"
	projectile_gfx = "advanced_railgun_l"
	tags = { weapon_type_kinetic l_slot }
	ai_tags = { weapon_role_anti_shield gunship }
	upgrades_to = "LARGE_BIO_MASS_DRIVER_5"
	resources = {
		category = ship_components
		cost = {
			alloys = @l_t4_cost
			volatile_motes = @l_t4_rare
		}
		upkeep = {
			food =  @l_t4_upkeep_energy
			alloys = @l_t4_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
		modifier = {
			factor = @cosmic_storm_gravity_ai_weight_factor
			has_country_flag = affected_by_gravity_storm
		}
	}
}

# ## Gauss Cannons
weapon_component_template = {
	type = instant

	key = "SMALL_BIO_MASS_DRIVER_5"
	size = small

	icon = "GFX_mutation_shard_accelerator_5"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_mass_drivers_5" }
	component_set = "BIO_MASS_DRIVER_5"
	projectile_gfx = "gauss_cannon_s"
	tags = { weapon_type_kinetic s_slot }
	ai_tags = { weapon_role_anti_shield brawler brawler_stealth gunship }
	resources = {
		category = ship_components
		cost = {
			alloys = @s_t5_cost
			volatile_motes = @s_t5_rare
		}
		upkeep = {
			food =  @s_t5_upkeep_energy
			alloys = @s_t5_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
	}
}

weapon_component_template = {
	type = instant

	key = "MEDIUM_BIO_MASS_DRIVER_5"
	size = medium

	icon = "GFX_mutation_shard_accelerator_5"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_mass_drivers_5" }
	component_set = "BIO_MASS_DRIVER_5"
	projectile_gfx = "gauss_cannon_m"
	tags = { weapon_type_kinetic m_slot }
	ai_tags = { weapon_role_anti_shield gunship}
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t5_cost
			volatile_motes = @m_t5_rare
		}
		upkeep = {
			food =  @m_t5_upkeep_energy
			alloys = @m_t5_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
	}
}

weapon_component_template = {
	type = instant

	key = "LARGE_BIO_MASS_DRIVER_5"
	size = large

	icon = "GFX_mutation_shard_accelerator_5"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	min_range = 7 #45.0

	prerequisites = { "tech_mass_drivers_5" }
	component_set = "BIO_MASS_DRIVER_5"
	projectile_gfx = "gauss_cannon_l"
	tags = { weapon_type_kinetic l_slot }
	ai_tags = { weapon_role_anti_shield gunship }
	resources = {
		category = ship_components
		cost = {
			alloys = @l_t5_cost
			volatile_motes = @l_t5_rare
		}
		upkeep = {
			food =  @l_t5_upkeep_energy
			alloys = @l_t5_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
		modifier = {
			factor = @cosmic_storm_gravity_ai_weight_factor
			has_country_flag = affected_by_gravity_storm
		}
	}
}

# ## Ancient Macro Batteries
weapon_component_template = {
	type = instant

	key = "SMALL_BIO_ARCHAEO_KINETIC"
	size = small

	icon = "GFX_mutation_ancient_macro_shard_batteries"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_archaeo_mass_drivers" }
	component_set = "BIO_ARCHAEO_KINETIC"
	projectile_gfx = "mass_driver_s"
	tags = { weapon_type_kinetic weapon_archaeotech }
	ai_tags = { weapon_role_anti_shield gunship }
	resources = {
		category = ship_components
		cost = {
			alloys = @s_t3_cost
			minor_artifacts = @minor_artifacts_cost_s
		}
		upkeep = {
			food =  @s_t3_upkeep_energy
			alloys = @s_t3_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 0
		modifier = {
			add = 2.5
			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
				}
			}
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
	}
}

weapon_component_template = {
	type = instant

	key = "MEDIUM_BIO_ARCHAEO_KINETIC"
	size = medium

	icon = "GFX_mutation_ancient_macro_shard_batteries"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_archaeo_mass_drivers" }
	component_set = "BIO_ARCHAEO_KINETIC"
	projectile_gfx = "mass_driver_m"
	tags = { weapon_type_kinetic weapon_archaeotech }
	ai_tags = { weapon_role_anti_shield gunship }
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t3_cost
			minor_artifacts = @minor_artifacts_cost_m
		}
		upkeep = {
			food =  @m_t3_upkeep_energy
			alloys = @m_t3_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 0
		modifier = {
			add = 2.5
			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
				}
			}
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
	}
}

weapon_component_template = {
	type = instant

	key = "LARGE_BIO_ARCHAEO_KINETIC"
	size = large

	icon = "GFX_mutation_ancient_macro_shard_batteries"
	icon_frame = 1

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

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}

	prerequisites = { "tech_archaeo_mass_drivers" }
	component_set = "BIO_ARCHAEO_KINETIC"
	projectile_gfx = "mass_driver_l"
	tags = { weapon_type_kinetic weapon_archaeotech }
	ai_tags = { weapon_role_anti_shield gunship }
	resources = {
		category = ship_components
		cost = {
			alloys = @l_t3_cost
			minor_artifacts = @minor_artifacts_cost_l
		}
		upkeep = {
			food =  @l_t3_upkeep_energy
			alloys = @l_t3_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 0
		modifier = {
			add = 2.5
			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
				}
			}
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
	}
}

## Bio-Disruptors

# ## Disruptor 1
weapon_component_template = {
	key = "SMALL_BIO_DISRUPTOR_1"
	size = small
	type = instant

	icon = "GFX_mutation_disruptor_1"
	icon_frame = 1
	#color = { 1.0 1.0 1.0 1 }
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	prerequisites = { "tech_disruptors_1" }
	component_set = "BIO_DISRUPTOR_1"
	projectile_gfx = "disruptor_1_small"
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_hull brawler brawler_stealth }
	ai_tag_weight = 5
	upgrades_to = "SMALL_BIO_DISRUPTOR_2"
	target_type = target_enemies
	injected_modifier = {
		modifier = {
			modifier = disruptor_regen_debuff_1
			days = 10
		}
		stack_info = {
			id = disruptor_regen
			priority = 1
		}
	}
	resources = {
		category = ship_components
		cost = {
			alloys = @s_t3_cost
		}
		upkeep = {
			alloys = @s_t3_upkeep_alloys
			food = @s_t3_upkeep_energy
		}
	}
}

weapon_component_template = {
	key = "MEDIUM_BIO_DISRUPTOR_1"
	size = medium
	type = instant

	icon = "GFX_mutation_disruptor_1"
	icon_frame = 1
	#color = { 1.0 1.0 1.0 1 }
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	prerequisites = { "tech_disruptors_1" }
	component_set = "BIO_DISRUPTOR_1"
	projectile_gfx = "disruptor_1_medium"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_hull brawler brawler_stealth }
	ai_tag_weight = 5
	upgrades_to = "MEDIUM_BIO_DISRUPTOR_2"
	target_type = target_enemies
	injected_modifier = {
		modifier = {
			modifier = disruptor_regen_debuff_1
			days = 10
		}
		stack_info = {
			id = disruptor_regen
			priority = 1
		}
	}
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t3_cost
		}
		upkeep = {
			alloys = @m_t3_upkeep_alloys
			food = @m_t3_upkeep_energy
		}
	}
}

# ## Disruptor 2
weapon_component_template = {
	key = "SMALL_BIO_DISRUPTOR_2"
	size = small
	type = instant

	icon = "GFX_mutation_disruptor_2"
	icon_frame = 1
	#color = { 0.1 1.0 0.1 1 }
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	prerequisites = { "tech_disruptors_2" }
	component_set = "BIO_DISRUPTOR_2"
	projectile_gfx = "disruptor_2_small"
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_hull brawler brawler_stealth }
	ai_tag_weight = 5
	upgrades_to = "SMALL_BIO_DISRUPTOR_3"
	target_type = target_enemies
	injected_modifier = {
		modifier = {
			modifier = disruptor_regen_debuff_2
			days = 10
		}
		stack_info = {
			id = disruptor_regen
			priority = 2
		}
	}
	resources = {
		category = ship_components
		cost = {
			alloys = @s_t4_cost
			rare_crystals = @s_t4_rare
		}
		upkeep = {
			alloys = @s_t4_upkeep_alloys
			food = @s_t4_upkeep_energy
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

weapon_component_template = {
	key = "MEDIUM_BIO_DISRUPTOR_2"
	size = medium
	type = instant

	icon = "GFX_mutation_disruptor_2"
	icon_frame = 1
	#color = { 0.1 1.0 0.1 1 }
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	prerequisites = { "tech_disruptors_2" }
	component_set = "BIO_DISRUPTOR_2"
	projectile_gfx = "disruptor_2_medium"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_hull brawler brawler_stealth }
	ai_tag_weight = 5
	upgrades_to = "MEDIUM_BIO_DISRUPTOR_3"
	target_type = target_enemies
	injected_modifier = {
		modifier = {
			modifier = disruptor_regen_debuff_2
			days = 10
		}
		stack_info = {
			id = disruptor_regen
			priority = 2
		}
	}
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t4_cost
			rare_crystals = @m_t4_rare
		}
		upkeep = {
			alloys = @m_t4_upkeep_alloys
			food = @m_t4_upkeep_energy
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

# ## Disruptor 3
weapon_component_template = {
	key = "SMALL_BIO_DISRUPTOR_3"
	size = small
	type = instant

	icon = "GFX_mutation_disruptor_3"
	icon_frame = 1
	#color = { 0.1 1.0 0.1 1 }
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	prerequisites = { "tech_disruptors_3" }
	component_set = "BIO_DISRUPTOR_3"
	projectile_gfx = "disruptor_3_small"
	tags = { weapon_type_energy s_slot }
	ai_tags = { weapon_role_anti_hull brawler brawler_stealth }
	ai_tag_weight = 5
	target_type = target_enemies
	injected_modifier = {
		modifier = {
			modifier = disruptor_regen_debuff_3
			days = 10
		}
		stack_info = {
			id = disruptor_regen
			priority = 3
		}
	}
	resources = {
		category = ship_components
		cost = {
			alloys = @s_t5_cost
			rare_crystals = @s_t5_rare
		}
		upkeep = {
			alloys = @s_t5_upkeep_alloys
			food = @s_t5_upkeep_energy
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

weapon_component_template = {
	key = "MEDIUM_BIO_DISRUPTOR_3"
	size = medium
	type = instant

	icon = "GFX_mutation_disruptor_3"
	icon_frame = 1
	#color = { 0.1 1.0 0.1 1 }
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	prerequisites = { "tech_disruptors_3" }
	component_set = "BIO_DISRUPTOR_3"
	projectile_gfx = "disruptor_3_medium"
	tags = { weapon_type_energy m_slot }
	ai_tags = { weapon_role_anti_hull brawler brawler_stealth }
	ai_tag_weight = 5
	target_type = target_enemies
	injected_modifier = {
		modifier = {
			modifier = disruptor_regen_debuff_3
			days = 10
		}
		stack_info = {
			id = disruptor_regen
			priority = 3
		}
	}
	resources = {
		category = ship_components
		cost = {
			alloys = @m_t5_cost
			rare_crystals = @m_t5_rare
		}
		upkeep = {
			alloys = @m_t5_upkeep_alloys
			food = @m_t5_upkeep_energy
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

#####################
# Bio-PD
#####################

### Point Defence 1
weapon_component_template = {
	key = "BIO_POINT_DEFENCE_1"
	size = point_defence

	icon = "GFX_mutation_spitter_gun_1"
	icon_frame = 1

	prerequisites = { "tech_pd_tracking_1" }
	potential = {
		ship_uses_weaver_components = no
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	component_set = "BIO_POINT_DEFENCE_1"
	type = point_defence

	projectile_gfx = "red_laser_pd"
	tags = { weapon_type_point_defense weapon_type_energy }
	ai_tags = { weapon_role_point_defense screen }
	upgrades_to = "BIO_POINT_DEFENCE_2"
	resources = {
		category = ship_components
		cost = {
			alloys = 8
		}
		upkeep = {
			food = 0.08
			alloys = 0.008
		}
	}

	point_defence_targets = { "missile" "strike_craft" }
}

### Point Defence 2
weapon_component_template = {
	key = "BIO_POINT_DEFENCE_2"
	size = point_defence

	icon = "GFX_mutation_spitter_gun_2"
	icon_frame = 1

	prerequisites = { "tech_pd_tracking_2" }
	potential = {
		ship_uses_weaver_components = no
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	component_set = "BIO_POINT_DEFENCE_2"
	type = point_defence

	projectile_gfx = "blue_laser_pd"
	tags = { weapon_type_point_defense weapon_type_energy }
	ai_tags = { weapon_role_point_defense screen }
	upgrades_to = "BIO_POINT_DEFENCE_3"
	resources = {
		category = ship_components
		cost = {
			alloys = 10
		}
		upkeep = {
			food = 0.10
			alloys = 0.010
		}
	}

	point_defence_targets = { "missile" "strike_craft" }
}

### Point Defence 3
weapon_component_template = {
	key = "BIO_POINT_DEFENCE_3"
	size = point_defence

	icon = "GFX_mutation_spitter_gun_3"
	icon_frame = 1

	prerequisites = { "tech_pd_tracking_3" }
	potential = {
		ship_uses_weaver_components = no
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	component_set = "BIO_POINT_DEFENCE_3"
	type = point_defence

	projectile_gfx = "white_laser_pd"
	tags = { weapon_type_point_defense weapon_type_energy }
	ai_tags = { weapon_role_point_defense screen }
	resources = {
		category = ship_components
		cost = {
			alloys = 13
		}
		upkeep = {
			food = 0.13
			alloys = 0.013
		}
	}

	point_defence_targets = { "missile" "strike_craft" }
}

### Archaeo-Point Defence
weapon_component_template = {
	key = "BIO_ARCHAEO_POINTDEFENCE"
	size = point_defence

	icon = "GFX_mutation_ancient_web_slinger"
	icon_frame = 1

	prerequisites = { "tech_archaeo_point_defence" }
	potential = {
		ship_uses_weaver_components = no
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	component_set = "BIO_ARCHAEO_POINTDEFENCE"
	type = point_defence

	projectile_gfx = "white_laser_pd"
	tags = { weapon_type_point_defense weapon_type_energy weapon_archaeotech }
	ai_tags = { weapon_role_point_defense screen }
	resources = {
		category = ship_components
		cost = {
			alloys = 13
			minor_artifacts = @minor_artifacts_cost_l
		}
		upkeep = {
			food = 0.13
			alloys = 0.013
		}
	}

	point_defence_targets = { "missile" "strike_craft" }

	ai_weight = {
		weight = 0
		modifier = {
			add = 2.5
			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
				}
			}
		}
	}
}

#####################
# Bio-Flak Battery
#####################

### Flak Battery 1
weapon_component_template = {
	type = point_defence

	key = "BIO_FLAK_BATTERY_1"
	size = point_defence

	icon = "GFX_mutation_barb_1"
	icon_frame = 1

	prerequisites = { "tech_flak_batteries_1" }
	potential = {
		ship_uses_weaver_components = no
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	component_set = "BIO_FLAK_BATTERY_1"
	projectile_gfx = "flak_pd_1"
	tags = { weapon_type_point_defense weapon_type_kinetic }
	ai_tags = { weapon_role_point_defense screen }
	upgrades_to = "BIO_FLAK_BATTERY_2"
	resources = {
		category = ship_components
		cost = {
			alloys = 8
		}
		upkeep = {
			food = 0.08
			alloys = 0.008
		}
	}

	point_defence_targets = { "missile" "strike_craft" }
}

### Flak Battery 2
weapon_component_template = {
	type = point_defence

	key = "BIO_FLAK_BATTERY_2"
	size = point_defence

	icon = "GFX_mutation_barb_2"
	icon_frame = 1

	prerequisites = { "tech_flak_batteries_2" }
	potential = {
		ship_uses_weaver_components = no
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	component_set = "BIO_FLAK_BATTERY_2"
	projectile_gfx = "flak_pd_2"
	tags = { weapon_type_point_defense weapon_type_kinetic }
	ai_tags = { weapon_role_point_defense screen }
	upgrades_to = "BIO_FLAK_BATTERY_3"
	resources = {
		category = ship_components
		cost = {
			alloys = 10
		}
		upkeep = {
			food = 0.10
			alloys = 0.010
		}
	}

	point_defence_targets = { "missile" "strike_craft" }
}


### Flak Battery 3
weapon_component_template = {
	type = point_defence

	key = "BIO_FLAK_BATTERY_3"
	size = point_defence

	icon = "GFX_mutation_barb_3"
	icon_frame = 1

	prerequisites = { "tech_flak_batteries_3" }
	potential = {
		ship_uses_weaver_components = no
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	component_set = "BIO_FLAK_BATTERY_3"
	projectile_gfx = "flak_pd_3"
	tags = { weapon_type_point_defense weapon_type_kinetic }
	ai_tags = { weapon_role_point_defense screen }
	resources = {
		category = ship_components
		cost = {
			alloys = 13
		}
		upkeep = {
			food = 0.13
			alloys = 0.013
		}
	}

	point_defence_targets = { "missile" "strike_craft" }
}

### Nanite Flak Battery 4
weapon_component_template = {
	type = point_defence

	key = "BIO_FLAK_BATTERY_4"
	size = point_defence

	icon = "GFX_mutation_barb_4"
	icon_frame = 1

	prerequisites = { "tech_nanite_flak_batteries" }
	potential = {
		ship_uses_weaver_components = no
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	component_set = "BIO_FLAK_BATTERY_4"
	projectile_gfx = "flak_pd_3"
	tags = { weapon_type_point_defense weapon_type_kinetic }
	ai_tags = { weapon_role_point_defense screen }
	resources = {
		category = ship_components
		cost = {
			alloys = 13
		}
		upkeep = {
			food = 0.13
			alloys = 0.013
		}
	}

	point_defence_targets = { "missile" "strike_craft" }
}

# ####################
# Energy Torpedoes
# ####################

# ## Energy Torpedoes 1
weapon_component_template = {
	key = "BIO_ENERGY_TORPEDO_1"
	size = torpedo
	type = instant

	firing_arc = 25.0
	min_range = 7 #45.0

	icon = "GFX_mutation_thrower_1"
	icon_frame = 1
	prerequisites = { "tech_energy_torpedoes_1" }
	potential = {
		ship_uses_mauler_components = no
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	component_set = "BIO_ENERGY_TORPEDO_1"
	projectile_gfx = "proton_torpedoes"
	tags = { weapon_type_energy }
	ai_tags = { weapon_role_artillery artillery artillery_stealth energy_torpedoes energy_torpedoes_stealth }
	ai_tag_weight = 0
	upgrades_to = "BIO_ENERGY_TORPEDO_2"
	resources = {
		category = ship_components
		cost = {
			alloys = @l_t5_cost
			exotic_gases = @l_t5_rare
		}
		upkeep = {
			alloys = @l_t5_upkeep_alloys
			food = @l_t5_upkeep_energy
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = exotic_gases }
		}
		modifier = {
			factor = @cosmic_storm_gravity_ai_weight_factor
			has_country_flag = affected_by_gravity_storm
		}
	}
}

# ## Energy Torpedoes 2
weapon_component_template = {
	key = "BIO_ENERGY_TORPEDO_2"
	size = torpedo
	type = instant

	firing_arc = 25.0
	min_range = 7 #45.0

	icon = "GFX_mutation_thrower_2"
	icon_frame = 1
	prerequisites = { "tech_energy_torpedoes_2" }
	potential = {
		ship_uses_mauler_components = no
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	component_set = "BIO_ENERGY_TORPEDO_2"
	projectile_gfx = "neutron_torpedoes"
	tags = { weapon_type_energy }
	ai_tags = { weapon_role_artillery artillery artillery_stealth energy_torpedoes energy_torpedoes_stealth }
	ai_tag_weight = 0
	resources = {
		category = ship_components
		cost = {
			alloys = @l_t6_cost
			exotic_gases = @l_t6_rare
		}
		upkeep = {
			alloys = @l_t6_upkeep_alloys
			food = @l_t6_upkeep_energy
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = exotic_gases }
		}
		modifier = {
			factor = @cosmic_storm_gravity_ai_weight_factor
			has_country_flag = affected_by_gravity_storm
		}
	}
}

#####################
# Bio-Mass Accelerators
#####################

# ## Mass Accelerator 1
weapon_component_template = {
	type = instant

	key = "BIO_MASS_ACCELERATOR_1"
	size = extra_large

	icon = "GFX_mutation_bombard_1"
	icon_frame = 1

	firing_arc = 25.0
	min_range = 7 #45.0
	use_ship_main_target = no

	prerequisites = { "tech_mass_accelerator_1" }
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	component_set = "BIO_MASS_ACCELERATOR_1"
	projectile_gfx = "kinetic_artillery"
	tags = { weapon_type_kinetic weapon_role_artillery x_slot }
	ai_tags = { weapon_role_artillery artillery }
	ai_tag_weight = 0
	upgrades_to = "BIO_MASS_ACCELERATOR_2"
	resources = {
		category = ship_components
		cost = {
			alloys = @xl_t5_cost
			volatile_motes = @xl_t5_rare
		}
		upkeep = {
			food = @xl_t5_upkeep_energy
			alloys = @xl_t5_upkeep_alloys
		}
	}

	target_weights = {
		titan = 3
		battleship = 2
		stinger_stage_1 = 1.5
		stinger_stage_2 = 2
		stinger_stage_3 = 2
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
		modifier = {
			factor = @cosmic_storm_gravity_ai_weight_factor
			has_country_flag = affected_by_gravity_storm
		}
	}
}

# ## Mass Accelerator 2
weapon_component_template = {
	type = instant

	key = "BIO_MASS_ACCELERATOR_2"
	size = extra_large

	icon = "GFX_mutation_bombard_2"
	icon_frame = 1

	firing_arc = 25.0
	min_range = 7 #45.0
	use_ship_main_target = no

	prerequisites = { "tech_mass_accelerator_2" }
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	component_set = "BIO_MASS_ACCELERATOR_2"
	projectile_gfx = "adv_kinetic_artillery"
	tags = { weapon_type_kinetic weapon_role_artillery x_slot }
	ai_tags = { weapon_role_artillery artillery }
	ai_tag_weight = 0
	resources = {
		category = ship_components
		cost = {
			alloys = @xl_t6_cost
			volatile_motes = @xl_t6_rare
		}
		upkeep = {
			food = @xl_t6_upkeep_energy
			alloys = @xl_t6_upkeep_alloys
		}
	}

	target_weights = {
		titan = 3
		battleship = 2
		stinger_stage_1 = 1.5
		stinger_stage_2 = 2
		stinger_stage_3 = 2
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
		modifier = {
			factor = @cosmic_storm_gravity_ai_weight_factor
			has_country_flag = affected_by_gravity_storm
		}
	}
}

# ## Archeo-Mass Accelerator
weapon_component_template = {
	type = instant

	key = "BIO_ARCHAEO_X"
	size = extra_large

	icon = "GFX_mutation_ancient_fragmentor_artillery"
	icon_frame = 1

	firing_arc = 25.0
	min_range = 7 #45.0
	use_ship_main_target = no

	prerequisites = { "tech_archaeo_mass_accelerator" }
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	component_set = "BIO_ARCHAEO_X"
	projectile_gfx = "adv_kinetic_artillery"
	tags = { weapon_type_kinetic weapon_archaeotech }
	ai_tags = { weapon_role_artillery artillery }
	ai_tag_weight = 0
	resources = {
		category = ship_components
		cost = {
			alloys = @xl_t6_cost
			minor_artifacts = @minor_artifacts_cost_xl
		}
		upkeep = {
			food = @xl_t6_upkeep_energy
			alloys = @xl_t6_upkeep_alloys
		}
	}

	target_weights = {
		titan = 3
		battleship = 2
		stinger_stage_1 = 1.5
		stinger_stage_2 = 2
		stinger_stage_3 = 2
	}

	ai_weight = {
		weight = 0
		modifier = {
			factor = 0.0
			owner = {
				has_monthly_income = {
					resource = minor_artifacts
					value < 3
				}
			}
		}
		modifier = {
			add = 2.5
			owner = { has_ascension_perk = ap_archaeoengineers }
		}
		modifier = {
			factor = 1.3
			owner = {
				resource_stockpile_compare = {
					resource = minor_artifacts
					value > 250
				}
			}
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
		modifier = {
			factor = @cosmic_storm_gravity_ai_weight_factor
			has_country_flag = affected_by_gravity_storm
		}
	}
}

# ####################
# Bio-Kinetic Artillery
# ####################

# ## Kinetic Artillery 1
weapon_component_template = {
	type = instant

	key = "BIO_KINETIC_ARTILLERY_1"
	size = large

	icon = "GFX_mutation_chitin_1"
	icon_frame = 1

	min_range = 7 #45.0

	prerequisites = { "tech_kinetic_artillery_1" }
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	component_set = "BIO_KINETIC_ARTILLERY_1"
	projectile_gfx = "kinetic_artillery"
	tags = { weapon_type_kinetic l_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery artillery artillery_stealth }
	ai_tag_weight = 0
	upgrades_to = "BIO_KINETIC_ARTILLERY_2"
	resources = {
		category = ship_components
		cost = {
			alloys = @l_t5_cost
			volatile_motes = @l_t5_rare
		}
		upkeep = {
			food = @l_t5_upkeep_energy
			alloys = @l_t5_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
		modifier = {
			factor = @cosmic_storm_gravity_ai_weight_factor
			has_country_flag = affected_by_gravity_storm
		}
	}
}

# ## Kinetic Artillery 2
weapon_component_template = {
	type = instant

	key = "BIO_KINETIC_ARTILLERY_2"
	size = large

	icon = "GFX_mutation_chitin_2"
	icon_frame = 1

	min_range = 7 #45.0

	prerequisites = { "tech_kinetic_artillery_2" }
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	component_set = "BIO_KINETIC_ARTILLERY_2"
	projectile_gfx = "adv_kinetic_artillery"
	tags = { weapon_type_kinetic l_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery artillery artillery_stealth }
	ai_tag_weight = 0
	resources = {
		category = ship_components
		cost = {
			alloys = @l_t6_cost
			volatile_motes = @l_t6_rare
		}
		upkeep = {
			food = @l_t6_upkeep_energy
			alloys = @l_t6_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
		modifier = {
			factor = @cosmic_storm_gravity_ai_weight_factor
			has_country_flag = affected_by_gravity_storm
		}
	}
}

# ####################
# Energy Lance
# ####################

# ## Energy Lance 1
weapon_component_template = {
	key = "BIO_ENERGY_LANCE_1"
	size = extra_large
	type = instant

	icon = "GFX_mutation_beam_1"
	icon_frame = 1

	firing_arc = 25.0
	use_ship_main_target = no
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	prerequisites = { "tech_energy_lance_1" }
	component_set = "BIO_ENERGY_LANCE_1"
	projectile_gfx = "particle_lance"
	tags = { weapon_type_energy weapon_role_artillery x_slot }
	ai_tags = { weapon_role_artillery artillery}
	ai_tag_weight = 0
	upgrades_to = "BIO_ENERGY_LANCE_2"
	resources = {
		category = ship_components
		cost = {
			alloys = @xl_t5_cost
			rare_crystals = @xl_t5_rare
		}
		upkeep = {
			alloys = @xl_t5_upkeep_alloys
			food = @xl_t5_upkeep_energy
		}
	}

	target_weights = {
		titan = 3
		battleship = 2
		stinger_stage_1 = 1.5
		stinger_stage_2 = 2
		stinger_stage_3 = 2
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

# ## Energy Lance 2
weapon_component_template = {
	key = "BIO_ENERGY_LANCE_2"
	size = extra_large
	type = instant

	icon = "GFX_mutation_beam_2"
	icon_frame = 1

	firing_arc = 25.0
	use_ship_main_target = no
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	prerequisites = { "tech_energy_lance_2" }
	component_set = "BIO_ENERGY_LANCE_2"
	projectile_gfx = "tachyon_lance"
	tags = { weapon_type_energy weapon_role_artillery x_slot }
	ai_tags = { weapon_role_artillery artillery }
	ai_tag_weight = 0
	resources = {
		category = ship_components
		cost = {
			alloys = @xl_t6_cost
			rare_crystals = @xl_t6_rare
		}
		upkeep = {
			alloys = @xl_t6_upkeep_alloys
			food = @xl_t6_upkeep_energy
		}
	}

	target_weights = {
		titan = 3
		battleship = 2
		stinger_stage_1 = 1.5
		stinger_stage_2 = 2
		stinger_stage_3 = 2
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

# ####################
# Arc Emitter
# ####################

# ## Arc Emitter 1
weapon_component_template = {
	key = "BIO_ARC_EMITTER_1"
	size = extra_large
	type = instant

	icon = "GFX_mutation_lightning_emitter_1"
	icon_frame = 1

	firing_arc = 35.0
	min_range = 2 #10.0
	use_ship_main_target = no
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	prerequisites = { "tech_arc_emitter_1" }
	component_set = "BIO_ARC_EMITTER_1"
	projectile_gfx = "arc_emitter"
	tags = { weapon_type_energy weapon_role_artillery x_slot }
	ai_tags = { weapon_role_artillery artillery }
	ai_tag_weight = 0
	upgrades_to = "BIO_ARC_EMITTER_2"
	resources = {
		category = ship_components
		cost = {
			alloys = @xl_t5_cost
			rare_crystals = @xl_t5_rare
		}
		upkeep = {
			alloys = @xl_t5_upkeep_alloys
			food = @xl_t5_upkeep_energy
		}
	}

	target_weights = {
		titan = 3
		battleship = 2
		stinger_stage_1 = 1.5
		stinger_stage_2 = 2
		stinger_stage_3 = 2
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

# ## Arc Emitter 2
weapon_component_template = {
	key = "BIO_ARC_EMITTER_2"
	size = extra_large
	type = instant

	icon = "GFX_mutation_lightning_emitter_2"
	icon_frame = 1
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	firing_arc = 35.0
	min_range = 2 #10.0
	use_ship_main_target = no

	prerequisites = { "tech_arc_emitter_2" }
	component_set = "BIO_ARC_EMITTER_2"
	projectile_gfx = "focused_arc_emitter"
	tags = { weapon_type_energy weapon_role_artillery x_slot }
	ai_tags = { weapon_role_artillery artillery }
	ai_tag_weight = 0
	resources = {
		category = ship_components
		cost = {
			alloys = @xl_t6_cost
			rare_crystals = @xl_t6_rare
		}
		upkeep = {
			alloys = @xl_t6_upkeep_alloys
			food = @xl_t6_upkeep_energy
		}
	}

	target_weights = {
		titan = 3
		battleship = 2
		stinger_stage_1 = 1.5
		stinger_stage_2 = 2
		stinger_stage_3 = 2
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

# Strike Craft
@attack_range = 10
@engagement_range = 125
@launch_time = 2
@strike_craft_speed1 = 550
@strike_craft_speed2 = 600
@strike_craft_speed3 = 650
@strike_craft_speed4 = 700
@strike_craft_speed5 = 725
@count = 16
@regen = 1

@bio_strike_craft_power1 = -20
@bio_strike_craft_power2 = -34
@bio_strike_craft_power3 = -45
@bio_strike_craft_power4 = -59
@bio_strike_craft_power5 = -73

strike_craft_component_template = {
	key = "BIO_SCOUT_HANGAR_1"
	size = LARGE
	entity = "bomber_entity"
	weapon_type = point_defence
	projectile_gfx = "scout_laser_1"
	power = @bio_strike_craft_power1
	resources = {
		category = ship_components
		cost = {
			food = @l_t1_cost
			mult = @alloy_to_food_cost_ratio
		}
		upkeep = {
			food = @l_t1_upkeep_energy
			alloys = @l_t1_upkeep_alloys
		}
	}
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	count = @count
	regeneration_per_day = @regen
	launch_time = @launch_time
	damage = { min = 2 max = 4 }
	cooldown = 2.3
	range = @attack_range
	engagement_range = @engagement_range
	accuracy = 1.00
	tracking = 0.70
	health = 2.5
	armor = 5
	shield = 0

	evasion = 0.60
	speed = @strike_craft_speed1
	rotation_speed = 0.8
	acceleration = 1

	shield_penetration = 1.0
	armor_damage = 1.5

	ship_behavior = "fighters_behavior"
	icon = "GFX_mutation_flagella_marsupium_0"
	icon_frame = 1
	component_set = "BIO_SCOUT_HANGAR_1"
	upgrades_to = "BIO_STRIKE_CRAFT_HANGAR_1"
	tags = { weapon_type_strike_craft }
	ai_tags = { weapon_role_point_defense carrier }
	point_defence_targets = { "strike_craft" }
}

strike_craft_component_template = {
	key = "BIO_STRIKE_CRAFT_HANGAR_1"
	size = LARGE
	entity = "bomber_entity"

	weapon_type = point_defence
	projectile_gfx = "strike_craft_laser_1"

	power = @bio_strike_craft_power2
	resources = {
		category = ship_components
		cost = {
			food = @l_t3_cost
			mult = @alloy_to_food_cost_ratio
		}
		upkeep = {
			food = @l_t3_upkeep_energy
			alloys = @l_t3_upkeep_alloys
		}
	}
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	count = @count
	regeneration_per_day = @regen
	launch_time = @launch_time

	damage = { min = 2 max = 5 }
	cooldown = 2.3
	range = @attack_range
	engagement_range = @engagement_range
	accuracy = 1.00
	tracking = 0.80

	health = 3.5
	armor = 7.5
	shield = 0
	evasion = 0.65

	speed = @strike_craft_speed2
	rotation_speed = 0.8
	acceleration = 1

	shield_penetration = 1.0
	armor_damage = 1.5

	ship_behavior = "fighters_behavior"

	icon = "GFX_mutation_flagella_marsupium_1"
	icon_frame = 1
	component_set = "BIO_STRIKE_CRAFT_HANGAR_1"
	prerequisites = { "tech_strike_craft_1" }
	upgrades_to = "BIO_STRIKE_CRAFT_HANGAR_2"

	tags = { weapon_type_strike_craft }
	ai_tags = { weapon_role_point_defense carrier}
	point_defence_targets = { "strike_craft" }
}

strike_craft_component_template = {
	key = "BIO_STRIKE_CRAFT_HANGAR_2"
	size = LARGE
	entity = "bomber_entity"

	weapon_type = point_defence
	projectile_gfx = "strike_craft_laser_2"

	power = @bio_strike_craft_power3
	resources = {
		category = ship_components
		cost = {
			food = @l_t4_cost
			mult = @alloy_to_food_cost_ratio
		}
		upkeep = {
			food = @l_t4_upkeep_energy
			alloys = @l_t4_upkeep_alloys
		}
	}
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	count = @count
	regeneration_per_day = @regen
	launch_time = @launch_time

	damage = { min = 2.5 max = 6.5 }
	cooldown = 2.3
	range = @attack_range
	engagement_range = @engagement_range
	accuracy = 1.00
	tracking = 0.90

	health = 5
	armor = 10
	shield = 0
	evasion = 0.80

	speed = @strike_craft_speed3
	rotation_speed = 0.8
	acceleration = 1

	shield_penetration = 1.0
	armor_damage = 1.5

	ship_behavior = "fighters_behavior"

	icon = "GFX_mutation_flagella_marsupium_2"
	icon_frame = 1
	component_set = "BIO_STRIKE_CRAFT_HANGAR_2"
	prerequisites = { "tech_strike_craft_2" }
	upgrades_to = "BIO_STRIKE_CRAFT_HANGAR_3"

	tags = { weapon_type_strike_craft }
	ai_tags = { weapon_role_point_defense carrier }
	point_defence_targets = { "strike_craft" }
}

strike_craft_component_template = {
	key = "BIO_STRIKE_CRAFT_HANGAR_3"
	size = LARGE
	entity = "bomber_entity"

	weapon_type = point_defence
	projectile_gfx = "strike_craft_laser_3"

	power = @bio_strike_craft_power4
	resources = {
		category = ship_components
		cost = {
			food = @l_t5_cost
			mult = @alloy_to_food_cost_ratio
		}
		upkeep = {
			food = @l_t5_upkeep_energy
			alloys = @l_t5_upkeep_alloys
		}
	}
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	count = @count
	regeneration_per_day = @regen
	launch_time = @launch_time

	damage = { min = 3 max = 8.5 }
	cooldown = 2.3
	range = @attack_range
	engagement_range = @engagement_range
	accuracy = 1.00
	tracking = 1.00

	health = 6
	armor = 12.5
	shield = 0
	evasion = 0.80

	speed = @strike_craft_speed4
	rotation_speed = 0.8
	acceleration = 1

	shield_penetration = 1.0
	armor_damage = 1.5

	ship_behavior = "fighters_behavior"

	icon = "GFX_mutation_flagella_marsupium_3"
	icon_frame = 1
	component_set = "BIO_STRIKE_CRAFT_HANGAR_3"
	prerequisites = { "tech_strike_craft_3" }
	upgrades_to = "BIO_STRIKE_CRAFT_SKRAND"

	tags = { weapon_type_strike_craft }
	ai_tags = { weapon_role_point_defense carrier }
	point_defence_targets = { "strike_craft" }
}

strike_craft_component_template = {
	key = "BIO_STRIKE_CRAFT_SKRAND"
	size = LARGE
	entity = "bomber_entity"

	weapon_type = point_defence
	projectile_gfx = "techno_strike_craft_laser_3"

	power = @bio_strike_craft_power5
	resources = {
		category = ship_components
		cost = {
			food = @l_t6_cost
			mult = @alloy_to_food_cost_ratio
		}
		upkeep = {
			food = @l_t6_upkeep_energy
			alloys = @l_t6_upkeep_alloys
		}
	}
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	count = @count
	regeneration_per_day = @regen
	launch_time = @launch_time

	damage = { min = 4 max = 9 }
	cooldown = 2.3
	range = @attack_range
	engagement_range = @engagement_range
	accuracy = 1.00
	tracking = 1.00

	health = 6.5
	armor = 12.5
	shield = 2.5
	evasion = 0.85

	speed = @strike_craft_speed5
	rotation_speed = 0.8
	acceleration = 1

	shield_penetration = 1.0
	armor_damage = 1.5

	ship_behavior = "fighters_behavior"

	icon = "GFX_mutation_flagella_marsupium_4"
	icon_frame = 1
	component_set = "BIO_STRIKE_CRAFT_SKRAND"
	prerequisites = { "tech_strike_craft_skrand" }

	tags = { weapon_type_strike_craft }
	ai_tags = { weapon_role_point_defense carrier }
	point_defence_targets = { "strike_craft" }
}

strike_craft_component_template = {
	key = "BIO_ARCHAEO_STRIKECRAFT"
	size = LARGE
	entity = "bomber_entity"

	weapon_type = point_defence
	projectile_gfx = "strike_craft_laser_3"

	power = @bio_strike_craft_power4
	resources = {
		category = ship_components
		cost = {
			food = @l_t5_cost
			mult = @alloy_to_food_cost_ratio
		}
		cost = {
			minor_artifacts = @minor_artifacts_cost_m
		}
		upkeep = {
			food = @l_t5_upkeep_energy
			alloys = @l_t5_upkeep_alloys
		}
	}
	potential = {
		is_arkship_ship = no
		from = {
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		country_uses_bio_ships = yes
	}
	count = @count
	regeneration_per_day = @regen
	launch_time = @launch_time

	damage = { min = 2 max = 8 }
	cooldown = 2.3
	range = @attack_range
	engagement_range = @engagement_range
	accuracy = 1.00
	tracking = 1.00

	health = 5
	armor = 12.5
	shield = 0
	evasion = 0.80

	speed = @strike_craft_speed4
	rotation_speed = 0.8
	acceleration = 1

	armor_penetration = 1.0
	shield_damage = 0.5
	hull_damage = 1.25

	ship_behavior = "fighters_behavior"

	icon = "GFX_mutation_ancient_driller_beasts"
	icon_frame = 1
	component_set = "BIO_ARCHAEO_STRIKECRAFT"
	prerequisites = { "tech_archaeo_strike_crafts" }

	tags = { weapon_type_strike_craft weapon_archaeotech }
	ai_tags = { weapon_role_point_defense carrier }
	point_defence_targets = { "strike_craft" }

	ai_weight = {
		weight = 0
		modifier = {
			add = 2.5
			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
				}
			}
		}
	}
}

# Healing "Weapons"
weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_healing_weapons
		TIER = 1
		EXOTIC_GASES = 0
		DARK_MATTER = 0
	}

	upgrades_to = HEALING_GUN_2
	projectile_gfx = "biogenesis_01_healing_projectile"

	ai_weight = {
		weight = 1
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_healing_weapons
		TIER = 2
		EXOTIC_GASES = 0
		DARK_MATTER = 0
	}

	upgrades_to = HEALING_GUN_3
	projectile_gfx = "biogenesis_01_healing_projectile"

	ai_weight = {
		weight = 2
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_healing_weapons
		TIER = 3
		EXOTIC_GASES = 0
		DARK_MATTER = 0
	}

	upgrades_to = HEALING_GUN_4
	projectile_gfx = "biogenesis_01_healing_projectile"

	ai_weight = {
		weight = 3
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_healing_weapons
		TIER = 4
		EXOTIC_GASES = @s_t4_rare
		DARK_MATTER = 0
	}

	upgrades_to = HEALING_GUN_5
	projectile_gfx = "biogenesis_01_healing_projectile"

	ai_weight = {
		weight = 4
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = exotic_gases }
		}
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_healing_weapons
		TIER = 5
		EXOTIC_GASES = @s_t5_rare
		DARK_MATTER = 0
	}

	upgrades_to = HEALING_GUN_6
	projectile_gfx = "biogenesis_01_healing_projectile"

	ai_weight = {
		weight = 5
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = exotic_gases }
		}
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_healing_weapons
		TIER = 6
		EXOTIC_GASES = 0
		DARK_MATTER = @s_t6_rare
		REPAIR_AMOUNT = 60
	}

	projectile_gfx = "biogenesis_01_healing_projectile"

	ai_weight = {
		weight = 6
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_dark_matter }
		}
	}
}

# Confusing "Weapons"
weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_confusing_weapons
		TIER = 1
		VOLATILE_MOTES = 0
		DARK_MATTER = 0
	}

	upgrades_to = CONFUSER_GUN_2
	projectile_gfx = "biogenesis_01_confuser_laser"

	ai_weight = {
		weight = 1
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_confusing_weapons
		TIER = 2
		VOLATILE_MOTES = 0
		DARK_MATTER = 0
	}

	upgrades_to = CONFUSER_GUN_3
	projectile_gfx = "biogenesis_01_confuser_laser"

	ai_weight = {
		weight = 2
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_confusing_weapons
		TIER = 3
		VOLATILE_MOTES = 0
		DARK_MATTER = 0
	}

	upgrades_to = CONFUSER_GUN_4
	projectile_gfx = "biogenesis_01_confuser_laser"

	ai_weight = {
		weight = 3
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_confusing_weapons
		TIER = 4
		VOLATILE_MOTES = @s_t4_rare
		DARK_MATTER = 0
	}

	upgrades_to = CONFUSER_GUN_5
	projectile_gfx = "biogenesis_01_confuser_laser"

	ai_weight = {
		weight = 4
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_confusing_weapons
		TIER = 5
		VOLATILE_MOTES = @s_t5_rare
		DARK_MATTER = 0
	}

	upgrades_to = CONFUSER_GUN_6
	projectile_gfx = "biogenesis_01_confuser_laser"

	ai_weight = {
		weight = 5
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_confusing_weapons
		TIER = 6
		VOLATILE_MOTES = 0
		DARK_MATTER = @s_t6_rare
		REPAIR_AMOUNT = 60
	}

	projectile_gfx = "biogenesis_01_confuser_laser"

	ai_weight = {
		weight = 6
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_dark_matter }
		}
	}
}

# Anti-Evasion "Weapons"
weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_anti_evasion_weapons
		TIER = 1
		RARE_CRYSTALS = 0
		DARK_MATTER = 0
	}

	upgrades_to = ANTI_EVASION_GUN_2
	projectile_gfx = "biogenesis_01_anti_evasion_projectile"

	ai_weight = {
		weight = 1
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_anti_evasion_weapons
		TIER = 2
		RARE_CRYSTALS = 0
		DARK_MATTER = 0
	}

	upgrades_to = ANTI_EVASION_GUN_3
	projectile_gfx = "biogenesis_01_anti_evasion_projectile"

	ai_weight = {
		weight = 2
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_anti_evasion_weapons
		TIER = 3
		RARE_CRYSTALS = 0
		DARK_MATTER = 0
	}

	upgrades_to = ANTI_EVASION_GUN_4
	projectile_gfx = "biogenesis_01_anti_evasion_projectile"

	ai_weight = {
		weight = 3
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_anti_evasion_weapons
		TIER = 4
		RARE_CRYSTALS = @s_t4_rare
		DARK_MATTER = 0
	}

	upgrades_to = ANTI_EVASION_GUN_5
	projectile_gfx = "biogenesis_01_anti_evasion_projectile"

	ai_weight = {
		weight = 4
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_anti_evasion_weapons
		TIER = 5
		RARE_CRYSTALS = @s_t5_rare
		DARK_MATTER = 0
	}

	upgrades_to = ANTI_EVASION_GUN_6
	projectile_gfx = "biogenesis_01_anti_evasion_projectile"

	ai_weight = {
		weight = 5
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_anti_evasion_weapons
		TIER = 6
		RARE_CRYSTALS = 0
		DARK_MATTER = @s_t6_rare
	}

	projectile_gfx = "biogenesis_01_anti_evasion_projectile"

	ai_weight = {
		weight = 6
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_dark_matter }
		}
	}
}

# Evasion "Weapons"
weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_evasion_weapons
		TIER = 1
		RARE_CRYSTALS = 0
		DARK_MATTER = 0
	}

	upgrades_to = EVASION_GUN_2
	projectile_gfx = "biogenesis_01_evasion_projectile"

	ai_weight = {
		weight = 1
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_evasion_weapons
		TIER = 2
		RARE_CRYSTALS = 0
		DARK_MATTER = 0
	}

	upgrades_to = EVASION_GUN_3
	projectile_gfx = "biogenesis_01_evasion_projectile"

	ai_weight = {
		weight = 2
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_evasion_weapons
		TIER = 3
		RARE_CRYSTALS = 0
		DARK_MATTER = 0
	}

	upgrades_to = EVASION_GUN_4
	projectile_gfx = "biogenesis_01_evasion_projectile"

	ai_weight = {
		weight = 3
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_evasion_weapons
		TIER = 4
		RARE_CRYSTALS = @s_t4_rare
		DARK_MATTER = 0
	}

	upgrades_to = EVASION_GUN_5
	projectile_gfx = "biogenesis_01_evasion_projectile"

	ai_weight = {
		weight = 4
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_evasion_weapons
		TIER = 5
		RARE_CRYSTALS = @s_t5_rare
		DARK_MATTER = 0
	}

	upgrades_to = EVASION_GUN_6
	projectile_gfx = "biogenesis_01_evasion_projectile"

	ai_weight = {
		weight = 5
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = rare_crystals }
		}
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_evasion_weapons
		TIER = 6
		RARE_CRYSTALS = 0
		DARK_MATTER = @s_t6_rare
		REPAIR_AMOUNT = 60
	}

	projectile_gfx = "biogenesis_01_evasion_projectile"

	ai_weight = {
		weight = 6
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_dark_matter }
		}
	}
}

# Anti-Fire Rate "Weapons"
weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_anti_fire_rate_weapons
		TIER = 1
		VOLATILE_MOTES = 0
		DARK_MATTER = 0
	}

	upgrades_to = ANTI_FIRE_RATE_GUN_2
	projectile_gfx = "biogenesis_01_anti_fire_rate_laser"

	ai_weight = {
		weight = 1
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_anti_fire_rate_weapons
		TIER = 2
		VOLATILE_MOTES = 0
		DARK_MATTER = 0
	}

	upgrades_to = ANTI_FIRE_RATE_GUN_3
	projectile_gfx = "biogenesis_01_anti_fire_rate_laser"

	ai_weight = {
		weight = 2
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_anti_fire_rate_weapons
		TIER = 3
		VOLATILE_MOTES = 0
		DARK_MATTER = 0
	}

	upgrades_to = ANTI_FIRE_RATE_GUN_4
	projectile_gfx = "biogenesis_01_anti_fire_rate_laser"

	ai_weight = {
		weight = 3
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_anti_fire_rate_weapons
		TIER = 4
		VOLATILE_MOTES = @s_t4_rare
		DARK_MATTER = 0
	}

	upgrades_to = ANTI_FIRE_RATE_GUN_5
	projectile_gfx = "biogenesis_01_anti_fire_rate_laser"

	ai_weight = {
		weight = 4
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_anti_fire_rate_weapons
		TIER = 5
		VOLATILE_MOTES = @s_t5_rare
		DARK_MATTER = 0
	}

	upgrades_to = ANTI_FIRE_RATE_GUN_6
	projectile_gfx = "biogenesis_01_anti_fire_rate_laser"

	ai_weight = {
		weight = 5
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_anti_fire_rate_weapons
		TIER = 6
		VOLATILE_MOTES = 0
		DARK_MATTER = @s_t6_rare
		REPAIR_AMOUNT = 60
	}

	tags = { weapon_type_energy }
	projectile_gfx = "biogenesis_01_anti_fire_rate_laser"

	ai_weight = {
		weight = 6
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_dark_matter }
		}
	}
}

# Fire Rate "Weapons"
weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_fire_rate_weapons
		TIER = 1
		VOLATILE_MOTES = 0
		DARK_MATTER = 0
	}

	upgrades_to = FIRE_RATE_GUN_2
	projectile_gfx = "biogenesis_01_fire_rate_laser"

	ai_weight = {
		weight = 1
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_fire_rate_weapons
		TIER = 2
		VOLATILE_MOTES = 0
		DARK_MATTER = 0
	}

	upgrades_to = FIRE_RATE_GUN_3
	projectile_gfx = "biogenesis_01_fire_rate_laser"

	ai_weight = {
		weight = 2
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_fire_rate_weapons
		TIER = 3
		VOLATILE_MOTES = 0
		DARK_MATTER = 0
	}

	upgrades_to = FIRE_RATE_GUN_4
	projectile_gfx = "biogenesis_01_fire_rate_laser"

	ai_weight = {
		weight = 3
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_fire_rate_weapons
		TIER = 4
		VOLATILE_MOTES = @s_t4_rare
		DARK_MATTER = 0
	}

	upgrades_to = FIRE_RATE_GUN_5
	projectile_gfx = "biogenesis_01_fire_rate_laser"

	ai_weight = {
		weight = 4
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_fire_rate_weapons
		TIER = 5
		VOLATILE_MOTES = @s_t5_rare
		DARK_MATTER = 0
	}

	upgrades_to = FIRE_RATE_GUN_6
	projectile_gfx = "biogenesis_01_fire_rate_laser"

	ai_weight = {
		weight = 5
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
	}
}

weapon_component_template = {
	inline_script = {
		script = ship_components/bio_weaver_fire_rate_weapons
		TIER = 6
		VOLATILE_MOTES = 0
		DARK_MATTER = @s_t6_rare
		REPAIR_AMOUNT = 60
	}

	tags = { weapon_type_energy }
	projectile_gfx = "biogenesis_01_fire_rate_laser"

	ai_weight = {
		weight = 6
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_dark_matter }
		}
	}
}

# ####################
# Reshaping Projectile Accelerator
# ####################

weapon_component_template = {
	type = instant
	key = "LM_BIO_ACCELERATOR"
	size = large
	icon = "GFX_ship_part_lm_bio_accelerator"
	icon_frame = 1
	min_range = 7 #45.0

	prerequisites = { "tech_kinetic_artillery_2" }
	potential = {
		from = {
			is_galvanic_empire = yes
			country_uses_bio_ships = yes
		}
	}

	show_tech_unlock_if = {
		is_galvanic_empire = yes
		country_uses_bio_ships = yes
	}

	component_set = "LM_BIO_ACCELERATOR_SET"
	projectile_gfx = "adv_kinetic_artillery"
	tags = { weapon_type_kinetic l_slot weapon_role_artillery }
	ai_tags = { weapon_role_artillery artillery artillery_stealth }
	ai_tag_weight = 0
	resources = {
		category = ship_components
		cost = {
			sr_living_metal = @l_t6_cost
			volatile_motes = @l_t6_rare
		}
		upkeep = {
			food = @l_t6_upkeep_energy
			alloys = @l_t6_upkeep_alloys
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = volatile_motes }
		}
		modifier = {
			factor = 0.0
			no_resource_for_component = { RESOURCE = sr_living_metal }
		}
		modifier = {
			factor = @cosmic_storm_shroud_ai_weight_factor
			has_country_flag = affected_by_shroud_storm
		}
		modifier = {
			factor = @cosmic_storm_gravity_ai_weight_factor
			has_country_flag = affected_by_gravity_storm
		}
	}
}