AI_marine = {
	allowed = {
		is_allied_ai = yes
	}
	enable = {
		is_in_faction_with = ENG
		date > 1939.1.1
		NOT = { tag = FRA }
		NOT = { tag = BEL }
		NOT = { tag = HOL }
		NOT = { tag = LUX }
	}

	abort = {
		has_tech = marines
	}

	ai_strategy = {
		type = research_weight_factor
		id = marines
		value = 100
	}
}

AI_get_anti_air_please = {
	allowed = {
		NOT = { original_tag = SOV }
	}
	enable = {
		OR = {
			date > 1939.6.1
			AND = {
				date > 1938.6.1
				OR = {
					GER_is_human_yes_air = yes
					GER_is_super_ai_yes_air = yes
					human_is_observer = yes
				}
			}
		}
	}

	abort = {
		has_tech = antiair1
	}

	ai_strategy = {
		type = research_weight_factor
		id = antiair1
		value = 100
	}
}

AI_get_anti_air2_please = {
	allowed = {
		NOT = { original_tag = SOV }
	}
	enable = {
		OR = {
			date > 1940.1.1
			AND = {
				date > 1939.1.1
				OR = {
					GER_is_human_yes_air = yes
					GER_is_super_ai_yes_air = yes
					human_is_observer = yes
				}
			}
		}
	}

	abort = {
		has_tech = antiair2
	}

	ai_strategy = {
		type = research_weight_factor
		id = antiair2
		value = 100
	}
}
AI_get_antitank_please = {
	allowed = {
		NOT = { original_tag = SOV }
	}
	enable = {
		capital_scope = { is_on_continent = europe }
		amount_research_slots > 3
		date > 1936.10.1
	}

	abort = {
		has_tech = interwar_antitank
	}

	ai_strategy = {
		type = research_weight_factor
		id = interwar_antitank
		value = 300
	}
}

AI_get_antitank2_GERplease = {
	allowed = {
		original_tag = GER
	}
	enable = {
		OR = {
			has_tech = basic_medium_tank_chassis
			is_researching_technology = basic_medium_tank_chassis
		}
	}

	abort = {
		has_tech = antitank1
	}

	ai_strategy = {
		type = research_tech
		id = antitank1
		value = 100
	}
}

AI_get_antitank2_please = {
	allowed = {
		NOT = { original_tag = SOV }
	}
	enable = {
		date > 1938.9.1
		is_historical_focus_on = yes
	}

	abort = {
		has_tech = antitank1
	}

	ai_strategy = {
		type = research_tech
		id = antitank1
		value = 100
	}
}

AI_get_antitank3_please = {
	allowed = {
		NOT = { original_tag = SOV }
	}
	enable = {
		date > 1939.4.1
		is_historical_focus_on = yes
	}

	abort = {
		has_tech = antitank2
	}

	ai_strategy = {
		type = research_tech
		id = antitank2
		value = 100
	}
}

AI_get_antitank2a_please = {
	allowed = {
		NOT = { original_tag = SOV }
	}
	enable = {
		has_focus_tree = generic_focus
		is_historical_focus_on = yes
	}

	abort = {
		has_tech = antitank1
	}

	ai_strategy = {
		type = research_tech
		id = antitank1
		value = 100
	}
}

AI_get_antitank3a_please = {
	allowed = {
		NOT = { original_tag = SOV }
	}
	enable = {
		has_focus_tree = generic_focus
		is_historical_focus_on = yes
	}

	abort = {
		has_tech = antitank2
	}

	ai_strategy = {
		type = research_tech
		id = antitank2
		value = 100
	}
}


AI_get_antitank4_please = {
	allowed = {
		NOT = { original_tag = SOV }
	}
	enable = {
		date > 1940.8.1
		is_historical_focus_on = yes
	}

	abort = {
		has_tech = antitank3
	}

	ai_strategy = {
		type = research_tech
		id = antitank3
		value = 100
	}
}

