@section_cost = 40
@cost1 = 40
@cost2 = 50
@cost3 = 60
@cost4 = 70
@cost5 = 130

####################################################################################################################################################################
### BOW ############################################################################################################################################################
####################################################################################################################################################################

ship_section_template = {
	key = "CRUISER_BOW_L3"
	ship_size = cruiser
	fits_on_slot = bow
	entity = "cruiser_bow_L1_entity"
	icon = "GFX_ship_part_core_bow"
	ai_tags = { artillery }
	
	component_slot = {
		name = "LARGE_GUN_01"
		template = "large_turret"
		locatorname = "large_gun_01"
	}
	component_slot = {
		name = "LARGE_GUN_02"
		template = "invisible_large_turret"
		locatorname = "large_gun_01"
	}
	component_slot = {
		name = "LARGE_GUN_03"
		template = "invisible_large_turret"
		locatorname = "large_gun_01"
	}
	
	medium_utility_slots = 4
	
	resources = {
		category = ship_sections
		cost = { alloys = @cost4 }
	}
}

ship_section_template = {
	key = "CRUISER_BOW_M4S4"
	ship_size = cruiser
	fits_on_slot = bow
	entity = "cruiser_bow_M1S2_entity"
	icon = "GFX_ship_part_core_bow"
	ai_tags = { gunship }
	
	component_slot = {
		name = "SMALL_GUN_01"
		template = "small_turret"
		locatorname = "small_gun_01"
	}	
	component_slot = {
		name = "SMALL_GUN_02"
		template = "small_turret"
		locatorname = "small_gun_02"
	}
	component_slot = {
		name = "SMALL_GUN_03"
		template = "invisible_small_turret"
		locatorname = "small_gun_01"
	}
	component_slot = {
		name = "SMALL_GUN_04"
		template = "invisible_small_turret"
		locatorname = "small_gun_02"
	}
	component_slot = {
		name = "MEDIUM_GUN_01"
		template = "medium_turret"
		locatorname = "medium_gun_01"
	}
	component_slot = {
		name = "MEDIUM_GUN_02"
		template = "invisible_medium_turret"
		locatorname = "medium_gun_01"
	}
	component_slot = {
		name = "MEDIUM_GUN_03"
		template = "invisible_medium_turret"
		locatorname = "medium_gun_01"
	}
	component_slot = {
		name = "MEDIUM_GUN_04"
		template = "invisible_medium_turret"
		locatorname = "medium_gun_01"
	}
	
	medium_utility_slots = 6
	
	resources = {
		category = ship_sections
		cost = { alloys = @cost2 }
	}
}

ship_section_template = {
	key = "CRUISER_BOW_M2S3P3"
	ship_size = cruiser
	fits_on_slot = bow
	entity = "cruiser_bow_M1S2_entity"
	icon = "GFX_ship_part_core_bow"
	ai_tags = { gunship }
	
	component_slot = {
		name = "SMALL_GUN_01"
		template = "small_turret"
		locatorname = "small_gun_01"
	}	
	component_slot = {
		name = "SMALL_GUN_02"
		template = "small_turret"
		locatorname = "small_gun_02"
	}
	component_slot = {
		name = "SMALL_GUN_03"
		template = "invisible_small_turret"
		locatorname = "small_gun_01"
	}
	component_slot = {
		name = "MEDIUM_GUN_01"
		template = "medium_turret"
		locatorname = "medium_gun_01"
	}
	component_slot = {
		name = "MEDIUM_GUN_02"
		template = "invisible_medium_turret"
		locatorname = "medium_gun_01"
	}
	component_slot = {
		name = "SMALL_GUN_04"
		template = "point_defence_turret"
		locatorname = "small_gun_02"
	}
	component_slot = {
		name = "SMALL_GUN_05"
		template = "invisible_point_defence_turret"
		locatorname = "small_gun_01"
	}
	component_slot = {
		name = "SMALL_GUN_06"
		template = "invisible_point_defence_turret"
		locatorname = "small_gun_02"
	}
	
	medium_utility_slots = 6
	
	resources = {
		category = ship_sections
		cost = { alloys = @cost1 }
	}
}

