



SOV_better_tactical_bomber = {
	category = air

	available_for = { SOV }

	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
			}
		}

		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	
			}
			
		}

		allowed_modules = {
			medium_bomb_bay
			engine_1_2x
			
		}
	}

	tac_bomber_1_default = {
		priority = {
			factor = 100
	
		}

		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	
			}
			
		}

		allowed_modules = {
			medium_bomb_bay
			engine_2_2x
		}
	}
	tac_bomber_2_default = {
		priority = {
			factor = 100
	
		}

		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 = lmg_defense_turret_2x
				special_type_slot_2 = empty	
			}
			
		}

		allowed_modules = {
			medium_bomb_bay
			bomb_locks
			engine_3_2x
			lmg_defense_turret_2x
		}
	}

	tac_bomber_3_default = {
		priority = {
			factor = 100
		}

		target_variant = {
			match_value = 4000
			type = medium_plane_airframe_3
			modules = {
				fixed_main_weapon_slot = medium_bomb_bay
				fixed_auxiliary_weapon_slot_1 = heavy_bomb_locks
				fixed_auxiliary_weapon_slot_2 = heavy_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	
			}
			
		}

		allowed_modules = {
			medium_bomb_bay
			heavy_bomb_locks
			bomb_locks
			torpedo_mounting
			engine_4_2x
			lmg_defense_turret_2x
		}
	}
	jet_tac_bomber_default = {
		priority = {
			factor = 100
		}

		target_variant = {
			match_value = 4000
			type = medium_plane_airframe_4
			modules = {
				fixed_main_weapon_slot = medium_bomb_bay
				fixed_auxiliary_weapon_slot_1 = heavy_bomb_locks
				fixed_auxiliary_weapon_slot_2 = heavy_bomb_locks
				fixed_auxiliary_weapon_slot_3 = torpedo_mounting
				engine_type_slot = engine_4_3x
				special_type_slot_1 = fuel_tanks_medium
				special_type_slot_2 = empty	
			}
			
		}

		allowed_modules = {
			medium_bomb_bay
			bomb_locks
			heavy_bomb_locks
			fuel_tanks_medium
			torpedo_mounting
			jet_engine_2x
			engine_4_3x
		}
	}
}

SOV_better_cas = {
	category = air

	available_for = { SOV }

	roles = {
		air_cas
	}

	priority = {
		factor = 100
	}

	priority = {
		factor = 100
	}
	cas_0 = { #Hs 123
		priority = {
			factor = 10
			modifier = { 
				has_tech = basic_small_airframe
				factor = 0 #let's not waste XP here
			}
		}

		target_variant = {
			match_value = 500
			type = small_plane_cas_airframe_0
			modules = {
				fixed_main_weapon_slot = bomb_locks
				fixed_auxiliary_weapon_slot_1 = empty
				engine_type_slot = engine_1_1x
				special_type_slot_1 = empty
				special_type_slot_2 = empty
			}
			
		}

		allowed_modules = {
			bomb_locks
			engine_1_1x
			armor_plate_small
			fuel_tanks_small
		}
	}
	cas_1 = {
		priority = {
			factor = 100	
		}
		target_variant = {
			match_value = 1000
			type = small_plane_cas_airframe_1
			modules = {
				fixed_main_weapon_slot = bomb_locks
				fixed_auxiliary_weapon_slot_1 = bomb_locks
				engine_type_slot = engine_2_1x
				special_type_slot_1 = armor_plate_small
				special_type_slot_2 = fuel_tanks_small	
			}
			
		}

		allowed_modules = {
			bomb_locks
			engine_2_1x
			armor_plate_small
			fuel_tanks_small
		}
	}
	cas_2 = {
		priority = {
			factor = 200
			modifier = { 
				has_tech = heavy_bombs
				factor = 0 #let's not waste XP here
			}
		}
		target_variant = {
			match_value = 1500
			type = small_plane_cas_airframe_2
			modules = {
				fixed_main_weapon_slot = bomb_locks
				fixed_auxiliary_weapon_slot_1 = bomb_locks
				engine_type_slot = engine_2_1x
				special_type_slot_1 = armor_plate_small
				special_type_slot_2 = fuel_tanks_small
			}
		}
		allowed_modules = {
			small_bomb_bay
			bomb_locks
			engine_2_2x
			armor_plate_small
			fuel_tanks_small
		}
	}
	cas_2_improved = {
		priority = {
			factor = 200
			modifier = { 
				NOT = { has_tech = heavy_bombs }
				factor = 0 #let's not waste XP here
			}
		}
		target_variant = {
			match_value = 1500
			type = small_plane_cas_airframe_2
			modules = {
				fixed_main_weapon_slot = heavy_bomb_locks
				fixed_auxiliary_weapon_slot_1 = heavy_bomb_locks
				fixed_auxiliary_weapon_slot_2 = bomb_locks
				engine_type_slot = engine_3_1x	
				special_type_slot_1 = fuel_tanks_small	
				special_type_slot_2 = self_sealing_fuel_tanks_small
			}
		}
		allowed_modules = {
			small_bomb_bay
			bomb_locks
			engine_2_2x
			armor_plate_small
			engine_3_1x
			fuel_tanks_small
			heavy_bomb_locks
		}
	}
	cas_3 = {
		priority = {
			factor = 200
		}
		target_variant = {
			match_value = 2500
			type = small_plane_cas_airframe_3
			modules = {
				fixed_main_weapon_slot = heavy_bomb_locks
				fixed_auxiliary_weapon_slot_1 = heavy_bomb_locks
				fixed_auxiliary_weapon_slot_2 = heavy_bomb_locks
				engine_type_slot = engine_4_1x	
				special_type_slot_1 = fuel_tanks_small	
				special_type_slot_2 = fuel_tanks_small		
				special_type_slot_3 = self_sealing_fuel_tanks_small	
			}
		}

		allowed_modules = {
			bomb_locks
			dive_brakes_small	
			heavy_bomb_locks
			engine_3_1x
			engine_4_1x
			self_sealing_fuel_tanks_small	
			fuel_tanks_small	
		}
	}
}

