# AI tank design for testing

SOV_better_tanks = {
	category = land

	blocked_for = {}

	available_for = {SOV}

	roles = {
		land_medium_tank
	}

	priority = {
		factor = 2000
		modifier = {
			factor = 0
			has_army_experience < 200
			has_country_flag = pure_infantry
		}
	}

	very_basic_medium_tank_default = { #T28
		priority = {
			factor = 2000
			modifier = { 
				has_tech = basic_medium_tank_chassis
				factor = 0 #let's not waste XP here
			}
		}

		target_variant = {
			match_value = 2000
			type = medium_tank_chassis_0
			modules = {
				main_armament_slot = tank_small_cannon_2
				turret_type_slot = tank_medium_three_man_tank_turret
				suspension_type_slot = tank_christie_suspension
				armor_type_slot = tank_riveted_armor
				engine_type_slot = tank_diesel_engine
				special_type_slot_1 = wet_ammo_storage
				special_type_slot_2 = secondary_turret_hmg
				special_type_slot_3 = secondary_turret_hmg
				special_type_slot_4 = tank_radio_module
			}
			upgrades = {
				tank_nsb_engine_upgrade = 0
				tank_nsb_armor_upgrade = 3
			}
		}

		allowed_modules = {	
			wet_ammo_storage
			additional_machine_guns
			tank_small_cannon_2
			tank_medium_three_man_tank_turret
			tank_christie_suspension
			tank_riveted_armor
			tank_diesel_engine
			tank_radio_1
			tank_radio_2
			tank_radio_3
		}
	}

	basic_medium_tank_AT0_MT0 = { #T28
		priority = {
			factor = 500
			modifier = { 
				OR = {
					has_tech = improved_medium_tank_chassis
					has_tech = antitank1
				}
				factor = 0 #let's not waste XP here
			}
		}

		target_variant = {
			match_value = 2000
			type = medium_tank_chassis_1
			modules = {
				main_armament_slot = tank_small_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 = tank_radio_module
				special_type_slot_2 = secondary_turret_hmg
				special_type_slot_3 = secondary_turret_hmg
				special_type_slot_4 = wet_ammo_storage
			}
			upgrades = {
				tank_nsb_engine_upgrade = 0
				tank_nsb_armor_upgrade = 4
			}
		}

		allowed_modules = {	
			easy_maintenance
			tank_small_cannon_2
			tank_close_support_gun 	
			tank_medium_cannon
			tank_medium_three_man_tank_turret
			tank_bogie_suspension
			tank_riveted_armor
			tank_diesel_engine
			tank_radio_1
			tank_radio_2
			tank_radio_3
			secondary_turret_hmg
		}
	}

	basic_medium_tank_AT1_MT0 = { #T28
		priority = {
			factor = 500
			modifier = { 
				OR = {
					has_tech = improved_medium_tank_chassis
					has_tech = antitank3
					has_tech = tech_maintenance_company2
				}
				factor = 0 #let's not waste XP here
			}
		}
		enable = {
			has_tech = antitank1
		}

		target_variant = {
			match_value = 2000
			type = medium_tank_chassis_1
			modules = {
				main_armament_slot = tank_medium_cannon
				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 = tank_radio_module
				special_type_slot_2 = secondary_turret_hmg
				special_type_slot_3 = secondary_turret_hmg
				special_type_slot_4 = wet_ammo_storage
			}
			upgrades = {
				tank_nsb_engine_upgrade = 0
				tank_nsb_armor_upgrade = 4
			}
		}

		allowed_modules = {	
			easy_maintenance
			wet_ammo_storage
			tank_medium_cannon
			tank_medium_three_man_tank_turret
			tank_bogie_suspension
			tank_riveted_armor
			tank_diesel_engine
			tank_radio_1
			tank_radio_2
			tank_radio_3
			secondary_turret_hmg
		}
	}
	basic_medium_tank_AT1_MT2 = { #T28
		priority = {
			factor = 800
			modifier = { 
				OR = {
					has_tech = improved_medium_tank_chassis
					has_tech = antitank3
					NOT = { has_tech = tech_maintenance_company2 }
				}
				factor = 0 #let's not waste XP here
			}
		}
		enable = {
			has_tech = antitank1
		}

		target_variant = {
			match_value = 2000
			type = medium_tank_chassis_1
			modules = {
				main_armament_slot = tank_medium_cannon
				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 = easy_maintenance
				special_type_slot_2 = secondary_turret_hmg
				special_type_slot_3 = secondary_turret_hmg
				special_type_slot_4 = wet_ammo_storage
			}
			upgrades = {
				tank_nsb_engine_upgrade = 0
				tank_nsb_armor_upgrade = 4
			}
		}

		allowed_modules = {	
			easy_maintenance
			wet_ammo_storage
			tank_medium_cannon_2 	
			tank_medium_cannon
			tank_medium_three_man_tank_turret
			tank_bogie_suspension
			tank_riveted_armor
			tank_diesel_engine
			tank_radio_1
			tank_radio_2
			tank_radio_3
			secondary_turret_hmg
		}
	}
	basic_medium_tank_AT3_MT0 = { #T28
		priority = {
			factor = 1200
			modifier = { 
				OR = {
					has_tech = improved_medium_tank_chassis
					NOT = { has_tech = antitank3 }
					has_tech = tech_maintenance_company2
				}
				factor = 0 #let's not waste XP here
			}
		}

		target_variant = {
			match_value = 2000
			type = medium_tank_chassis_1
			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 = tank_radio_module
				special_type_slot_2 = secondary_turret_hmg
				special_type_slot_3 = secondary_turret_hmg
				special_type_slot_4 = wet_ammo_storage
			}
			upgrades = {
				tank_nsb_engine_upgrade = 0
				tank_nsb_armor_upgrade = 4
			}
		}

		allowed_modules = {	
			easy_maintenance
			wet_ammo_storage
			tank_medium_cannon_2
			tank_medium_three_man_tank_turret
			tank_bogie_suspension
			tank_riveted_armor
			tank_diesel_engine
			tank_radio_1
			tank_radio_2
			tank_radio_3
			secondary_turret_hmg
		}
	}
	basic_medium_tank_AT3_MT2 = { #T28
		priority = {
			factor = 1500
			modifier = { 
				OR = {
					has_tech = improved_medium_tank_chassis
					NOT = { has_tech = antitank3 }
					NOT = { has_tech = tech_maintenance_company2 }
				}
				factor = 0 #let's not waste XP here
			}
		}

		target_variant = {
			match_value = 2000
			type = medium_tank_chassis_1
			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 = easy_maintenance
				special_type_slot_2 = secondary_turret_hmg
				special_type_slot_3 = secondary_turret_hmg
				special_type_slot_4 = wet_ammo_storage
			}
			upgrades = {
				tank_nsb_engine_upgrade = 0
				tank_nsb_armor_upgrade = 4
			}
		}

		allowed_modules = {	
			easy_maintenance
			wet_ammo_storage
			tank_medium_cannon_2
			tank_medium_three_man_tank_turret
			tank_bogie_suspension
			tank_riveted_armor
			tank_diesel_engine
			tank_radio_1
			tank_radio_2
			tank_radio_3
			secondary_turret_hmg
		}
	}

	improved_medium_tank_AT1_MT0 = {
		priority = {
			factor = 2000
			modifier = { 
				OR = {
					has_tech = advanced_medium_tank_chassis
					has_tech = antitank3
					has_tech = tech_maintenance_company2
				}
				factor = 0 #let's not waste XP here
			}
		}
		enable = {
			has_tech = antitank1
		}

		target_variant = { #T34/76
			match_value = 3500
			type = medium_tank_chassis_2
			modules = {
				main_armament_slot = tank_medium_cannon
				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 = tank_radio_module
				special_type_slot_2 = secondary_turret_hmg
				special_type_slot_3 = secondary_turret_hmg
				special_type_slot_4 = wet_ammo_storage
			}
			upgrades = {
				tank_nsb_engine_upgrade = 0
				tank_nsb_armor_upgrade = 14
			}
		}

		allowed_modules = {
			easy_maintenance
			tank_medium_cannon
			tank_high_velocity_cannon_2
			tank_medium_three_man_tank_turret
			tank_bogie_suspension
			tank_riveted_armor
			wet_ammo_storage
			tank_diesel_engine
			secondary_turret_hmg
			tank_radio_3
			tank_radio_2
			tank_radio_1
		}
	}

	improved_medium_tank_AT1_MT2 = {
		priority = {
			factor = 3000
			modifier = { 
				OR = {
					has_tech = advanced_medium_tank_chassis
					has_tech = antitank3
					NOT = { has_tech = tech_maintenance_company2 }
				}
				factor = 0 #let's not waste XP here
			}
		}
		enable = {
			has_tech = antitank1
		}

		target_variant = { #T34/76
			match_value = 3500
			type = medium_tank_chassis_2
			modules = {
				main_armament_slot = tank_medium_cannon
				turret_type_slot = tank_medium_three_man_tank_turret 
				suspension_type_slot = tank_torsion_bar_suspension
				armor_type_slot = tank_riveted_armor
				engine_type_slot = tank_diesel_engine
				special_type_slot_1 = easy_maintenance
				special_type_slot_2 = secondary_turret_hmg
				special_type_slot_3 = secondary_turret_hmg
				special_type_slot_4 = wet_ammo_storage
			}
			upgrades = {
				tank_nsb_engine_upgrade = 0
				tank_nsb_armor_upgrade = 14
			}
		}

		allowed_modules = {		
			easy_maintenance
			tank_medium_cannon
			tank_high_velocity_cannon_2
			tank_medium_three_man_tank_turret
			tank_torsion_bar_suspension
			tank_riveted_armor
			wet_ammo_storage
			tank_diesel_engine
			secondary_turret_hmg
			tank_radio_3
			tank_radio_2
			tank_radio_1
		}
	}

	improved_medium_tank_AT3_MT0 = {
		priority = {
			factor = 5000
			modifier = { 
				OR = {
					has_tech = advanced_medium_tank_chassis
					NOT = { has_tech = antitank3 }
					has_tech = tech_maintenance_company2
				}
				factor = 0 #let's not waste XP here
			}
		}

		target_variant = { #T34/76
			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_torsion_bar_suspension
				armor_type_slot = tank_riveted_armor
				engine_type_slot = tank_diesel_engine
				special_type_slot_1 = tank_radio_module
				special_type_slot_2 = secondary_turret_hmg
				special_type_slot_3 = secondary_turret_hmg
				special_type_slot_4 = wet_ammo_storage
			}
			upgrades = {
				tank_nsb_engine_upgrade = 0
				tank_nsb_armor_upgrade = 14
			}
		}

		allowed_modules = {
			
			tank_medium_cannon_2
			tank_high_velocity_cannon_2
			tank_medium_three_man_tank_turret
			tank_torsion_bar_suspension
			tank_riveted_armor
			wet_ammo_storage
			tank_diesel_engine
			secondary_turret_hmg
			tank_radio_3
			tank_radio_2
			tank_radio_1
		}
	}

	improved_medium_tank_AT3_MT2 = {
		priority = {
			factor = 10000
			modifier = { 
				OR = {
					has_tech = advanced_medium_tank_chassis
					NOT = { has_tech = antitank3 }
					NOT = { has_tech = tech_maintenance_company2 }
				}
				factor = 0 #let's not waste XP here
			}
		}

		target_variant = { #T34/76
			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_torsion_bar_suspension
				armor_type_slot = tank_riveted_armor
				engine_type_slot = tank_diesel_engine
				special_type_slot_1 = easy_maintenance
				special_type_slot_2 = secondary_turret_hmg
				special_type_slot_3 = secondary_turret_hmg
				special_type_slot_4 = wet_ammo_storage
			}
			upgrades = {
				tank_nsb_engine_upgrade = 0
				tank_nsb_armor_upgrade = 14
			}
		}

		allowed_modules = {
			easy_maintenance
			tank_medium_cannon_2
			tank_high_velocity_cannon_2
			tank_medium_three_man_tank_turret
			tank_torsion_bar_suspension
			tank_riveted_armor
			wet_ammo_storage
			tank_diesel_engine
			secondary_turret_hmg
			tank_radio_3
			tank_radio_2
			tank_radio_1
		}
	}

	advanced_medium_tank_default = { #
		priority = {
			factor = 15000
			modifier = {
				factor = 0
				has_country_flag = era_of_transition
			}
		}

		target_variant = {
			match_value = 4000
			type = medium_tank_chassis_3
			modules = {
				main_armament_slot = tank_medium_cannon_2
				turret_type_slot = tank_medium_three_man_tank_turret
				suspension_type_slot = tank_torsion_bar_suspension
				armor_type_slot = tank_riveted_armor
				engine_type_slot = tank_diesel_engine
				special_type_slot_1 = tank_radio_module
				special_type_slot_2 = secondary_turret_hmg
				special_type_slot_3 = secondary_turret_hmg
				special_type_slot_4 = easy_maintenance
			}
			upgrades = {
				tank_nsb_engine_upgrade = 0
				tank_nsb_armor_upgrade = 20
			}
		}

		allowed_modules = {
			tank_high_velocity_cannon_2
			tank_medium_cannon_2
			tank_medium_three_man_tank_turret
			tank_christie_suspension
			tank_riveted_armor
			tank_diesel_engine
			tank_radio_3
			tank_radio_2
			tank_radio_1
			easy_maintenance
			wet_ammo_storage	
			secondary_turret_hmg
			auto_loader
		}
	}

	advanced_medium_tank_transition = { #
		priority = {
			factor = 25000
			modifier = {
				factor = 0
				NOT = { has_country_flag = era_of_transition }
			}
		}

		target_variant = {
			match_value = 4000
			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_christie_suspension
				armor_type_slot = tank_welded_armor
				engine_type_slot = tank_diesel_engine
				special_type_slot_1 = tank_radio_module
				special_type_slot_2 = secondary_turret_small_cannon
				special_type_slot_3 = secondary_turret_small_cannon
				special_type_slot_4 = easy_maintenance
			}
			upgrades = {
				tank_nsb_engine_upgrade = 0
				tank_nsb_armor_upgrade = 20
			}
		}

		allowed_modules = {
			easy_maintenance
			secondary_turret_small_cannon
			tank_high_velocity_cannon_2
			tank_medium_three_man_tank_turret
			tank_christie_suspension
			tank_welded_armor
			tank_diesel_engine
			sloped_armor
			tank_radio_3
			tank_radio_2
			tank_radio_1
			wet_ammo_storage
		}
	}
}
SOV_heavy_tanks = {
	category = land

	blocked_for = {}

	available_for = {SOV}

	roles = {
		land_heavy_tank
	}

	priority = {
		factor = 0 #test_flag
		modifier = {
			factor = 0
			has_army_experience < 200
			has_country_flag = pure_infantry
		}
	}

	basic_heavy_tank_default = {
		priority = {
			factor = 10
			modifier = { 
				has_tech = improved_heavy_tank_chassis 
				factor = 0 #let's not waste XP here
			}
			modifier = { 
				is_mass_assault_has_human_wave = yes
				factor = 0 
			}
			
		}

		target_variant = {
			match_value = 1000
			type = heavy_tank_chassis_1
			modules = {
				main_armament_slot = {
					any_of = { 
						tank_heavy_cannon
						tank_heavy_cannon_2
						tank_high_velocity_cannon_3
					}
				}
				turret_type_slot = tank_heavy_three_man_tank_turret
				suspension_type_slot = tank_bogie_suspension
				armor_type_slot = tank_welded_armor
				engine_type_slot = tank_gasoline_engine
				special_type_slot_1 = tank_radio_module
				special_type_slot_2 = sloped_armor
				special_type_slot_3 = armor_skirts
				special_type_slot_4 = wet_ammo_storage
			}
			upgrades = {
				tank_nsb_engine_upgrade = 9
				tank_nsb_armor_upgrade = 20
			}
		}

		allowed_modules = {
			wet_ammo_storage
			tank_heavy_cannon
			sloped_armor
			tank_christie_suspension
			easy_maintenance 
			tank_heavy_cannon_2
			tank_heavy_cannon
			tank_high_velocity_cannon_3
			tank_heavy_three_man_tank_turret
			tank_bogie_suspension
			tank_welded_armor
			tank_gasoline_engine
			secondary_turret_hmg
			tank_radio_3
			tank_radio_2
			tank_radio_1
			armor_skirts
		}
	}
	basic_heavy_tank_tech = {
		priority = {
			factor = 10
			modifier = { 
				has_tech = improved_heavy_tank_chassis 
				factor = 0 #let's not waste XP here
			}
			modifier = { 
				is_mass_assault_not_human_wave = yes
				factor = 0 
			}
			
		}

		target_variant = {
			match_value = 1000
			type = heavy_tank_chassis_1
			modules = {
				main_armament_slot = {
					any_of = { 
						tank_heavy_cannon
						tank_heavy_cannon_2
						tank_high_velocity_cannon_3
					}
				}
				turret_type_slot = tank_heavy_three_man_tank_turret
				suspension_type_slot = tank_bogie_suspension
				armor_type_slot = tank_welded_armor
				engine_type_slot = tank_gasoline_engine
				special_type_slot_1 = tank_radio_module
				special_type_slot_2 = sloped_armor
				special_type_slot_3 = easy_maintenance
				special_type_slot_4 = wet_ammo_storage
			}
			upgrades = {
				tank_nsb_engine_upgrade = 9
				tank_nsb_armor_upgrade = 20
			}
		}

		allowed_modules = {
			wet_ammo_storage
			tank_heavy_cannon
			sloped_armor
			tank_christie_suspension
			easy_maintenance 
			tank_heavy_cannon_2
			tank_heavy_cannon
			tank_high_velocity_cannon_3
			tank_heavy_three_man_tank_turret
			tank_bogie_suspension
			tank_welded_armor
			tank_gasoline_engine
			secondary_turret_hmg
			tank_radio_3
			tank_radio_2
			tank_radio_1
		}
	}

	improved_heavy_tank_default = { 
		priority = {
			factor = 100
			modifier = { 
				has_tech = advanced_heavy_tank_chassis 
				factor = 0 #let's not waste XP here
			}
			modifier = { 
				is_mass_assault_not_human_wave = yes
				factor = 0 
			}
		}

		target_variant = {
			match_value = 2000
			type = heavy_tank_chassis_2
			modules = {
				main_armament_slot = {
					any_of = { 
						tank_heavy_cannon_2
						tank_high_velocity_cannon_3
					}
				}
				turret_type_slot = tank_heavy_three_man_tank_turret
				suspension_type_slot = tank_christie_suspension
				armor_type_slot = tank_welded_armor
				engine_type_slot = tank_gasoline_engine
				special_type_slot_1 = tank_radio_module
				special_type_slot_2 = sloped_armor
				special_type_slot_3 = easy_maintenance
				special_type_slot_4 = wet_ammo_storage
			}
			upgrades = {
				tank_nsb_engine_upgrade = 13
				tank_nsb_armor_upgrade = 20
			}
		}

		allowed_modules = {
			tank_heavy_cannon_2
			wet_ammo_storage
			tank_high_velocity_cannon_3
			tank_heavy_three_man_tank_turret
			sloped_armor
			tank_christie_suspension
			easy_maintenance 
			tank_bogie_suspension
			tank_welded_armor
			tank_gasoline_engine
			secondary_turret_hmg
			tank_radio_3
			tank_radio_2
			tank_radio_1
		}
	}
	advanced_heavy_tank_default = { #Tiger II
		priority = {
			factor = 100
		}

		target_variant = {
			match_value = 4000
			type = heavy_tank_chassis_3
			modules = {
				main_armament_slot = {
					any_of = { 
						tank_heavy_cannon_3
						tank_high_velocity_cannon_3
					}
				}
				turret_type_slot = tank_heavy_three_man_tank_turret
				suspension_type_slot = tank_bogie_suspension
				armor_type_slot = tank_welded_armor
				engine_type_slot = tank_gasoline_engine
				special_type_slot_1 = tank_radio_module
				special_type_slot_2 = sloped_armor
				special_type_slot_3 = easy_maintenance
				special_type_slot_4 = wet_ammo_storage
			}
			upgrades = {
				tank_nsb_engine_upgrade = 13
				tank_nsb_armor_upgrade = 20
			}
		}

		allowed_modules = {
			tank_heavy_cannon_2
			wet_ammo_storage
			tank_heavy_cannon
			sloped_armor
			tank_christie_suspension
			easy_maintenance 
			tank_medium_cannon 
			tank_medium_cannon_2
			tank_high_velocity_cannon
			tank_high_velocity_cannon_2
			tank_high_velocity_cannon_3
			tank_heavy_three_man_tank_turret
			tank_bogie_suspension
			tank_welded_armor
			tank_gasoline_engine
			secondary_turret_hmg
			tank_radio_3
			tank_radio_2
			tank_radio_1
		}
	}
}

