
motorized_div_generic = {
	
	role = motorized

	blocked_for = {
		DNZ	
	}

	upgrade_prio = {
		base = 0
	}
	infantry_motorized = {

		upgrade_prio = {
			factor = 0
			modifier = {
				factor = 0
				OR = {	
					tag = SOV
					tag = USA
					tag = ENG
					tag = CAN
				}
				has_tech = mechanised_infantry
				is_historical_focus_on = no
			}
			modifier = {
				factor = 0
				tag = NEP
			}
			modifier = {
				factor = 0
				tag = GER
			}
		}
		target_template = {
			support = {
				engineer = 1
				anti_tank = 1
				anti_air = 1
				artillery = 1
				rangers_support = 1
			}

			regiments = {
				mountaineers = 9
			}
		}
	}

	infantry_mot2 = {

		upgrade_prio = {
			factor = 0
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
			modifier = {
				factor = 0
				NOT = {
					OR = {	
						tag = SOV
						tag = USA
						tag = ENG
					}
				}
			}
		}
		target_template = {
			support = {
				engineer = 1
				logistics_company = 1
				anti_air = 1
				artillery = 1
				rangers_support = 1
			}

			regiments = {
				mechanized = 15
				mot_anti_tank_brigade = 1
				mot_anti_air_brigade = 1
			}
		}
	}

	infantry_mot_NEP = {

		upgrade_prio = {
			factor = 0
			modifier = {
				factor = 0
				NOT = {
					tag = NEP
				}
			}
		}

		target_template = {
			support = {
				engineer = 1
				logistics_company = 1
				anti_air = 1
				artillery = 1
				rangers_support = 1
			}

			regiments = {
				mountaineers = 8
			}
		}
	}

}
mobile_div_generic = {
	
	role = mobile

	available_for = {
		ENG
	}

	upgrade_prio = {
		base = 0
	}

	infantry_mobile = {

		upgrade_prio = {
			factor = 0
			modifier = {
				factor = 0.5
				date < 1941.1.1
			}
			modifier = {
				factor = 0
				is_major = yes
			}
			modifier = {
				factor = 0
				has_tech = mechanised_infantry
			}
		}
		target_template = {
			support = {
				engineer = 1
				anti_tank = 1
				anti_air = 1
				artillery = 1
				rangers_support = 1
			}

			regiments = {
				motorized = 9
			}
		}
	}

	infantry_mobile2 = {

		upgrade_prio = {
			factor = 0
			modifier = {
				factor = 0.5
				date < 1941.1.1
			}
			modifier = {
				factor = 0
				is_major = yes
			}
			modifier = {
				factor = 20
				has_tech = mechanised_infantry
			}
		}
		target_template = {
			support = {
				engineer = 1
				anti_tank = 1
				anti_air = 1
				artillery = 1
				rangers_support = 1
			}

			regiments = {
				mechanized = 9
			}
		}
	}
}
anti_armor_generic = {
	
	role = anti_armor

	blocked_for = {
		SOV
	}

	upgrade_prio = {
		base = 0
	}

	infantry_anti_armor_general = {

		upgrade_prio = {
			factor = 0
		}

		target_template = {
			support = {
				engineer = 1
				anti_tank = 1
				anti_air = 1
				artillery = 1
				rangers_support = 1
			}

			regiments = {
				mountaineers = 9
			}
		}
	}
}