AI_get_antitank5_please = {
	allowed = {
		NOT = { original_tag = SOV }
	}
	enable = {
		date > 1941.8.1
		is_historical_focus_on = yes
	}

	abort = {
		has_tech = antitank4
	}

	ai_strategy = {
		type = research_tech
		id = antitank4
		value = 200
	}
}

AI_get_antitank6_please = {
	allowed = {
		NOT = { original_tag = SOV }
	}
	enable = {
		date > 1942.8.1
		is_historical_focus_on = yes
	}

	abort = {
		has_tech = antitank5
	}

	ai_strategy = {
		type = research_tech
		id = antitank5
		value = 200
	}
}
ROM_get_tech_basic_small_frame_please = {
	allowed = {
		original_tag = ROM
	}
	enable = {
		NOT = { has_tech = basic_small_airframe }
	}

	abort = {
		has_tech = basic_small_airframe
	}

	ai_strategy = {
		type = research_tech
		id = basic_small_airframe
		value = 100
	}
}


everyone_gets_engineer_3_please = {
	enable = {
		amount_research_slots > 4 #soviet union may not rush it
		date > 1941.5.1
	}

	abort = {
		has_tech = tech_engineers3
	}

	ai_strategy = {
		type = research_tech
		id = tech_engineers3
		value = 500
	}
}


GER_gets_logi_3_please = {
	allowed = {
		tag = GER
	}
	enable = {
		amount_research_slots > 3 #soviet union may not rush it
		date > 1941.8.1
	}

	abort = {
		has_tech = tech_logistics_company3
	}

	ai_strategy = {
		type = research_weight_factor
		id = tech_logistics_company3
		value = 500
	}
}


GER_gets_feh_3_please = {
	allowed = {
		tag = GER
	}
	enable = {
		amount_research_slots > 3 #soviet union may not rush it
		date > 1942.1.1
	}

	abort = {
		has_tech = tech_field_hospital3
	}

	ai_strategy = {
		type = research_weight_factor
		id = tech_field_hospital3
		value = 500
	}
}


everyone_gets_engine_3_please = {
	allowed = {
		original_tag = GER
	}
	enable = {
		amount_research_slots > 3 #soviet union may not rush it
		date > 1938.5.1
		ITA_is_doing_it_for_us = no
	}

	abort = {
		OR = {
			has_tech = engines_3
			ITA_is_doing_it_for_us = yes
			has_country_flag = plane_licensed_ITA
		}
	}

	ai_strategy = {
		type = research_weight_factor
		id = engines_3
		value = 500
	}
}

ROM_get_tech_improved_small_frame_please = {
	allowed = {
		original_tag = ROM
	}
	enable = {
		has_completed_focus = ROM_iar_80
	}

	abort = {
		has_tech = improved_small_airframe
	}

	ai_strategy = {
		type = research_tech
		id = improved_small_airframe
		value = 2000 #we give license
	}
}

BUL_get_tech_mot_please = {
	allowed = {
		original_tag = BUL
	}
	enable = {
		is_historical_focus_on = yes
	}

	abort = {
		has_tech = motorised_infantry
	}

	ai_strategy = {
		type = research_tech
		id = motorised_infantry
		value = 2000 #we give license
	}
}

GER_mech_god = {
	allowed = {
		original_tag = GER
	}
	enable = {
		GER_AI_is_mass_mob = no
		date > 1939.1.1
	}

	abort = {
		has_tech = mechanised_infantry
	}

	ai_strategy = {
		type = research_tech
		id = mechanised_infantry
		value = 2000 #we give license
	}
}

SOV_mech_brick = {
	allowed = {
		original_tag = SOV
	}
	enable = {
		NOT = { has_tech = mechanised_infantry }
		has_country_flag = mech_brick
		has_completed_focus = SOV_pc_of_mechanical_engineering
	}

	abort = {
		has_tech = mechanised_infantry
	}

	ai_strategy = {
		type = research_tech
		id = mechanised_infantry
		value = 2000 #we give license
	}
}



