technologies = {
	@anti_air = -7

	interwar_antiair = {

		enable_equipments = {
			anti_air_equipment_1
		}

		enable_equipment_modules = {
			ship_anti_air_2
			tank_aa_machine_gun
			tank_anti_air_cannon # Dual AAMG
			tank_anti_air_cannon_2 # 20mm AA
			tank_auto_cannon
		}

		enable_building = {
			building = anti_air_building
			level = 5
		}

		path = {
			leads_to_tech = antiair1
			research_cost_coeff = 1
		}

		sub_technologies = {
			interwar_antiair_h
		}

		research_cost = 1.0

		start_year = 1936

		folder = {
			name = artillery_folder
			position = { x = @anti_air y = 2 }
		}

		ai_will_do = {
			factor = 1

			modifier = {
				factor = 0.5

				OR = {
					tag = CHI
					tag = PRC
					tag = XSM
					tag = SIK
					tag = GXC
					tag = SHX
					tag = YUN
				}
			}
			modifier = {
				factor = 2
				date > "1937.1.1"
			}

			modifier = {
				factor = 5
				date > "1938.1.1"
			}

			modifier = {
				factor = 5
				date > "1939.1.1"
			}
		}

		categories = {
			artillery
			cat_anti_air
			mio_cat_all_artillery_equipment
		}
		special_project_specialization = { specialization_land specialization_air }
	}
	interwar_antiair_h = {

		enable_equipment_modules = {
			tank_heavy_anti_air_cannon
			tank_high_velocity_cannon
			lc_heavy_anti_air_battery #Module for Land Cruiser
		}

		enable_equipments = {
			anti_air_equipment_h_1
		}
	
		enable_subunits = {
			anti_air_brigade_h
			mot_anti_air_brigade_h
		}

		static_anti_air_damage_factor = 0.05

		research_cost = 0.5 #Artillery Variant
		start_year = 1936
		
		categories = {
			artillery
			cat_anti_air
			mio_cat_all_artillery_equipment
		}
		special_project_specialization = { specialization_land specialization_air }
		
		ai_will_do = {
			factor = 1

			modifier = {
				factor = 0.5

				OR = {
					tag = CHI
					tag = PRC
					tag = XSM
					tag = SIK
					tag = GXC
					tag = SHX
					tag = YUN
				}
			}
			modifier = {
				factor = 2
				date > "1937.1.1"
			}

			modifier = {
				factor = 5
				date > "1938.1.1"
			}

			modifier = {
				factor = 5
				date > "1939.1.1"
			}
			modifier = {
				num_of_factories < 75
				factor = 0.1
			}
		}
	}

	antiair1 = {

		category_anti_air = {
			air_attack = 0.1
		}

		tech_air_damage_factor = -0.01

		enable_equipment_modules = {
			tank_auto_cannon_2
			tank_anti_air_cannon_12
			tank_anti_air_cannon_22 # 20mm Dual
		}

		path = {
			leads_to_tech = antiair2
			research_cost_coeff = 1
		}

		research_cost = 1

		start_year = 1939

		folder = {
			name = artillery_folder
			position = { x = @anti_air y = 4 }
		}

		ai_will_do = {
			factor = 1
			modifier = {
				factor = 2
				OR = {
					is_major = yes
					num_of_military_factories > 10
				}
			}
		}

		categories = {
			artillery
			cat_anti_air
			mio_cat_all_artillery_equipment
		}
		special_project_specialization = { specialization_land specialization_air }
	}

	antiair2 = {

		enable_equipments = {
			anti_air_equipment_2
		}

		tech_air_damage_factor = -0.01

		enable_equipment_modules = {
			ship_anti_air_3
			tank_anti_air_cannon_3 # 37mm
			tank_anti_air_cannon_24
			lc_light_anti_air_battery #Module for Land Cruiser
		}

		path = {
			leads_to_tech = antiair3
			research_cost_coeff = 1
		}

		path = {
			leads_to_tech = sp_shock_hardening_techniques
			research_cost_coeff = 1
		}

		sub_technologies = {
			antiair2_h
		}

		research_cost = 1

		start_year = 1940

		folder = {
			name = artillery_folder
			position = { x = @anti_air y = 6 }
		}

		ai_will_do = {
			factor = 1
			modifier = {
				factor = 2
				OR = {
					is_major = yes
					num_of_military_factories > 10
				}
			}
		}

		categories = {
			artillery
			cat_anti_air
			mio_cat_all_artillery_equipment
		}
		special_project_specialization = { specialization_land specialization_air }
	}
	antiair2_h = {

		enable_equipment_modules = {
			tank_heavy_anti_air_cannon_2
			tank_heavy_anti_air_cannon_3
			tank_high_velocity_cannon_2
			tank_high_velocity_cannon_3
		}

		enable_equipments = {
			anti_air_equipment_h_2
		}
	
		enable_subunits = {
			anti_air_brigade_h
			mot_anti_air_brigade_h
		}

		static_anti_air_damage_factor = 0.05

		research_cost = 0.5 #Artillery Variant
		start_year = 1940
		
		categories = {
			artillery
			cat_anti_air
			mio_cat_all_artillery_equipment
		}
		special_project_specialization = { specialization_land specialization_air }
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 2
				OR = {
					is_major = yes
					num_of_military_factories > 10
				}
			}
			modifier = {
				num_of_factories < 75
				factor = 0.1
			}
		}
	}

	antiair3 = {

		category_anti_air = {
			air_attack = 0.15
			soft_attack = -0.05
			hard_attack = -0.05
		}

		tech_air_damage_factor = -0.01

		enable_equipment_modules = {
			tank_anti_air_cannon_32 # 37mm Dual
		}

		path = {
			leads_to_tech = antiair4
			research_cost_coeff = 1
		}

		research_cost = 1

		start_year = 1941

		folder = {
			name = artillery_folder
			position = { x = @anti_air y = 8 }
		}

		ai_will_do = {
			factor = 1
			modifier = {
				factor = 2
				OR = {
					is_major = yes
					num_of_military_factories > 10
				}
			}
		}

		categories = {
			artillery
			cat_anti_air
			mio_cat_all_artillery_equipment
		}
		special_project_specialization = { specialization_land specialization_air }
	}

	antiair4 = {

		category_anti_air = {
			air_attack = 0.15
			soft_attack = -0.05
			hard_attack = -0.05
		}

		tech_air_damage_factor = -0.01

		enable_equipment_modules = {
			tank_anti_air_cannon_4 # 40mm
		}

		path = {
			leads_to_tech = antiair5
			research_cost_coeff = 1
		}

		research_cost = 1

		start_year = 1942

		folder = {
			name = artillery_folder
			position = { x = @anti_air y = 10 }
		}

		ai_will_do = {
			factor = 1
			modifier = {
				factor = 2
				OR = {
					is_major = yes
					num_of_military_factories > 10
				}
			}
		}

		categories = {
			artillery
			cat_anti_air
			mio_cat_all_artillery_equipment
		}
		special_project_specialization = { specialization_land specialization_air }
	}

	antiair5 = {

		enable_equipments = {
			anti_air_equipment_3
		}

		tech_air_damage_factor = -0.01

		enable_equipment_modules = {
			ship_anti_air_4
			tank_anti_air_cannon_42 # 40mm Dual
			#tank_auto_cannon_3 # 40mm AC
			auto_loader
		}

		sub_technologies = {
			antiair5_h
		}

		research_cost = 1

		start_year = 1943

		folder = {
			name = artillery_folder
			position = { x = @anti_air y = 12 }
		}

		ai_will_do = {
			factor = 1
			modifier = {
				factor = 2
				OR = {
					is_major = yes
					num_of_military_factories > 10
				}
			}
		}

		categories = {
			artillery
			cat_anti_air
			mio_cat_all_artillery_equipment
		}
		special_project_specialization = { specialization_land specialization_air }
	}
	antiair5_h = {

		enable_equipment_modules = {
			tank_heavy_anti_air_cannon_4
			tank_high_velocity_cannon_4
			tank_high_velocity_cannon_5
			lc_heavy_anti_air_platform #Module for Land Cruiser
		}

		enable_equipments = {
			anti_air_equipment_h_3
		}
	
		enable_subunits = {
			anti_air_brigade_h
			mot_anti_air_brigade_h
		}

		static_anti_air_damage_factor = 0.10

		research_cost = 0.5 #Artillery Variant
		start_year = 1943
		
		categories = {
			artillery
			cat_anti_air
			mio_cat_all_artillery_equipment
		}
		special_project_specialization = { specialization_land specialization_air }
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 2
				OR = {
					is_major = yes
					num_of_military_factories > 10
				}
			}
			modifier = {
				num_of_factories < 75
				factor = 0.1
			}
		}
	}
	
	sp_shock_hardening_techniques = {
		
		allow_branch = {
			 has_dlc = "Gotterdammerung"
		}

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

		static_anti_air_damage_factor = 0.15 #Remember to adjust sp_naval_proximity_fuze_custom_tt when changing value
		static_anti_air_hit_chance_factor = 0.3 

		path = {
			leads_to_tech = sp_variable_time_fuze_shells
			research_cost_coeff = 1
		}
        
        force_use_small_tech_layout = yes		
		is_special_project_tech = yes	
		research_cost = 1.5
		start_year = 1941
		folder = {
			name = artillery_folder
			position = { x = -9 y = 8 }
		}

		categories = {
			artillery
			mio_cat_all_artillery_equipment
			mio_cat_artillery
		}

		special_project_specialization = { specialization_land specialization_air }
	}

	sp_variable_time_fuze_shells = {
		allow_branch = {
			 has_dlc = "Gotterdammerung"
		}

		allow = {
	 		ROOT = {
				is_special_project_completed = sp:sp_naval_proximity_fuze
			}
		}
		
		artillery = {
			soft_attack = 0.1
		}
		artillery_brigade = {
			soft_attack = 0.2
		}
		mot_artillery_brigade = {
			soft_attack = 0.2
		}
		category_self_propelled_artillery = {
			soft_attack = 0.1
		}

		force_use_small_tech_layout = yes
		research_cost = 1.5
		start_year = 1942
		is_special_project_tech = yes
			
		folder = {
			name = artillery_folder
			position = { x = -9 y = 10 }
		}

		categories = {
			artillery
			mio_cat_all_artillery_equipment
			mio_cat_artillery
		}

		special_project_specialization = { specialization_land specialization_air }
	}
}