armor_generic = {
	
	role = armor

	blocked_for = {
		GER
		JAP
		ENG
		USA
		ITA
		SOV
		FRA
		CZE
		HUN
		SWE
		NZL
		CAN
		AFG
	}
	
	upgrade_prio = {
		base = 200

		modifier = {
			factor = 7
			OR = {
				has_tech = basic_medium_tank
				has_tech = basic_medium_tank_chassis
			}
		}
		
		modifier = {
			factor = 2
			OR = {
				has_tech = main_battle_tank
				has_tech = main_battle_tank_chassis
			}
		}
		
		modifier = {
			factor = 0
			is_ai_mass_mob = yes
		}
	}
	
	medium_armor_default = {
	
		upgrade_prio = {
			factor = 200

			modifier = {
				factor = 4
				OR = {
					has_tech = basic_medium_tank
					has_tech = basic_medium_tank_chassis
				}
			}
		
			modifier = {
				factor = 0
				is_ai_mass_mob = yes
			}

			modifier = {
				factor = 0
				is_ai_mech_mob = yes
			}

			modifier = {
				factor = 0
				has_country_flag = era_of_transition
			}
		}
		target_template = {
			support = {
				engineer = 1
				rangers_support = 1
				anti_air = 1
				logistics_company = 1
				medium_flame_tank = 1
			}
			
			regiments = {
				medium_armor = 8
				motorized = 8
			}
		}
		replace_at_match = 0.8
		replace_with = medium_armor_2_default
		target_min_match = 0.5
	}

	medium_armor_2_default = { #2 armored 2 default
	
		upgrade_prio = {
			factor = 200

			modifier = {
				factor = 4
				has_tech = armored_car1
			}
		
			modifier = {
				factor = 0
				is_ai_mass_mob = yes
			}

			modifier = {
				factor = 0
				is_ai_mech_mob = yes
			}

			modifier = {
				factor = 0
				has_country_flag = era_of_transition
			}
		}
		target_template = {
			support = {
				engineer = 1
				rangers_support = 1
				anti_air = 1
				logistics_company = 1
				medium_flame_tank = 1
			}
			
			regiments = {
				medium_armor = 8
				motorized = 8
			}
		}
		replace_at_match = 0.8
		replace_with = modern_armor_default
		target_min_match = 0.5
	}


	modern_armor_default = {
	
		upgrade_prio = {
			factor = 200
		
			modifier = {
				factor = 0
				is_ai_mass_mob = yes
			}

			modifier = {
				factor = 0
				is_ai_mech_mob = yes
			}

			modifier = {
				factor = 0
				NOT = { has_country_flag = era_of_transition }
			}
		}
		target_template = {
			support = {
				engineer = 1
				rangers_support = 1
				medium_flame_tank = 1
				logistics_company = 1
				anti_air = 1
			}
			
			regiments = {
				medium_armor = 8
				mechanized = 8
			}
		}
	}
}

garrison_generic = {
	
	role = garrison

	blocked_for = {
		GER
		JAP
		ENG
		USA
		ITA
		SOV
		FRA
	}
	
	upgrade_prio = {
		base = 200
	}

	garrison_generic = {
	
		reinforce_prio = 0
		custom_icon = 7
	
		upgrade_prio = {
			factor = 2

			modifier = {
				factor = 0
				has_focus_tree = vichy_french_focus
			}
		}
		target_template = {
			support = { 
				engineer = 1
				artillery = 1
			}
			
			regiments = {
				infantry = 6
			}
		}
	}

	garrison_vichy = { #stop if with sheer bodycount
	
		reinforce_prio = 0
		custom_icon = 7
	
		upgrade_prio = {
			factor = 2

			modifier = {
				factor = 0
				NOT = { has_focus_tree = vichy_french_focus }
			}
		}
		target_template = {
			support = {
				artillery = 1
			}
			
			regiments = {
				infantry = 6
			}
		}
	}
}

suppression_generic = {
	
	role = suppression
	
	upgrade_prio = {
		base = 200

		modifier = {
			factor = 20
			has_war = yes
		}
	}

	suppression_generic = {
	
		reinforce_prio = 0
		custom_icon = 13
	
		upgrade_prio = {
			factor = 2
		}
		target_template = {
			regiments = {
				cavalry = 10
			}
		}
	}
}