SOV_better_modern_tanks = {
	category = land

	blocked_for = {}

	available_for = {SOV}

	roles = {
		land_modern_tank
	}

	priority = {
		factor = 200
		modifier = {
			num_of_factories < 100
			factor = 0
		}
	}

	basic_modern_tank_default = { #T54
		priority = {
			factor = 10
		}

		target_variant = {
			match_value = 1000
			type = modern_tank_chassis
			modules = {
				main_armament_slot = tank_heavy_cannon_3
				turret_type_slot = tank_modern_tank_turret
				suspension_type_slot = tank_torsion_bar_suspension
				armor_type_slot = tank_welded_armor
				engine_type_slot = tank_diesel_engine
				special_type_slot_1 = tank_radio_module
				special_type_slot_2 = sloped_armor
				special_type_slot_3 = stabilizer
				special_type_slot_4 = auto_loader
			}
			upgrades = {
				tank_nsb_engine_upgrade = 6
				tank_nsb_armor_upgrade = 20
			}
		}

		allowed_modules = {
		 
			tank_high_velocity_cannon_3
			tank_heavy_cannon_3 
			tank_modern_tank_turret
			tank_torsion_bar_suspension
			tank_welded_armor
			tank_diesel_engine
			sloped_armor
			auto_loader
			stabilizer
			tank_radio_3
			tank_radio_2
			tank_radio_1
		}
	}
}