BUL_get_tech_mech_please = {
	allowed = {
		original_tag = BUL
	}
	enable = {
		has_completed_focus = BUL_war_logistics
	}

	abort = {
		has_tech = mechanised_infantry
	}

	ai_strategy = {
		type = research_tech
		id = mechanised_infantry
		value = 2000 #we give license
	}
}

mech_mob_get_tech_mech_please = {
	allowed = {
		is_ai_mech_mob = yes
	}
	enable = {
		has_completed_focus = SMB_mechanized_troops
	}

	abort = {
		has_tech = mechanised_infantry
	}

	ai_strategy = {
		type = research_tech
		id = mechanised_infantry
		value = 2000 #we give license
	}
}

TANVEN_get_tech_truck_please = {
	allowed = {
		OR = {
			original_tag = TAN
			original_tag = VEN
		}
	}
	enable = {
		has_completed_focus = motorization_effort
	}

	abort = {
		has_tech = motorised_infantry
	}

	ai_strategy = {
		type = research_tech
		id = motorised_infantry
		value = 2000 #we give license
	}
}

TAN_get_tech_mech_please = {
	allowed = {
		OR = {
			original_tag = TAN
			original_tag = VEN
		}
	}
	enable = {
		has_completed_focus = mechanization_effort
	}

	abort = {
		has_tech = mechanised_infantry
	}

	ai_strategy = {
		type = research_tech
		id = mechanised_infantry
		value = 2000 #we give license
	}
}

CAN_get_tech_truck_please = {
	allowed = {
		original_tag = CAN
	}
	enable = {
		date < 1938.1.1
	}

	abort = {
		has_tech = motorised_infantry
	}

	ai_strategy = {
		type = research_tech
		id = motorised_infantry
		value = 2000 #we give license
	}
}

CAN_get_tech_mech_please = {
	allowed = {
		original_tag = CAN
	}
	enable = {
		has_completed_focus = CAN_cmp_truck
	}

	abort = {
		has_tech = mechanised_infantry
	}

	ai_strategy = {
		type = research_tech
		id = mechanised_infantry
		value = 2000 #we give license
	}
}

allied_minor_get_gun_tech_please = {
	allowed = {
		is_major = no
		has_focus_tree = generic_focus
	}
	enable = {
		date > 1936.1.1
	}

	abort = {
		has_tech = infantry_weapons1
	}

	ai_strategy = {
		type = research_tech
		id = infantry_weapons1
		value = 2000 #we give license
	}
}

allied_minor_get_gun_tech_please = {
	allowed = {
		tag = SOV
	}
	enable = {
		has_country_flag = mech_brick
	}

	abort = {
		has_tech = infantry_weapons1
	}

	ai_strategy = {
		type = research_tech
		id = infantry_weapons1
		value = 2000 
	}
}


minor_get_gun_tech2_please = {
	allowed = {
		is_major = no
	}
	enable = {
		date > 1936.1.1
		has_focus_tree = generic_focus
	}

	abort = {
		has_tech = improved_infantry_weapons
	}

	ai_strategy = {
		type = research_tech
		id = improved_infantry_weapons
		value = 999 #we give license
	}
}

minor_get_gun_tech2b_please = {
	allowed = {
		is_major = no
	}
	enable = {
		has_focus_tree = generic_focus
		date > 1936.1.1
	}

	abort = {
		has_tech = infantry_weapons2
	}

	ai_strategy = {
		type = research_tech
		id = infantry_weapons2
		value = 2000 #we give license
	}
}

minor_get_gun_tech3_please = {
	allowed = {
		is_major = no
	}
	enable = {
		has_focus_tree = generic_focus
		has_tech = improved_infantry_weapons
		has_completed_focus = equipment_effort
	}

	abort = {
		has_tech = improved_infantry_weapons_2
	}

	ai_strategy = {
		type = research_tech
		id = improved_infantry_weapons_2
		value = 2000 #we give license
	}
}

minor_get_gun_tech4_please = {
	allowed = {
		is_major = no
	}
	enable = {
		has_focus_tree = generic_focus
		has_completed_focus = equipment_effort_2
		has_completed_focus = equipment_effort_3
	}

	abort = {
		has_tech = advanced_infantry_weapons
	}

	ai_strategy = {
		type = research_tech
		id = advanced_infantry_weapons
		value = 2000 #we give license
	}
}