ship_section_template = {
	key = "CRUISER_BOW_M6"
	ship_size = cruiser
	fits_on_slot = bow
	entity = "cruiser_bow_M2_entity"
	icon = "GFX_ship_part_core_bow"
	ai_tags = { gunship }
	
	component_slot = {
		name = "MEDIUM_GUN_01"
		template = "medium_turret"
		locatorname = "medium_gun_01"
	}
	component_slot = {
		name = "MEDIUM_GUN_02"
		template = "medium_turret"
		locatorname = "medium_gun_02"
	}
	component_slot = {
		name = "MEDIUM_GUN_03"
		template = "invisible_medium_turret"
		locatorname = "medium_gun_01"
	}
	component_slot = {
		name = "MEDIUM_GUN_04"
		template = "invisible_medium_turret"
		locatorname = "medium_gun_02"
	}
	component_slot = {
		name = "MEDIUM_GUN_05"
		template = "invisible_medium_turret"
		locatorname = "medium_gun_01"
	}
	component_slot = {
		name = "MEDIUM_GUN_06"
		template = "invisible_medium_turret"
		locatorname = "medium_gun_02"
	}
	
	medium_utility_slots = 6
	
	resources = {
		category = ship_sections
		cost = { alloys = @cost2 }
	}
}





####################################################################################################################################################################
### MID ############################################################################################################################################################
####################################################################################################################################################################

ship_section_template = {
	key = "CRUISER_MID_M2L2"
	ship_size = cruiser
	fits_on_slot = mid
	entity = "cruiser_mid_L1M1_entity"
	icon = "GFX_ship_part_core_mid"
	
	component_slot = {
		name = "MEDIUM_GUN_01"
		template = "medium_turret"
		locatorname = "medium_gun_01"
	}
	component_slot = {
		name = "MEDIUM_GUN_02"
		template = "invisible_medium_turret"
		locatorname = "medium_gun_01"
	}
	component_slot = {
		name = "LARGE_GUN_01"
		template = "large_turret"
		locatorname = "large_gun_01"
	}
	component_slot = {
		name = "LARGE_GUN_02"
		template = "invisible_large_turret"
		locatorname = "large_gun_01"
	}
	
	medium_utility_slots = 5
	
	resources = {
		category = ship_sections
		cost = { alloys = @cost3 }
	}
}

ship_section_template = {
	key = "CRUISER_MID_M5P2"
	ship_size = cruiser
	fits_on_slot = mid
	entity = "cruiser_mid_M3_entity"
	icon = "GFX_ship_part_core_mid"
	ai_tags = { gunship }
	
	component_slot = {
		name = "PD_GUN_01"
		template = "invisible_point_defence_turret"
		locatorname = "medium_gun_01"
	}
	component_slot = {
		name = "PD_GUN_02"
		template = "invisible_point_defence_turret"
		locatorname = "medium_gun_03"
	}
	component_slot = {
		name = "MEDIUM_GUN_01"
		template = "medium_turret"
		locatorname = "medium_gun_01"
	}	
	component_slot = {
		name = "MEDIUM_GUN_02"
		template = "medium_turret"
		locatorname = "medium_gun_02"
	}	
	component_slot = {
		name = "MEDIUM_GUN_03"
		template = "medium_turret"
		locatorname = "medium_gun_03"
	}
	component_slot = {
		name = "MEDIUM_GUN_04"
		template = "invisible_medium_turret"
		locatorname = "medium_gun_01"
	}	
	component_slot = {
		name = "MEDIUM_GUN_05"
		template = "invisible_medium_turret"
		locatorname = "medium_gun_02"
	}	
	
	medium_utility_slots = 6
	
	resources = {
		category = ship_sections
		cost = { alloys = @cost1 }
	}
}

ship_section_template = {
	key = "CRUISER_MID_M5S3"
	ship_size = cruiser
	fits_on_slot = mid
	entity = "cruiser_mid_M2S2_entity"
	icon = "GFX_ship_part_core_mid"
	ai_tags = { gunship }
	
	component_slot = {
		name = "SMALL_GUN_01"
		template = "invisible_small_turret"
		locatorname = "small_gun_01"
	}
	component_slot = {
		name = "SMALL_GUN_02"
		template = "invisible_small_turret"
		locatorname = "small_gun_02"
	}
	component_slot = {
		name = "SMALL_GUN_03"
		template = "invisible_small_turret"
		locatorname = "small_gun_01"
	}
	component_slot = {
		name = "MEDIUM_GUN_01"
		template = "medium_turret"
		locatorname = "medium_gun_01"
	}	
	component_slot = {
		name = "MEDIUM_GUN_02"
		template = "medium_turret"
		locatorname = "medium_gun_01"
	}	
	component_slot = {
		name = "MEDIUM_GUN_03"
		template = "medium_turret"
		locatorname = "medium_gun_01"
	}
	component_slot = {
		name = "MEDIUM_GUN_04"
		template = "invisible_medium_turret"
		locatorname = "medium_gun_02"
	}	
	component_slot = {
		name = "MEDIUM_GUN_05"
		template = "invisible_medium_turret"
		locatorname = "medium_gun_02"
	}	
	
	medium_utility_slots = 6
	
	resources = {
		category = ship_sections
		cost = { alloys = @cost2 }
	}
}