infantry_base = {
	
	role = infantry

	blocked_for = {
		DNZ
	}
	
	upgrade_prio = {
		base = 0
	}
	infantry_irregular_default = {
	
		upgrade_prio = {
			factor = 0
		}
		target_template = {
			regiments = {
				irregular_infantry = 6
			}
		}
	}
	infantry_militia_default = {
	
		upgrade_prio = {
			factor = 0
		}
		target_template = {
			regiments = {
				militia = 6
			}
		}
	}
}
infantry_generic = {
	
	role = infantry

	blocked_for = {
		GER
		JAP
		ENG
		USA
		ITA
		SOV
		CHI
		PRC 
		GXC
		YUN
		SHX
		FRA
		XSM
		SIK
		FIN
		CZE
		MON
		TAN
		NEP
		AOI
		LBA
		POL
		HUN
		SWE
		RAJ
		SPR
		NZL
		MEX
		CAN
		POR
		BEL
		AUS
		AFG
		LUX
	}
	
	upgrade_prio = {
		base = 200

		modifier = {
			factor = 5
		}
	}
	infantry_default = {
	
		upgrade_prio = {
			factor = 10

			modifier = {
				factor = 0
				OR = {
					is_ai_mass_mob = yes
					is_ai_mech_mob = yes
					is_historical_focus_on = no
				}
			}
		}
		target_template = {
			support = {
				engineer = 1
				anti_tank = 1
				logistics_company = 1
				anti_air = 1
				artillery = 1
			}
			
			regiments = {
				infantry = 9
			}
		}
		replace_at_match = 0.9
		replace_with = infantry_improved
		target_min_match = 0.9
	}

	infantry_improved = {
	
		upgrade_prio = {
			factor = 10

			modifier = {
				factor = 0
				num_of_military_factories < 13
			}

			modifier = {
				factor = 0
				OR = {
					is_ai_mass_mob = yes
					is_ai_mech_mob = yes
					is_historical_focus_on = no
				}
			}
		}
		target_template = {
			support = {
				engineer = 1
				anti_tank = 1
				logistics_company = 1
				field_hospital = 1
				artillery = 1
			}
			
			regiments = {
				anti_air_brigade = 1
				anti_tank_brigade = 1
				infantry = 15
			}
		}
	}


	infantry_mass_mob_base = {
	
		upgrade_prio = {
			factor = 10

			modifier = {
				factor = 0
				is_ai_mass_mob = no
			}

			modifier = {
				factor = 0
				is_historical_focus_on = no
			}

			modifier = {
				factor = 0
				OR = {
					num_of_military_factories > 13
					tag = HUN
					tag = ROM
					tag = BEL
					tag = POL
					tag = RAJ
					date > 1941.1.1
				}
			}

		}
		
		target_template = {
			support = {
				artillery = 1
				anti_air = 1
				anti_tank = 1
				rangers_support = 1
			}
			
			regiments = {
				infantry = 7
			}
		}
	}


	infantry_mass_mob_base2 = {
	
		upgrade_prio = {
			factor = 10

			modifier = {
				factor = 0
				is_ai_mass_mob = no
			}

			modifier = {
				factor = 0
				OR = {
					num_of_military_factories < 13
					tag = HUN
					tag = ROM
					tag = BEL
					tag = POL
					tag = RAJ
					date < 1941.1.1
				}
			}

			modifier = {
				factor = 0
				is_historical_focus_on = no
			}


		}
		
		
		target_template = {
			support = {
				artillery = 1
				anti_air = 1
				anti_tank = 1
				engineer = 1
				rangers_support = 1
			}
			
			regiments = {
				infantry = 7
			}
		}
	}

	infantry_mass_mob_BEL_inbetween = {
	
		upgrade_prio = {
			factor = 10

			modifier = {
				factor = 0
				is_ai_mass_mob = no
			}

			modifier = {
				factor = 0
				NOT = { tag = BEL }
			}

			modifier = {
				factor = 0
				is_historical_focus_on = no
			}


		}
		
		target_template = {
			support = {
				engineer = 1
				anti_air = 1
				artillery = 1
				anti_tank = 1
				rangers_support = 1
			}

			regiments = {
				infantry = 7
			}
		}
	}

	infantry_mass_mob_upgrade = {
	
		upgrade_prio = {
			factor = 10

			modifier = {
				factor = 0
				is_ai_mass_mob = no
			}

			modifier = {
				factor = 0
				num_of_military_factories < 35
				NOT = { tag = HUN }
				NOT = { tag = ROM }
				NOT = { tag = MEX }
			}

			modifier = {
				factor = 0
				is_historical_focus_on = no
			}

			modifier = {
				factor = 0
				tag = RAJ
				is_historical_focus_on = yes
				has_army_manpower = { size < 2000000 }
			}


		}
		
		can_upgrade_in_field = {
			has_equipment = { anti_tank_equipment > 200 } 
		}
		
		target_template = {
			support = {
				engineer = 1
				anti_air = 1
				artillery = 1
				logistics_company = 1
				rangers_support = 1
			}

			regiments = {
				infantry = 10
				anti_tank_brigade = 1
			}
		}
	}
	infantry_mech_mob = {
	
		upgrade_prio = {
			factor = 10

			modifier = {
				factor = 0
				is_ai_mech_mob = no
			}
		}
		
		target_template = {
			support = {
				signal_company = 1
				anti_air = 1
				engineer = 1
				logistics_company = 1
				field_hospital = 1
			}
			
			regiments = {
				mechanized = 11
				mot_anti_tank_brigade = 1
			}
		}
	}

}

