technologies = {

	# MM: This constants are here because I am not a **** savage
	@transport_plane_x = 1
	@mothership_x_bba = 3
	@mothership_x = 3

	bba_early_transport_plane = {

		enable_equipments = {
			transport_plane_equipment_1
		}
	
		path = {
			leads_to_tech = bba_improved_transport_plane
			research_cost_coeff = 1
		}
		
		research_cost = 2
		start_year = 1933

		folder = {
			name = bba_air_techs_folder
			position = { x = @transport_plane_x y = 2 } 
		}
		
		categories = {
			air_equipment
			transport_planes_cat
		}
		special_project_specialization = { specialization_air }
		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 1 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				set_temp_variable = { EAI_tmp_research_factor = 0 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:bba_early_transport_plane } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:bba_early_transport_plane } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:bba_early_transport_plane } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}

	bba_improved_transport_plane = {

		enable_equipments = {
			transport_plane_equipment_2
		}
	
		path = {
			leads_to_tech = bba_strategic_airlifter
			research_cost_coeff = 1
		}
		
		research_cost = 2
		start_year = 1940
		
		folder = {
			name = bba_air_techs_folder
			position = { x = @transport_plane_x y = 6 } 
		}
		
		categories = {
			air_equipment
			transport_planes_cat
		}
		special_project_specialization = { specialization_air }
		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 1 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				set_temp_variable = { EAI_tmp_research_factor = 0 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:bba_improved_transport_plane } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:bba_improved_transport_plane } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:bba_improved_transport_plane } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}

	bba_strategic_airlifter = {

		enable_equipments = {
			transport_plane_equipment_3
		}
		
		research_cost = 2
		start_year = 1945
		
		folder = {
			name = bba_air_techs_folder
			position = { x = @transport_plane_x y = 12 } 
		}
		
		categories = {
			air_equipment
			transport_planes_cat
		}
		special_project_specialization = { specialization_air }
		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 1 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				set_temp_variable = { EAI_tmp_research_factor = 0 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:bba_strategic_airlifter } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:bba_strategic_airlifter } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:bba_strategic_airlifter } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}
	
	iw_small_airframe = {

		enable_equipments = {
			small_plane_airframe_0
			small_plane_cas_airframe_0
			small_plane_naval_bomber_airframe_0
			small_plane_suicide_airframe_0
			cv_small_plane_airframe_0
			cv_small_plane_cas_airframe_0
			cv_small_plane_naval_bomber_airframe_0
			cv_small_plane_suicide_airframe_0
		}
		
	
		path = {
			leads_to_tech = basic_small_airframe
			research_cost_coeff = 1
		}
		
		
		research_cost = 2
		start_year = 1926
		folder = {
			name = bba_air_techs_folder
			position = { x = 0 y = 2 }
		}
		
		categories = {
			light_air
			light_fighter
			cas_bomber
			naval_air
			naval_bomber
			air_equipment
			mio_cat_all_light_fighter_and_modules
			mio_cat_all_cas_and_modules
			mio_cat_all_naval_bomber_and_modules
			mio_cat_all_light_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }

		
		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 1 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				if = { 
					limit = { 
						EAI_FTR_tech_focus = yes
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 20 }
				}

				if = { 
					limit = { 
						EAI_FTR_tech_focus = yes 
						OR = { is_major = yes num_of_military_factories > 25 date > 1940.1.1 }
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 30 }
				}

				if = { 
					limit = { 
						NOT = { EAI_FTR_tech_focus = yes } 
						EAI_major_country = yes
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 5 }
				}

				if = { 
					limit = { 
						NOT = { EAI_FTR_tech_focus = yes } 
						date > 1941.1.1
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 2 }
				}

				if = { 
					limit = { 
						NOT = { EAI_FTR_tech_focus = yes } 
						num_of_military_factories > 25
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 10 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							date < 1936.1.7
						}
						else = { 
							
							date < 1936.1.7
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 
							
							AND = {
								NOT = { EAI_FTR_tech_focus = yes EAI_CAS_tech_focus = yes EAI_NAV_tech_focus = yes EAI_CV_tech_focus = yes }
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:iw_small_airframe } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:iw_small_airframe } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:iw_small_airframe } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}
	
	
	
	basic_small_airframe = {

		enable_equipments = {
			small_plane_airframe_1
			small_plane_cas_airframe_1
			small_plane_naval_bomber_airframe_1
			small_plane_suicide_airframe_1
			cv_small_plane_airframe_1
			cv_small_plane_cas_airframe_1
			cv_small_plane_naval_bomber_airframe_1
			cv_small_plane_suicide_airframe_1
		}
	
		path = {
			leads_to_tech = improved_small_airframe
			research_cost_coeff = 1
		}
		
		research_cost = 2
		start_year = 1936

		folder = {
			name = bba_air_techs_folder
			position = { x = 0 y = 4 }
		}
		
		categories = {
			light_air
			light_fighter
			cas_bomber
			naval_air
			naval_bomber
			air_equipment
			mio_cat_all_light_fighter_and_modules
			mio_cat_all_cas_and_modules
			mio_cat_all_naval_bomber_and_modules
			mio_cat_all_light_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }
		
		
		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 20 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				if = { 
					limit = { 
						EAI_FTR_tech_focus = yes
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 20 }
				}

				if = { 
					limit = { 
						EAI_FTR_tech_focus = yes 
						OR = { is_major = yes num_of_military_factories > 25 date > 1940.1.1 }
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 30 }
				}

				if = { 
					limit = { 
						NOT = { EAI_FTR_tech_focus = yes } 
						EAI_major_country = yes
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 5 }
				}

				if = { 
					limit = { 
						NOT = { EAI_FTR_tech_focus = yes } 
						date > 1941.1.1
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 2 }
				}

				if = { 
					limit = { 
						NOT = { EAI_FTR_tech_focus = yes } 
						num_of_military_factories > 25
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 10 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							date < 1936.1.7
						}
						else = { 
							
							date < 1936.1.7
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 
							
							AND = {
								NOT = { EAI_FTR_tech_focus = yes EAI_CAS_tech_focus = yes EAI_NAV_tech_focus = yes EAI_CV_tech_focus = yes }
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:basic_small_airframe } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:basic_small_airframe } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:basic_small_airframe } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}
	
	
	
	improved_small_airframe = {

		enable_equipments = {
			small_plane_airframe_2
			small_plane_cas_airframe_2
			small_plane_naval_bomber_airframe_2
			small_plane_suicide_airframe_2
			cv_small_plane_airframe_2
			cv_small_plane_cas_airframe_2
			cv_small_plane_naval_bomber_airframe_2
			cv_small_plane_suicide_airframe_2
		}
	
		path = {
			leads_to_tech = advanced_small_airframe
			research_cost_coeff = 1
		}
		on_research_complete = {
			custom_effect_tooltip = {
				localization_key = SP_UNLOCK_PROJECT
				PROJECT = sp_air_jet_engine	
			}
			
		}				

		research_cost = 2
		start_year = 1940
		folder = {
			name = bba_air_techs_folder
			position = { x = 0 y = 6 }
		}
		
		categories = {
			light_air
			light_fighter
			cas_bomber
			naval_air
			naval_bomber
			air_equipment
			mio_cat_all_light_fighter_and_modules
			mio_cat_all_cas_and_modules
			mio_cat_all_naval_bomber_and_modules
			mio_cat_all_light_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }

		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 1 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				if = { 
					limit = { 
						EAI_FTR_tech_focus = yes
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 20 }
				}

				if = { 
					limit = { 
						EAI_FTR_tech_focus = yes 
						OR = { is_major = yes num_of_military_factories > 25 date > 1940.1.1 }
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 30 }
				}

				if = { 
					limit = { 
						NOT = { EAI_FTR_tech_focus = yes } 
						EAI_major_country = yes
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 5 }
				}

				if = { 
					limit = { 
						NOT = { EAI_FTR_tech_focus = yes } 
						date > 1941.1.1
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 2 }
				}

				if = { 
					limit = { 
						NOT = { EAI_FTR_tech_focus = yes } 
						num_of_military_factories > 25
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 10 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							if = { limit = { EAI_fighter_tech_bonus = yes }

								date < 1937.6.1
							}
							else = { 
								
								date < 1938.6.1
							}
						}
						else = { 
							
							if = { limit = { EAI_fighter_tech_bonus = yes }

								date < 1938.1.1
							}
							else = { 
								
								date < 1939.1.1
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 
							
							AND = {
								NOT = { EAI_FTR_tech_focus = yes EAI_CAS_tech_focus = yes EAI_NAV_tech_focus = yes EAI_CV_tech_focus = yes }
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:improved_small_airframe } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:improved_small_airframe } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:improved_small_airframe } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}
	
	advanced_small_airframe = {

		enable_equipments = {
			small_plane_airframe_3
			small_plane_cas_airframe_3
			small_plane_naval_bomber_airframe_3
			small_plane_suicide_airframe_3
			cv_small_plane_airframe_3
			cv_small_plane_cas_airframe_3
			cv_small_plane_naval_bomber_airframe_3
			cv_small_plane_suicide_airframe_3
		}
		
		path = {
			leads_to_tech = modern_small_airframe
			research_cost_coeff = 1
		}
		on_research_complete = {
			custom_effect_tooltip = {
				localization_key = SP_UNLOCK_PROJECT
				PROJECT = sp_air_axial_jet_engine	
			}
		}		
		research_cost = 2
		start_year = 1944

		folder = {
			name = bba_air_techs_folder
			position = { x = 0 y = 8 }
		}
		
		categories = {
			light_air
			light_fighter
			cas_bomber
			naval_air
			naval_bomber
			air_equipment
			mio_cat_all_light_fighter_and_modules
			mio_cat_all_cas_and_modules
			mio_cat_all_naval_bomber_and_modules
			mio_cat_all_light_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }
		
		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 1 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				if = { 
					limit = { 
						EAI_FTR_tech_focus = yes
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 20 }
				}

				if = { 
					limit = { 
						EAI_FTR_tech_focus = yes 
						OR = { is_major = yes num_of_military_factories > 25 date > 1940.1.1 }
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 30 }
				}

				if = { 
					limit = { 
						NOT = { EAI_FTR_tech_focus = yes } 
						EAI_major_country = yes
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 5 }
				}

				if = { 
					limit = { 
						NOT = { EAI_FTR_tech_focus = yes } 
						date > 1941.1.1
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 2 }
				}

				if = { 
					limit = { 
						NOT = { EAI_FTR_tech_focus = yes } 
						num_of_military_factories > 25
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 10 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							if = { limit = { EAI_fighter_tech_bonus = yes }

								date < 1941.6.1
							}
							else = { 
								
								date < 1942.6.1
							}
						}
						else = { 
							
							if = { limit = { EAI_fighter_tech_bonus = yes }

								date < 1942.1.1
							}
							else = { 
								
								date < 1943.1.1
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 
							
							AND = {
								NOT = { EAI_FTR_tech_focus = yes EAI_CAS_tech_focus = yes EAI_NAV_tech_focus = yes EAI_CV_tech_focus = yes }
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:advanced_small_airframe } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:advanced_small_airframe } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:advanced_small_airframe } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}
	
	modern_small_airframe = {

		allow = { 	 		
			ROOT = {
				is_special_project_completed = sp:sp_air_axial_jet_engine
			} 
		}

		is_special_project_tech = yes

		enable_equipments = {
			small_plane_airframe_4
			small_plane_cas_airframe_4
			small_plane_naval_bomber_airframe_4
			small_plane_suicide_airframe_4
			cv_small_plane_airframe_4
			cv_small_plane_cas_airframe_4
			cv_small_plane_naval_bomber_airframe_4
			cv_small_plane_suicide_airframe_4
		}

		research_cost = 2
		start_year = 1945

		folder = {
			name = bba_air_techs_folder
			position = { x = 0 y = 12 }
		}
		
		categories = {
			light_air
			light_fighter
			cas_bomber
			air_equipment
			naval_air
			naval_bomber
			jet_technology
			mio_cat_all_light_fighter_and_modules
			mio_cat_all_cas_and_modules
			mio_cat_all_naval_bomber_and_modules
			mio_cat_all_light_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }

		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 1 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				if = { 
					limit = { 
						EAI_FTR_tech_focus = yes
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 20 }
				}

				if = { 
					limit = { 
						EAI_FTR_tech_focus = yes 
						OR = { is_major = yes num_of_military_factories > 25 date > 1940.1.1 }
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 30 }
				}

				if = { 
					limit = { 
						NOT = { EAI_FTR_tech_focus = yes } 
						EAI_major_country = yes
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 5 }
				}

				if = { 
					limit = { 
						NOT = { EAI_FTR_tech_focus = yes } 
						date > 1941.1.1
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 2 }
				}

				if = { 
					limit = { 
						NOT = { EAI_FTR_tech_focus = yes } 
						num_of_military_factories > 25
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 10 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							date < 1944.1.1
						}
						else = { 
							
							date < 1945.1.1
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 
							
							AND = {
								NOT = { EAI_FTR_tech_focus = yes EAI_CAS_tech_focus = yes EAI_NAV_tech_focus = yes EAI_CV_tech_focus = yes }
							}

							AND = {
								EAI_JET_tech_focus = yes
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:modern_small_airframe } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:iw_small_airframe } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:iw_small_airframe } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}

	supersonic_small_airframe = { #supersonic

		allow = { always = no }

		enable_equipments = {
			small_plane_airframe_5
		}
		
		research_cost = 2
		start_year = 1950
		
		categories = {
			light_air
			light_fighter
		}
		special_project_specialization = { specialization_air }

		ai_will_do = {
			factor = 0
		}
	}
	
	iw_medium_airframe = {

		enable_equipments = {
			medium_plane_airframe_0
			medium_plane_fighter_airframe_0
			medium_plane_scout_plane_airframe_0
		}

		path = {
			leads_to_tech = basic_medium_airframe
			research_cost_coeff = 1
		}
		
		research_cost = 2
		start_year = 1926
		folder = {
			name = bba_air_techs_folder
			position = { x = 2 y = 2 }
		}
		
		categories = {
			medium_air
			tactical_bomber
			cat_heavy_fighter
			air_equipment
			mio_cat_all_medium_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }
		
		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 1 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				if = { 
					limit = { 
						EAI_HFTR_tech_focus = yes
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 20 }
				}

				if = { 
					limit = { 
						EAI_HFTR_tech_focus = yes 
						OR = { is_major = yes num_of_military_factories > 25 date > 1940.1.1 }
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 30 }
				}

				if = { 
					limit = { 
						NOT = { EAI_HFTR_tech_focus = yes } 
						EAI_major_country = yes
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 5 }
				}

				if = { 
					limit = { 
						NOT = { EAI_HFTR_tech_focus = yes } 
						date > 1941.1.1
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 2 }
				}

				if = { 
					limit = { 
						NOT = { EAI_HFTR_tech_focus = yes } 
						num_of_military_factories > 25
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 10 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							date < 1936.1.7
						}
						else = { 
							
							date < 1936.1.7
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 
							
							AND = {
								NOT = { EAI_TAC_tech_focus = yes EAI_HFTR_tech_focus = yes }
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:iw_medium_airframe } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:iw_medium_airframe } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:iw_medium_airframe } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}
	
	basic_medium_airframe = {

		enable_equipments = {
			medium_plane_airframe_1
			medium_plane_fighter_airframe_1
			medium_plane_scout_plane_airframe_1
		}
	
		path = {
			leads_to_tech = improved_medium_airframe
			research_cost_coeff = 1
		}

		research_cost = 2
		start_year = 1936

		folder = {
			name = bba_air_techs_folder
			position = { x = 2 y = 4 }
		}
		
		categories = {
			medium_air
			tactical_bomber
			cat_heavy_fighter
			air_equipment
			mio_cat_all_medium_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }
		
		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 1 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				if = { 
					limit = { 
						EAI_HFTR_tech_focus = yes
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 20 }
				}

				if = { 
					limit = { 
						EAI_HFTR_tech_focus = yes 
						OR = { is_major = yes num_of_military_factories > 25 date > 1940.1.1 }
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 30 }
				}

				if = { 
					limit = { 
						NOT = { EAI_HFTR_tech_focus = yes } 
						EAI_major_country = yes
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 5 }
				}

				if = { 
					limit = { 
						NOT = { EAI_HFTR_tech_focus = yes } 
						date > 1941.1.1
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 2 }
				}

				if = { 
					limit = { 
						NOT = { EAI_HFTR_tech_focus = yes } 
						num_of_military_factories > 25
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 10 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							date < 1936.1.7
						}
						else = { 
							
							date < 1936.1.7
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 
							
							AND = {
								NOT = { EAI_TAC_tech_focus = yes EAI_HFTR_tech_focus = yes }
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:basic_medium_airframe } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:basic_medium_airframe } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:basic_medium_airframe } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}
	
	improved_medium_airframe = {

		enable_equipments = {
			medium_plane_airframe_2
			medium_plane_fighter_airframe_2
			medium_plane_scout_plane_airframe_2
		}
	
		path = {
			leads_to_tech = advanced_medium_airframe
			research_cost_coeff = 1
		}
		on_research_complete = {
			custom_effect_tooltip = {
				localization_key = SP_UNLOCK_PROJECT
				PROJECT = sp_air_jet_engine	
			}
		}		
		research_cost = 2
		start_year = 1940
		folder = {
			name = bba_air_techs_folder
			position = { x = 2 y = 6 }
		}
		
		categories = {
			medium_air
			tactical_bomber
			cat_heavy_fighter
			air_equipment
			mio_cat_all_medium_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }
		
		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 1 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				if = { 
					limit = { 
						EAI_HFTR_tech_focus = yes
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 20 }
				}

				if = { 
					limit = { 
						EAI_HFTR_tech_focus = yes 
						OR = { is_major = yes num_of_military_factories > 25 date > 1940.1.1 }
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 30 }
				}

				if = { 
					limit = { 
						NOT = { EAI_HFTR_tech_focus = yes } 
						EAI_major_country = yes
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 5 }
				}

				if = { 
					limit = { 
						NOT = { EAI_HFTR_tech_focus = yes } 
						date > 1941.1.1
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 2 }
				}

				if = { 
					limit = { 
						NOT = { EAI_HFTR_tech_focus = yes } 
						num_of_military_factories > 25
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 10 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							if = { limit = { EAI_HFTR_tech_focus = yes }

								date < 1938.6.1
							}
							else = { 
								
								date < 1939.6.1
							}
						}
						else = { 
							
							if = { limit = { EAI_HFTR_tech_focus = yes }

								date < 1939.1.1
							}
							else = { 
								
								date < 1940.1.1
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 
							
							AND = {
								NOT = { EAI_TAC_tech_focus = yes EAI_HFTR_tech_focus = yes }
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:improved_medium_airframe } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:improved_medium_airframe } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:improved_medium_airframe } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}
	
	advanced_medium_airframe = {

		enable_equipments = {
			medium_plane_airframe_3
			medium_plane_fighter_airframe_3
			medium_plane_scout_plane_airframe_3
		}
		
		path = {
			leads_to_tech = modern_medium_airframe
			research_cost_coeff = 1
		}
		on_research_complete = {
			custom_effect_tooltip = {
				localization_key = SP_UNLOCK_PROJECT
				PROJECT = sp_air_axial_jet_engine	
			}
		}
		research_cost = 2
		start_year = 1944
		folder = {
			name = bba_air_techs_folder
			position = { x = 2 y = 8 }
		}
		
		categories = {
			medium_air
			tactical_bomber
			cat_heavy_fighter
			air_equipment
			mio_cat_all_medium_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }
		
		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 1 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				if = { 
					limit = { 
						EAI_HFTR_tech_focus = yes
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 20 }
				}

				if = { 
					limit = { 
						EAI_HFTR_tech_focus = yes 
						OR = { is_major = yes num_of_military_factories > 25 date > 1940.1.1 }
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 30 }
				}

				if = { 
					limit = { 
						NOT = { EAI_HFTR_tech_focus = yes } 
						EAI_major_country = yes
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 5 }
				}

				if = { 
					limit = { 
						NOT = { EAI_HFTR_tech_focus = yes } 
						date > 1941.1.1
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 2 }
				}

				if = { 
					limit = { 
						NOT = { EAI_HFTR_tech_focus = yes } 
						num_of_military_factories > 25
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 10 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							if = { limit = { EAI_HFTR_tech_focus = yes }

								date < 1942.6.1
							}
							else = { 
								
								date < 1943.6.1
							}
						}
						else = { 
							
							if = { limit = { EAI_HFTR_tech_focus = yes }

								date < 1943.1.1
							}
							else = { 
								
								date < 1944.1.1
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 
							
							AND = {
								NOT = { EAI_TAC_tech_focus = yes EAI_HFTR_tech_focus = yes }
							}

							AND = {
								EAI_FTR_tech_focus = yes NOT = { EAI_HFTR_tech_focus = yes has_tech = advanced_small_airframe is_researching_technology = advanced_small_airframe }
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:advanced_medium_airframe } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:advanced_medium_airframe } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:advanced_medium_airframe } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}
	
	modern_medium_airframe = {

		allow = { 	 		
			ROOT = {
				is_special_project_completed = sp:sp_air_axial_jet_engine
			} 
		}

		is_special_project_tech = yes

		enable_equipments = {
			medium_plane_airframe_4
			medium_plane_fighter_airframe_4
			medium_plane_scout_plane_airframe_4
		}
		
		research_cost = 2
		start_year = 1945
		
		folder = {
			name = bba_air_techs_folder
			position = { x = 2 y = 12 }
		}
		
		categories = {
			medium_air
			jet_technology
			cat_heavy_fighter
			tactical_bomber
			mio_cat_all_medium_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }
		
		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 1 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				if = { 
					limit = { 
						EAI_HFTR_tech_focus = yes
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 20 }
				}

				if = { 
					limit = { 
						EAI_HFTR_tech_focus = yes 
						OR = { is_major = yes num_of_military_factories > 25 date > 1940.1.1 }
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 30 }
				}

				if = { 
					limit = { 
						NOT = { EAI_HFTR_tech_focus = yes } 
						EAI_major_country = yes
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 5 }
				}

				if = { 
					limit = { 
						NOT = { EAI_HFTR_tech_focus = yes } 
						date > 1941.1.1
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 2 }
				}

				if = { 
					limit = { 
						NOT = { EAI_HFTR_tech_focus = yes } 
						num_of_military_factories > 25
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 10 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							if = { limit = { EAI_HFTR_tech_focus = yes }

								date < 1943.6.1
							}
							else = { 
								
								date < 1944.6.1
							}
						}
						else = { 
							
							if = { limit = { EAI_HFTR_tech_focus = yes }

								date < 1944.6.1
							}
							else = { 
								
								date < 1945.1.1
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 
							
							AND = {
								NOT = { EAI_TAC_tech_focus = yes EAI_HFTR_tech_focus = yes }
							}

							AND = {
								EAI_JET_tech_focus = yes
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:modern_medium_airframe } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:modern_medium_airframe } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:modern_medium_airframe } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}

	iw_large_airframe = {

		enable_equipments = {
			large_plane_airframe_0
			large_plane_maritime_patrol_plane_airframe_0
		}
	
		path = {
			leads_to_tech = basic_large_airframe
			research_cost_coeff = 1
		}

		research_cost = 2
		start_year = 1926
		folder = {
			name = bba_air_techs_folder
			position = { x = 0 y = 2 }
		}
		
		categories = {
			heavy_air
			air_equipment
			cat_strategic_bomber
			cat_maritime_patrol
			mio_cat_all_heavy_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }
		
		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 1 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				if = { 
					limit = { 
						date > 1938.1.1
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 150 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							date < 1936.1.7
						}
						else = { 
							
							date < 1936.1.7
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 
							
							AND = {
								NOT = { EAI_STR_tech_focus = yes EAI_MARITIME_tech_focus = yes }
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:iw_large_airframe } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:iw_large_airframe } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:iw_large_airframe } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}
	
	basic_large_airframe = {

		enable_equipments = {
			large_plane_airframe_1
			large_plane_maritime_patrol_plane_airframe_1
		}
	
		path = {
			leads_to_tech = improved_large_airframe
			research_cost_coeff = 1
		}

		research_cost = 2
		start_year = 1936
		folder = {
			name = bba_air_techs_folder
			position = { x = 0 y = 4 }
		}
		
		categories = {
			heavy_air
			air_equipment
			cat_strategic_bomber
			cat_maritime_patrol
			mio_cat_all_heavy_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }
		
		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 100 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				if = { 
					limit = { 
						date > 1938.1.1
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 150 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							date < 1936.1.7
						}
						else = { 
							
							date < 1936.1.7
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 
							
							AND = {
								NOT = { EAI_STR_tech_focus = yes EAI_MARITIME_tech_focus = yes }
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:basic_large_airframe } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:basic_large_airframe } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:basic_large_airframe } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}
	
	improved_large_airframe = {

		on_research_complete = {
			if = {
				limit = { has_dlc = "Gotterdammerung"}
				custom_effect_tooltip = {
					localization_key = SP_UNLOCK_PROJECT
					PROJECT = sp_air_intercontinental_bomber	
				}
				custom_effect_tooltip = {
					localization_key = SP_UNLOCK_PROJECT
					PROJECT = sp_air_mothership_aircraft	
				}						
			}
		}
		enable_equipments = {
			large_plane_airframe_2
			large_plane_maritime_patrol_plane_airframe_2
		}
	
		path = {
			leads_to_tech = advanced_large_airframe
			research_cost_coeff = 1
		}

		path = {
			leads_to_tech = reinforced_wings_mothership
			research_cost_coeff = 1
		}
		
		research_cost = 2
		start_year = 1940
		folder = {
			name = bba_air_techs_folder
			position = { x = 0 y = 6 }
		}
		
		categories = {
			heavy_air
			air_equipment
			cat_strategic_bomber
			cat_maritime_patrol
			mio_cat_all_heavy_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }
		
		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 150 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							date < 1939.6.1
						}
						else = { 
							
							date < 1940.1.1
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 
							
							AND = {
								NOT = { EAI_STR_tech_focus = yes EAI_MARITIME_tech_focus = yes }
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:improved_large_airframe } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:improved_large_airframe } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:improved_large_airframe } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}
	
	advanced_large_airframe = {

		enable_equipments = {
			large_plane_airframe_3
			large_plane_maritime_patrol_plane_airframe_3
		}
		
		path = {
			leads_to_tech = modern_large_airframe
			research_cost_coeff = 1
		}

		research_cost = 2
		start_year = 1944
		folder = {
			name = bba_air_techs_folder
			position = { x = 0 y = 8 }
		}
		
		categories = {
			heavy_air
			air_equipment
			cat_strategic_bomber
			cat_maritime_patrol
			mio_cat_all_heavy_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }
		
		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 150 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							date < 1943.6.1
						}
						else = { 
							
							date < 1944.1.1
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 
							
							AND = {
								NOT = { EAI_STR_tech_focus = yes EAI_MARITIME_tech_focus = yes }
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:advanced_large_airframe } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:advanced_large_airframe } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:advanced_large_airframe } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}
	
	modern_large_airframe = {

		allow = { 	 		
			ROOT = {
				is_special_project_completed = sp:sp_air_axial_jet_engine
			} 
		}

		is_special_project_tech = yes

		enable_equipments = {
			large_plane_airframe_4
			large_plane_maritime_patrol_plane_airframe_4
		}
		
		research_cost = 2
		start_year = 1945

		folder = {
			name = bba_air_techs_folder
			position = { x = 0 y = 12 }
		}
		
		categories = {
			heavy_air
			jet_technology
			cat_strategic_bomber
			cat_maritime_patrol
			mio_cat_all_heavy_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }
		
		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 150 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							date < 1947.6.1
						}
						else = { 
							
							date < 1948.1.1
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 
							
							AND = {
								NOT = { EAI_STR_tech_focus = yes EAI_MARITIME_tech_focus = yes }
							}

							AND = {
								EAI_JET_tech_focus = yes
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:modern_large_airframe } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:modern_large_airframe } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:modern_large_airframe } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}

	early_bombs = {
		enable_equipment_modules = {
					bomb_locks
					small_bomb_bay
					medium_bomb_bay
					large_bomb_bay
		}
			
		research_cost = 1
		start_year = 1922

		folder = {
			name = bba_air_techs_folder
			position = { x = 0 y = 2 }
		}

		path = {
			leads_to_tech = armor_piercing_bombs
			research_cost_coeff = 1
		}




		path = {
			leads_to_tech = heavy_bombs
			research_cost_coeff = 1
		}
		
		categories = {
			air_equipment
			plane_modules_tech
			cat_air_bombs
			mio_cat_all_cas_and_modules
			mio_cat_all_medium_aircraft_and_modules
			mio_cat_all_heavy_aircraft_and_modules
			mio_cat_all_light_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }

		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 20 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				if = { 
					limit = { 
						OR = { is_major = yes num_of_military_factories > 25 }
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 30 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							date < 1936.1.7
						}
						else = { 
							
							date < 1936.1.7
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 
							
							AND = {
								NOT = { EAI_bomb_MODULE_FOCUS = yes }
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:early_bombs } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:early_bombs } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:early_bombs } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}



	heavy_bombs = {
		enable_equipment_modules = {
			heavy_bomb_locks
		}

		on_research_complete = { 
			custom_effect_tooltip = {
				localization_key = SP_UNLOCK_PROJECT
				PROJECT = sp_air_bouncing_bomb
			}
			custom_effect_tooltip = {
				localization_key = SP_UNLOCK_PROJECT
				PROJECT = sp_air_earthshaker_bomb	
			}
		}
			
		research_cost = 1
		start_year = 1940

		folder = {
			name = bba_air_techs_folder
			position = { x = 0 y = 6 }
		}
		
		categories = {
			air_equipment
			plane_modules_tech
			cat_air_bombs
			mio_cat_all_cas_and_modules
			mio_cat_all_medium_aircraft_and_modules
			mio_cat_all_light_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }
		
		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 0 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							date < 1939.6.1
						}
						else = { 
							
							date < 1940.1.1
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:heavy_bombs } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:heavy_bombs } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:heavy_bombs } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}


	armor_piercing_bombs = {
		enable_equipment_modules = {
			armor_piercing_bomb_locks
		}
			
		research_cost = 1
		start_year = 1936

		folder = {
			name = bba_air_techs_folder
			position = { x = 2 y = 2 }
		}
		
		categories = {
			air_equipment
			plane_modules_tech
			cat_air_bombs
			mio_cat_all_cas_and_modules
			mio_cat_all_medium_aircraft_and_modules
			mio_cat_all_light_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }

		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 0 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							date < 1936.6.1
						}
						else = { 
							
							date < 1937.1.1
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:armor_piercing_bombs } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:armor_piercing_bombs } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:armor_piercing_bombs } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}

	photo_reconnaisance = {
		enable_equipment_modules = {
			recon_camera
		}
		
		research_cost = 1
		start_year = 1922

		folder = {
			name = bba_air_techs_folder
			position = { x = 0 y = 2 }
		}

		allow_branch = { has_dlc = "La Resistance" }
		
		categories = {
			air_equipment
			plane_modules_tech
			mio_cat_all_medium_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }
		
		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 0 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							date < 1936.6.1
						}
						else = { 
							
							date < 1937.1.1
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:photo_reconnaisance } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:photo_reconnaisance } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:photo_reconnaisance } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}

	air_torpedoe_1 = {
		enable_equipment_modules = {
			torpedo_mounting
		}
			
		research_cost = 1
		start_year = 1936

		folder = {
			name = bba_air_techs_folder
			position = { x = 0 y = 2 }
		}

		path = {
			leads_to_tech = air_torpedoe_2
			research_cost_coeff = 1
		}
		
		categories = {
			air_equipment
			plane_modules_tech
			cat_air_bombs
			cat_maritime_patrol
			mio_cat_all_naval_bomber_and_modules
			mio_cat_all_medium_aircraft_and_modules
			mio_cat_all_heavy_aircraft_and_modules
			mio_cat_all_light_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }
		
		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 20 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				if = { 
					limit = { 
						OR = { is_major = yes num_of_military_factories > 25 }
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 30 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							date < 1936.1.7
						}
						else = { 
							
							date < 1936.1.7
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 
							
							AND = {
								NOT = { 
									EAI_torpedo_mounting_MODULE_FOCUS = yes 
								}
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:air_torpedoe_1 } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:air_torpedoe_1 } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:air_torpedoe_1 } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}

	air_torpedoe_2 = {
		enable_equipment_modules = {
			torpedo_mounting_2
		}
			
		research_cost = 1
		start_year = 1940

		folder = {
			name = bba_air_techs_folder
			position = { x = 0 y = 6 }
		}

		path = {
			leads_to_tech = air_torpedoe_3
			research_cost_coeff = 1
		}
		
		categories = {
			air_equipment
			plane_modules_tech
			cat_air_bombs
			cat_maritime_patrol
			mio_cat_all_naval_bomber_and_modules
			mio_cat_all_medium_aircraft_and_modules
			mio_cat_all_heavy_aircraft_and_modules
			mio_cat_all_light_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }
		
		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 20 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				if = { 
					limit = { 
						OR = { is_major = yes num_of_military_factories > 25 }
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 30 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							date < 1939.6.1
						}
						else = { 
							
							date < 1940.1.1
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 
							
							AND = {
								NOT = { 
									EAI_torpedo_mounting_MODULE_FOCUS = yes 
								}
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:air_torpedoe_2 } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:air_torpedoe_2 } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:air_torpedoe_2 } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}

	air_torpedoe_3 = {
		enable_equipment_modules = {
			torpedo_mounting_3
		}
			
		research_cost = 1
		start_year = 1944

		folder = {
			name = bba_air_techs_folder
			position = { x = 0 y = 10 }
		}

		categories = {
			air_equipment
			plane_modules_tech
			cat_air_bombs
			cat_maritime_patrol
			mio_cat_all_naval_bomber_and_modules
			mio_cat_all_medium_aircraft_and_modules
			mio_cat_all_heavy_aircraft_and_modules
			mio_cat_all_light_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }
		
		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 20 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				if = { 
					limit = { 
						OR = { is_major = yes num_of_military_factories > 25 }
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 30 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							date < 1943.6.1
						}
						else = { 
							
							date < 1944.1.1
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 
							
							AND = {
								NOT = { 
									EAI_torpedo_mounting_MODULE_FOCUS = yes 
								}
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:air_torpedoe_3 } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:air_torpedoe_3 } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:air_torpedoe_3 } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}

	aa_lmg = {

		enable_equipment_modules = {
			light_mg_2x
			light_mg_4x
			lmg_defense_turret
			lmg_defense_turret_2x
		}
		
		research_cost = 1
		start_year = 1922

		folder = {
			name = bba_air_techs_folder
			position = { x = 0 y = 2 }
		}

		path = {
			leads_to_tech = aa_hmg
			research_cost_coeff = 1
		}

		path = {
			leads_to_tech = aa_cannon_1
			research_cost_coeff = 1
		}

		path = {
			leads_to_tech = survivability_studies
			research_cost_coeff = 1
		}
		
		categories = {
			air_equipment
			plane_modules_tech
			cat_air_guns
			mio_cat_all_light_fighter_and_modules
			mio_cat_all_medium_aircraft_and_modules
			mio_cat_all_heavy_aircraft_and_modules
			mio_cat_all_light_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }

		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 20 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				if = { 
					limit = { 
						OR = { is_major = yes num_of_military_factories > 1 }
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 30 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							date < 1936.1.7
						}
						else = { 
							
							date < 1936.1.7
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 
							
							AND = {
								NOT = { 
									EAI_aa_mg_MODULE_FOCUS = yes 
									EAI_aa_cannon_MODULE_FOCUS = yes 
									EAI_armor_plate_MODULE_FOCUS = yes 
									EAI_self_sealing_fuel_tanks_MODULE_FOCUS = yes
								}
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:aa_lmg } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:aa_lmg } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:aa_lmg } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}

	survivability_studies = {

		enable_equipment_modules = {
			self_sealing_fuel_tanks_small
			self_sealing_fuel_tanks_medium
			self_sealing_fuel_tanks_large
			armor_plate_small
			armor_plate_medium
			armor_plate_large
		}
		
		research_cost = 1
		start_year = 1939

		folder = {
			name = bba_air_techs_folder
			position = { x = -2 y = 5 }
		}

		categories = {
			air_equipment
			plane_modules_tech
			mio_cat_all_light_fighter_and_modules
			mio_cat_all_medium_aircraft_and_modules
			mio_cat_all_heavy_aircraft_and_modules
			mio_cat_all_light_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }

		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 20 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				if = { 
					limit = { 
						OR = { is_major = yes num_of_military_factories > 1 }
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 30 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							date < 1938.6.1
						}
						else = { 
							
							date < 1939.1.1
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 
							
							AND = {
								NOT = { 
									EAI_armor_plate_MODULE_FOCUS = yes 
									EAI_self_sealing_fuel_tanks_MODULE_FOCUS = yes 
								}
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:survivability_studies } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:survivability_studies } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:survivability_studies } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}

	aa_hmg = {

		enable_equipment_modules = {
			heavy_mg_2x
			heavy_mg_4x
			hmg_defense_turret
			hmg_defense_turret_2x
		}
		
		research_cost = 1
		start_year = 1939

		folder = {
			name = bba_air_techs_folder
			position = { x = 0 y = 5 }
		}

		categories = {
			air_equipment
			plane_modules_tech
			cat_air_guns
			mio_cat_all_light_fighter_and_modules
			mio_cat_all_medium_aircraft_and_modules
			mio_cat_all_heavy_aircraft_and_modules
			mio_cat_all_light_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }

		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 20 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				if = { 
					limit = { 
						OR = { is_major = yes num_of_military_factories > 1 }
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 30 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							date < 1938.6.1
						}
						else = { 
							
							date < 1939.1.1
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 
							
							AND = {
								NOT = { EAI_aa_mg_MODULE_FOCUS = yes }
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:aa_hmg } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:aa_hmg } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:aa_hmg } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}

	aa_cannon_1 = {

		enable_equipment_modules = {
			aircraft_cannon_1_1x
			aircraft_cannon_1_2x
		}
		
		research_cost = 1
		start_year = 1939

		folder = {
			name = bba_air_techs_folder
			position = { x = 2 y = 5 }
		}
		path = {
			leads_to_tech = aa_cannon_2
			research_cost_coeff = 1
		}

		path = {
			leads_to_tech = aa_cannon_3
			research_cost_coeff = 1
		}

		categories = {
			air_equipment
			plane_modules_tech
			cat_air_guns
			mio_cat_all_light_fighter_and_modules
			mio_cat_all_medium_aircraft_and_modules
			mio_cat_all_heavy_aircraft_and_modules
			mio_cat_all_light_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }

		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 20 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				if = { 
					limit = { 
						OR = { is_major = yes num_of_military_factories > 1 }
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 30 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							date < 1938.6.1
						}
						else = { 
							
							date < 1939.1.1
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 
							
							AND = {
								NOT = { EAI_aa_cannon_MODULE_FOCUS = yes }
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:aa_cannon_1 } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:aa_cannon_1 } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:aa_cannon_1 } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}

	aa_cannon_2 = {

		enable_equipment_modules = {
			large_aircraft_cannon_1x
			large_aircraft_cannon_2x
			cannon_defense_turret
			cannon_defense_turret_2x
		}
		
		research_cost = 1.5
		start_year = 1943

		folder = {
			name = bba_air_techs_folder
			position = { x = 0 y = 7 }
		}

		categories = {
			air_equipment
			plane_modules_tech
			cat_air_guns
			mio_cat_all_light_fighter_and_modules
			mio_cat_all_medium_aircraft_and_modules
			mio_cat_all_heavy_aircraft_and_modules
			mio_cat_all_light_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }

		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 0 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							date < 1942.6.1
						}
						else = { 
							
							date < 1943.1.1
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:aa_cannon_2 } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:aa_cannon_2 } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:aa_cannon_2 } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}

	aa_cannon_3 = {

		enable_equipment_modules = {
			aircraft_cannon_2_1x
			aircraft_cannon_2_2x
			cannon_defense_turret
			cannon_defense_turret_2x
		}
		
		research_cost = 2
		start_year = 1945

		folder = {
			name = bba_air_techs_folder
			position = { x = 2 y = 12 }
		}

		categories = {
			air_equipment
			plane_modules_tech
			cat_air_guns
			mio_cat_all_light_fighter_and_modules
			mio_cat_all_medium_aircraft_and_modules
			mio_cat_all_heavy_aircraft_and_modules
			mio_cat_all_light_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }
		
		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 20 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				if = { 
					limit = { 
						OR = { is_major = yes num_of_military_factories > 1 }
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 30 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							date < 1944.6.1
						}
						else = { 
							
							date < 1945.1.1
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 
							
							AND = {
								NOT = { EAI_aa_cannon_MODULE_FOCUS = yes }
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:aa_cannon_3 } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:aa_cannon_3 } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:aa_cannon_3 } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}

	engines_1 = {

		enable_equipment_modules = {
			engine_1_1x
			engine_1_2x
			engine_1_3x
			engine_1_4x
			engine_1_6x	
		}
		
		research_cost = 1
		start_year = 1922

		folder = {
			name = bba_air_techs_folder
			position = { x = 0 y = 2 }
		}

		path = {
			leads_to_tech = engines_2
			research_cost_coeff = 1
		}

		path = {
			leads_to_tech = range_improvements
			research_cost_coeff = 1
		}

		path = {
			leads_to_tech = aircraft_construction
			research_cost_coeff = 1
		}

		categories = {
			air_equipment
			plane_modules_tech
			cat_air_engine
			mio_cat_all_light_fighter_and_modules
			mio_cat_all_cas_and_modules
			mio_cat_all_naval_bomber_and_modules
			mio_cat_all_medium_aircraft_and_modules
			mio_cat_all_heavy_aircraft_and_modules
			mio_cat_all_light_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }

		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 20 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				if = { 
					limit = { 
						OR = { is_major = yes num_of_military_factories > 1 }
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 30 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							date < 1936.1.7
						}
						else = { 
							
							date < 1936.1.7
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 
							
							AND = {
								NOT = { EAI_wants_to_build_aircraft = yes }
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:engines_1 } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:engines_1 } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:engines_1 } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}

	engines_2 = {

		enable_equipment_modules = {
			engine_2_1x
			engine_2_2x
			engine_2_3x
			engine_2_4x
			engine_2_6x	
		}
		on_research_complete = {
			custom_effect_tooltip = {
				localization_key = SP_UNLOCK_PROJECT
				PROJECT = sp_air_jet_engine	
			}
		}		
		research_cost = 1
		start_year = 1936

		folder = {
			name = bba_air_techs_folder
			position = { x = 0 y = 4 }
		}

		path = {
			leads_to_tech = engines_3
			research_cost_coeff = 1
		}

		categories = {
			air_equipment
			plane_modules_tech
			cat_air_engine
			mio_cat_all_light_fighter_and_modules
			mio_cat_all_cas_and_modules
			mio_cat_all_naval_bomber_and_modules
			mio_cat_all_medium_aircraft_and_modules
			mio_cat_all_heavy_aircraft_and_modules
			mio_cat_all_light_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }

		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 20 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				if = { 
					limit = { 
						OR = { is_major = yes num_of_military_factories > 1 }
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 30 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							date < 1936.1.7
						}
						else = { 
							
							date < 1936.1.7
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 
							
							AND = {
								NOT = { EAI_wants_to_build_aircraft = yes }
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:engines_2 } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:engines_2 } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:engines_2 } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}

	engines_3 = {

		enable_equipment_modules = {
			engine_3_1x
			engine_3_2x
			engine_3_3x
			engine_3_4x
			engine_3_6x	
		}
		on_research_complete = {
			custom_effect_tooltip = {
				localization_key = SP_UNLOCK_PROJECT
				PROJECT = sp_air_axial_jet_engine	
			}
		}		
		research_cost = 1.5
		start_year = 1940

		folder = {
			name = bba_air_techs_folder
			position = { x = 0 y = 6 }
		}

		path = {
			leads_to_tech = engines_4
			research_cost_coeff = 1
		}

		categories = {
			air_equipment
			plane_modules_tech
			cat_air_engine
			mio_cat_all_light_fighter_and_modules
			mio_cat_all_cas_and_modules
			mio_cat_all_naval_bomber_and_modules
			mio_cat_all_medium_aircraft_and_modules
			mio_cat_all_heavy_aircraft_and_modules
			mio_cat_all_light_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }

		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 20 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				if = { 
					limit = { 
						OR = { is_major = yes num_of_military_factories > 1 }
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 30 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							date < 1939.6.1
						}
						else = { 
							
							date < 1940.1.1
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 
							
							AND = {
								NOT = { EAI_wants_to_build_aircraft = yes }
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:engines_3 } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:engines_3 } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:engines_3 } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}

	engines_4 = {

		enable_equipment_modules = {
			engine_4_1x
			engine_4_2x
			engine_4_3x
			engine_4_4x
			engine_4_6x	
		}
		
		research_cost = 1.5
		start_year = 1944

		folder = {
			name = bba_air_techs_folder
			position = { x = 0 y = 8 }
		}

		path = {
			leads_to_tech = sp_centrifugal_jet_tech
			research_cost_coeff = 1
		}

		categories = {
			air_equipment
			plane_modules_tech
			cat_air_engine
			mio_cat_all_light_fighter_and_modules
			mio_cat_all_cas_and_modules
			mio_cat_all_naval_bomber_and_modules
			mio_cat_all_medium_aircraft_and_modules
			mio_cat_all_heavy_aircraft_and_modules
			mio_cat_all_light_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }

		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 20 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				if = { 
					limit = { 
						OR = { is_major = yes num_of_military_factories > 1 }
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 30 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							date < 1943.1.1
						}
						else = { 
							
							date < 1943.6.1
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 
							
							AND = {
								NOT = { EAI_wants_to_build_aircraft = yes }
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:engines_4 } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:engines_4 } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:engines_4 } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}

	range_improvements = {

		enable_equipment_modules = {
			fuel_tanks_small
			fuel_tanks_medium
			fuel_tanks_large
			drop_tanks
		}
		
		research_cost = 1
		start_year = 1936

		folder = {
			name = bba_air_techs_folder
			position = { x = -2 y = 4 }
		}

		categories = {
			air_equipment
			plane_modules_tech
			mio_cat_all_light_fighter_and_modules
			mio_cat_all_cas_and_modules
			mio_cat_all_naval_bomber_and_modules
			mio_cat_all_medium_aircraft_and_modules
			mio_cat_all_heavy_aircraft_and_modules
			mio_cat_all_light_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }

		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 20 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				if = { 
					limit = { 
						OR = { is_major = yes num_of_military_factories > 1 }
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 30 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							date < 1936.1.7
						}
						else = { 
							
							date < 1936.1.7
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 
							
							AND = {
								NOT = { EAI_drop_tanks_MODULE_FOCUS = yes EAI_fuel_tanks_MODULE_FOCUS = yes }
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:range_improvements } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:range_improvements } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:range_improvements } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}

	aircraft_construction = {

		enable_equipment_modules = {
			dive_brakes_small
			non_strategic_materials_small
			floats
			non_strategic_materials_medium
			flying_boat_medium
			non_strategic_materials_large
			flying_boat_large
		}
		
		research_cost = 1
		start_year = 1936

		folder = {
			name = bba_air_techs_folder
			position = { x = -2 y = 2 }
		}

		categories = {
			air_equipment
			plane_modules_tech
			mio_cat_all_light_fighter_and_modules
			mio_cat_all_cas_and_modules
			mio_cat_all_naval_bomber_and_modules
			mio_cat_all_medium_aircraft_and_modules
			mio_cat_all_heavy_aircraft_and_modules
			mio_cat_all_light_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }

		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 20 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				if = { 
					limit = { 
						OR = { is_major = yes num_of_military_factories > 1 }
					}

					multiply_temp_variable = { EAI_tmp_research_factor = 30 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				if = { 
					limit = { 
						if = { limit = { has_country_flag = EAI_unused_research_slots }

							date < 1936.1.7
						}
						else = { 
							
							date < 1936.1.7
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				if = {
					limit = {
						NOT = { has_country_flag = EAI_unused_research_slots_extended }

						OR = { 

							AND = {
								NOT = { EAI_dive_brakes_MODULE_FOCUS = yes EAI_flying_boat_MODULE_FOCUS = yes EAI_non_strategic_materials_MODULE_FOCUS = yes }
							}
						}
					}

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:aircraft_construction } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:aircraft_construction } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:aircraft_construction } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}

	suicide_charge = {

		enable_equipment_modules = {
			fixed_explosive_charge
		}
				
		research_cost = 1.5 #Carrier Variant
		start_year = 1944

		# only from focus!!! #####
		allow = {
			always = no
		}

		#folder = {
		#	name = air_techs_folder
		#	position = { x = -2 y = 8 }
		#}
		
		ai_will_do = { #EAI
			factor = 0

			#DATE

			#WEIGHT
			
			#RESTRICTIONS
		}
		################
	}



	##### SPECIAL PROJECTS #####

	sp_centrifugal_jet_tech = {
		allow_branch = {
			has_dlc = "Gotterdammerung"
		}
		
		allow = {
			ROOT = {
				is_special_project_completed = sp:sp_air_jet_engine
			} 
		}

		is_special_project_tech = yes

		research_cost = 2
		start_year = 1945
		
		folder = {
			name = bba_air_techs_folder
			position = { x = 0 y = 12 }
		}

		folder = {
			name = air_techs_folder
			position = { x = 4 y = 12 }
		}
		
		categories = {
			jet_technology
			cat_air_engine
			helicopter_tech
		}

		category_helicopter_support_companies = {
			fuel_consumption = -0.05
			maximum_speed = 0.1
			defense = 0.05
			breakthrough = 0.05
		}

		special_project_specialization = { specialization_air }	
		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 1 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				set_temp_variable = { EAI_tmp_research_factor = 0 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:sp_centrifugal_jet_tech } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:sp_centrifugal_jet_tech } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:sp_centrifugal_jet_tech } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}

	reinforced_wings_mothership = {
		allow_branch = {
			 has_dlc = "Gotterdammerung"
		}	

		allow = {
			ROOT = {
				is_special_project_completed = sp:sp_air_mothership_aircraft
			}
		}

		is_special_project_tech = yes
				
		path = {
			leads_to_tech = miniature_fighters
			research_cost_coeff = 1
		}	
		research_cost = 1.75
		start_year = 1942

		folder = {
			name = bba_air_techs_folder
			position = { x = @mothership_x_bba y = 7 }
		}

		folder = {
			name = air_techs_folder
			position = { x = @mothership_x y = 7 }
		}

		categories = {
			heavy_air
			air_equipment
			cat_strategic_bomber
			mio_cat_all_heavy_aircraft_and_modules
		}
		mothership = {
			air_defence = 0.08
		}
		special_project_specialization = { specialization_air }	
		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 1 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				set_temp_variable = { EAI_tmp_research_factor = 0 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:reinforced_wings_mothership } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:reinforced_wings_mothership } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:reinforced_wings_mothership } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}

	miniature_fighters = {
		allow = {
			ROOT = {
				is_special_project_completed = sp:sp_air_mothership_aircraft
			}
		}

		is_special_project_tech = yes

		path = {
			leads_to_tech = aerial_hangars
			research_cost_coeff = 1
		}	

		research_cost = 1.5
		start_year = 1944

		folder = {
			name = bba_air_techs_folder
			position = { x = @mothership_x_bba y = 10 }
		}

		folder = {
			name = air_techs_folder
			position = { x = @mothership_x y = 10 }
		}

		categories = {
			heavy_air
			air_equipment
			cat_strategic_bomber
			mio_cat_all_heavy_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }	
		mothership = {
			air_agility = 0.06
			air_attack = 0.06
			fuel_consumption_factor = -0.08
		}

		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 1 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				set_temp_variable = { EAI_tmp_research_factor = 0 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:miniature_fighters } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:miniature_fighters } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:miniature_fighters } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}

	aerial_hangars = {
		allow = {
			ROOT = {
				is_special_project_completed = sp:sp_air_mothership_aircraft
			}
		}

		is_special_project_tech = yes

		research_cost = 1.75
		start_year = 1946

		folder = {
			name = bba_air_techs_folder
			position = { x = @mothership_x_bba y = 13 }
		}

		folder = {
			name = air_techs_folder
			position = { x = @mothership_x y = 13 }
		}

		categories = {
			heavy_air
			air_equipment
			cat_strategic_bomber
			mio_cat_all_heavy_aircraft_and_modules
		}
		special_project_specialization = { specialization_air }			
		mothership = {
			air_agility = 0.1
			air_range = 0.2
			air_attack = 0.1
		}
		
		ai_will_do = { #EAI

			factor = 1

			modifier = {

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Base

				set_temp_variable = { EAI_tmp_research_factor = 1 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Modifiers

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Date

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Restrictions

				set_temp_variable = { EAI_tmp_research_factor = 0 }

				# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

				### RESEARCH:Priority research

				if = { limit = { NOT = { check_variable = { EAI_priority_research_current_tech = 0 } } NOT = { check_variable = { EAI_priority_research_current_tech = token:aerial_hangars } } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { OR = { check_variable = { global.EAI_days_elapsed < 2 } has_country_flag = EAI_PR_block_research } } # Block dynamic strategies generated by the AI

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				if = { limit = { check_variable = { EAI_priority_research_current_tech = token:aerial_hangars } NOT = { has_country_flag = EAI_PR_block_priority_research } }

					set_temp_variable = { EAI_tmp_research_factor = 1 }
				}

				if = { limit = { is_in_array = { EAI_priority_research_block_techs = token:aerial_hangars } }

					set_temp_variable = { EAI_tmp_research_factor = 0 }
				}

				# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

				factor = EAI_tmp_research_factor
			}
		}
	}
}
