# AI plane design for testing

generic_fighter = {
	category = air

	blocked_for = {GER ENG USA JAP}

	available_for = {}

	roles = {
		air_fighter
	}

	priority = {
		factor = 1000
	}

	great_war_fighter_default = {
		priority = {
			factor = 1
			modifier = { 
				has_tech = basic_small_airframe
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 1000
			type = small_plane_airframe_0
			modules = {
				fixed_main_weapon_slot = light_mg_4x
				fixed_auxiliary_weapon_slot_1 = empty
				engine_type_slot = engine_1_1x
				special_type_slot_1 = empty
				special_type_slot_2 = empty	
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			engine_1_1x
			light_mg_4x
		}
	}

	basic_fighter_default = {
		priority = {
			factor = 100
			modifier = { 
				has_tech = improved_small_airframe
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 2000
			type = small_plane_airframe_1
			modules = {
				fixed_main_weapon_slot = {
					any_of = { 
						heavy_mg_4x
						light_mg_4x
					}
				}
				fixed_auxiliary_weapon_slot_1 = {
					any_of = { 
						aircraft_cannon_1_2x
						heavy_mg_4x
						light_mg_4x
					}
				}
				engine_type_slot = engine_2_1x
				special_type_slot_1 = empty
				special_type_slot_2 = empty	
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			light_mg_4x
			aircraft_cannon_1_1x
			engine_2_1x
			armor_plate_small
		}
	}

	improved_fighter_default = {
		priority = {
			factor = 10
			modifier = { 
				has_tech = advanced_small_airframe 
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 3000
			type = small_plane_airframe_2
			modules = {
				fixed_main_weapon_slot = {
					any_of = { 
						heavy_mg_4x
						light_mg_4x
					}
				}
				fixed_auxiliary_weapon_slot_1 = {
					any_of = { 
						aircraft_cannon_2_2x
						aircraft_cannon_1_2x
						heavy_mg_4x
						light_mg_4x
					}
				}
				engine_type_slot = {
					any_of = { 
						engine_4_1x
						engine_3_1x
						engine_2_1x
					}
				}
				special_type_slot_1 = empty
				special_type_slot_2 = empty	
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			light_mg_4x
			aircraft_cannon_1_2x
			engine_3_1x
		}
	}

	advanced_fighter_default = {
		priority = {
			factor = 10
			modifier = { 
				has_tech = modern_small_airframe
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 4000
			type = small_plane_airframe_3
			modules = {
				fixed_main_weapon_slot = {
					any_of = { 
						heavy_mg_4x
						light_mg_4x
					}
				}
				fixed_auxiliary_weapon_slot_1 = {
					any_of = { 
						aircraft_cannon_2_2x
						aircraft_cannon_1_2x
						heavy_mg_4x
						light_mg_4x
					}
				}
				engine_type_slot = {
					any_of = { 
						engine_4_1x
						engine_3_1x
						engine_2_1x
					}
				}
				special_type_slot_1 = armor_plate_small
				special_type_slot_2 = empty	
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = { 
			aircraft_cannon_2_2x
			heavy_mg_4x
			engine_4_1x
			armor_plate_small
		}
	}
	jet_fighter_default = {
		priority = {
			factor = 10
			modifier = { 
				not = { has_tech = modern_small_airframe }
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 4000
			type = small_plane_airframe
			modules = {
				fixed_main_weapon_slot = {
					any_of = { 
						aircraft_cannon_4_1x
						aircraft_cannon_3_2x
						aircraft_cannon_2_2x
						aircraft_cannon_1_2x
						heavy_mg_4x
						light_mg_4x
					}
				}
				fixed_auxiliary_weapon_slot_1 = {
					any_of = { 
						plane_aam_4
						plane_aam_3
						plane_aam_2
						plane_aam_1
						aircraft_cannon_4_1x
						aircraft_cannon_3_2x
						aircraft_cannon_2_2x
						aircraft_cannon_1_2x
						heavy_mg_4x
						light_mg_4x
					}
				}
				engine_type_slot = {
					any_of = { 
						jet_engine_improved_centrifugal_1x
						jet_engine_centrifugal_1x
						jet_engine_axial_1x
						jet_engine_2x
					}
				}
				special_type_slot_1 = armor_plate_small
				special_type_slot_2 = {	
					any_of = { 
						air_air_radar_6
						air_air_radar_5
						air_air_radar_4
						air_air_radar_3
						air_air_radar_2
						air_air_radar_1
					}
				}
				special_type_slot_3 = {
					any_of = { 
						drop_tanks
					}
				}
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = { 
			aircraft_cannon_2_2x
			aircraft_cannon_2_2x
			jet_engine_2x
			armor_plate_small
		}
	}
}

generic_cas = {
	category = air

	blocked_for = {GER ENG USA JAP}

	available_for = {}

	roles = {
		air_cas
	}

	priority = {
		factor = 100
	}
	cas_1 = {
		priority = {
			factor = 100	
			modifier = { 
				has_tech = improved_small_airframe
				factor = 0 #let's not waste XP here
			}
		}
		history = yes
		target_variant = {
			match_value = 1000
			type = small_plane_cas_airframe_1
			modules = {
				fixed_main_weapon_slot = bomb_locks
				fixed_auxiliary_weapon_slot_1 = empty
				engine_type_slot = engine_2_1x
				special_type_slot_1 = {
					any_of = { 
						armor_plate_small
					}
				}
				special_type_slot_2 = {	
					any_of = { 
						fuel_tanks_small
					}
				}
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			bomb_locks
			engine_2_1x
			armor_plate_small
			fuel_tanks_small
		}
	}
	cas_2 = {
		priority = {
			factor = 200
			modifier = { 
				has_tech = advanced_small_airframe 
				factor = 0 #let's not waste XP here
			}
		}
		history = yes
		target_variant = {
			match_value = 1500
			type = small_plane_cas_airframe_2
			modules = {
				fixed_main_weapon_slot = small_bomb_bay
				fixed_auxiliary_weapon_slot_1 = bomb_locks
				engine_type_slot = {
					any_of = { 
						engine_4_1x
						engine_3_1x
						engine_2_1x
					}
				}
				special_type_slot_1 = {
					any_of = { 
						armor_plate_small
					}
				}
				special_type_slot_2 = {	
					any_of = { 
						fuel_tanks_small
					}
				}
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}
		allowed_modules = {
			small_bomb_bay
			bomb_locks
			engine_2_2x
			armor_plate_small
			fuel_tanks_small
		}
	}
	cas_3 = {
		priority = {
			factor = 200
			modifier = { 
				has_tech = modern_small_airframe
				factor = 0 #let's not waste XP here
			}
		}
		history = yes
		target_variant = {
			match_value = 2500
			type = small_plane_cas_airframe_3
			modules = {
				fixed_main_weapon_slot = small_bomb_bay
				fixed_auxiliary_weapon_slot_1 = bomb_locks
				fixed_auxiliary_weapon_slot_2 = bomb_locks
				engine_type_slot = {
					any_of = { 
						engine_4_1x
						engine_3_1x
						engine_2_1x
					}
				}
				special_type_slot_1 = {
					any_of = { 
						armor_plate_small
					}
				}
				special_type_slot_2 = {	
					any_of = { 
						fuel_tanks_small
					}
				}
				special_type_slot_3 = {	
					any_of = { 
						air_ground_radar_4
						air_ground_radar_3
						air_ground_radar_2
						air_ground_radar_1
					}
				}
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			small_bomb_bay
			bomb_locks
			engine_3_1x
		}
	}
	cas_4 = {
		priority = {
			factor = 200
			modifier = { 
				not = { has_tech = modern_small_airframe }
				factor = 0 #let's not waste XP here
			}
		}
		history = yes
		target_variant = {
			match_value = 2500
			type = small_plane_cas_airframe
			modules = {
				fixed_main_weapon_slot = {
					any_of = { 
						rocket_rails5
						rocket_rails4
						rocket_rails3
						small_bomb_bay
					}
				}
				fixed_auxiliary_weapon_slot_1 = {
					any_of = { 
						rocket_rails5
						rocket_rails4
						rocket_rails3
						bomb_locks
					}
				}
				fixed_auxiliary_weapon_slot_2 = {
					any_of = { 
						rocket_rails5
						rocket_rails4
						rocket_rails3
						bomb_locks
					}
				}
				engine_type_slot = {
					any_of = { 
						jet_engine_improved_centrifugal_1x
						jet_engine_centrifugal_1x
						jet_engine_axial_1x
						jet_engine_2x
					}
				}
				special_type_slot_1 = {
					any_of = { 
						dive_brakes_small
					}
				}
				special_type_slot_2 =  {
					any_of = { 
						fuel_tanks_small
					}
				}
				special_type_slot_3 =  {
					any_of = { 
						self_sealing_fuel_tanks_small
					}
				}
				special_type_slot_4 = {	
					any_of = { 
						air_ground_radar_4
						air_ground_radar_3
						air_ground_radar_2
						air_ground_radar_1
					}
				}
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			small_bomb_bay
			bomb_locks
			engine_3_1x
		}
	}
}

generic_naval_bomber = {
	category = air

	blocked_for = {GER ENG USA JAP}

	available_for = {}

	roles = {
		air_naval_bomber
	}
	priority = {
		factor = 500
	}
	naval_bomber_1 = {
		priority = {
			factor = 100
			modifier = { 
				has_tech = improved_small_airframe
				factor = 0 #let's not waste XP here
			}
		}
		history = yes
		target_variant = {
			match_value = 1000
			type = small_plane_naval_bomber_airframe_1
			modules = {
				fixed_main_weapon_slot = {
					any_of = { 
						torpedo_mounting_3
						torpedo_mounting_2
						torpedo_mounting
					}
				}
				fixed_auxiliary_weapon_slot_1 = empty
				engine_type_slot = engine_2_1x
				special_type_slot_1 = empty
				special_type_slot_2 = empty	
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}
		allowed_modules = {
			torpedo_mounting
			engine_2_1x
		}
	}
	naval_bomber_2 = {
		priority = {
			factor = 200
			modifier = { 
				has_tech = advanced_small_airframe 
				factor = 0 #let's not waste XP here
			}
		}
		history = yes
		target_variant = {
			match_value = 1500
			type = small_plane_naval_bomber_airframe_2
			modules = {
				fixed_main_weapon_slot = {
					any_of = { 
						torpedo_mounting_3
						torpedo_mounting_2
						torpedo_mounting
					}
				}
				fixed_auxiliary_weapon_slot_1 = bomb_locks
				engine_type_slot = {
					any_of = { 
						engine_4_1x
						engine_3_1x
						engine_2_1x
					}
				}
				special_type_slot_1 = lmg_defense_turret
				special_type_slot_2 = empty	
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}
		allowed_modules = {
			torpedo_mounting
			lmg_defense_turret
			bomb_locks
			engine_2_2x
		}
	}

	naval_bomber_3 = {
		priority = {
			factor = 200
			modifier = { 
				has_tech = modern_small_airframe
				factor = 0 #let's not waste XP here
			}
		}
		history = yes
		target_variant = {
			match_value = 2000
			type = small_plane_naval_bomber_airframe_3
			modules = {
				fixed_main_weapon_slot = {
					any_of = { 
						torpedo_mounting_3
						torpedo_mounting_2
						torpedo_mounting
					}
				}
				fixed_auxiliary_weapon_slot_1 = bomb_locks
				fixed_auxiliary_weapon_slot_2 = empty
				engine_type_slot = {
					any_of = { 
						engine_4_1x
						engine_3_1x
						engine_2_1x
					}
				}
				special_type_slot_1 = lmg_defense_turret
				special_type_slot_2 = empty	
				special_type_slot_4 = {	
					any_of = { 
						air_ground_radar_4
						air_ground_radar_3
						air_ground_radar_2
						air_ground_radar_1
					}
				}
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			torpedo_mounting
			bomb_locks
			engine_3_1x
			lmg_defense_turret
		}
	}
	
	naval_bomber_4 = {
		priority = {
			factor = 200
			modifier = { 
				not = { has_tech = modern_small_airframe }
				factor = 0 #let's not waste XP here
			}
		}
		history = yes
		target_variant = {
			match_value = 2000
			type = small_plane_naval_bomber_airframe
			modules = {
				fixed_main_weapon_slot = {
					any_of = { 
						light_guided_anti_ship_missile_5
						light_guided_anti_ship_missile_4
						torpedo_mounting_3
						torpedo_mounting_2
						torpedo_mounting
					}
				}
				fixed_auxiliary_weapon_slot_1 = bomb_locks
				fixed_auxiliary_weapon_slot_2 = empty
				engine_type_slot = {
					any_of = { 
						jet_engine_improved_centrifugal_1x
						jet_engine_centrifugal_1x
						jet_engine_axial_1x
						jet_engine_2x
					}
				}
				special_type_slot_1 = lmg_defense_turret
				special_type_slot_2 = empty	
				special_type_slot_4 = {	
					any_of = { 
						air_ground_radar_4
						air_ground_radar_3
						air_ground_radar_2
						air_ground_radar_1
					}
				}
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			torpedo_mounting
			bomb_locks
			engine_3_1x
			lmg_defense_turret
		}
	}
}

generic_cv_fighter = {
	category = air

	#blocked_for = {  ENG USA FRA JAP } #Why
	blocked_for = { ENG JAP }

	available_for = {}

	roles = {
		air_cv_fighter
	}

	priority = {
		factor = 1000
		modifier = {
			has_navy_size = {
				unit = carrier
 	  			size < 1
			}
			factor = 0
		}
	}

	great_war_cv_fighter_default = {
		priority = {
			factor = 1
			modifier = { 
				has_tech = basic_small_airframe
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 1000
			type = cv_small_plane_airframe_0
			modules = {
				fixed_main_weapon_slot = light_mg_4x
				fixed_auxiliary_weapon_slot_1 = empty
				engine_type_slot = engine_1_1x
				special_type_slot_1 = empty
				special_type_slot_2 = empty	
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			engine_1_1x
			light_mg_4x
		}
	}

	basic_cv_fighter_default = {
		priority = {
			factor = 100
			modifier = { 
				has_tech = improved_small_airframe
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 2000
			type = cv_small_plane_airframe_1
			modules = {
				fixed_main_weapon_slot = {
					any_of = { 
						heavy_mg_4x
						light_mg_4x
					}
				}
				fixed_auxiliary_weapon_slot_1 = {
					any_of = { 
						aircraft_cannon_1_2x
						heavy_mg_4x
						light_mg_4x
					}
				}
				engine_type_slot = engine_2_1x
				special_type_slot_1 = empty
				special_type_slot_2 = empty	
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			light_mg_4x
			aircraft_cannon_1_1x
			engine_2_1x
			armor_plate_small
		}
	}

	improved_cv_fighter_default = {
		priority = {
			factor = 10
			modifier = { 
				has_tech = advanced_small_airframe 
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 3000
			type = cv_small_plane_airframe_2
			modules = {
				fixed_main_weapon_slot = {
					any_of = { 
						heavy_mg_4x
						light_mg_4x
					}
				}
				fixed_auxiliary_weapon_slot_1 = {
					any_of = { 
						aircraft_cannon_2_2x
						aircraft_cannon_1_2x
						heavy_mg_4x
						light_mg_4x
					}
				}
				engine_type_slot = {
					any_of = { 
						engine_4_1x
						engine_3_1x
						engine_2_1x
					}
				}
				special_type_slot_1 = empty
				special_type_slot_2 = empty	
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			light_mg_4x
			aircraft_cannon_1_2x
			engine_3_1x
		}
	}

	advanced_cv_fighter_default = {
		priority = {
			factor = 10
			modifier = { 
				has_tech = modern_small_airframe
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 4000
			type = cv_small_plane_airframe_3
			modules = {
				fixed_main_weapon_slot = {
					any_of = { 
						heavy_mg_4x
						light_mg_4x
					}
				}
				fixed_auxiliary_weapon_slot_1 = {
					any_of = { 
						aircraft_cannon_2_2x
						aircraft_cannon_1_2x
						heavy_mg_4x
						light_mg_4x
					}
				}
				engine_type_slot = {
					any_of = { 
						engine_4_1x
						engine_3_1x
						engine_2_1x
					}
				}
				special_type_slot_1 = armor_plate_small
				special_type_slot_2 = empty	
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = { 
			aircraft_cannon_1_2x
			heavy_mg_4x
			engine_4_1x
			armor_plate_small
		}
	}
	jet_cv_fighter_default = {
		priority = {
			factor = 10
			modifier = { 
				not = { has_tech = modern_small_airframe }
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 4000
			type = cv_small_plane_airframe_4
			modules = {
				fixed_main_weapon_slot = {
					any_of = { 
						aircraft_cannon_4_1x
						aircraft_cannon_3_2x
						aircraft_cannon_2_2x
						aircraft_cannon_1_2x
						heavy_mg_4x
						light_mg_4x
					}
				}
				fixed_auxiliary_weapon_slot_1 = {
					any_of = { 
						plane_aam_4
						plane_aam_3
						plane_aam_2
						plane_aam_1
						aircraft_cannon_4_1x
						aircraft_cannon_3_2x
						aircraft_cannon_2_2x
						aircraft_cannon_1_2x
						heavy_mg_4x
						light_mg_4x
					}
				}
				engine_type_slot = {
					any_of = { 
						jet_engine_improved_centrifugal_1x
						jet_engine_centrifugal_1x
						jet_engine_axial_1x
						jet_engine_2x
					}
				}
				special_type_slot_1 = armor_plate_small
				special_type_slot_2 = {	
					any_of = { 
						air_air_radar_4
						air_air_radar_3
						air_air_radar_2
						air_air_radar_1
					}
				}
				special_type_slot_3 = {
					any_of = { 
						drop_tanks
					}
				}
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = { 
			aircraft_cannon_2_2x
			aircraft_cannon_2_2x
			jet_engine_2x
			armor_plate_small
		}
	}
}

generic_cv_cas = {
	category = air

	#blocked_for = { ENG USA FRA JAP }
	blocked_for = { ENG JAP }

	available_for = {}

	roles = {
		air_cv_cas
	}

	priority = {
		factor = 100
		modifier = {
			has_navy_size = {
				unit = carrier
 	  			size < 1
			}
			factor = 0
		}
	}
	cv_cas_1 = {
		priority = {
			factor = 100
			modifier = { 
				has_tech = improved_small_airframe
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 1000
			type = cv_small_plane_cas_airframe_1
			modules = {
				fixed_main_weapon_slot = bomb_locks
				fixed_auxiliary_weapon_slot_1 = empty
				engine_type_slot = engine_2_1x
				special_type_slot_1 = {
					any_of = { 
						dive_brakes_small
					}
				}
				special_type_slot_2 = empty	
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			bomb_locks
			engine_2_1x
			dive_brakes_small
		}
	}
	cv_cas_2 = {
		priority = {
			factor = 200
			modifier = { 
				has_tech = advanced_small_airframe 
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 1500
			type = cv_small_plane_cas_airframe_2
			modules = {
				fixed_main_weapon_slot = small_bomb_bay
				fixed_auxiliary_weapon_slot_1 = bomb_locks
				engine_type_slot = {
					any_of = { 
						engine_4_1x
						engine_3_1x
						engine_2_1x
					}
				}
				special_type_slot_1 = {
					any_of = { 
						dive_brakes_small
					}
				}
				special_type_slot_2 = empty	
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			small_bomb_bay
			bomb_locks
			engine_2_2x
			dive_brakes_small
		}
	}
	cv_cas_3 = {
		priority = {
			factor = 200
			modifier = { 
				has_tech = modern_small_airframe
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 2500
			type = cv_small_plane_cas_airframe_3
			modules = {
				fixed_main_weapon_slot = bomb_locks
				fixed_auxiliary_weapon_slot_1 = bomb_locks
				engine_type_slot = {
					any_of = { 
						engine_4_1x
						engine_3_1x
						engine_2_1x
					}
				}
				special_type_slot_1 = {
					any_of = { 
						dive_brakes_small
					}
				}
				special_type_slot_2 = {	
					any_of = { 
						air_ground_radar_4
						air_ground_radar_3
						air_ground_radar_2
						air_ground_radar_1
					}
				}
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			small_bomb_bay
			bomb_locks
			engine_3_1x
			dive_brakes_small
		}
	}
	cv_cas_4 = {
		priority = {
			factor = 200
			modifier = { 
				not = { has_tech = modern_small_airframe }
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 2500
			type = cv_small_plane_cas_airframe
			modules = {
				fixed_main_weapon_slot = bomb_locks
				fixed_auxiliary_weapon_slot_1 = bomb_locks
				engine_type_slot = {
					any_of = { 
						jet_engine_improved_centrifugal_1x
						jet_engine_centrifugal_1x
						jet_engine_axial_1x
						jet_engine_2x
					}
				}
				special_type_slot_1 = {
					any_of = { 
						dive_brakes_small
					}
				}
				special_type_slot_2 =  {
					any_of = { 
						fuel_tanks_small
					}
				}
				special_type_slot_3 =  {
					any_of = { 
						self_sealing_fuel_tanks_small
					}
				}
				special_type_slot_4 = {	
					any_of = { 
						air_ground_radar_4
						air_ground_radar_3
						air_ground_radar_2
						air_ground_radar_1
					}
				}
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			small_bomb_bay
			bomb_locks
			engine_3_1x
			dive_brakes_small
		}
	}
}

generic_cv_naval_bomber = {
	category = air

	#blocked_for = {  ENG USA FRA JAP }
	blocked_for = { ENG JAP }

	available_for = {}

	roles = {
		air_cv_naval_bomber
	}

	priority = {
		factor = 500
		modifier = {
			has_navy_size = {
				unit = carrier
 	  			size < 1
			}
			factor = 0
		}
	}
	cv_naval_bomber_1 = {
		priority = {
			factor = 100
			modifier = { 
				has_tech = improved_small_airframe
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 1000
			type = cv_small_plane_naval_bomber_airframe_1
			modules = {
				fixed_main_weapon_slot = {
					any_of = { 
						light_guided_anti_ship_missile_5
						light_guided_anti_ship_missile_4
						torpedo_mounting_3
						torpedo_mounting_2
						torpedo_mounting
					}
				}
				fixed_auxiliary_weapon_slot_1 = empty
				engine_type_slot = engine_2_1x
				special_type_slot_1 = empty
				special_type_slot_2 = empty	
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			torpedo_mounting
			engine_2_1x
		}
	}
	cv_naval_bomber_2 = {
		priority = {
			factor = 200
			modifier = { 
				has_tech = advanced_small_airframe 
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 1500
			type = cv_small_plane_naval_bomber_airframe_2
			modules = {
				fixed_main_weapon_slot = {
					any_of = { 
						light_guided_anti_ship_missile_5
						light_guided_anti_ship_missile_4
						torpedo_mounting_3
						torpedo_mounting_2
						torpedo_mounting
					}
				}
				fixed_auxiliary_weapon_slot_1 = bomb_locks
				engine_type_slot = {
					any_of = { 
						engine_4_1x
						engine_3_1x
						engine_2_1x
					}
				}
				special_type_slot_1 = {
					any_of = { 
						lmg_defense_turret
					}
				}
				special_type_slot_2 = empty	
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			torpedo_mounting
			bomb_locks
			engine_3_1x
			lmg_defense_turret
		}
	}

	cv_naval_bomber_3 = {
		priority = {
			factor = 200
			modifier = { 
				has_tech = modern_small_airframe
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 2000
			type = cv_small_plane_naval_bomber_airframe_3
			modules = {
				fixed_main_weapon_slot = {
					any_of = { 
						light_guided_anti_ship_missile_5
						light_guided_anti_ship_missile_4
						torpedo_mounting_3
						torpedo_mounting_2
						torpedo_mounting
					}
				}
				fixed_auxiliary_weapon_slot_1 = bomb_locks
				engine_type_slot = {
					any_of = { 
						engine_4_1x
						engine_3_1x
						engine_2_1x
					}
				}
				special_type_slot_1 = {
					any_of = { 
						lmg_defense_turret
					}
				}
				special_type_slot_2 = empty	
				special_type_slot_3 = {	
					any_of = { 
						air_ground_radar_4
						air_ground_radar_3
						air_ground_radar_2
						air_ground_radar_1
					}
				}
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			torpedo_mounting
			bomb_locks
			engine_3_1x
			lmg_defense_turret
		}
	}

	cv_naval_bomber_4 = {
		priority = {
			factor = 200
			modifier = { 
				not = { has_tech = modern_small_airframe }
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 2000
			type = cv_small_plane_naval_bomber_airframe
			modules = {
				fixed_main_weapon_slot = {
					any_of = { 
						light_guided_anti_ship_missile_5
						light_guided_anti_ship_missile_4
						torpedo_mounting_3
						torpedo_mounting_2
						torpedo_mounting
					}
				}
				fixed_auxiliary_weapon_slot_1 = bomb_locks
				engine_type_slot = {
					any_of = { 
						jet_engine_improved_centrifugal_1x
						jet_engine_centrifugal_1x
						jet_engine_axial_1x
						jet_engine_2x
					}
				}
				special_type_slot_1 = {
					any_of = { 
						lmg_defense_turret
					}
				}
				special_type_slot_2 = empty	
				special_type_slot_4 = {	
					any_of = { 
						air_ground_radar_4
						air_ground_radar_3
						air_ground_radar_2
						air_ground_radar_1
					}
				}
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			torpedo_mounting
			bomb_locks
			engine_3_1x
			lmg_defense_turret
		}
	}
}



generic_tactical_bomber = {
	category = air

	blocked_for = {GER ENG USA JAP}

	available_for = {}

	roles = {
		air_tactical_bomber
	}

	priority = {
		factor = 2000
		modifier = {
			num_of_factories < 100
			factor = 0.5
		}
		modifier = {
			num_of_factories < 50
			factor = 0
		}
	}

	gw_tac_bomber_default = {
		priority = {
			factor = 100
			modifier = { 
				has_tech = basic_medium_airframe
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 2000
			type = medium_plane_airframe_0
			modules = {
				fixed_main_weapon_slot = medium_bomb_bay
				fixed_auxiliary_weapon_slot_1 = empty
				engine_type_slot = engine_1_2x
				special_type_slot_1 = empty
				special_type_slot_2 = empty	
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			medium_bomb_bay
			engine_1_2x
			
		}
	}

	tac_bomber_1_default = {
		priority = {
			factor = 100
			modifier = { 
				has_tech = improved_medium_airframe
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 3000
			type = medium_plane_airframe_1
			modules = {
				fixed_main_weapon_slot = medium_bomb_bay
				fixed_auxiliary_weapon_slot_1 = medium_bomb_bay
				engine_type_slot = engine_2_2x
				special_type_slot_1 = empty
				special_type_slot_2 = empty	
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			medium_bomb_bay
			engine_2_2x
		}
	}
	tac_bomber_2_default = {
		priority = {
			factor = 100
			modifier = { 
				has_tech = advanced_medium_airframe
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 3000
			type = medium_plane_airframe_2
			modules = {
				fixed_main_weapon_slot = medium_bomb_bay
				fixed_auxiliary_weapon_slot_1 = medium_bomb_bay
				fixed_auxiliary_weapon_slot_2 = bomb_locks
				engine_type_slot = engine_3_2x
				special_type_slot_1 = {
					any_of = { 
						lmg_defense_turret_2x
					}
				}
				special_type_slot_2 = empty	
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			medium_bomb_bay
			bomb_locks
			engine_3_2x
			lmg_defense_turret_2x
		}
	}

	tac_bomber_3_default = {
		priority = {
			factor = 100
			modifier = { 
				has_tech = modern_medium_airframe
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 4000
			type = medium_plane_airframe_3
			modules = {
				fixed_main_weapon_slot = medium_bomb_bay
				fixed_auxiliary_weapon_slot_1 = medium_bomb_bay
				fixed_auxiliary_weapon_slot_2 = bomb_locks
#				fixed_auxiliary_weapon_slot_3 = torpedo_mounting
				engine_type_slot = engine_4_2x
				special_type_slot_1 = lmg_defense_turret_2x
				special_type_slot_2 = empty	
				special_type_slot_4 = {	
					any_of = { 
						air_ground_radar_4
						air_ground_radar_3
						air_ground_radar_2
						air_ground_radar_1
					}
				}
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			medium_bomb_bay
			bomb_locks
			torpedo_mounting
			engine_4_2x
			lmg_defense_turret_2x
		}
	}
	jet_tac_bomber_default = {
		priority = {
			factor = 100
			modifier = { 
				not = { has_tech = modern_medium_airframe }
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 4000
			type = medium_plane_airframe
			modules = {
				fixed_main_weapon_slot = medium_bomb_bay
				fixed_auxiliary_weapon_slot_1 = medium_bomb_bay
				fixed_auxiliary_weapon_slot_2 = bomb_locks
#				fixed_auxiliary_weapon_slot_3 = {
#					any_of = { 
#						guided_anti_ship_missile_5
#						guided_anti_ship_missile_4
#						guided_anti_ship_missile_3
#						guided_anti_ship_missile_2
#						guided_anti_ship_missile
#						torpedo_mounting
#					}
#				}
				engine_type_slot = {
					any_of = { 
						jet_engine_improved_centrifugal_2x
						jet_engine_centrifugal_2x
						jet_engine_axial_2x
						jet_engine_2x
					}
				}
				special_type_slot_1 = fuel_tanks_medium
				special_type_slot_2 = empty	
				special_type_slot_4 = {	
					any_of = { 
						air_ground_radar_4
						air_ground_radar_3
						air_ground_radar_2
						air_ground_radar_1
					}
				}
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			medium_bomb_bay
			bomb_locks
			fuel_tanks_medium
			jet_engine_2x
		}
	}
}

generic_heavy_fighter = {
	category = air

	blocked_for = {GER ENG USA JAP}

	available_for = {}

	roles = {
		air_heavy_fighter
	}

	priority = {
		factor = 500
		
	}
	heavy_fighter_1 = {
		priority = {
			factor = 100
			modifier = { 
				has_tech = improved_medium_airframe
				factor = 0 #let's not waste XP here
			}
		}
		

		history = yes
		target_variant = {
			match_value = 1000
			type = medium_plane_fighter_airframe_1
			modules = {
				fixed_main_weapon_slot = light_mg_4x
				fixed_auxiliary_weapon_slot_1 = {
					any_of = { 
						aircraft_cannon_2_2x
						aircraft_cannon_1_2x
						heavy_mg_4x
						light_mg_4x
					}
				}
				fixed_auxiliary_weapon_slot_2 = empty
				engine_type_slot = engine_2_2x
				special_type_slot_1 = empty
				special_type_slot_2 = empty	
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			light_mg_4x
			aircraft_cannon_1_2x
			engine_2_2x
		}
	}

	heavy_fighter_2 = {
		priority = {
			factor = 200
			modifier = { 
				has_tech = advanced_medium_airframe
				factor = 0 #let's not waste XP here
			}
		}
		

		history = yes
		target_variant = {
			match_value = 1500
			type = medium_plane_fighter_airframe_2
			modules = {
				fixed_main_weapon_slot = heavy_mg_4x
				fixed_auxiliary_weapon_slot_1 = {
					any_of = { 
						aircraft_cannon_2_2x
						aircraft_cannon_1_2x
						heavy_mg_4x
					}
				}
				fixed_auxiliary_weapon_slot_2 = empty
				engine_type_slot = engine_3_2x
				special_type_slot_1 = empty
				special_type_slot_2 = empty	
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			heavy_mg_4x
			aircraft_cannon_1_2x
			engine_3_2x
		}
	}

	heavy_fighter_3 = {
		priority = {
			factor = 200
			modifier = { 
				has_tech = modern_medium_airframe
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 2000
			type = medium_plane_fighter_airframe_3
			modules = {
				fixed_main_weapon_slot = heavy_mg_4x
				fixed_auxiliary_weapon_slot_1 = {
					any_of = { 
						aircraft_cannon_2_2x
						aircraft_cannon_1_2x
						heavy_mg_4x
					}
				}
				fixed_auxiliary_weapon_slot_2 = empty
				engine_type_slot = engine_4_2x
				special_type_slot_1 = empty
				special_type_slot_2 = empty	
				special_type_slot_3 = {	
					any_of = { 
						air_air_radar_4
						air_air_radar_3
						air_air_radar_2
						air_air_radar_1
					}
				}
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			heavy_mg_4x
			aircraft_cannon_2_2x
			engine_4_2x
		}
	}
	heavy_fighter_4 = {
		priority = {
			factor = 200
			modifier = { 
				not = { has_tech = modern_medium_airframe }
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 2000
			type = medium_plane_fighter_airframe
			modules = {
				fixed_main_weapon_slot = {
					any_of = { 
						aircraft_cannon_4_1x
						aircraft_cannon_3_2x
						aircraft_cannon_2_2x
						aircraft_cannon_1_2x
						heavy_mg_4x
						light_mg_4x
					}
				}
				fixed_auxiliary_weapon_slot_1 = {
					any_of = { 
						plane_aam_4
						plane_aam_3
						plane_aam_2
						plane_aam_1
						aircraft_cannon_4_1x
						aircraft_cannon_3_2x
						aircraft_cannon_2_2x
						aircraft_cannon_1_2x
						heavy_mg_4x
						light_mg_4x
					}
				}
				fixed_auxiliary_weapon_slot_2 = {
					any_of = { 
						plane_aam_4
						plane_aam_3
						plane_aam_2
						plane_aam_1
						aircraft_cannon_4_1x
						aircraft_cannon_3_2x
						aircraft_cannon_2_2x
						aircraft_cannon_1_2x
						heavy_mg_4x
						light_mg_4x
					}
				}
				engine_type_slot = {
					any_of = { 
						jet_engine_improved_centrifugal_2x
						jet_engine_centrifugal_2x
						jet_engine_axial_2x
						jet_engine_2x
					}
				}
				special_type_slot_1 = armor_plate_medium
				special_type_slot_2 = empty	
				special_type_slot_3 = {	
					any_of = { 
						air_air_radar_4
						air_air_radar_3
						air_air_radar_2
						air_air_radar_1
					}
				}
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			heavy_mg_4x
			aircraft_cannon_2_2x
			engine_4_2x
		}
	}
}


generic_scout_plane = {
	category = air
	blocked_for = {}
	available_for = {}

	roles = {
		air_scout_plane
	}

	priority = {
		factor = 200
		modifier = {
			num_of_factories < 50
			factor = 0
		}
	}

	scout_plane_1_default = {
		priority = {
			factor = 10
			modifier = { 
				has_tech = improved_medium_airframe
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 1000
			type = medium_plane_scout_plane_airframe_1
			modules = {
				fixed_main_weapon_slot = recon_camera
				fixed_auxiliary_weapon_slot_1 = empty
				fixed_auxiliary_weapon_slot_2 = empty
				engine_type_slot = engine_1_2x
				special_type_slot_1 = fuel_tanks_medium
				special_type_slot_2 = empty
				special_type_slot_3 = empty
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			recon_camera
			engine_1_2x
			fuel_tanks_medium
		}
	}

	scout_plane_2_default = {
		priority = {
			factor = 10
			modifier = { 
				has_tech = advanced_medium_airframe
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 2000
			type = medium_plane_scout_plane_airframe_2
			modules = {
				fixed_main_weapon_slot = recon_camera
				fixed_auxiliary_weapon_slot_1 = empty
				fixed_auxiliary_weapon_slot_2 = empty
				engine_type_slot = engine_2_2x
				special_type_slot_1 = empty
				special_type_slot_2 = empty
				special_type_slot_3 = fuel_tanks_medium
				special_type_slot_4 = empty
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			engine_2_4x
			recon_camera
			fuel_tanks_medium
		}
	}

	scout_plane_3_default = {
		priority = {
			factor = 10
			modifier = { 
				has_tech = modern_medium_airframe
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 4000
			type = medium_plane_scout_plane_airframe_3
			modules = {
				fixed_main_weapon_slot = recon_camera
				fixed_auxiliary_weapon_slot_1 = empty
				fixed_auxiliary_weapon_slot_2 = empty
				engine_type_slot = engine_4_2x
				special_type_slot_1 = empty
				special_type_slot_2 = empty
				special_type_slot_3 = fuel_tanks_medium
				special_type_slot_4 = fuel_tanks_medium
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			engine_4_2x
			fuel_tanks_medium
			recon_camera
		}
	}
	scout_plane_4_default = {
		priority = {
			factor = 10
			modifier = { 
				not = { has_tech = modern_medium_airframe }
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 4000
			type = medium_plane_scout_plane_airframe
			modules = {
				fixed_main_weapon_slot = recon_camera
				fixed_auxiliary_weapon_slot_1 = empty
				fixed_auxiliary_weapon_slot_2 = empty
				engine_type_slot = {
					any_of = { 
						jet_engine_improved_centrifugal_2x
						jet_engine_centrifugal_2x
						jet_engine_axial_2x
						jet_engine_2x
					}
				}
				special_type_slot_1 = lmg_defense_turret_2x
				special_type_slot_2 = empty
				special_type_slot_3 = fuel_tanks_medium
				special_type_slot_4 = fuel_tanks_medium
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			engine_4_2x
			fuel_tanks_medium
			recon_camera
		}
	}
}

generic_strategic_bomber = {
	category = air

	blocked_for = {GER ENG USA SOV JAP}

	available_for = {}

	roles = {
		air_strategic_bomber
	}

	priority = {
		factor = 200
		modifier = {
			num_of_factories < 50
			factor = 0
		}
	}

	strat_bomber_0_default = {
		priority = {
			factor = 5
			modifier = { 
				has_tech = basic_large_airframe
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 500
			type = large_plane_airframe_0
			modules = {
				fixed_main_weapon_slot = large_bomb_bay
				engine_type_slot = engine_1_4x
				special_type_slot_1 = {
					any_of = {
						lmg_defense_turret_2x
						lmg_defense_turret
					}
				}
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			large_bomb_bay
			engine_1_4x
			lmg_defense_turret_2x
			lmg_defense_turret
		}
	}

	strat_bomber_1_default = {
		priority = {
			factor = 10
			modifier = { 
				has_tech = improved_large_airframe
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 1000
			type = large_plane_airframe_1
			modules = {
				fixed_main_weapon_slot = large_bomb_bay
				fixed_auxiliary_weapon_slot_1 = empty
				fixed_auxiliary_weapon_slot_2 = empty
				engine_type_slot = engine_2_4x
				special_type_slot_1 = {
					any_of = {
						lmg_defense_turret_2x
						lmg_defense_turret
					}
				}
				special_type_slot_2 = {
					any_of = {
						lmg_defense_turret
					}
				}
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			large_bomb_bay
			engine_2_4x
			lmg_defense_turret_2x
			lmg_defense_turret
		}
	}

	strat_bomber_2_default = {
		priority = {
			factor = 10
			modifier = { 
				has_tech = advanced_large_airframe
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 2000
			type = large_plane_airframe_2
			modules = {
				fixed_main_weapon_slot = large_bomb_bay
				fixed_auxiliary_weapon_slot_1 = large_bomb_bay
				fixed_auxiliary_weapon_slot_2 = empty
				engine_type_slot = engine_3_4x
				special_type_slot_1 = {
					any_of = {
						hmg_defense_turret_2x
						lmg_defense_turret_2x
					}
				}
				special_type_slot_2 = {
					any_of = {
						lmg_defense_turret_2x
					}
				}
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			large_bomb_bay
			engine_3_4x
			hmg_defense_turret_2x
			lmg_defense_turret_2x
		}
	}

	strat_bomber_3_default = {
		priority = {
			factor = 10
			modifier = { 
				has_tech = modern_large_airframe
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 4000
			type = large_plane_airframe_3
			modules = {
				fixed_main_weapon_slot = large_bomb_bay
				fixed_auxiliary_weapon_slot_1 = large_bomb_bay
				fixed_auxiliary_weapon_slot_2 = large_bomb_bay
				engine_type_slot = engine_4_4x
				special_type_slot_1 = {
					any_of = {
						cannon_defense_turret_2x
						hmg_defense_turret_2x
						lmg_defense_turret_2x
					}
				}
				special_type_slot_2 = {
					any_of = {
						hmg_defense_turret_2x
						lmg_defense_turret_2x
					}
				}
				special_type_slot_3 = {
					any_of = {
						bomb_sights_4
						bomb_sights_3
						bomb_sights_2
						bomb_sights_1
					}
				}
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			large_bomb_bay
			engine_4_4x
			cannon_defense_turret_2x
			hmg_defense_turret_2x
		}
	}

	strat_bomber_4_default = {
		priority = {
			factor = 10
			modifier = { 
				not = { has_tech = modern_large_airframe }
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 4000
			type = large_plane_airframe
			modules = {
				fixed_main_weapon_slot = large_bomb_bay
				fixed_auxiliary_weapon_slot_1 = large_bomb_bay
				fixed_auxiliary_weapon_slot_2 = large_bomb_bay
				engine_type_slot = {
					any_of = { 
						jet_engine_improved_centrifugal_4x
						jet_engine_centrifugal_4x
						jet_engine_axial_4x
						jet_engine_6x
					}
				}
				special_type_slot_1 = {
					any_of = {
						cannon_defense_turret_2x
						hmg_defense_turret_2x
						lmg_defense_turret_2x
					}
				}
				special_type_slot_2 = {
					any_of = {
						cannon_defense_turret_2x
						hmg_defense_turret_2x
						lmg_defense_turret_2x
					}
				}
				special_type_slot_3 = {
					any_of = {
						bomb_sights_4
						bomb_sights_3
						bomb_sights_2
						bomb_sights_1
					}
				}
				special_type_slot_4 = {
					any_of = {
						air_ground_radar_4
						air_ground_radar_3
						air_ground_radar_2
						air_ground_radar_1
					}
				}
				special_type_slot_5 = {
					any_of = {
						radio_navigation_4
						radio_navigation_3
						radio_navigation_2
						radio_navigation_1
					}
				}
				special_type_slot_6 = {
					any_of = {
						fuel_tanks_large
					}
				}
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			large_bomb_bay
			engine_4_4x
			cannon_defense_turret_2x
			hmg_defense_turret_2x
		}
	}
}

generic_maritime_patrol = {
	category = air

	blocked_for = {GER ENG USA JAP}

	available_for = {}

	roles = {
		air_maritime_patrol
	}

	priority = {
		factor = 200
		modifier = {
			num_of_factories < 50
			factor = 0
		}
		modifier = {
			all_owned_state = {
				is_coastal = no
			}
			factor = 0
		}
	}

	maritime_patrol_1_default = {
		priority = {
			factor = 10
			modifier = { 
				has_tech = improved_large_airframe
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 1000
			type = large_plane_maritime_patrol_plane_airframe_1
			modules = {
				fixed_main_weapon_slot = {
					any_of = { 
						guided_anti_ship_missile_5
						guided_anti_ship_missile_4
						guided_anti_ship_missile_3
						guided_anti_ship_missile_2
						guided_anti_ship_missile
						torpedo_mounting_3
						torpedo_mounting_2
						torpedo_mounting
					}
				}
				fixed_auxiliary_weapon_slot_1 = empty
				fixed_auxiliary_weapon_slot_2 = empty
				engine_type_slot = engine_1_4x
				special_type_slot_1 = lmg_defense_turret_2x
				special_type_slot_2 = fuel_tanks_large
				special_type_slot_3 = flying_boat_large
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			torpedo_mounting
			engine_1_4x
			fuel_tanks_large
			flying_boat_large
			lmg_defense_turret
		}
	}

	maritime_patrol_2_default = {
		priority = {
			factor = 10
			modifier = { 
				has_tech = advanced_large_airframe
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 2000
			type = large_plane_maritime_patrol_plane_airframe_2
			modules = {
				fixed_main_weapon_slot = {
					any_of = { 
						guided_anti_ship_missile_5
						guided_anti_ship_missile_4
						guided_anti_ship_missile_3
						guided_anti_ship_missile_2
						guided_anti_ship_missile
						torpedo_mounting_3
						torpedo_mounting_2
						torpedo_mounting
					}
				}
				fixed_auxiliary_weapon_slot_1 = {
					any_of = { 
						guided_anti_ship_missile_5
						guided_anti_ship_missile_4
						guided_anti_ship_missile_3
						guided_anti_ship_missile_2
						guided_anti_ship_missile
						torpedo_mounting_3
						torpedo_mounting_2
						torpedo_mounting
					}
				}
				fixed_auxiliary_weapon_slot_2 = empty
				engine_type_slot = engine_2_4x
				special_type_slot_1 = hmg_defense_turret_2x
				special_type_slot_2 = lmg_defense_turret_2x
				special_type_slot_3 = fuel_tanks_large
				special_type_slot_4 = flying_boat_large
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			torpedo_mounting
			engine_2_4x
			hmg_defense_turret_2x
			lmg_defense_turret_2x
			fuel_tanks_large
			flying_boat_large
		}
	}

	maritime_patrol_3_default = {
		priority = {
			factor = 10
			modifier = { 
				has_tech = modern_large_airframe
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 4000
			type = large_plane_maritime_patrol_plane_airframe_3
			modules = {
				fixed_main_weapon_slot = {
					any_of = { 
						guided_anti_ship_missile_5
						guided_anti_ship_missile_4
						guided_anti_ship_missile_3
						guided_anti_ship_missile_2
						guided_anti_ship_missile
						torpedo_mounting_3
						torpedo_mounting_2
						torpedo_mounting
					}
				}
				fixed_auxiliary_weapon_slot_1 = {
					any_of = { 
						guided_anti_ship_missile_5
						guided_anti_ship_missile_4
						guided_anti_ship_missile_3
						guided_anti_ship_missile_2
						guided_anti_ship_missile
						torpedo_mounting_3
						torpedo_mounting_2
						torpedo_mounting
					}
				}
				fixed_auxiliary_weapon_slot_2 = {
					any_of = { 
						guided_anti_ship_missile_5
						guided_anti_ship_missile_4
						guided_anti_ship_missile_3
						guided_anti_ship_missile_2
						guided_anti_ship_missile
						torpedo_mounting_3
						torpedo_mounting_2
						torpedo_mounting
					}
				}
				engine_type_slot = engine_4_4x
				special_type_slot_1 = cannon_defense_turret_2x
				special_type_slot_2 = { 
					any_of = {
						air_ground_radar_4
						air_ground_radar_3
						air_ground_radar_2
						air_ground_radar_1
						recon_camera
						hmg_defense_turret_2x 
					}
				}
				special_type_slot_3 = fuel_tanks_large
				special_type_slot_4 = flying_boat_large
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			torpedo_mounting
			engine_4_4x
			cannon_defense_turret_2x
			hmg_defense_turret_2x
			air_ground_radar_2
			air_ground_radar_1
			recon_camera
			fuel_tanks_large
			flying_boat_large
		}
	}

	maritime_patrol_4_default = {
		priority = {
			factor = 10
			modifier = { 
				not = { has_tech = modern_large_airframe }
				factor = 0 #let's not waste XP here
			}
		}

		history = yes
		target_variant = {
			match_value = 4000
			type = large_plane_maritime_patrol_plane_airframe_3
			modules = {
				fixed_main_weapon_slot = {
					any_of = { 
						guided_anti_ship_missile_5
						guided_anti_ship_missile_4
						guided_anti_ship_missile_3
						guided_anti_ship_missile_2
						guided_anti_ship_missile
						torpedo_mounting_3
						torpedo_mounting_2
						torpedo_mounting
					}
				}
				fixed_auxiliary_weapon_slot_1 = {
					any_of = { 
						guided_anti_ship_missile_5
						guided_anti_ship_missile_4
						guided_anti_ship_missile_3
						guided_anti_ship_missile_2
						guided_anti_ship_missile
						torpedo_mounting_3
						torpedo_mounting_2
						torpedo_mounting
					}
				}
				fixed_auxiliary_weapon_slot_2 = {
					any_of = { 
						guided_anti_ship_missile_5
						guided_anti_ship_missile_4
						guided_anti_ship_missile_3
						guided_anti_ship_missile_2
						guided_anti_ship_missile
						torpedo_mounting_3
						torpedo_mounting_2
						torpedo_mounting
					}
				}
				fixed_auxiliary_weapon_slot_3 = {
					any_of = { 
						plane_sonobuoy_1
					}
				}
				fixed_auxiliary_weapon_slot_4 = {
					any_of = { 
						plane_sonobuoy_1
					}
				}
				engine_type_slot = {
					any_of = { 
						jet_engine_improved_centrifugal_4x
						jet_engine_centrifugal_4x
						jet_engine_axial_4x
						jet_engine_6x
					}
				}
				special_type_slot_1 = {
					any_of = {
						cannon_defense_turret_2x
						hmg_defense_turret_2x
						lmg_defense_turret_2x
					}
				}
				special_type_slot_2 = { 
					any_of = {
						air_ground_radar_4
						air_ground_radar_3
						air_ground_radar_2
						air_ground_radar_1
					}
				}
				special_type_slot_3 = fuel_tanks_large
				special_type_slot_4 = flying_boat_large
				special_type_slot_5 = fuel_tanks_large
				special_type_slot_6 = { 
					any_of = {
						plane_mad_3
						plane_mad_2
						plane_mad_1
					}
				}
			}
			upgrades = {
				plane_AT_reliability_upgrade = 100
			}
		}

		allowed_modules = {
			torpedo_mounting
			engine_4_4x
			cannon_defense_turret_2x
			hmg_defense_turret_2x
			air_ground_radar_2
			air_ground_radar_1
			recon_camera
			fuel_tanks_large
			flying_boat_large
		}
	}
}

