# AI tank design for testing

generic_light_tanks = { 
	category = land 

	available_for = { }

	roles = {
		land_light_tank
	}
       
	priority = {
		factor = 2000
        modifier = {
			or = { 
				num_of_factories < 26 
				not = { 
					any_allied_country = {
				    is_major = yes
			        } 
				}
			}
			factor = 0
		}
	}
    light_tank_rubbish = {
		priority = {
			factor = 100
            modifier = { 
				has_tech = basic_light_tank_chassis
				factor = 0 #let's not waste XP here
			}
		}
               
		target_variant = { 
			match_value = 1000
			type = light_tank_chassis_0
		    modules = {
			    main_armament_slot = tank_close_support_gun 
			    turret_type_slot = tank_light_three_man_tank_turret
			    suspension_type_slot = tank_wheeled_suspension
			    armor_type_slot = tank_makeshift_armor
			    engine_type_slot = tank_diesel_engine
				special_type_slot_1 = extra_ammo_storage 
				special_type_slot_2 = extra_ammo_storage 
				special_type_slot_3 = extra_ammo_storage 
				special_type_slot_4 = extra_ammo_storage 
			}
		    upgrades = {
			    tank_nsb_engine_upgrade = 3
			    tank_nsb_armor_upgrade = 0
			}
		}
	}
    light_tank_recon = {
		priority = {
			factor = 100
            modifier = { 
				has_tech = improved_light_tank_chassis
				factor = 0 #let's not waste XP here
			}
		}
               
		target_variant = { 
			match_value = 1000
			type = light_tank_chassis_1
		    modules = {
			    main_armament_slot = tank_close_support_gun 
			    turret_type_slot = tank_light_three_man_tank_turret
			    suspension_type_slot = tank_wheeled_suspension
			    armor_type_slot = tank_makeshift_armor
			    engine_type_slot = tank_diesel_engine
				special_type_slot_1 = extra_ammo_storage 
			    special_type_slot_2 = dozer_blade
			    special_type_slot_3 = extra_ammo_storage 
			    special_type_slot_4 = extra_ammo_storage 
            }
		    upgrades = {
			    tank_nsb_engine_upgrade = 0
			    tank_nsb_armor_upgrade = 4
			}
		}
	}
    light_tank_recon_max = {
		priority = {
			factor = 100
		}
               
		target_variant = { 
			match_value = 1000
			type = light_tank_chassis_2
		    modules = {
			    main_armament_slot = tank_close_support_gun 
			    turret_type_slot = tank_light_three_man_tank_turret
			    suspension_type_slot = tank_wheeled_suspension
			    armor_type_slot = tank_makeshift_armor
			    engine_type_slot = tank_diesel_engine
				special_type_slot_1 = secondary_turret_small_cannon
			    special_type_slot_2 = dozer_blade
			    special_type_slot_3 = extra_ammo_storage 
			    special_type_slot_4 = extra_ammo_storage 
            }
		    upgrades = {
			    tank_nsb_engine_upgrade = 0
			    tank_nsb_armor_upgrade = 4
			}
		}
	}
}
#AI中坦设计
generic_medium_tanks = { 
	category = land #装备分属#那不废话嘛肯定是陆地装备啊#

	available_for = {}#什么国家可以用

	roles = {
		land_medium_tank
	}#定义你的装备类型

	priority = {
		factor = 2000
	}#AI设计这个装备类型下的所有装备的优先级
        medium_tank_rubbish = {
		priority = {#在这里定义什么条件下启用或者禁用该装备
			factor = 200
		}

		target_variant = { #你的装备要捏成什么样子
			match_value = 2000#同类装备中AI对这个装备的偏好
			type = medium_tank_chassis_0
		    modules = {
			    main_armament_slot = { any_of = { tank_medium_cannon tank_medium_cannon_2 tank_high_velocity_cannon tank_high_velocity_cannon_2 } }
			    turret_type_slot = tank_medium_three_man_tank_turret
			    suspension_type_slot = tank_christie_suspension
			    armor_type_slot = tank_makeshift_armor
			    engine_type_slot = tank_diesel_engine
			    special_type_slot_1 = easy_maintenance
			    special_type_slot_2 = tank_radio_1
			    special_type_slot_3 = secondary_turret_small_cannon
			    special_type_slot_4 = secondary_turret_small_cannon
		    }
		    upgrades = {
			    tank_nsb_engine_upgrade = 0
			    tank_nsb_armor_upgrade = 1
			}
		}
	}

	basic_medium_tank_default = {
		priority = {
			factor = 250
			modifier = { 
				has_tech = improved_medium_tank_chassis
                has_tech = antitank4
				factor = 0 #let's not waste XP here
			}
            modifier = { 
				is_major = yes
				factor = 0 #我们真的需要为了那点减造价去造棺材嘛？
			}
		}

		target_variant = {
			match_value = 2500
			type = medium_tank_chassis_1
		        modules = {
			        main_armament_slot = { any_of = { tank_medium_cannon_2 tank_high_velocity_cannon tank_high_velocity_cannon_2 } }
			        turret_type_slot = tank_medium_three_man_tank_turret
			        suspension_type_slot = tank_bogie_suspension
			        armor_type_slot = tank_makeshift_armor
			        engine_type_slot = tank_diesel_engine
			        special_type_slot_1 = secondary_turret_small_cannon
			        special_type_slot_2 = secondary_turret_small_cannon
			        special_type_slot_3 = tank_radio_1
			        special_type_slot_4 = easy_maintenance
		        }
		        upgrades = {
			        tank_nsb_engine_upgrade = 0
			        tank_nsb_armor_upgrade = 0
			    }
		}
	}
    basic_medium_tank_superior = {
		priority = {
			factor = 250
			modifier = { 
				has_tech = improved_medium_tank_chassis
				factor = 0 #let's not waste XP here
			}
            modifier = { 
				is_major = no
				factor = 0 #可靠的步兵坦克才能量产！
			}
		}

		target_variant = {
			match_value = 2500
			type = medium_tank_chassis_1
		        modules = {
			        main_armament_slot = { any_of = { tank_medium_cannon tank_medium_cannon_2 } }
			        turret_type_slot = tank_medium_three_man_tank_turret
			        suspension_type_slot = tank_bogie_suspension
			        armor_type_slot = tank_makeshift_armor
			        engine_type_slot = tank_diesel_engine
			        special_type_slot_1 = secondary_turret_small_cannon
			        special_type_slot_2 = secondary_turret_small_cannon
			        special_type_slot_3 = tank_radio_1
			        special_type_slot_4 = easy_maintenance
		        }
		        upgrades = {
			        tank_nsb_engine_upgrade = 0
			        tank_nsb_armor_upgrade = 4
			    }
		}
	}
	improved_medium_tank_default = {
		priority = {
			factor = 300
            modifier = { 
				is_major = yes
				factor = 0 #量大管饱！
			}
        }

		target_variant = {
			match_value = 3000
			type = medium_tank_chassis_2
		    modules = {
			    main_armament_slot = tank_medium_cannon_2
			    turret_type_slot = tank_medium_three_man_tank_turret
			    suspension_type_slot = tank_bogie_suspension
			    armor_type_slot = tank_makeshift_armor
			    engine_type_slot = tank_diesel_engine
			    special_type_slot_1 = secondary_turret_small_cannon
			    special_type_slot_2 = secondary_turret_small_cannon
			    special_type_slot_3 = tank_radio_module
			    special_type_slot_4 = easy_maintenance
		    }
		    upgrades = {
			    tank_nsb_engine_upgrade = 0
			    tank_nsb_armor_upgrade = 0
			}
		}
	}
    improved_medium_tank_Luxurious = {
		priority = {
			factor = 300
            modifier = { 
				is_major = no
				factor = 0 #优质的中坦！
			}
            modifier = { 
				has_tech = advanced_radio
                has_tech = antitank4
				factor = 0 
			}
      	}

		target_variant = {
			match_value = 3500
			type = medium_tank_chassis_2
		        modules = {
			        main_armament_slot = tank_medium_cannon_2
			        turret_type_slot = tank_medium_three_man_tank_turret
			        suspension_type_slot = tank_bogie_suspension
			        armor_type_slot = tank_makeshift_armor
			        engine_type_slot = tank_diesel_engine
			        special_type_slot_1 = secondary_turret_small_cannon
			        special_type_slot_2 = secondary_turret_small_cannon
			        special_type_slot_3 = tank_radio_module
			        special_type_slot_4 = easy_maintenance
		        }
		        upgrades = {
			        tank_nsb_engine_upgrade = 0
			        tank_nsb_armor_upgrade = 4
			}
		}
	}
    improved_medium_tank_Luxurious_breakthrough = {
		priority = {
			factor = 400
            modifier = { 
				is_major = no
				factor = 0 #优质的中坦！
			}
      	}
        enable = {
			has_tech = antitank4
		}

		target_variant = {
			match_value = 5000
			type = medium_tank_chassis_2
		        modules = {
			        main_armament_slot = tank_high_velocity_cannon_2
			        turret_type_slot = tank_medium_three_man_tank_turret
			        suspension_type_slot = tank_bogie_suspension
			        armor_type_slot = tank_makeshift_armor
			        engine_type_slot = tank_diesel_engine
			        special_type_slot_1 = secondary_turret_small_cannon
			        special_type_slot_2 = secondary_turret_small_cannon
			        special_type_slot_3 = tank_radio_module
			        special_type_slot_4 = easy_maintenance
		        }
		        upgrades = {
			        tank_nsb_engine_upgrade = 0
			        tank_nsb_armor_upgrade = 14
			    }
		}
	}
    adv_medium_tank_Luxurious_breakthrough = {
		priority = {
			factor = 450
            modifier = { 
				is_major = no
				factor = 0 #优质的中坦！
			}
      	}
        enable = {
			has_tech = antitank4
            has_tech = advanced_medium_tank_chassis
		}

		target_variant = {
			match_value = 5000
			type = medium_tank_chassis_3
		    modules = {
			    main_armament_slot = tank_high_velocity_cannon_2
			    turret_type_slot = tank_medium_three_man_tank_turret
			    suspension_type_slot = tank_bogie_suspension
			    armor_type_slot = tank_makeshift_armor
			    engine_type_slot = tank_diesel_engine
			    special_type_slot_1 = secondary_turret_small_cannon
			    special_type_slot_2 = secondary_turret_small_cannon
			    special_type_slot_3 = tank_radio_module
			    special_type_slot_4 = easy_maintenance
		    }
		    upgrades = {
			    tank_nsb_engine_upgrade = 6
			    tank_nsb_armor_upgrade = 20
			}
		}
	}
}