USA_mech_is_real = {
	allowed = {
		original_tag = USA
	}
	enable = {
		date > 1939.8.1 #we are the tank nation here
	}

	abort = {
		has_tech = mechanised_infantry
	}

	ai_strategy = {
		type = research_tech
		id = mechanised_infantry
		value = 2000 #we give license
	}
}

GER_mech_is_real = {
	allowed = {
		original_tag = GER
	}
	enable = {
		date > 1939.3.1 #we are the tank nation here
	}

	abort = {
		has_tech = mechanised_infantry
	}

	ai_strategy = {
		type = research_tech
		id = mechanised_infantry
		value = 2000 #we give license
	}
}

CAN_fighter_prep1 = {
	allowed = {
		original_tag = CAN
	}
	enable = {
		date > 1936.1.1
		AST = { is_ai = no }
	}

	abort = {
		has_tech = basic_small_airframe
	}

	ai_strategy = {
		type = research_tech
		id = basic_small_airframe
		value = 2000 #we give license
	}
}

CAN_fighter_prep2 = {
	allowed = {
		original_tag = CAN
	}
	enable = {
		has_completed_focus = CAN_we_have_the_hurricane
		AST = { is_ai = no }
	}

	abort = {
		has_tech = improved_small_airframe
	}

	ai_strategy = {
		type = research_tech
		id = improved_small_airframe
		value = 2000 #we give license
	}
}

GER_get_tech_logistics_company_please = {
	allowed = {
		original_tag = GER
	}
	enable = {
		date > 1939.1.1
	}

	abort = {
		has_tech = tech_logistics_company
	}

	ai_strategy = {
		type = research_tech
		id = tech_logistics_company
		value = 100
	}
}

GER_get_tech_maintenance_company_please = {
	allowed = {
		original_tag = GER
	}
	enable = {
		date > 1939.3.1
		SOV = { is_ai = yes }
	}

	abort = {
		has_tech = tech_maintenance_company
	}

	ai_strategy = {
		type = research_tech
		id = tech_maintenance_company
		value = 100
	}
}

GER_get_tech_maintenance_company2_please = {
	allowed = {
		original_tag = GER
	}
	enable = {
		date > 1939.6.1 #in time for the blitzkrieg
		SOV = { is_ai = yes }
	}

	abort = {
		has_tech = tech_maintenance_company2
	}

	ai_strategy = {
		type = research_tech
		id = tech_maintenance_company2
		value = 100
	}
}
GER_get_tech_logistics_company2_please = {
	allowed = {
		original_tag = GER
	}
	enable = {
		date > 1940.6.1
	}

	abort = {
		has_tech = tech_logistics_company2
	}

	ai_strategy = {
		type = research_weight_factor
		id = tech_logistics_company2
		value = 100
	}
}

GER_get_field_hospital_please = {
	allowed = {
		original_tag = GER
	}
	enable = {
		date > 1938.8.1
		OR = {
			GER_is_spacemarine = yes
			has_country_flag = mech_god
		}
	}

	abort = {
		has_tech = tech_field_hospital
	}

	ai_strategy = {
		type = research_tech
		id = tech_field_hospital
		value = 100
	}
}

mech_get_field_hospital_please = {
	allowed = {
		is_ai_mech_mob = yes	
	}
	enable = {
		date > 1938.8.1
	}

	abort = {
		has_tech = tech_field_hospital
	}

	ai_strategy = {
		type = research_tech
		id = tech_field_hospital
		value = 100
	}
}