ship_section_template = {
	key = "CRUISER_MID_G4P3"
	ship_size = cruiser
	fits_on_slot = mid
	entity = "cruiser_mid_M2S2_entity"
	icon = "GFX_ship_part_core_mid"
	ai_tags = { gunship }
	
	component_slot = {
		name = "PD_GUN_01"
		template = "point_defence_turret"
		locatorname = "small_gun_01"
	}
	component_slot = {
		name = "PD_GUN_02"
		template = "point_defence_turret"
		locatorname = "small_gun_02"
	}
	component_slot = {
		name = "PD_GUN_03"
		template = "invisible_point_defence_turret"
		locatorname = "small_gun_01"
	}
	component_slot = {
		name = "MISSILE_01"
		template = "medium_missile_turret"
		locatorname = "medium_gun_01"
	}	
	component_slot = {
		name = "MISSILE_02"
		template = "medium_missile_turret"
		locatorname = "medium_gun_02"
	}	
	component_slot = {
		name = "MISSILE_03"
		template = "invisible_missile_turret"
		locatorname = "medium_gun_02"
	}
	component_slot = {
		name = "MISSILE_04"
		template = "invisible_missile_turret"
		locatorname = "medium_gun_01"
	}	

	medium_utility_slots = 4
	
	resources = {
		category = ship_sections
		cost = { alloys = @cost4 }
	}
}



####################################################################################################################################################################
### STERN ##########################################################################################################################################################
####################################################################################################################################################################

ship_section_template = {
	key = "CRUISER_STERN_M2"
	ship_size = cruiser
	fits_on_slot = stern
	entity = "cruiser_stern_M1_entity"
	icon = "GFX_ship_part_core_stern"
	ai_tags = { gunship }

	component_slot = {
		name = "MEDIUM_GUN_01"
		template = "medium_turret"
		locatorname = "medium_gun_01"
	}
	component_slot = {
		name = "MEDIUM_GUN_02"
		template = "invisible_medium_turret"
		locatorname = "medium_gun_01"
	}
	
	aux_utility_slots = 2
		
	resources = {
		category = ship_sections
		cost = { alloys = @cost1 }
	}
}

ship_section_template = {
	key = "CRUISER_STERN_S4"
	ship_size = cruiser
	fits_on_slot = stern
	entity = "cruiser_stern_S2_entity"
	icon = "GFX_ship_part_core_stern"
	ai_tags = { brawler }

	component_slot = {
		name = "SMALL_GUN_01"
		template = "small_turret"
		locatorname = "small_gun_01"
	}	
	component_slot = {
		name = "SMALL_GUN_02"
		template = "small_turret"
		locatorname = "small_gun_02"
	}
	component_slot = {
		name = "SMALL_GUN_03"
		template = "invisible_small_turret"
		locatorname = "small_gun_01"
	}	
	component_slot = {
		name = "SMALL_GUN_04"
		template = "invisible_small_turret"
		locatorname = "small_gun_02"
	}
	
	aux_utility_slots = 2
	
	resources = {
		category = ship_sections
		cost = { alloys = @cost1 }
	}
}

ship_section_template = {
	key = "CRUISER_STERN_P4"
	ship_size = cruiser
	fits_on_slot = stern
	entity = "cruiser_stern_S2_entity"
	icon = "GFX_ship_part_core_stern"
	ai_tags = { brawler }

	component_slot = {
		name = "PD_GUN_01"
		template = "point_defence_turret"
		locatorname = "small_gun_01"
	}	
	component_slot = {
		name = "PD_GUN_02"
		template = "point_defence_turret"
		locatorname = "small_gun_02"
	}
	component_slot = {
		name = "PD_GUN_03"
		template = "invisible_point_defence_turret"
		locatorname = "small_gun_01"
	}	
	component_slot = {
		name = "PD_GUN_04"
		template = "invisible_point_defence_turret"
		locatorname = "small_gun_02"
	}
	
	aux_utility_slots = 2
	
	resources = {
		category = ship_sections
		cost = { alloys = @cost1 }
	}
}





