utility_component_template = {
	key = "DSC_EMPTY_AURA"
	size = medium
	icon = "GFX_ship_part_empty_ftl_drive"
	icon_frame = 1
	power = 0

	component_set = "dsc_aura_components"

	ai_weight = {
		weight = 1
	}
}

utility_component_template = {
	key = "DSC_TARGET_MAGNET"
	size = medium
	icon = "GFX_bulwark_array"
	icon_frame = 1
	power = 0

	ship_modifier = {
		ship_target_weight_mult = 0.50
	}

	component_set = "dsc_aura_components"

	resources = {
		category = ship_components
		upkeep = {
			energy = 5
		}
	}

	ai_weight = {
		weight = 10
	}
}

utility_component_template = {
	key = "DSC_AURA_COMMUNICATIONS_JAMMER"
	size = medium
	icon = "GFX_starbase_communication_jammer"
	icon_frame = 1
	power = 0

	potential = {
		ship_uses_dsc_components = yes
	}
	component_set = "dsc_aura_components"

	resources = {
		category = ship_components
		upkeep = {
			energy = 5
		}
	}

	hostile_aura = {
		name = "aura_starbase_communications_jammer"
		system_wide = yes

		stack_info = {
			id = hostile_communications_jammer_aura
			priority = 10
		}

		modifier = {
			ship_speed_mult = -0.20
			ship_disengage_chance_mult = -0.20
		}
	}
}

utility_component_template = {
	key = "DSC_AURA_DISRUPTION_FIELD"
	size = medium
	icon = "GFX_spaceport_module_orbital_mind_control_lazer"
	icon_frame = 1
	power = 0

	potential = {
		ship_uses_dsc_components = yes
	}
	component_set = "dsc_aura_components"

	resources = {
		category = ship_components
		upkeep = {
			energy = 5
		}
	}

	hostile_aura = {
		name = "aura_starbase_distruption_field"
		system_wide = yes

		stack_info = {
			id = hostile_disruption_field_aura
			priority = 10
		}

		modifier = {
			ship_shield_mult = -0.20
		}
	}
}

utility_component_template = {
	key = "DSC_AURA_COMMAND_CENTER"
	size = medium
	icon = "GFX_starbase_command_center"
	icon_frame = 1
	power = 0

	prerequisites = { "tech_command_matrix" }

	potential = {
		ship_uses_dsc_components = yes
	}
	component_set = "dsc_aura_components"

	resources = {
		category = ship_components
		upkeep = {
			energy = 5
		}
	}

	friendly_aura = {
		name = "aura_starbase_command_center"
		system_wide = yes

		stack_info = {
			id = friendly_command_center_aura
			priority = 10
		}

		modifier = {
			ship_fire_rate_mult = 0.1
		}
	}
}

utility_component_template = {
	key = "DSC_OFFSPRING_OUTLOOK"
	size = medium
	icon = "GFX_offspring_aura_sb"
	icon_frame = 1
	power = 0

	potential = {
		ship_uses_dsc_components = yes
		from = {
			has_origin = origin_progenitor_hive
		}
	}
	component_set = "dsc_aura_components"

	resources = {
		category = ship_components
		upkeep = {
			energy = 5
		}
	}

	friendly_aura = {
		name = "OFFSPRING_AURA"
		system_wide = yes

		stack_info = {
			id = offspring_aura
			priority = 2
		}

		limit = {
			exists = owner
			owner = { has_origin = origin_progenitor_hive }
		}
		modifier = {
			ship_military_speed_mult = 0.65
			ship_evasion_mult = 0.65
			ship_fire_rate_mult = 0.65
			ship_accuracy_mult = 0.65
		}
	}
}

# Anti Lightshow
utility_component_template = {
	key = "DSC_AURA_LASER_PENETRATION"
	size = medium
	icon = "GFX_ship_part_aura_pd_penetration"
	icon_frame = 1
	power = 0

	potential = {
		ship_uses_dsc_components = yes
	}
	component_set = "dsc_aura_components"

	resources = {
		category = ship_components
		upkeep = {
			energy = 5
		}
	}

	hostile_aura = {
		name = "aura_laser_penetration"
		system_wide = yes

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

		modifier = {
			weapon_type_energy_weapon_damage_mult = -0.25
		}
	}

	ai_weight = {
		weight = 10
		modifier = {
			factor = 2
			is_ai = yes
			is_preferred_weapons = weapon_type_energy
		}
	}
}
# Anti Dakka
utility_component_template = {
	key = "DSC_AURA_KINETIC_PENETRATION"
	size = medium
	icon = "GFX_ship_part_aura_minefield"
	icon_frame = 1
	power = 0

	potential = {
		ship_uses_dsc_components = yes
	}
	component_set = "dsc_aura_components"

	resources = {
		category = ship_components
		upkeep = {
			energy = 5
		}
	}

	hostile_aura = {
		name = "aura_kinetic_penetration"
		system_wide = yes

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

		modifier = {
			weapon_type_kinetic_weapon_damage_mult = -0.25
		}
	}

	ai_weight = {
		weight = 10
		modifier = {
			factor = 2
			is_ai = yes
			is_preferred_weapons = weapon_type_energy
		}
	}
}
# Anti missile
utility_component_template = {
	key = "DSC_AURA_MISSILE_PENETRATION"
	size = medium
	icon = "GFX_ship_part_aura_detection_scrambler"
	icon_frame = 1
	power = 0

	potential = {
		ship_uses_dsc_components = yes
	}
	component_set = "dsc_aura_components"

	resources = {
		category = ship_components
		upkeep = {
			energy = 5
		}
	}

	hostile_aura = {
		name = "aura_missile_penetration"
		system_wide = yes

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

		modifier = {
			weapon_type_explosive_weapon_damage_mult = -0.25
		}
	}

	ai_weight = {
		weight = 10
		modifier = {
			factor = 2
			is_ai = yes
			is_preferred_weapons = weapon_type_energy
		}
	}
}
# Anti Strikecraft
utility_component_template = {
	key = "DSC_AURA_STRIKECRAFT_PENETRATION"
	size = medium
	icon = "GFX_ship_part_enigmatic_disruption_field"
	icon_frame = 1
	power = 0

	potential = {
		ship_uses_dsc_components = yes
	}
	component_set = "dsc_aura_components"

	resources = {
		category = ship_components
		upkeep = {
			energy = 5
		}
	}

	hostile_aura = {
		name = "aura_strike_craft_penetration"
		system_wide = yes

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

		modifier = {
			weapon_type_strike_craft_weapon_damage_mult = -0.25
		}
	}

	ai_weight = {
		weight = 10
		modifier = {
			factor = 2
			is_ai = yes
			is_preferred_weapons = weapon_type_energy
		}
	}
}