SOV_fighter = {
	category = air

	available_for = {SOV}

	roles = {
		air_fighter
	}

	priority = {
		factor = 20000
	}

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

		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	
			}
		}

		allowed_modules = {
			engine_1_1x
			light_mg_4x
		}
	}

	basic_fighter_default = {
		priority = {
			factor = 2000
		}

		target_variant = {
			match_value = 2000
			type = small_plane_airframe_1
			modules = {
				fixed_main_weapon_slot = aircraft_cannon_1_2x
				fixed_auxiliary_weapon_slot_1 = aircraft_cannon_1_1x
				engine_type_slot = engine_2_1x
				special_type_slot_1 = empty
				special_type_slot_2 = empty	
			}
		}

		allowed_modules = {
			light_mg_4x
			heavy_mg_4x
			aircraft_cannon_1_1x
			aircraft_cannon_1_2x
			engine_2_1x
			armor_plate_small
		}
	}

	improved_fighter_default = {
		priority = {
			factor = 5000
			modifier = { 
				has_tech = advanced_small_airframe 
				factor = 0 
			}
			modifier = { 
				OR = {
					has_tech = aa_hmg
					has_country_flag = plane_licensed_SOV
				}
				factor = 0
			}
		}

		target_variant = {
			match_value = 3000
			type = small_plane_airframe_2
			modules = {
				fixed_main_weapon_slot = aircraft_cannon_1_2x
				fixed_auxiliary_weapon_slot_1 = aircraft_cannon_1_2x
				fixed_auxiliary_weapon_slot_2 = aircraft_cannon_1_1x
				engine_type_slot = engine_3_1x
				special_type_slot_1 = armor_plate_small
				special_type_slot_2 = drop_tanks
				special_type_slot_3 = empty
			}
		}

		allowed_modules = {
			heavy_mg_4x
			aircraft_cannon_1_2x
			engine_3_1x
			armor_plate_small
			fuel_tanks_small
			self_sealing_fuel_tanks_small
			drop_tanks
		}
	}

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

		target_variant = {
			match_value = 3000
			type = small_plane_airframe_2
			modules = {
				fixed_main_weapon_slot = heavy_mg_4x
				fixed_auxiliary_weapon_slot_1 = heavy_mg_4x
				fixed_auxiliary_weapon_slot_2 = heavy_mg_4x
				engine_type_slot = engine_3_1x
				special_type_slot_1 = armor_plate_small
				special_type_slot_2 = drop_tanks
				special_type_slot_3 = empty
			}
		}

		allowed_modules = {
			light_mg_4x
			heavy_mg_4x
			aircraft_cannon_1_2x
			aircraft_cannon_1_1x
			engine_3_1x
			armor_plate_small
			drop_tanks
			fuel_tanks_small
			self_sealing_fuel_tanks_small
		}
	}

	advanced_fighter_default = {
		priority = {
			factor = 25000
			modifier = { 
				has_tech = aa_cannon_3
				factor = 0 
			}
		}

		target_variant = {
			match_value = 4000
			type = small_plane_airframe_3
			modules = {
				fixed_main_weapon_slot = heavy_mg_4x
				fixed_auxiliary_weapon_slot_1 = heavy_mg_4x
				fixed_auxiliary_weapon_slot_2 = heavy_mg_4x
				engine_type_slot = engine_4_1x
				special_type_slot_1 = armor_plate_small
				special_type_slot_2 = self_sealing_fuel_tanks_small
				special_type_slot_3 = fuel_tanks_small	
				special_type_slot_4 = fuel_tanks_small	
			}
		}

		allowed_modules = { 
			aircraft_cannon_1_2x
			aircraft_cannon_2_2x
			heavy_mg_4x
			engine_4_1x
			armor_plate_small
			fuel_tanks_small
			self_sealing_fuel_tanks_small
		}
	}

	advanced_fighter_improved = {
		priority = {
			factor = 0
			modifier = { 
				has_tech = aa_cannon_3
				add = 100 
			}
			modifier = { 
				has_resources_in_country = {
					resource = rubber
					amount > 50
				}
				date > 1944.1.1
				add = 100
			}
			modifier = { 
				has_deployed_air_force_size = {
					size > 4999 #the sky is still ours????
					type = fighter
				}
				OR = {
					NOT = { has_war_with = MAL }
					NOT = { has_war_with = INS }
					NOT = { has_war_with = VIN }
				}
				date > 1945.3.1
				add = 100
			}
		}

		target_variant = {
			match_value = 4000
			type = small_plane_airframe_3
			modules = {
				fixed_main_weapon_slot = aircraft_cannon_2_2x
				fixed_auxiliary_weapon_slot_1 = aircraft_cannon_2_2x
				fixed_auxiliary_weapon_slot_2 = aircraft_cannon_2_2x
				engine_type_slot = engine_4_1x
				special_type_slot_1 = armor_plate_small
				special_type_slot_2 = self_sealing_fuel_tanks_small	
				special_type_slot_3 = fuel_tanks_small	
				special_type_slot_4 = fuel_tanks_small	
			}
		}

		allowed_modules = { 
			aircraft_cannon_1_2x
			aircraft_cannon_2_2x
			heavy_mg_4x
			engine_4_1x
			armor_plate_small
			fuel_tanks_small
			self_sealing_fuel_tanks_small
		}
	}

	jet_fighter_default = {
		priority = {
			factor = 10
			modifier = { 
				has_tech = aa_cannon_3
				factor = 0 
			}
		}

		target_variant = {
			match_value = 4000
			type = small_plane_airframe_4
			modules = {
				fixed_main_weapon_slot = heavy_mg_4x
				fixed_auxiliary_weapon_slot_1 = heavy_mg_4x
				fixed_auxiliary_weapon_slot_2 = heavy_mg_4x
				fixed_auxiliary_weapon_slot_3 = heavy_mg_4x
				engine_type_slot = jet_engine_2x
				special_type_slot_1 = armor_plate_small
				special_type_slot_2 = self_sealing_fuel_tanks_small	
				special_type_slot_3 = fuel_tanks_small		
				special_type_slot_4 = fuel_tanks_small	
			}
		}

		allowed_modules = { 
			aircraft_cannon_1_2x
			aircraft_cannon_2_2x
			heavy_mg_4x
			jet_engine_2x
			engine_4_1x
			armor_plate_small
			fuel_tanks_small
			self_sealing_fuel_tanks_small
		}
	}

	jet_fighter_improved = {
		priority = {
			factor = 10
			modifier = { 
				has_deployed_air_force_size = {
					size > 8999 #the sky is still ours????
					type = fighter
				}
				OR = {
					NOT = { has_war_with = MAL }
					NOT = { has_war_with = INS }
					NOT = { has_war_with = VIN }
				}
				date > 1945.3.1
				add = 100
			}
			modifier = { 
				has_tech = aa_cannon_3
				add = 200
			}
			modifier = {
				num_of_military_factories > 400
				add = -500
			}
		}

		target_variant = {
			match_value = 4000
			type = small_plane_airframe_4
			modules = {
				fixed_main_weapon_slot = aircraft_cannon_2_2x
				fixed_auxiliary_weapon_slot_1 = aircraft_cannon_2_2x
				fixed_auxiliary_weapon_slot_2 = aircraft_cannon_2_2x
				engine_type_slot = engine_4_1x
				special_type_slot_1 = armor_plate_small
				special_type_slot_2 = self_sealing_fuel_tanks_small	
				special_type_slot_3 = fuel_tanks_small	
				special_type_slot_4 = fuel_tanks_small	
			}
		}

		allowed_modules = { 
			aircraft_cannon_1_2x
			aircraft_cannon_2_2x
			heavy_mg_4x
			jet_engine_2x
			engine_4_1x
			armor_plate_small
			fuel_tanks_small
			self_sealing_fuel_tanks_small
		}
	}

	jet_fighter_improved_we_are_god = {
		priority = {
			factor = 0
			modifier = {
				num_of_military_factories > 400 
				has_tech = aa_cannon_3
				add = 1000
			}
		}

		target_variant = {
			match_value = 4000
			type = small_plane_airframe_4
			modules = {
				fixed_main_weapon_slot = aircraft_cannon_2_2x
				fixed_auxiliary_weapon_slot_1 = aircraft_cannon_2_2x
				fixed_auxiliary_weapon_slot_2 = heavy_mg_4x
				fixed_auxiliary_weapon_slot_3 = heavy_mg_4x
				engine_type_slot = engine_4_2x
				special_type_slot_1 = armor_plate_small
				special_type_slot_2 = self_sealing_fuel_tanks_small	
				special_type_slot_3 = fuel_tanks_small
				special_type_slot_4 = armor_plate_small
			}
		}

		allowed_modules = { 
			aircraft_cannon_1_2x
			aircraft_cannon_2_2x
			heavy_mg_4x
			jet_engine_2x
			engine_4_2x
			armor_plate_small
			fuel_tanks_small
			self_sealing_fuel_tanks_small
		}
	}
}