SOV_modern_tank_destroyer = {
	category = land

	blocked_for = {}

	available_for = {SOV}

	roles = {
		land_modern_tank_destroyer
	}

	priority = {
		factor = 200
		modifier = {
			num_of_factories < 100
			factor = 0
		}
	}

	basic_modern_tank_destroyer_default = {
		priority = {
			factor = 10
			
		}

		target_variant = {
			match_value = 1000
			type = modern_tank_destroyer_chassis
			modules = {
				main_armament_slot = { 
					any_of = { 
						tank_high_velocity_cannon_3 
						tank_heavy_cannon_3 
						tank_heavy_cannon_2 
						tank_high_velocity_cannon_2 
						tank_heavy_cannon 
					} 
				}
				turret_type_slot = tank_modern_tank_turret
				suspension_type_slot = tank_torsion_bar_suspension
				armor_type_slot = tank_cast_armor
				engine_type_slot = tank_gas_turbine_engine
				special_type_slot_1 = tank_radio_module
				special_type_slot_2 = smoke_launchers
				special_type_slot_3 = armor_skirts
				special_type_slot_4 = sloped_armor
			}
			upgrades = {
				tank_nsb_engine_upgrade = 12
				tank_nsb_armor_upgrade = {
					base = 2
					modifier = {
						add = 4
						has_war = yes
					}
					modifier = {
						any_enemy_country = {
							is_major = yes
						}
						add = 2
					}
				}
			}
		}

		allowed_modules = {
			
			tank_high_velocity_cannon_2 
			tank_high_velocity_cannon_3 
			tank_heavy_cannon 
			tank_heavy_cannon_2 
			tank_heavy_cannon_3 
			tank_modern_tank_turret
			tank_torsion_bar_suspension
			tank_cast_armor
			tank_gas_turbine_engine
			sloped_armor
			smoke_launchers
			armor_skirts
			tank_radio_3
			tank_radio_2
			tank_radio_1
		}
	}
}