tank_minor_get_tank = {
	allowed = {
		is_ai_tank_minor = yes	
	}
	enable = {
		date > 1937.8.1
	}

	abort = {
		has_tech = gwtank_chassis
	}

	ai_strategy = {
		type = research_tech
		id = gwtank_chassis
		value = 100
	}
}
tank_minor_get_tank2 = {
	allowed = {
		is_ai_tank_minor = yes	
	}
	enable = {
		date > 1937.8.1
	}

	abort = {
		has_tech = basic_medium_tank_chassis
	}

	ai_strategy = {
		type = research_tech
		id = basic_medium_tank_chassis
		value = 100
	}
}
ger_get_tank = {
	allowed = {
		original_tag = GER
	}
	enable = {
		date > 1937.4.1
	}

	abort = {
		has_tech = basic_medium_tank_chassis
	}

	ai_strategy = {
		type = research_tech
		id = basic_medium_tank_chassis
		value = 100
	}
}

GER_get_field_hospital2_please = {
	allowed = {
		original_tag = GER
	}
	enable = {
		date > 1940.1.1
	}

	abort = {
		has_tech = tech_field_hospital2
	}

	ai_strategy = {
		type = research_weight_factor
		id = tech_field_hospital2
		value = 100
	}
}

close_support_gun_is_good = {
	allowed = {
		OR = {
			original_tag = JAP
			is_major = no
		}
		capital_scope = { is_on_continent = asia }
	}
	enable = {
		OR = {
			has_tech = basic_medium_tank_chassis
			has_tech = basic_light_tank_chassis
		}
	}

	abort = {
		has_tech = gw_artillery
	}

	ai_strategy = {
		type = research_weight_factor
		id = gw_artillery
		value = 300
	}
}

basic_medium_tank_research_bonus = {
	allowed = {
		NOT = { original_tag = GER }
		NOT = { original_tag = FRA }
		NOT = { original_tag = SOV }
		NOT = { original_tag = JAP }
	}
	enable = {
		amount_research_slots > 4
		date > 1938.1.1		
	}

	abort = {
		has_tech = basic_medium_tank_chassis
	}

	ai_strategy = {
		type = research_tech
		id = basic_medium_tank_chassis
		value = 500
	}
}

allies_get_engineer1_please = {
	allowed = {
		OR = {
			original_tag = USA
			original_tag = ENG
			is_in_faction_with = ENG
		}
	}
	enable = {
		amount_research_slots > 3
		date > 1937.8.1
	}

	abort = {
		has_tech = tech_engineers
	}

	ai_strategy = {
		type = research_tech
		id = tech_engineers
		value = 100
	}
}

allies_get_engineer2_please = {
	allowed = {
		OR = {
			original_tag = USA
			original_tag = ENG
			is_in_faction_with = ENG
		}
	}
	enable = {
		amount_research_slots > 3
		date > 1938.8.1
	}

	abort = {
		has_tech = tech_engineers2
	}

	ai_strategy = {
		type = research_weight_factor
		id = tech_engineers2
		value = 100
	}
}

allies_get_engineer3_please = {
	allowed = {
		OR = {
			original_tag = USA
			original_tag = ENG
			is_in_faction_with = ENG
		}
	}
	enable = {
		amount_research_slots > 3
		date > 1941.4.1
	}

	abort = {
		has_tech = tech_engineers3
	}

	ai_strategy = {
		type = research_weight_factor
		id = tech_engineers3
		value = 100
	}
}

allies_get_aa_cannon_3_please = {
	allowed = {
		OR = {
			original_tag = USA
			original_tag = ENG
			is_in_faction_with = ENG
		}
	}
	enable = {
		amount_research_slots > 3
		date > 1946.3.1
	}

	abort = {
		has_tech = aa_cannon_3
	}

	ai_strategy = {
		type = research_tech
		id = aa_cannon_3
		value = 100
	}
}

allies_get_engine_3_please = {
	allowed = {
		OR = {
			original_tag = USA
			original_tag = ENG
			is_in_faction_with = ENG
		}
	}
	enable = {
		amount_research_slots > 4
		date > 1939.1.1 #about time
	}

	abort = {
		has_tech = engines_3
	}

	ai_strategy = {
		type = research_tech
		id = engines_3
		value = 100
	}
}