generic_medium_tank_destroyer = {
	category = land

	available_for = {}

	roles = {
		land_medium_tank_destroyer
	}

	priority = {
		factor = 0
	}
	medium_tank_destroyer_1 = {
		priority = {
			factor = 100
			modifier = {
			has_tech = basic_medium_tank_chassis 
			factor = 0
		        }	
		}
		enable = {
			has_tech = interwar_antitank
		}

		target_variant = {
			match_value = 1000
			type = medium_tank_destroyer_chassis_0
			modules = {
				main_armament_slot = tank_heavy_cannon
				turret_type_slot = tank_medium_fixed_superstructure_turret
				suspension_type_slot = tank_bogie_suspension
				armor_type_slot = tank_makeshift_armor
				engine_type_slot = tank_diesel_engine
				special_type_slot_1 = extra_ammo_storage
				special_type_slot_2 = extra_ammo_storage
				special_type_slot_3 = extra_ammo_storage
				special_type_slot_4 = easy_maintenance
			}
			upgrades = {
				tank_nsb_engine_upgrade = 3
				tank_nsb_armor_upgrade = 0
			}
		}

		allowed_modules = {
			tank_heavy_cannon
			tank_medium_fixed_superstructure_turret
			tank_bogie_suspension
			tank_riveted_armor
			tank_diesel_engine
            extra_ammo_storage
		}
	}
    battle_destroyer0 = {
		priority = {
			factor = 100
			modifier = {
			has_tech = antitank3
			factor = 0
		        }
		}
		enable = {
			has_tech = antitank2
		}

		target_variant = {
			match_value = 5000
			type = medium_tank_destroyer_chassis_1
			modules = {
				main_armament_slot = tank_heavy_cannon_2 
				turret_type_slot = tank_medium_fixed_superstructure_turret
				suspension_type_slot = tank_bogie_suspension
				armor_type_slot = tank_makeshift_armor
				engine_type_slot = tank_diesel_engine
				special_type_slot_1 = squeezebore_adaptor
				special_type_slot_2 = extra_ammo_storage
				special_type_slot_3 = extra_ammo_storage
				special_type_slot_4 = easy_maintenance
			}
			upgrades = {
				tank_nsb_engine_upgrade = 0
				tank_nsb_armor_upgrade = 0
			}
		}

		allowed_modules = {
			tank_heavy_cannon_2 
			tank_medium_fixed_superstructure_turret
			tank_bogie_suspension
			tank_riveted_armor
			tank_diesel_engine
                        extra_ammo_storage
		}
	}
    battle_destroyer1 = {
		priority = {
			factor = 300
                        modifier = {
			factor = 0
			has_tech = antitank4
		        }	
		}
		enable = {
			has_tech = antitank3
		}

		target_variant = {
			match_value = 5500
			type = medium_tank_destroyer_chassis_2
			modules = {
			    main_armament_slot = tank_medium_cannon_2
			    turret_type_slot = tank_medium_three_man_tank_turret
			    suspension_type_slot = tank_bogie_suspension
			    armor_type_slot = tank_riveted_armor
			    engine_type_slot = tank_diesel_engine
			    special_type_slot_1 = secondary_turret_small_cannon
			    special_type_slot_2 = secondary_turret_small_cannon
			    special_type_slot_3 = extra_ammo_storage
			    special_type_slot_4 = easy_maintenance
		    }
		    upgrades = {
			    tank_nsb_engine_upgrade = 0
			    tank_nsb_armor_upgrade = 9
			}
		}
	}
    battle_destroyer2 = {
		priority = {
			factor = 300
            modifier = {
			factor = 0
			has_tech = antitank5
		    }	
		}
		enable = {
			has_tech = antitank4
		}

		target_variant = {
			match_value = 6000
			type = medium_tank_destroyer_chassis_2
			modules = {
			    main_armament_slot = tank_high_velocity_cannon_2
			    turret_type_slot = tank_medium_three_man_tank_turret
			    suspension_type_slot = tank_bogie_suspension
			    armor_type_slot = tank_riveted_armor
			    engine_type_slot = tank_diesel_engine
			    special_type_slot_1 = secondary_turret_small_cannon
			    special_type_slot_2 = secondary_turret_small_cannon
			    special_type_slot_3 = extra_ammo_storage
			    special_type_slot_4 = easy_maintenance
		    }
		    upgrades = {
			    tank_nsb_engine_upgrade = 0
			    tank_nsb_armor_upgrade = 9
			}
		}
	}
    battle_destroyer3 = {
		priority = {
			factor = 300
      	}
		enable = {
			has_tech = antitank5
		}

		target_variant = {
			match_value = 7500
			type = medium_tank_destroyer_chassis_2
			modules = {
			    main_armament_slot = tank_high_velocity_cannon_3
			    turret_type_slot = tank_medium_fixed_superstructure_turret
			    suspension_type_slot = tank_bogie_suspension
			    armor_type_slot = tank_riveted_armor
			    engine_type_slot = tank_diesel_engine
			    special_type_slot_1 = secondary_turret_small_cannon
			    special_type_slot_2 = secondary_turret_small_cannon
			    special_type_slot_3 = extra_ammo_storage
			    special_type_slot_4 = easy_maintenance
		    }
		    upgrades = {
			    tank_nsb_engine_upgrade = 0
			    tank_nsb_armor_upgrade = 9
			}
		}
	}
}

