# By 北风☭, 1.15.1
#科技研究

#生产
production_0 = {
	allowed = {
		always = yes
	}
	enable = {
		always = yes
	}

	abort = {
		has_tech = basic_machine_tools 
                has_tech = concentrated_industry
                has_tech = construction1
                has_tech = electronic_mechanical_engineering
      	}
        
	ai_strategy = {
		type = research_tech
		id = basic_machine_tools 
		value = 1000
	}
         ai_strategy = {
		type = research_weight_factor
		id = basic_machine_tools
		value = 999
	}
        ai_strategy = {
		type = research_tech
		id = concentrated_industry
		value = 999
	}
        ai_strategy = {
		type = research_weight_factor
		id = concentrated_industry
		value = 999
	}
        ai_strategy = {
		type = research_tech
		id = construction1
		value = 5000
	}
        ai_strategy = {
		type = research_weight_factor
		id = construction1
		value = 999
	}
        ai_strategy = {
		type = research_tech
		id = electronic_mechanical_engineering
		value = 1000
	}
    
}
production_1 = {
	allowed = {
		always = yes
	}
	enable = {
		date > 1936.12.1
	}

	abort = {
		has_tech = improved_machine_tools 
                has_tech = concentrated_industry2
                has_tech = construction2
	}

	ai_strategy = {
		type = research_tech
		id = improved_machine_tools 
		value = 1000
	}
       ai_strategy = {
		type = research_weight_factor
		id = improved_machine_tools 
		value = 999
	}

        ai_strategy = {
		type = research_tech
		id = concentrated_industry2
		value = 1000
	}
         ai_strategy = {
		type = research_weight_factor
		id = concentrated_industry2
		value = 999
	}

        ai_strategy = {
		type = research_tech
		id = construction2
		value = 5000
	}
        ai_strategy = {
		type = research_weight_factor
		id = construction2
		value = 999
	}
}
production_2 = {
	allowed = {
		always = yes
	}
	enable = {
		date > 1938.12.1
	}

	abort = {
		has_tech = advanced_machine_tools
                has_tech = concentrated_industry3
                has_tech = construction3
	}

	ai_strategy = {
		type = research_tech
		id = advanced_machine_tools
		value = 1000
	}
        ai_strategy = {
		type = research_tech
		id = concentrated_industry3
		value = 1000
	}
        ai_strategy = {
		type = research_tech
		id = construction3
		value = 5000
	}
}
production_3 = {
	allowed = {
		always = yes
	}
	enable = {
		date > 1940.12.1
	}

	abort = {
		has_tech = assembly_line_production
                has_tech = concentrated_industry4
                has_tech = construction4
                has_tech = improved_computing_machine
	}
      

	ai_strategy = {
		type = research_tech
		id = assembly_line_production
		value = 1000
	}
        ai_strategy = {
		type = research_tech
		id = concentrated_industry4
		value = 1000
	}
        ai_strategy = {
		type = research_tech
		id = construction4
		value = 5000
	}
        ai_strategy = {
		type = research_tech
		id = improved_computing_machine
		value = 1000
	}
}