allies_get_engine_4_please = {
	allowed = {
		OR = {
			original_tag = USA
			original_tag = ENG
			is_in_faction_with = ENG
		}
	}
	enable = {
		amount_research_slots > 4
		date > 1943.6.1
	}

	abort = {
		has_tech = engines_4
	}

	ai_strategy = {
		type = research_tech
		id = engines_4
		value = 100
	}
}

allies_heavy_bomb_please = {
	allowed = {
		OR = {
			original_tag = USA
			original_tag = ENG
		}
	}
	enable = {
		amount_research_slots > 4
		date > 1939.8.1
	}

	abort = {
		has_tech = heavy_bombs
	}

	ai_strategy = {
		type = research_tech
		id = heavy_bombs
		value = 100
	}
}

allies_survivability_tech_please = {
	allowed = {
		OR = {
			original_tag = USA
			original_tag = ENG
		}
	}
	enable = {
		amount_research_slots > 4
		date > 1938.1.1 #pushed up
	}

	abort = {
		has_tech = survivability_studies
	}

	ai_strategy = {
		type = research_tech
		id = survivability_studies
		value = 100
	}
}

allies_improved_small_airframe_please = {
	allowed = {
		OR = {
			original_tag = USA
			original_tag = ENG
		}
	}
	enable = {
		amount_research_slots > 4
		date > 1939.9.1 #push up
	}

	abort = {
		has_tech = improved_small_airframe
	}

	ai_strategy = {
		type = research_tech
		id = improved_small_airframe
		value = 50
	}
}

allies_aa_hmg_please = {
	allowed = {
		OR = {
			original_tag = USA
			original_tag = ENG
		}
	}
	enable = {
		amount_research_slots > 4
		date > 1938.9.1 #push up
	}

	abort = {
		has_tech = aa_hmg
	}

	ai_strategy = {
		type = research_tech
		id = aa_hmg
		value = 100
	}
}

allies_range_improvements_please = {
	allowed = {
		OR = {
			original_tag = USA
			original_tag = ENG
		}
	}
	enable = {
		amount_research_slots > 4
		date > 1939.10.1 #we realised range is necessary
	}

	abort = {
		has_tech = range_improvements
	}

	ai_strategy = {
		type = research_tech
		id = range_improvements
		value = 100
	}
}
	
MAN_the_fuel_slave1 = {
	allowed = {
		tag = MAN
	}
	enable = {
		is_historical_focus_on = yes
	}

	abort = {
		is_subject = no
	}

	ai_strategy = {
		type = research_tech
		id = construction1
		value = 100
	}

	ai_strategy = {
		type = research_tech
		id = construction2
		value = 100
	}

	ai_strategy = {
		type = research_tech
		id = construction3
		value = 100
	}

	ai_strategy = {
		type = research_tech
		id = construction4
		value = 100
	}

	ai_strategy = {
		type = research_tech
		id = construction5
		value = 100
	}

	ai_strategy = {
		type = research_tech
		id = excavation1
		value = 100
	}

	ai_strategy = {
		type = research_tech
		id = excavation2
		value = 100
	}

	ai_strategy = {
		type = research_tech
		id = excavation3
		value = 100
	}

	ai_strategy = {
		type = research_tech
		id = excavation4
		value = 100
	}

	ai_strategy = {
		type = research_tech
		id = excavation5
		value = 100
	}
}
	
MAN_the_fuel_slave2 = {
	allowed = {
		tag = MAN
	}
	enable = {
		is_historical_focus_on = yes
		date > 1937.1.1
	}

	abort = {
		is_subject = no
	}

	ai_strategy = {
		type = research_weight_factor
		id = fuel_silos
		value = 100
	}

	ai_strategy = {
		type = research_weight_factor
		id = fuel_refining
		value = 100
	}

	ai_strategy = {
		type = research_weight_factor
		id = fuel_refining2
		value = 100
	}

	ai_strategy = {
		type = research_weight_factor
		id = fuel_refining3
		value = 100
	}

	ai_strategy = {
		type = research_weight_factor
		id = fuel_refining4
		value = 100
	}

	ai_strategy = {
		type = research_weight_factor
		id = fuel_refining5
		value = 100
	}
}