generic_flame_tanks = {
	category = land

	available_for = {}

	roles = {
		land_medium_flame_tank
	}

	priority = {
		factor = 2000
	}

	basic_flame_tank_default = {
		priority = {
			factor = 10			
		}

		target_variant = {
			match_value = 1000
			type = medium_tank_flame_chassis_0
		    modules = {
				main_armament_slot = flamethrower
				turret_type_slot = tank_light_one_man_tank_turret
				suspension_type_slot = tank_bogie_suspension
				armor_type_slot = tank_makeshift_armor
				engine_type_slot = tank_diesel_engine
				special_type_slot_1 = dozer_blade
				special_type_slot_2 = extra_ammo_storage
				special_type_slot_3 = extra_ammo_storage
				special_type_slot_4 = extra_ammo_storage
			    }
			    upgrades = {
				tank_nsb_engine_upgrade = 0
				tank_nsb_armor_upgrade = 0
			    }
		}
	}
    basic_flame_tank_8K = {
	priority = {
	    factor = 0			
	}
	target_variant = {
			match_value = 1000
			type = medium_tank_flame_chassis_1
		    modules = {
				main_armament_slot = flamethrower
				turret_type_slot = tank_light_one_man_tank_turret
				suspension_type_slot = tank_bogie_suspension
				armor_type_slot = tank_makeshift_armor
				engine_type_slot = tank_gasoline_engine
				special_type_slot_1 = dozer_blade
				special_type_slot_2 = extra_ammo_storage
				special_type_slot_3 = extra_ammo_storage
				special_type_slot_4 = extra_ammo_storage
			}
			upgrades = {
				tank_nsb_engine_upgrade = 0
				tank_nsb_armor_upgrade = 0
			}
		}
	}
}
generic_amph_tank = {
    category = land

	available_for = {}    
        roles = {
		land_amphibious_tank
	}
    priority = {
		factor = 1000
	}
    amph_medium_tank_heavy = {
		priority = {
			factor = 1000
            modifier = {
			not = { has_design_based_on = medium_tank_chassis }
			factor = 0
		    }
      	}

		target_variant = {
			match_value = 3500
			type = heavy_tank_amphibious_chassis_2
		        modules = {
			        main_armament_slot = tank_high_velocity_cannon_3
			        turret_type_slot = tank_heavy_three_man_tank_turret
			        suspension_type_slot = tank_torsion_bar_suspension
			        armor_type_slot = tank_makeshift_armor
			        engine_type_slot = tank_diesel_engine
			        special_type_slot_1 = secondary_turret_small_cannon
			        special_type_slot_2 = secondary_turret_small_cannon
			        special_type_slot_3 = amphibious_drive
			        special_type_slot_4 = secondary_turret_small_cannon
		        }
		        upgrades = {
			        tank_nsb_engine_upgrade = 1
			        tank_nsb_armor_upgrade = 4
			    }
		}
	}
}