SOV_medium_tank_destroyer = {
	category = land

	blocked_for = {}

	available_for = {SOV}

	roles = {
		land_medium_tank_destroyer
	}

	priority = {
		factor = 0 #test_flag
		modifier = {
			factor = 0
			OR = {
				has_country_flag = pure_infantry
				has_country_flag = grand_battleplan_15w
			}
		}
	}
	medium_tank_destroyer_0 = {
		priority = {
			factor = 20000
			
		}
		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_christie_suspension
				armor_type_slot = tank_riveted_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 = 0
				tank_nsb_armor_upgrade = 4
			}
		}

		allowed_modules = {
			tank_heavy_cannon
			tank_medium_fixed_superstructure_turret
			tank_christie_suspension
			tank_riveted_armor
			tank_diesel_engine
			secondary_turret_small_cannon
			extra_ammo_storage
		}
	}
	medium_tank_destroyer_1 = {
		priority = {
			factor = 10000
			
		}
		enable = {
			has_tech = interwar_antitank
			NOT = { has_tech = antitank2 }
		}

		target_variant = {
			match_value = 1000
			type = medium_tank_destroyer_chassis_1
			modules = {
				main_armament_slot = tank_heavy_cannon
				turret_type_slot = tank_medium_fixed_superstructure_turret
				suspension_type_slot = tank_christie_suspension
				armor_type_slot = tank_riveted_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 = 0
				tank_nsb_armor_upgrade = 4
			}
		}

		allowed_modules = {
			tank_heavy_cannon
			tank_medium_fixed_superstructure_turret
			tank_christie_suspension
			tank_riveted_armor
			tank_diesel_engine
			secondary_turret_small_cannon
			extra_ammo_storage
		}
	}
	
	medium_tank_destroyer_1c = {
		priority = {
			factor = 50000
			
		}
		enable = {
			has_tech = antitank2
			NOT = { has_tech = antitank3 }
		}

		target_variant = {
			match_value = 10000
			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_christie_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 = tank_radio_module
				special_type_slot_4 = easy_maintenance
			}
			upgrades = {
				tank_nsb_engine_upgrade = 0
				tank_nsb_armor_upgrade = 4
			}
		}

		allowed_modules = {
			tank_heavy_cannon_2
			tank_medium_fixed_superstructure_turret
			tank_christie_suspension
			tank_riveted_armor
			tank_diesel_engine
			secondary_turret_small_cannon
			extra_ammo_storage
			easy_maintenance
			tank_radio_1
			tank_radio_2
			tank_radio_3
		}
	}	
	medium_tank_destroyer_1d = {
		priority = {
			factor = 70000
			
		}
		enable = {
			has_tech = antitank3
		}

		target_variant = {
			match_value = 20000
			type = medium_tank_destroyer_chassis_1
			modules = {
				main_armament_slot = tank_medium_cannon_2
				turret_type_slot = tank_medium_three_man_tank_turret
				suspension_type_slot = tank_christie_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 = tank_radio_module
				special_type_slot_4 = easy_maintenance
			}
			upgrades = {
				tank_nsb_engine_upgrade = 0
				tank_nsb_armor_upgrade = 4
			}
		}

		allowed_modules = {
			tank_medium_cannon_2
			tank_medium_three_man_tank_turret
			tank_christie_suspension
			tank_riveted_armor
			tank_diesel_engine
			secondary_turret_small_cannon
			extra_ammo_storage
			easy_maintenance
			tank_radio_1
			tank_radio_2
			tank_radio_3
		}
	}
	medium_tank_destroyer_2a = {
		priority = {
			factor = 20000
			
		}
		enable = {
			has_tech = antitank3
			NOT = { has_tech = antitank4 }
		}

		target_variant = {
			match_value = 15000
			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_christie_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 = tank_radio_module
				special_type_slot_4 = easy_maintenance
			}
			upgrades = {
				tank_nsb_engine_upgrade = 0
				tank_nsb_armor_upgrade = 4
			}
		}

		allowed_modules = {
			tank_medium_cannon_2
			tank_medium_three_man_tank_turret
			tank_christie_suspension
			tank_riveted_armor
			tank_diesel_engine
			secondary_turret_small_cannon
			extra_ammo_storage
			easy_maintenance
			tank_radio_1
			tank_radio_2
			tank_radio_3
		}
	}
	medium_tank_destroyer_2b = {
		priority = {
			factor = 50000
			
		}
		enable = {
			has_tech = antitank4
		}

		target_variant = {
			match_value = 15000
			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_christie_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 = tank_radio_module
				special_type_slot_4 = easy_maintenance
			}
			upgrades = {
				tank_nsb_engine_upgrade = 0
				tank_nsb_armor_upgrade = 4
			}
		}

		allowed_modules = {
			tank_high_velocity_cannon_2
			tank_medium_three_man_tank_turret
			tank_christie_suspension
			tank_riveted_armor
			tank_diesel_engine
			secondary_turret_small_cannon
			extra_ammo_storage
			easy_maintenance
			tank_radio_1
			tank_radio_2
			tank_radio_3
		}
	}

	medium_tank_destroyer_3 = {
		priority = {
			factor = 20000
			
		}

		target_variant = {
			match_value = 20000
			type = medium_tank_destroyer_chassis_3
			modules = {
				main_armament_slot = tank_high_velocity_cannon_2
				turret_type_slot = tank_medium_three_man_tank_turret
				suspension_type_slot = tank_christie_suspension
				armor_type_slot = tank_welded_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 = 8
				tank_nsb_armor_upgrade = 20
			}
		}

		allowed_modules = {
			tank_high_velocity_cannon_2
			tank_medium_three_man_tank_turret
			tank_christie_suspension
			tank_welded_armor
			tank_gasoline_engine
			secondary_turret_small_cannon
			extra_ammo_storage
			easy_maintenance
			tank_radio_1
			tank_radio_2
			tank_radio_3
		}
	}
}