mountaineers_generic = {
	
	role = mountaineers

	blocked_for = {
		GER
		JAP
		ENG
		USA
		ITA
		SOV
		FRA
		AOI
		LBA
		NEP
		HUN
		RAJ
		SPR
		FIN
		BEL
	}
	
	upgrade_prio = {
		factor = 2

		modifier = {
			factor = 0
			NOT = {
				has_tech = tech_mountaineers
			}
		}
	}
	mountaineers_default = {
	
		upgrade_prio = {
			factor = 2

			modifier = {
				factor = 0
				tag = NEP
			}
		}
	
		target_template = {
			support = {
				engineer = 1
				artillery = 1
				anti_tank = 1
				logistics_company = 1
				anti_air = 1 
			}
			
			regiments = {
				mountaineers = 18
			}
		}
		
	}

	mountaineers_2 = {
	
		upgrade_prio = {
			factor = 2

			modifier = {
				factor = 0
				NOT = { tag = NEP }
			}
		}
		target_template = {
			support = {
				artillery = 1
				anti_air = 1 
			}
			
			regiments = {
				mountaineers = 6
			}
		}
	}
}

marines_generic = {
	
	role = marines

	blocked_for = {
		GER
		JAP
		ENG
		USA
		ITA
		SOV
		FRA
		CAN
	}
	
	upgrade_prio = {
		factor = 2000
	}
	marine_default = {
	
		upgrade_prio = {
			factor = 2000

			modifier = {
				factor = 1
			}

			modifier = {
				factor = 0
				is_ai_amtrac = yes
			}

			modifier = {
				factor = 0
				NOT = {
					has_tech = marines
				}
			}
		}
		target_template = {
			support = {
				pioneer_support = 1
				artillery = 1
				field_hospital = 1
				anti_air = 1
				anti_tank = 1
			}
			
			regiments = {
				marine = 18
			}
		}

	}
	marine_armored = {
	
		upgrade_prio = {
			factor = 2000

			modifier = {
				factor = 1
			}

			modifier = {
				factor = 0
				is_ai_amtrac = yes
			}

			modifier = {
				factor = 0
				NOT = {
					has_tech = marines
				}
			}
		}
		target_template = {
			support = {
				pioneer_support = 1
				artillery = 1
				logistics_company = 1
				anti_air = 1
				anti_tank = 1
			}
			
			regiments = {
				marine = 15
				mechanized = 2
				mot_anti_tank_brigade = 1
			}
		}
	}
	marine_amtrac = {
	
		upgrade_prio = {
			factor = 2000
			modifier = {
				factor = 20
				is_ai_amtrac = yes
			}
			modifier = {
				factor = 0
				is_ai_amtrac = no
			}
		}
		target_template = {
			support = {
				pioneer_support = 1
				artillery = 1
				logistics_company = 1
				medium_flame_tank = 1
				field_hospital = 1
			}
			
			regiments = {
				amphibious_mechanized = 10
				mechanized = 7
				mot_anti_tank_brigade = 1
				mot_anti_air_brigade = 1
			}
		}
	}
}


paratrooper_generic = {
	
	role = paratroopers

	blocked_for = {
		GER
		JAP
		ENG
		USA
		ITA
		SOV
		FRA
	}
	
	upgrade_prio = {
		factor = 2

		modifier = {
			factor = 0
			NOT = {
				has_tech = paratroopers
			}
		}
	}
	paratrooper_default = {
	
		upgrade_prio = {
			factor = 2

			modifier = {
				factor = 1
			}
		}

		target_template = {
			support = {
				engineer = 1
				artillery = 1
				anti_tank = 1
			}
			
			regiments = {
				paratrooper= 9
			}
		}
	}
}



# REGIMENTS:
#infantry
#light_armor
#super_heavy_armor
#modern_armor
#heavy_armor
#medium_armor
#light_armor
#anti_tank
#cavalry
#motorized
#mechanized
#marine
#mountaineers
#paratrooper
#rocket_artillery
#light_tank_destroyer
#medium_tank_destroyer_brigade
#heavy_tank_destroyer_brigade
#super_heavy_tank_destroyer_brigade
#modern_tank_destroyer_brigade
#anti_air
#artillery

# SUPPORT:
#engineer
#recon
#signal_company
#maintenance_company
#anti_tank_brigade
#anti_air_brigade
#artillery_brigade
#field_hospital
#logistics_company
#military_police
#light_sp_anti_air_brigade
#light_sp_artillery_brigade