####################################################################################################################################################################
### VANILLA SECTIONS ###############################################################################################################################################
####################################################################################################################################################################

#BOW

ship_section_template = {
	key = "CRUISER_BOW_L1"
	ship_size = cruiser
	fits_on_slot = bow
	should_draw_components = yes
	entity = "cruiser_bow_L1_entity"
	icon = "GFX_ship_part_core_bow"
	ai_tags = { artillery artillery_stealth }
	
	prerequisites = { "tech_nsc_disabled_sections" }

	component_slot = {
		name = "LARGE_GUN_01"
		template = "large_turret"
		locatorname = "large_gun_01"
	}

	medium_utility_slots = 4

	resources = {
		category = ship_sections
		cost = {
			alloys = @section_cost
		}
	}
}

ship_section_template = {
	key = "CRUISER_BOW_M1S2"
	ship_size = cruiser
	fits_on_slot = bow
	should_draw_components = yes
	entity = "cruiser_bow_M1S2_entity"
	icon = "GFX_ship_part_core_bow"
	ai_tags = { explosive explosive_stealth energy_torpedoes energy_torpedoes_stealth }

	prerequisites = { "tech_torpedoes_1" "tech_nsc_disabled_sections" }

	ai_weight = {
		modifier = {
			factor = 10.0
			is_preferred_weapons = weapon_type_explosive
		}
		modifier = {
			factor = 0.1
			NOT = { is_preferred_weapons = weapon_type_explosive }
		}
	}

	component_slot = {
		name = "TORPEDO_01"
		template = "medium_missile_turret"
		locatorname = "medium_gun_01"
	}

	component_slot = {
		name = "SMALL_GUN_01"
		template = "small_turret"
		locatorname = "small_gun_01"
	}

	component_slot = {
		name = "SMALL_GUN_02"
		template = "small_turret"
		locatorname = "small_gun_02"
	}

	medium_utility_slots = 4

	resources = {
		category = ship_sections
		cost = {
			alloys = @section_cost
		}
	}
}

ship_section_template = {
	key = "CRUISER_BOW_M2"
	ship_size = cruiser
	fits_on_slot = bow
	should_draw_components = yes
	entity = "cruiser_bow_M2_entity"
	icon = "GFX_ship_part_core_bow"
	ai_tags = { gunship carrier }
	
	prerequisites = { "tech_nsc_disabled_sections" }

	component_slot = {
		name = "MEDIUM_GUN_01"
		template = "medium_turret"
		locatorname = "medium_gun_01"
	}

	component_slot = {
		name = "MEDIUM_GUN_02"
		template = "medium_turret"
		locatorname = "medium_gun_02"
	}

	medium_utility_slots = 4

	resources = {
		category = ship_sections
		cost = {
			alloys = @section_cost
		}
	}
}

#MID
ship_section_template = {
	key = "CRUISER_MID_S2HB"
	ship_size = cruiser
	fits_on_slot = mid
	should_draw_components = yes
	entity = "cruiser_mid_S2HB_entity"
	icon = "GFX_ship_part_core_mid"
	ai_tags = { carrier }

	ai_weight = {
		modifier = {
			factor = 10.0
			is_preferred_weapons = weapon_type_strike_craft
		}
		modifier = {
			factor = 0.1
			NOT = { is_preferred_weapons = weapon_type_strike_craft }
		}
	}
	
	prerequisites = { "tech_nsc_disabled_sections" }

	component_slot = {
		name = "PD_01"
		template = "point_defence_turret"
		locatorname = "small_gun_01"
	}
	component_slot = {
		name = "PD_02"
		template = "point_defence_turret"
		locatorname = "small_gun_02"
	}
	component_slot = {
		name = "STRIKE_CRAFT_01"
		template = "large_strike_craft"
		rotation = 90
		locatorname = "strike_craft_locator_01"
	}

	medium_utility_slots = 4

	resources = {
		category = ship_sections
		cost = {
			alloys = @section_cost
		}
	}
}