SOV_light_tank_destroyers = {
	category = land

	blocked_for = {}

	available_for = {SOV}

	roles = {
		land_light_tank_destroyer
	}

	priority = {
		factor = 0
	}
	light_tank_destroyer_2 = {
		priority = {
			factor = 50
			modifier = {
				factor = 0
				has_tech = antitank4
			}
			modifier = {
				factor = 0
				has_tech = advanced_light_tank_chassis
			}
			
		}

		target_variant = {
			match_value = 9000
			type = light_tank_destroyer_chassis_2
			modules = {
				main_armament_slot = tank_high_velocity_cannon
				turret_type_slot = tank_light_fixed_superstructure_turret
				suspension_type_slot = tank_wheeled_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 = 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
			}
		}

		allowed_modules = {
			tank_medium_cannon_2
			tank_high_velocity_cannon
			tank_high_velocity_cannon_2
			tank_light_fixed_superstructure_turret
			tank_wheeled_suspension
			tank_riveted_armor
			tank_diesel_engine
			dozer_blade
			extra_ammo_storage
			secondary_turret_small_cannon
			easy_maintenance
		}
	}
	light_tank_destroyer_2a = {
		priority = {
			factor = 50
			modifier = {
				factor = 0
				NOT = { has_tech = antitank4 }
			}
			modifier = {
				factor = 0
				has_tech = advanced_light_tank_chassis
			}
			modifier = { 
				is_mass_assault_not_human_wave = yes
				factor = 0 
			}
			
		}

		target_variant = {
			match_value = 9000
			type = light_tank_destroyer_chassis_2
			modules = {
				main_armament_slot = tank_high_velocity_cannon_2
				turret_type_slot = tank_light_fixed_superstructure_turret
				suspension_type_slot = tank_wheeled_suspension
				armor_type_slot = tank_riveted_armor
				engine_type_slot = tank_diesel_engine
				special_type_slot_1 = easy_maintenance
				special_type_slot_2 = extra_ammo_storage
				special_type_slot_3 = secondary_turret_small_cannon
				special_type_slot_4 = dozer_blade
			}
			upgrades = {
				tank_nsb_engine_upgrade = 0
				tank_nsb_armor_upgrade = 0
			}
		}

		allowed_modules = {
			tank_high_velocity_cannon_2
			tank_light_fixed_superstructure_turret
			tank_wheeled_suspension
			tank_riveted_armor
			tank_diesel_engine
			dozer_blade
			extra_ammo_storage
			secondary_turret_small_cannon
			easy_maintenance
		}
	}
	light_tank_destroyer_3 = {
		priority = {
			factor = 50
			modifier = { 
				is_mass_assault_not_human_wave = yes
				factor = 0 
			}
			
		}

		target_variant = {
			match_value = 1500
			type = light_tank_destroyer_chassis_3
			modules = {
				main_armament_slot = tank_high_velocity_cannon_2
				turret_type_slot = tank_light_fixed_superstructure_turret
				suspension_type_slot = tank_wheeled_suspension
				armor_type_slot = tank_riveted_armor
				engine_type_slot = tank_diesel_engine
				special_type_slot_1 = easy_maintenance
				special_type_slot_2 = extra_ammo_storage
				special_type_slot_3 = secondary_turret_small_cannon
				special_type_slot_4 = dozer_blade
			}
			upgrades = {
				tank_nsb_engine_upgrade = 0
				tank_nsb_armor_upgrade = 0
			}
		}

		allowed_modules = {
			tank_high_velocity_cannon_2
			tank_light_fixed_superstructure_turret
			tank_wheeled_suspension
			tank_riveted_armor
			tank_diesel_engine
			dozer_blade
			extra_ammo_storage
			secondary_turret_small_cannon
			easy_maintenance
		}
	}
}