#坦克
make_some_panzer_0 = {
	allowed = {
		always = yes
	}
	enable = {
		date > 1936.5.1
                num_of_military_factories > 6
	}

	abort = {
		has_tech = gwtank_chassis
	}

	ai_strategy = {
		type = research_tech
		id = gwtank_chassis
		value = 2000
	}
}
make_some_panzer_1 = {
	allowed = {
		always = yes
	}
	enable = {
		date > 1938.1.1
        num_of_military_factories > 20
	}

	abort = {
		has_tech = basic_medium_tank_chassis
		has_tech = basic_heavy_tank_chassis
	}

	ai_strategy = {
		type = research_tech
		id = basic_medium_tank_chassis
		value = 2000
	}
	ai_strategy = {
		type = research_tech
		id = basic_heavy_tank_chassis
		value = 2000
	}
}
make_some_panzer_2 = {
	allowed = {
		always = yes
	}
	enable = {
		date > 1939.9.1
                num_of_military_factories > 30
	}

	abort = {
		has_tech = improved_medium_tank_chassis
	}

	ai_strategy = {
		type = research_tech
		id = improved_medium_tank_chassis
		value = 2000
	}
}
minor_make_some_panzer = {
	allowed = {
		always = yes
	}
	enable = {
		date > 1939.1.1
                amount_research_slots > 4
	}

	abort = {
		has_tech = basic_medium_tank_chassis
	}

	ai_strategy = {
		type = research_tech
		id = basic_medium_tank_chassis
		value = 2000
	}
}
make_some_heavy_panzer = {
	allowed = {
		always = yes
	}
	enable = {
		date > 1940.1.1
                num_of_military_factories > 100
	}

	abort = {
		has_tech = improved_heavy_tank_chassis
	}
        ai_strategy = {
		type = research_tech
		id = basic_heavy_tank_chassis
		value = 2000
	}

	ai_strategy = {
		type = research_tech
		id = improved_heavy_tank_chassis
		value = 2000
	}
        ai_strategy = {
		type = research_weight_factor
		id = improved_heavy_tank_chassis
		value = 999
	}
}
#火炮
make_some_panzer_artillery0 = {
	allowed = {
		always = yes
	}
	enable = {
		date > 1936.5.1
                num_of_military_factories > 6
	}

	abort = {
		has_tech = interwar_antitank
	}

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

make_some_panzer_artillery1 = {
	allowed = {
		always = yes
	}
	enable = {
		date > 1938.6.1
                num_of_military_factories > 30
	}

	abort = {
		has_tech = antitank1
	}

	ai_strategy = {
		type = research_tech
		id = antitank1
		value = 2000
	}
}
make_some_panzer_artillery1_earlier = {
	allowed = {
		always = yes
	}
	enable = {
		date > 1938.1.1
                amount_research_slots > 4
	}

	abort = {
		has_tech = antitank2
	}
        ai_strategy = {
		type = research_weight_factor
		id = antitank1
		value = 999
	}

	ai_strategy = {
		type = research_tech
		id = antitank1
		value = 2000
	}
}
make_some_panzer_artillery2 = {
	allowed = {
		always = yes
	}
	enable = {
		date > 1939.7.1
                num_of_military_factories > 40
	}

	abort = {
		has_tech = antitank2
	}
        ai_strategy = {
		type = research_weight_factor
		id = antitank2
		value = 9999
	}

	ai_strategy = {
		type = research_tech
		id = antitank2
		value = 5000
	}
}
make_some_panzer_artillery2_earlier = {
	allowed = {
		always = yes
	}
	enable = {
		date > 1938.1.1
                or = { has_tech = basic_medium_tank_chassis
                amount_research_slots > 4
                }
	}

	abort = {
		has_tech = antitank2
	}
        ai_strategy = {
		type = research_weight_factor
		id = antitank2
		value = 999
	}

	ai_strategy = {
		type = research_tech
		id = antitank2
		value = 2000
	}
}
make_some_panzer_artillery3 = {
	allowed = {
		always = yes
	}
	enable = {
		date > 1940.1.1
                num_of_military_factories > 50

	}

	abort = {
		has_tech = antitank3
	}
        ai_strategy = {
		type = research_weight_factor
		id = antitank3
		value = 9999
	}

	ai_strategy = {
		type = research_tech
		id = antitank3
		value = 9999
	}
}
make_some_panzer_artillery3_earlier = {
	allowed = {
		always = yes
	}
	enable = {
		date > 1938.9.1
                or = { has_tech = improved_medium_tank_chassis
                amount_research_slots > 4
                } 
	}

	abort = {
		has_tech = antitank3
	}
        ai_strategy = {
		type = research_weight_factor
		id = antitank3
		value = 9999
	}
	ai_strategy = {
		type = research_tech
		id = antitank3
		value = 9999
	}
}
make_some_panzer_artillery4 = {
	allowed = {
		always = yes
	}
	enable = {
		date > 1941.1.1
                num_of_military_factories > 60

	}

	abort = {
		has_tech = antitank4
	}
        ai_strategy = {
		type = research_weight_factor
		id = antitank4
		value = 999
	}
	ai_strategy = {
		type = research_tech
		id = antitank4
		value = 9999
	}
}
make_some_panzer_artillery4_early = {
	allowed = {
		always = yes
	}
	enable = {
		date > 1939.1.1
                or = { has_tech = improved_medium_tank_chassis
                amount_research_slots > 4
                } 
	}

	abort = {
		has_tech = antitank4
	}
        ai_strategy = {
		type = research_weight_factor
		id = antitank4
		value = 999
	}
	ai_strategy = {
		type = research_tech
		id = antitank4
		value = 9999
	}
}
make_some_panzer_artillery5 = {
	allowed = {
		always = yes
	}
	enable = {
		date > 1941.7.1
                num_of_military_factories > 60
                is_major = yes
	}

	abort = {
		has_tech = antitank5
	}
        ai_strategy = {
		type = research_weight_factor
		id = antitank5
		value = 999
	}
	ai_strategy = {
		type = research_tech
		id = antitank5
		value = 999
	}
}
#机械化
make_some_mechanize = {
	allowed = {
		always = yes
	}
	enable = {
		has_tech = basic_medium_tank_chassis
	}

	abort = {
		has_tech = mechanised_infantry
	}

	ai_strategy = {
		type = research_tech
		id = mechanised_infantry
		value = 9999
	}
}
make_some_mechanize_naval = {
	allowed = {
		always = yes
	}
	enable = {
		date > 1941.1.1
                num_of_military_factories > 50
                any_enemy_country = {
                        is_major = yes
                        is_neighbor_of = ROOT
                        naval_strength_ratio = {
			tag = ROOT
  			ratio < 1
  		        }
                }
	}

	abort = {
		has_tech = amphibious_mechanized_infantry 
	}

	ai_strategy = {
		type = research_tech
		id = amphibious_mechanized_infantry 
		value = 9999
	}
        ai_strategy = {
		type = research_weight_factor
		id = amphibious_mechanized_infantry
		value = 9999
	}
}

#飞机
range_more = {
        allowed = {
		always = yes
	}
	enable = {
		date > 1936.5.1
                num_of_military_factories > 25
	}

	abort = {
		has_tech = improved_small_airframe
	}
        ai_strategy = {
		type = research_tech
		id = range_improvements
		value = 999
	}
        ai_strategy = {
		type = research_tech
		id = aircraft_construction
		value = 999
	}
}
hmg_and_aac = {
        allowed = {
		always = yes
	}
	enable = {
		or = { and = { date > 1939.1.1
                num_of_military_factories > 30 }
                and = { date > 1938.5.1
                amount_research_slots > 4 }
	    }
	}

	abort = {
		has_tech = improved_small_airframe
	}
         ai_strategy = {
		type = research_tech
		id = aa_hmg
		value = 999
	}
        ai_strategy = {
		type = research_tech
		id = aa_cannon_1
		value = 999
	}
        ai_strategy = {
		type = research_tech
		id = survivability_studies
		value = 999
	}
}
make_some_plane = {
	allowed = {
		always = yes
	}
	enable = {
		date > 1939.8.1
                num_of_military_factories > 50
	}

	abort = {
		has_tech = improved_small_airframe
	}

	ai_strategy = {
		type = research_tech
		id = improved_small_airframe
		value = 9999
	}
        ai_strategy = {
		type = research_tech
		id = engines_3
		value = 999
	}
}
make_some_large_plane1 = {
	allowed = {
		always = yes
	}
	enable = {
		date > 1940.1.1
                num_of_military_factories > 100
                amount_research_slots > 4
	}

	abort = {
		has_tech = basic_medium_airframe
                has_tech = improved_medium_airframe
	}
        ai_strategy = {
		type = research_weight_factor
		id = basic_medium_airframe
		value = 999
	}
        ai_strategy = {
		type = research_weight_factor
		id = improved_medium_airframe
		value = 999
	}
	ai_strategy = {
		type = research_tech
		id = basic_medium_airframe
		value = 999
	}
        ai_strategy = {
		type = research_tech
		id = improved_medium_airframe
		value = 999
	}
}
make_some_large_plane2 = {
	allowed = {
		always = yes
	}
	enable = {
		date > 1943.1.1
                num_of_military_factories > 100
                amount_research_slots > 4
	}

	abort = {
		has_tech = advanced_medium_airframe
	}
        ai_strategy = {
		type = research_weight_factor
		id = advanced_medium_airframe
		value = 999
	}
        ai_strategy = {
		type = research_tech
		id = advanced_medium_airframe
		value = 999
	}
}
make_aa_cannon_3 = {
        allowed = {
		always = yes
	}
	enable = {
		date > 1943.1.1
                num_of_military_factories > 100
                amount_research_slots > 4
	}

	abort = {
		has_tech = aa_cannon_3
	}
        ai_strategy = {
		type = research_weight_factor
		id = aa_cannon_3
		value = 999
	}
        ai_strategy = {
		type = research_tech
		id = aa_cannon_3
		value = 999
	}
}
#防空
make_some_aa = {
	allowed = {
		always = yes
	}
	enable = {
		date > 1940.1.1
                has_war = yes
	}

	abort = {
		has_tech = antiair1
                has_tech = antiair2
	}

	ai_strategy = {
		type = research_tech
		id = antiair1
		value = 999
	}
        ai_strategy = {
		type = research_weight_factor
		id = antiair1
		value = 999
	}
        ai_strategy = {
		type = research_tech
		id = antiair2
		value = 999
	}
        ai_strategy = {
		type = research_weight_factor
		id = antiair2
		value = 999
	}
}
make_some_aa2 = {
	allowed = {
		always = yes
	}
	enable = {
		date > 1942.1.1
                has_war = yes
	}

	abort = {
		has_tech = antiair3
                has_tech = antiair4
                has_tech = antiair5
	}

	ai_strategy = {
		type = research_tech
		id = antiair3
		value = 999
	}
        ai_strategy = {
		type = research_weight_factor
		id = antiair3
		value = 999
	}
        ai_strategy = {
		type = research_tech
		id = antiair4
		value = 999
	}
        ai_strategy = {
		type = research_weight_factor
		id = antiair4
		value = 999
	}
        ai_strategy = {
		type = research_tech
		id = antiair5
		value = 999
	}
        ai_strategy = {
		type = research_weight_factor
		id = antiair5
		value = 999
	}
}

#四槽以上科研AI
four_slot_research1 = {
	allowed = {
		always = yes
	}
	enable = {
		amount_research_slots > 3
                date > 1936.1.10
	}

	abort_when_not_enabled = yes
      	ai_strategy = {
		type = research_tech
		id = support_weapons
		value = 999
	}
        ai_strategy = {
		type = research_tech
		id = armored_train
		value = 999
	}
        ai_strategy = {
		type = research_tech
		id = tech_signal_company
		value = 999
	}
        ai_strategy = {
		type = research_tech
		id = interwar_antiair
		value = 999
	}
        ai_strategy = {
		type = research_tech
		id = mechanical_computing
		value = 999
	}
        ai_strategy = {
		type = research_tech
		id = radio
		value = 999
	}
        ai_strategy = {
		type = research_tech
		id = tech_field_hospital
		value = 999
	}
        ai_strategy = {
		type = research_weight_factor
		id = tech_field_hospital
		value = 999
	}
}
four_slot_research2 = {
	allowed = {
		always = yes
	}
	enable = {
		amount_research_slots > 3
                date > 1937.12.1	
        }

	abort_when_not_enabled = yes

	ai_strategy = {
		type = research_tech
		id = support_weapons2
		value = 999
	}
        ai_strategy = {
		type = research_tech
		id = infantry_weapons2
		value = 999
	}
        ai_strategy = {
		type = research_tech
		id = radio_detection
		value = 999
	}
        ai_strategy = {
		type = research_tech
		id = computing_machine
		value = 999
	}
        ai_strategy = {
		type = research_tech
		id = railway_gun
		value = 999
	}
}
four_slot_research3 = {
	allowed = {
		always = yes
	}
	enable = {
		amount_research_slots > 3
                date > 1938.12.3	
        }

	abort_when_not_enabled = yes

	ai_strategy = {
		type = research_tech
		id = aa_hmg
		value = 600
	}
        ai_strategy = {
		type = research_tech
		id = improved_infantry_weapons
		value = 999
	}
        ai_strategy = {
		type = research_tech
		id = tech_engineers2
		value = 999
	}
        ai_strategy = {
		type = research_tech
		id = tech_field_hospital2
		value = 999
	}
        ai_strategy = {
		type = research_tech
		id = tech_signal_company2
		value = 999
	}
        ai_strategy = {
		type = research_tech
		id = antiair1
		value = 999
	}
	 
}
#五槽以上科研AI（40年之后)
five_slot_research1 = {
        enable = {
		amount_research_slots > 4
                date > 1939.12.1	
        }
        abort_when_not_enabled = yes
        ai_strategy = {
		type = research_weight_factor
		id = heavy_bombs
		value = 999
	}
        ai_strategy = {
		type = research_weight_factor
		id = support_weapons3
		value = 999
	}
        ai_strategy = {
		type = research_weight_factor
		id = improved_computing_machine
		value = 999
	}
}     
five_slot_research2 = {
        enable = {
		amount_research_slots > 4
                date > 1941.12.1	
        }
        abort_when_not_enabled = yes
        ai_strategy = {
		type = research_weight_factor
		id = tech_engineers3
		value = 999
	}
        ai_strategy = {
		type = research_weight_factor
		id = tech_field_hospital3
		value = 999
	}
        ai_strategy = {
		type = research_weight_factor
		id = tech_signal_company3
		value = 999
	}
        ai_strategy = {
		type = research_weight_factor
		id = support_weapons4
		value = 99
	}
        ai_strategy = {
		type = research_weight_factor
		id = advanced_infantry_weapons
		value = 99
	}
        ai_strategy = {
		type = research_weight_factor
		id = advanced_computing_machine
		value = 999
	}
}     
#1通信连
#1sc = {
#1    enable = {
#1	        any_enemy_country = {
#1            air_strength_ratio = {
#1			tag = ROOT
#1  			ratio < 1
#1  	        }
#1		}
#1
#1   }
#1    abort_when_not_enabled = yes
#1    ai_strategy = {
#1		type = research_weight_factor
#1		id = tech_signal_company
#1		value = 9999
#1	}
#1	ai_strategy = {
#1		type = research_weight_factor
#1		id = tech_signal_company2
#1		value = 9999
#1	}
#1}
# 从不研究的垃圾
non_research = {
        enable = {
		always = yes
        }
        abort_when_not_enabled = yes
        ai_strategy = {
		type = research_weight_factor
		id = submarine_mine_laying
		value = -999
	}
        ai_strategy = {
		type = research_weight_factor
		id = improved_naval_mines
		value = -999
	}
        ai_strategy = {
		type = research_weight_factor
		id = basic_naval_mines
		value = -999
	}
}     