ship_section_template = {
	key = "CRUISER_MID_L1M1"
	ship_size = cruiser
	fits_on_slot = mid
	should_draw_components = yes
	entity = "cruiser_mid_L1M1_entity"
	icon = "GFX_ship_part_core_mid"
	ai_tags = { artillery artillery_stealth }
	
	prerequisites = { "tech_nsc_disabled_sections" }

	component_slot = {
		name = "LARGE_GUN_01"
		template = "large_turret"
		locatorname = "large_gun_01"
	}
	component_slot = {
		name = "MEDIUM_GUN_01"
		template = "medium_turret"
		locatorname = "medium_gun_01"
	}

	medium_utility_slots = 4

	resources = {
		category = ship_sections
		cost = {
			alloys = @section_cost
		}
	}
}

ship_section_template = {
	key = "CRUISER_MID_M3"
	ship_size = cruiser
	fits_on_slot = mid
	should_draw_components = yes
	entity = "cruiser_mid_M3_entity"
	icon = "GFX_ship_part_core_mid"
	ai_tags = { gunship }
	
	prerequisites = { "tech_nsc_disabled_sections" }

	component_slot = {
		name = "MEDIUM_GUN_01"
		template = "medium_turret"
		locatorname = "medium_gun_01"
	}

	component_slot = {
		name = "MEDIUM_GUN_02"
		template = "medium_turret"
		locatorname = "medium_gun_02"
	}

	component_slot = {
		name = "MEDIUM_GUN_03"
		template = "medium_turret"
		locatorname = "medium_gun_03"
	}

	medium_utility_slots = 4

	resources = {
		category = ship_sections
		cost = {
			alloys = @section_cost
		}
	}
}

ship_section_template = {
	key = "CRUISER_MID_M2S2"
	ship_size = cruiser
	fits_on_slot = mid
	should_draw_components = yes
	entity = "cruiser_mid_M2S2_entity"
	icon = "GFX_ship_part_core_mid"
	ai_tags = { explosive explosive_stealth energy_torpedoes energy_torpedoes_stealth }

	prerequisites = { "tech_torpedoes_1" "tech_nsc_disabled_sections" }

	ai_weight = {
		modifier = {
			factor = 10.0
			is_preferred_weapons = weapon_type_explosive
		}
		modifier = {
			factor = 0.1
			NOT = { is_preferred_weapons = weapon_type_explosive }
		}
	}

	component_slot = {
		name = "TORPEDO_01"
		template = "medium_missile_turret"
		locatorname = "medium_gun_01"
	}

	component_slot = {
		name = "TORPEDO_02"
		template = "medium_missile_turret"
		locatorname = "medium_gun_02"
	}

	component_slot = {
		name = "SMALL_GUN_01"
		template = "small_turret"
		locatorname = "small_gun_01"
	}

	component_slot = {
		name = "SMALL_GUN_02"
		template = "small_turret"
		locatorname = "small_gun_02"
	}

	medium_utility_slots = 4

	resources = {
		category = ship_sections
		cost = {
			alloys = @section_cost
		}
	}
}

#STERN

ship_section_template = {
	key = "CRUISER_STERN_M1"
	ship_size = cruiser
	fits_on_slot = stern
	should_draw_components = yes
	entity = "cruiser_stern_M1_entity"
	icon = "GFX_ship_part_core_stern"
	ai_tags = { artillery artillery_stealth carrier	}
	prerequisites = { "tech_nsc_disabled_sections" }

	component_slot = {
		name = "MEDIUM_GUN_01"
		template = "medium_turret"
		locatorname = "medium_gun_01"
	}

	aux_utility_slots = 2

	resources = {
		category = ship_sections
		cost = {
			alloys = @section_cost
		}
	}
}

ship_section_template = {
	key = "CRUISER_STERN_S2"
	ship_size = cruiser
	fits_on_slot = stern
	should_draw_components = yes
	entity = "cruiser_stern_S2_entity"
	icon = "GFX_ship_part_core_stern"
	ai_tags = {	gunship explosive explosive_stealth energy_torpedoes energy_torpedoes_stealth }
	prerequisites = { "tech_nsc_disabled_sections" }

	component_slot = {
		name = "SMALL_GUN_01"
		template = "small_turret"
		locatorname = "small_gun_01"
	}

	component_slot = {
		name = "SMALL_GUN_02"
		template = "small_turret"
		locatorname = "small_gun_02"
	}

	aux_utility_slots = 3

	resources = {
		category = ship_sections
		cost = {
			alloys = @section_cost
		}
	}
}