SOV_strategic_bomber = {
	category = air

	available_for = {SOV}

	roles = {
		air_strategic_bomber
	}

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

	strat_bomber_1_default = {
		priority = {
			factor = 100
		}

		target_variant = {
			match_value = 1000
			type = large_plane_airframe_1
			modules = {
				fixed_main_weapon_slot = large_bomb_bay
				fixed_auxiliary_weapon_slot_1 = large_bomb_bay
				fixed_auxiliary_weapon_slot_2 = large_bomb_bay
				fixed_auxiliary_weapon_slot_3 = empty
				engine_type_slot = engine_4_6x
				special_type_slot_1 = fuel_tanks_large
				special_type_slot_2 = fuel_tanks_large
				special_type_slot_3 = fuel_tanks_large
				special_type_slot_4 = fuel_tanks_large
				special_type_slot_5 = fuel_tanks_large
			}
			
		}

		allowed_modules = {
			engine_3_6x
			large_bomb_bay
			engine_3_4x
			air_ground_radar_2
			air_ground_radar_1
			fuel_tanks_large
			bomb_sights_2
			bomb_sights_1
			cannon_defense_turret_2x
			hmg_defense_turret_2x
			radio_navigation_1
			radio_navigation_2
			air_ground_radar_1
			air_ground_radar_2
			hmg_defense_turret_2x
			cannon_defense_turret
		}
	}

	strat_bomber_2_default = {
		priority = {
			factor = 100
		}

		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 = large_bomb_bay
				fixed_auxiliary_weapon_slot_3 = empty
				fixed_auxiliary_weapon_slot_4 = empty
				engine_type_slot = engine_4_6x
				special_type_slot_1 = fuel_tanks_large
				special_type_slot_2 = fuel_tanks_large
				special_type_slot_3 = fuel_tanks_large
				special_type_slot_4 = fuel_tanks_large
				special_type_slot_5 = fuel_tanks_large
				special_type_slot_6 = fuel_tanks_large
			}
			
		}

		allowed_modules = {
			engine_3_6x
			large_bomb_bay
			engine_4_4x
			air_ground_radar_2
			air_ground_radar_1
			fuel_tanks_large
			bomb_sights_2
			bomb_sights_1
			cannon_defense_turret_2x
			hmg_defense_turret_2x
			radio_navigation_1
			radio_navigation_2
			air_ground_radar_1
			air_ground_radar_2
			hmg_defense_turret_2x
			cannon_defense_turret
		}
	}

	strat_bomber_3_default = {
		priority = {
			factor = 10
		}

		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
				fixed_auxiliary_weapon_slot_3 = empty
				fixed_auxiliary_weapon_slot_4 = empty
				engine_type_slot = engine_4_6x
				special_type_slot_1 = fuel_tanks_large
				special_type_slot_2 = fuel_tanks_large
				special_type_slot_3 = fuel_tanks_large
				special_type_slot_4 = fuel_tanks_large
				special_type_slot_5 = fuel_tanks_large
				special_type_slot_6 = fuel_tanks_large
			}
			
		}

		allowed_modules = {
			engine_3_6x
			large_bomb_bay
			engine_4_4x
			air_ground_radar_2
			air_ground_radar_1
			fuel_tanks_large
			bomb_sights_2
			bomb_sights_1
			cannon_defense_turret_2x
			hmg_defense_turret_2x
			radio_navigation_1
			radio_navigation_2
			air_ground_radar_1
			air_ground_radar_2
			hmg_defense_turret_2x
			cannon_defense_turret
		}
	}
}
