
armored_GER_sp_gbp = {
	
	role = armor

	available_for = {
		GER
	}
	upgrade_prio = {
		factor = 3000
			
		modifier = {
			factor = 0
			NOT = { has_country_flag = spacemarine_gbp }
		}
		modifier = {
			factor = 0
			NOT = { has_dlc = "No Step Back" }
		}
	}
	heavy_TD_spacemarine_1 = {
		reinforce_prio = 2

		upgrade_prio = {
			factor = 500
			modifier = {
				factor = 0
				can_equip_mech = yes
			}
		}

		target_template = {
			support = {
				medium_flame_tank = 1
				assault_engineer = 1
				field_hospital = 1
				logistics_company = 1
				rangers_support = 1
			}
			
			regiments = {
				heavy_tank_destroyer_brigade = 5
				motorized = 13
				mot_anti_air_brigade = 1
			}
		}
	}
	heavy_TD_spacemarine_2 = {
		reinforce_prio = 2

		upgrade_prio = {
			factor = 5000
		}

		target_template = {
			support = {
				medium_flame_tank = 1
				assault_engineer = 1
				field_hospital = 1
				logistics_company = 1
				rangers_support = 1
			}
			
			regiments = {
				heavy_tank_destroyer_brigade = 5
				mechanized = 13
				mot_anti_air_brigade = 1
			}
		}
	}
}
armored_GER = {
	
	role = armor

	available_for = {
		GER
	}
	upgrade_prio = {
		factor = 3000
			
		modifier = {
			factor = 0
			OR = {
				AND = {
					OR = {
						has_country_flag = spacemarine
					}
					has_army_manpower = { size < 1200000 }
					FRA = { has_capitulated = no }
				}
				has_country_flag = mass_mob_flag
				has_country_flag = mass_infantry_flag
				has_country_flag = mech_god
			}
		}
	}
	heavy_TD_spacemarine = {
		reinforce_prio = 2

	
		upgrade_prio = {
			factor = 5000
			modifier = {
				factor = 0
				NOT = { has_dlc = "No Step Back" }
			}
			
			modifier = {
				factor = 0
				NOT = { has_country_flag = spacemarine_gbp }
			}
		}

		target_template = {
			support = {
				medium_flame_tank = 1
				assault_engineer = 1
				field_hospital = 1
				logistics_company = 1
				anti_air = 1
			}
			
			regiments = {
				heavy_tank_destroyer_brigade = 5
				mechanized = 13
			}
		}
	}
	heavy_TD_spacemarine_nd = {
		reinforce_prio = 2

	
		upgrade_prio = {
			factor = 8000
			modifier = {
				factor = 0
				has_dlc = "No Step Back"
			}
			
			modifier = {
				factor = 0
				NOT = { has_country_flag = spacemarine_gbp }
			}
		}

		target_template = {
			support = {
				artillery = 1
				assault_engineer = 1
				field_hospital = 1
				logistics_company = 1
				anti_air = 1
			}
			
			regiments = {
				heavy_armor = 5
				mechanized = 13
			}
		}
	}

	medium_armor_mass_infantry = {
		reinforce_prio = 2

	
		upgrade_prio = {
			factor = 5000
			modifier = {
				factor = 0
				NOT = { has_country_flag = mass_infantry }
			}
			modifier = {
				factor = 0
				GER_europe_is_ours = no
			}
		}
		target_template = {
			support = {
				medium_flame_tank = 1
				assault_engineer = 1
				field_hospital = 1
				anti_air = 1
				logistics_company = 1
			}
			
			regiments = {
				medium_tank_destroyer_brigade = 5
				infantry = 15
			}
		}
	}
	medium_armor_default_GER_no_dlc = {
		reinforce_prio = 2

	
		upgrade_prio = {
			factor = 15000
			modifier = {
				factor = 0
				can_equip_mech = yes
			}
			modifier = {
				factor = 0
				has_dlc = "No Step Back"
			}
		}

		target_template = {
			support = {
				artillery = 1
				assault_engineer = 1
				field_hospital = 1
				logistics_company = 1
				anti_air = 1
			}
			
			regiments = {
				heavy_armor = 3
				medium_armor = 6
				mechanized = 8
			}
		}
		
		replace_at_match = 0.5
		replace_with = medium_armor_2_GER_no_dlc
		target_min_match = 0.5
	}

	medium_armor_2_GER_no_dlc = {
		reinforce_prio = 2

	
		upgrade_prio = {
			factor = 25000
			modifier = {
				factor = 0
				can_equip_mech = no
			}
			modifier = {
				factor = 0
				has_dlc = "No Step Back"
			}
		}

		can_upgrade_in_field = {
			has_equipment = { mechanized_equipment > 500 }
		}
		target_template = {
			support = {
				artillery = 1
				assault_engineer = 1
				field_hospital = 1
				logistics_company = 1
				anti_air = 1
			}
			
			regiments = {
				heavy_armor = 3
				medium_armor = 6
				mechanized = 8
			}
		}
	}

	medium_armor_3_MW_base_no_fh_logi = {
		reinforce_prio = 2

	
		upgrade_prio = {
			factor = 5000
			modifier = {
				factor = 0
				OR = {
					NOT = { has_dlc = "No Step Back" }
					NOT = { has_country_flag = mobile_warfare_flag }
					can_equip_mech = yes
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_field_hospital = yes
					has_logistics = yes
				}
			}
		}
		target_template = {
			support = {
				medium_flame_tank = 1
				assault_engineer = 1
				artillery = 1
				anti_air = 1
				recon = 1
			}
			
			regiments = {
				medium_tank_destroyer_brigade = 2
				medium_armor = 8
				motorized = 8
			}
		}
	}
	medium_armor_3_MW_base_no_fh = {
		reinforce_prio = 2

	
		upgrade_prio = {
			factor = 15000
			modifier = {
				factor = 0
				OR = {
					NOT = { has_dlc = "No Step Back" }
					NOT = { has_country_flag = mobile_warfare_flag }
					can_equip_mech = yes
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_field_hospital = yes
					has_logistics = no
				}
			}
		}
		target_template = {
			support = {
				medium_flame_tank = 1
				assault_engineer = 1
				artillery = 1
				anti_air = 1
				logistics_company = 1
			}
			
			regiments = {
				medium_tank_destroyer_brigade = 2
				medium_armor = 8
				motorized = 8
			}
		}
	}

	medium_armor_3_MW_base_no_logi = {
		reinforce_prio = 2

	
		upgrade_prio = {
			factor = 25000
			modifier = {
				factor = 0
				OR = {
					NOT = { has_dlc = "No Step Back" }
					NOT = { has_country_flag = mobile_warfare_flag }
					can_equip_mech = yes
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_field_hospital = no
					has_logistics = yes
				}
			}
		}
		target_template = {
			support = {
				medium_flame_tank = 1
				assault_engineer = 1
				field_hospital = 1
				anti_air = 1
				artillery = 1
			}
			
			regiments = {
				medium_tank_destroyer_brigade = 2
				medium_armor = 8
				motorized = 8
			}
		}
	}

	medium_armor_3_MW_final = {
		reinforce_prio = 2

	
		upgrade_prio = {
			factor = 45000
			modifier = {
				factor = 0
				OR = {
					NOT = { has_dlc = "No Step Back" }
					NOT = { has_country_flag = mobile_warfare_flag }
					can_equip_mech = yes
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_field_hospital = no
					has_logistics = no
				}
			}
		}
		target_template = {
			support = {
				medium_flame_tank = 1
				assault_engineer = 1
				field_hospital = 1
				anti_air = 1
				logistics_company = 1
			}
			
			regiments = {
				medium_tank_destroyer_brigade = 2
				medium_armor = 8
				motorized = 8
			}
		}
	}

	medium_armor_3_MW_base_no_fh_logi = {
		reinforce_prio = 2

	
		upgrade_prio = {
			factor = 5000
			modifier = {
				factor = 0
				OR = {
					NOT = { has_dlc = "No Step Back" }
					NOT = { has_country_flag = mobile_warfare_flag }
					can_equip_mech = no
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_field_hospital = yes
					has_logistics = yes
				}
			}
		}
		target_template = {
			support = {
				medium_flame_tank = 1
				assault_engineer = 1
				artillery = 1
				anti_air = 1
				recon = 1
			}
			
			regiments = {
				medium_tank_destroyer_brigade = 2
				medium_armor = 8
				mechanized = 8
			}
		}
	}
	medium_armor_3_MW_final_no_fh = {
		reinforce_prio = 2

	
		upgrade_prio = {
			factor = 15000
			modifier = {
				factor = 0
				OR = {
					NOT = { has_dlc = "No Step Back" }
					NOT = { has_country_flag = mobile_warfare_flag }
					can_equip_mech = no
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_field_hospital = yes
					has_logistics = no
				}
			}
		}

		can_upgrade_in_field = {
			has_equipment = { mechanized_equipment > 1000 }
		}
		target_template = {
			support = {
				medium_flame_tank = 1
				assault_engineer = 1
				artillery = 1
				anti_air = 1
				logistics_company = 1
			}
			
			regiments = {
				medium_tank_destroyer_brigade = 2
				medium_armor = 8
				mechanized = 8
			}
		}
	}

	medium_armor_3_MW_final_no_logi = {
		reinforce_prio = 2

	
		upgrade_prio = {
			factor = 30000
			modifier = {
				factor = 0
				OR = {
					NOT = { has_dlc = "No Step Back" }
					NOT = { has_country_flag = mobile_warfare_flag }
					can_equip_mech = no
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_field_hospital = no
					has_logistics = yes
				}
			}
		}

		can_upgrade_in_field = {
			has_equipment = { mechanized_equipment > 1000 }
		}
		target_template = {
			support = {
				medium_flame_tank = 1
				assault_engineer = 1
				field_hospital = 1
				anti_air = 1
				artillery = 1
			}
			
			regiments = {
				medium_tank_destroyer_brigade = 2
				medium_armor = 8
				mechanized = 8
			}
		}
	}

	medium_armor_3_MW_final = {
		reinforce_prio = 2

	
		upgrade_prio = {
			factor = 35000
			modifier = {
				factor = 0
				OR = {
					NOT = { has_dlc = "No Step Back" }
					NOT = { has_country_flag = mobile_warfare_flag }
					can_equip_mech = no
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_field_hospital = no
					has_logistics = no
				}
			}
		}

		can_upgrade_in_field = {
			has_equipment = { mechanized_equipment > 1000 }
		}
		target_template = {
			support = {
				medium_flame_tank = 1
				assault_engineer = 1
				field_hospital = 1
				anti_air = 1
				logistics_company = 1
			}
			
			regiments = {
				medium_tank_destroyer_brigade = 2
				medium_armor = 8
				mechanized = 8
			}
		}
	}

	medium_armor_3_normal_base_no_fh_logi = {
		reinforce_prio = 2

	
		upgrade_prio = {
			factor = 5000
			modifier = {
				factor = 0
				OR = {
					NOT = { has_dlc = "No Step Back" }
					has_country_flag = mobile_warfare_flag
					has_country_flag = spacemarine_gbp
					can_equip_mech = yes
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_field_hospital = yes
					has_logistics = yes
				}
			}
		}
		target_template = {
			support = {
				medium_flame_tank = 1
				assault_engineer = 1
				artillery = 1
				anti_air = 1
				recon = 1
			}
			
			regiments = {
				heavy_tank_destroyer_brigade = 1
				medium_armor = 9
				motorized = 8
			}
		}
	}
	medium_armor_3_normal_base_no_fh = {
		reinforce_prio = 2

	
		upgrade_prio = {
			factor = 15000
			modifier = {
				factor = 0
				OR = {
					NOT = { has_dlc = "No Step Back" }
					has_country_flag = mobile_warfare_flag
					has_country_flag = spacemarine_gbp
					can_equip_mech = yes
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_field_hospital = yes
					has_logistics = no
				}
			}
		}
		target_template = {
			support = {
				medium_flame_tank = 1
				assault_engineer = 1
				artillery = 1
				anti_air = 1
				logistics_company = 1
			}
			
			regiments = {
				heavy_tank_destroyer_brigade = 1
				medium_armor = 9
				motorized = 8
			}
		}
	}

	medium_armor_3_normal_base_no_logi = {
		reinforce_prio = 2

	
		upgrade_prio = {
			factor = 30000
			modifier = {
				factor = 0
				OR = {
					NOT = { has_dlc = "No Step Back" }
					has_country_flag = mobile_warfare_flag
					has_country_flag = spacemarine_gbp
					can_equip_mech = yes
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_field_hospital = no
					has_logistics = yes
				}
			}
		}
		target_template = {
			support = {
				medium_flame_tank = 1
				assault_engineer = 1
				field_hospital = 1
				anti_air = 1
				artillery = 1
			}
			
			regiments = {
				heavy_tank_destroyer_brigade = 1
				medium_armor = 9
				motorized = 8
			}
		}
	}

	medium_armor_3_normal_final = {
		reinforce_prio = 2

	
		upgrade_prio = {
			factor = 50000
			modifier = {
				factor = 0
				OR = {
					NOT = { has_dlc = "No Step Back" }
					has_country_flag = mobile_warfare_flag
					has_country_flag = spacemarine_gbp
					can_equip_mech = yes
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_field_hospital = no
					has_logistics = no
				}
			}
		}
		target_template = {
			support = {
				medium_flame_tank = 1
				assault_engineer = 1
				field_hospital = 1
				anti_air = 1
				logistics_company = 1
			}
			
			regiments = {
				heavy_tank_destroyer_brigade = 1
				medium_armor = 9
				motorized = 8
			}
		}
	}

	medium_armor_3_normal_base_no_fh_logi = {
		reinforce_prio = 2

	
		upgrade_prio = {
			factor = 5000
			modifier = {
				factor = 0
				OR = {
					NOT = { has_dlc = "No Step Back" }
					has_country_flag = mobile_warfare_flag
					has_country_flag = spacemarine_gbp
					can_equip_mech = no
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_field_hospital = yes
					has_logistics = yes
				}
			}
		}
		target_template = {
			support = {
				medium_flame_tank = 1
				assault_engineer = 1
				artillery = 1
				anti_air = 1
				recon = 1
			}
			
			regiments = {
				heavy_tank_destroyer_brigade = 1
				medium_armor = 9
				mechanized = 8
			}
		}
	}
	medium_armor_3_normal_final_no_fh = {
		reinforce_prio = 2

	
		upgrade_prio = {
			factor = 15000
			modifier = {
				factor = 0
				OR = {
					NOT = { has_dlc = "No Step Back" }
					has_country_flag = mobile_warfare_flag
					has_country_flag = spacemarine_gbp
					can_equip_mech = no
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_field_hospital = yes
					has_logistics = no
				}
			}
		}

		can_upgrade_in_field = {
			has_equipment = { mechanized_equipment > 1000 }
		}
		target_template = {
			support = {
				medium_flame_tank = 1
				assault_engineer = 1
				artillery = 1
				anti_air = 1
				logistics_company = 1
			}
			
			regiments = {
				heavy_tank_destroyer_brigade = 1
				medium_armor = 9
				mechanized = 8
			}
		}
	}

	medium_armor_3_normal_final_no_logi = {
		reinforce_prio = 2

	
		upgrade_prio = {
			factor = 30000
			modifier = {
				factor = 0
				OR = {
					NOT = { has_dlc = "No Step Back" }
					has_country_flag = mobile_warfare_flag
					has_country_flag = spacemarine_gbp
					can_equip_mech = no
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_field_hospital = no
					has_logistics = yes
				}
			}
		}

		can_upgrade_in_field = {
			has_equipment = { mechanized_equipment > 1000 }
		}
		target_template = {
			support = {
				medium_flame_tank = 1
				assault_engineer = 1
				field_hospital = 1
				anti_air = 1
				artillery = 1
			}
			
			regiments = {
				heavy_tank_destroyer_brigade = 1
				medium_armor = 9
				mechanized = 8
			}
		}
	}

	medium_armor_3_normal_final = {
		reinforce_prio = 2

	
		upgrade_prio = {
			factor = 50000
			modifier = {
				factor = 0
				OR = {
					NOT = { has_dlc = "No Step Back" }
					has_country_flag = mobile_warfare_flag
					has_country_flag = spacemarine_gbp
					can_equip_mech = no
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_field_hospital = no
					has_logistics = no
				}
			}
		}

		can_upgrade_in_field = {
			has_equipment = { mechanized_equipment > 1000 }
		}
		target_template = {
			support = {
				medium_flame_tank = 1
				assault_engineer = 1
				field_hospital = 1
				anti_air = 1
				logistics_company = 1
			}
			
			regiments = {
				heavy_tank_destroyer_brigade = 1
				medium_armor = 9
				mechanized = 8
			}
		}
	}
}

garrison_GER = {
	
	role = garrison

	available_for = {
		GER
	}
	upgrade_prio = {
		factor = 25
	}
	garrison_GER = {
	
		reinforce_prio = 0
		custom_icon = 7
	
		upgrade_prio = {
			factor = 200
		}
		target_template = {
			support = {
				artillery = 1
				anti_air = 1
			}
			
			regiments = {
				infantry = 7
			}
		}
	}
}
	
infantry_GER_KR = {
	
	role = infantry

	available_for = {
		GER
	}	
	upgrade_prio = {
		factor = 20

		modifier = {
			factor = 0
			NOT = {
				OR = {
					has_country_flag = GER_AI_RANDOM_KAISERREICH
					has_game_rule = {
						rule = GER_ai_behavior
						option = KAISERREICH
					}
					has_country_flag = GER_AI_RANDOM_KAISER
					has_game_rule = {
						rule = GER_ai_behavior
						option = KAISER
					}
				}
			}
		}
		modifier = {
			factor = 0
			has_country_flag = mass_infantry_flag
		}
	}
	
	infantry_KR_GER_base = {
	
		upgrade_prio = {
			factor = 10000

			modifier = {
				factor = 0
				NOT = {
					OR = {
						has_country_flag = GER_AI_RANDOM_KAISERREICH
						has_game_rule = {
							rule = GER_ai_behavior
							option = KAISERREICH
						}
						has_country_flag = GER_AI_RANDOM_KAISER
						has_game_rule = {
							rule = GER_ai_behavior
							option = KAISER
						}
					}
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_country_flag = mass_infantry_flag
					has_ranger = yes
				}
			}
		}
		
		target_template = {
			support = {
				engineer = 1
				medium_flame_tank = 1
				artillery = 1
				logistics_company = 1
				recon = 1
			}
			
			regiments = {
				infantry = 11
				artillery_brigade = 3
				anti_tank_brigade = 1
				anti_air_brigade = 1
			}
		}
	}
	
	infantry_KR_GER = {
	
		upgrade_prio = {
			factor = 25000

			modifier = {
				factor = 0
				NOT = {
					OR = {
						has_country_flag = GER_AI_RANDOM_KAISERREICH
						has_game_rule = {
							rule = GER_ai_behavior
							option = KAISERREICH
						}
						has_country_flag = GER_AI_RANDOM_KAISER
						has_game_rule = {
							rule = GER_ai_behavior
							option = KAISER
						}
					}
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_country_flag = mass_infantry_flag
					has_ranger = no
				}
			}
		}
		
		target_template = {
			support = {
				engineer = 1
				medium_flame_tank = 1
				artillery = 1
				logistics_company = 1
				rangers_support = 1
			}
			
			regiments = {
				infantry = 11
				artillery_brigade = 3
				anti_tank_brigade = 1
				anti_air_brigade = 1
			}
		}
	}
}
	
infantry_GER = {
	
	role = infantry

	available_for = {
		GER
	}	
	upgrade_prio = {
		factor = 25000

		modifier = {
			factor = 0
			GER = {
				OR = {
					has_country_flag = GER_AI_RANDOM_KAISERREICH
					has_game_rule = {
						rule = GER_ai_behavior
						option = KAISERREICH
					}
					has_country_flag = GER_AI_RANDOM_KAISER
					has_game_rule = {
						rule = GER_ai_behavior
						option = KAISER
					}
				}
				NOT = { has_country_flag = mass_infantry_flag }
			}
		}
	}
	
	infantry_default_GER = {
	
		upgrade_prio = {
			factor = 25000
			
			modifier = {
				OR = {
					AND = {
						OR = {
							has_country_flag = spacemarine
							has_country_flag = spacemarine_gbp
						}
						has_army_manpower = { size > 600000 }
					}
					AND = {
						has_country_flag = mass_mob_flag
						has_army_manpower = { size > 700000 }
					}
					AND = {
						has_country_flag = mech_god
						has_army_manpower = { size > 700000 }
					}
					has_country_flag = mobile_warfare_flag
					has_country_flag = mass_infantry_flag
					has_country_flag = spacemarine_gbp
				}
				factor = 0
			}
		}
		
		target_template = {
			support = {
				anti_air = 1
				artillery = 1
				logistics_company = 1
				rangers_support = 1
			}
			
			regiments = {
				infantry = 9
			}
		}
	}
	infantry_default_GER_sp_gbp = {
	
		upgrade_prio = {
			factor = 25000
			
			modifier = {
				OR = {
					has_army_manpower = { size > 600000 }
					NOT = { has_country_flag = spacemarine_gbp }
				}
				factor = 0
			}
		}
		
		target_template = {
			support = {
				anti_air = 1
				artillery = 1
			}
			
			regiments = {
				infantry = 8
			}
		}
	}

	GER_spacemarine_base_no_tech = {
	
		upgrade_prio = {
			factor = 500
			
			modifier = {
				factor = 0
				OR = {
					NOT = { has_country_flag = spacemarine }
					has_army_manpower = { size < 700000 }
					NOT = { has_dlc = "No Step Back" }
					has_assault_engineer = no
				}
			}
		}
		
		target_template = {
			support = {
				logistics_company = 1
				artillery = 1
				anti_air = 1
				engineer = 1
				field_hospital = 1
			}
			
			regiments = {
				infantry = 15
				medium_armor = 5
			}
		}
		
	}

	GER_GBP_spacemarine = {
	
		upgrade_prio = {
			factor = 500
			
			modifier = {
				factor = 0
				OR = {
					NOT = { has_country_flag = spacemarine_gbp }
					has_army_manpower = { size < 600000 }
					has_assault_engineer = yes
				}
			}
		}
		
		target_template = {
			support = {
				logistics_company = 1
				artillery = 1
				anti_air = 1
				engineer = 1
				medium_flame_tank = 1
			}
			
			regiments = {
				infantry = 8
				heavy_tank_destroyer_brigade = 1
			}
		}	
	}

	GER_GBP_spacemarine_near = {
	
		upgrade_prio = {
			factor = 500
			
			modifier = {
				factor = 0
				OR = {
					NOT = { has_country_flag = spacemarine_gbp }
					has_army_manpower = { size < 600000 }
					has_assault_engineer = no
					has_tech = sturmtruppe_battalion_tech
				}
			}
		}
		can_upgrade_in_field = {
			has_equipment = { armored_support_vehicle > 300 }
		}
		
		target_template = {
			support = {
				logistics_company = 1
				artillery = 1
				anti_air = 1
				assault_engineer = 1
				medium_flame_tank = 1
			}
			
			regiments = {
				infantry = 8
				heavy_tank_destroyer_brigade = 1
			}
		}	
	}

	GER_GBP_spacemarine_full = {
	
		upgrade_prio = {
			factor = 500
			
			modifier = {
				factor = 0
				OR = {
					NOT = { has_country_flag = spacemarine_gbp }
					has_army_manpower = { size < 600000 }
					has_assault_engineer = no
					NOT = { has_tech = sturmtruppe_battalion_tech }
					has_tech = ski_troops
				}
			}
		}
		can_upgrade_in_field = {
			has_equipment = { armored_support_vehicle > 300 }
		}
		
		target_template = {
			support = {
				logistics_company = 1
				sturmtruppe_battalion = 1
				anti_air = 1
				assault_engineer = 1
				medium_flame_tank = 1
			}
			
			regiments = {
				infantry = 8
				heavy_tank_destroyer_brigade = 1
			}
		}	
	}
	GER_GBP_spacemarine_full_2 = {
	
		upgrade_prio = {
			factor = 500
			
			modifier = {
				factor = 0
				OR = {
					NOT = { has_country_flag = spacemarine_gbp }
					has_army_manpower = { size < 600000 }
					has_assault_engineer = no
					NOT = { has_tech = sturmtruppe_battalion_tech }
					NOT = { has_tech = ski_troops }
				}
			}
		}
		can_upgrade_in_field = {
			has_equipment = { armored_support_vehicle > 300 }
		}
		
		target_template = {
			support = {
				logistics_company = 1
				sturmtruppe_battalion = 1
				rangers_support = 1
				assault_engineer = 1
				medium_flame_tank = 1
			}
			
			regiments = {
				infantry = 8
				heavy_tank_destroyer_brigade = 1
				anti_air_brigade = 1
			}
		}	
	}

	GER_spacemarine_base = {
	
		upgrade_prio = {
			factor = 500
			
			modifier = {
				factor = 0
				OR = {
					NOT = { has_country_flag = spacemarine }
					has_army_manpower = { size < 700000 }
					has_assault_engineer = no
				}
			}
		}
		
		target_template = {
			support = {
				logistics_company = 1
				artillery = 1
				anti_air = 1
				assault_engineer = 1
				field_hospital = 1
			}
			
			regiments = {
				infantry = 15
				medium_armor = 5
			}
		}	
	}

	GER_infantry_mech_god = {
	
		upgrade_prio = {
			factor = 25000

			modifier = {
				factor = 0
				NOT = { has_country_flag = mech_god }
			}
		}
		target_template = {
			support = {
				medium_flame_tank = 1
				rangers_support = 1
				assault_engineer = 1
				logistics_company = 1
				field_hospital = 1
			}
			
			regiments = {
				mechanized = 20
				mot_anti_air_brigade = 1
				mot_anti_tank_brigade = 1
				mot_artillery_brigade = 1
			}
		}
	}

	GER_infantry_mass_mob = {
	
		upgrade_prio = {
			factor = 25000

			modifier = {
				factor = 0
				OR = {
					NOT = { has_country_flag = mass_mob_flag }
					has_army_manpower = { size < 600000 }
					NOT = { has_dlc = "No Step Back" }
				}
			}
		}
		target_template = {
			support = {
				medium_flame_tank = 1
				rangers_support = 1
				assault_engineer = 1
				logistics_company = 1
				field_hospital = 1
			}
			
			regiments = {
				infantry = 10
				light_armor = 9
				anti_air_brigade = 1
				anti_tank_brigade = 1
			}
		}
	}

	GER_infantry_mass_infantry_no_fh = { #test_ref
	
		upgrade_prio = {
			factor = 25000

			modifier = {
				factor = 0
				OR = {
					NOT = { has_country_flag = mass_infantry_flag }
					epic_winter_month = yes
					has_field_hospital = yes
				}
			}
		}
		target_template = {
			support = {
				medium_flame_tank = 1
				artillery = 1
				assault_engineer = 1
				anti_tank = 1
				sturmtruppe_battalion = 1
			}
			
			regiments = {
				infantry = 9
				artillery_brigade = 1
			}
		}
	}
	GER_infantry_mass_infantry_full_tech = {
	
		upgrade_prio = {
			factor = 25000

			modifier = {
				factor = 0
				OR = {
					NOT = { has_country_flag = mass_infantry_flag }
					epic_winter_month = yes
					has_field_hospital = no
				}
			}
		}
		target_template = {
			support = {
				medium_flame_tank = 1
				field_hospital = 1
				assault_engineer = 1
				rangers_support = 1
				sturmtruppe_battalion = 1
			}
			
			regiments = {
				infantry = 9
				anti_tank_brigade = 1
				artillery_brigade = 1
			}
		}
	}

	GER_infantry_mass_infantr_winter_no_fh = { #test_ref
	
		upgrade_prio = {
			factor = 25000

			modifier = {
				factor = 0
				OR = {
					NOT = { has_country_flag = mass_infantry_flag }
					epic_winter_month = no
					has_field_hospital = yes
				}
			}
		}
		target_template = {
			support = {
				medium_flame_tank = 1
				sturmtruppe_battalion = 1
				assault_engineer = 1
				artillery = 1
				anti_tank = 1
			}
			
			regiments = {
				infantry = 9
				artillery_brigade = 1
			}
		}
	}
	GER_infantry_mass_infantr_winter = { #test_ref
	
		upgrade_prio = {
			factor = 25000

			modifier = {
				factor = 0
				OR = {
					NOT = { has_country_flag = mass_infantry_flag }
					epic_winter_month = no
					has_field_hospital = no
				}
			}
		}
		target_template = {
			support = {
				medium_flame_tank = 1
				field_hospital = 1
				assault_engineer = 1
				sturmtruppe_battalion = 1
				rangers_support = 1
			}
			
			regiments = {
				infantry = 9
				anti_tank_brigade = 1
				artillery_brigade = 1
			}
		}
	}

	infantry_mobile_warfare_flag = {
	
		upgrade_prio = {
			factor = 500
			
			modifier = {
				factor = 0
				NOT = { has_country_flag = mobile_warfare_flag }
			}
			
			modifier = {
				factor = 0
				OR = {
					has_country_flag = era_of_transition
					has_idea = crossing_the_atlantic_idea
				}
			}
		}
		
		target_template = {
			support = {
				artillery = 1
				rangers_support = 1
				logistics_company = 1
				anti_tank = 1
				anti_air = 1
			}
			
			regiments = {
				infantry = 8
			}
		}
	}

	infantry_mobile_warfare_flag_transitional = {
	
		upgrade_prio = {
			factor = 200
			
			modifier = {
				factor = 0
				NOT = { has_country_flag = mobile_warfare_flag }
			}
			
			modifier = {
				factor = 0
				NOT = { has_country_flag = era_of_transition }
				NOT = { has_idea = crossing_the_atlantic_idea }
			}
		}
		target_template = {
			support = {
				assault_engineer = 1
				artillery = 1
				rangers_support = 1
				anti_air = 1
				medium_flame_tank = 1
			}
			
			regiments = {
				mechanized = 9
			}
		}
	}

}
mountaineers_GER = {
	
	role = mountaineers

	available_for = {
		GER
	}	
	upgrade_prio = {
		factor = 20000

		modifier = {
			factor = 0
			NOT = { has_tech = tech_mountaineers }
		}

		modifier = {
			factor = 0
			has_country_flag = mobile_warfare_flag
		}
	}
	mountaineers_sp_gbp_GER_1 = {
	
		upgrade_prio = {
			factor = 5500

			modifier = {
				factor = 0
				NOT = { has_country_flag = spacemarine_gbp }
			}
		}
		target_template = {
			support = {
				assault_engineer = 1
				medium_flame_tank = 1
				rangers_support = 1
				sturmtruppe_battalion = 1
				logistics_company = 1
			}
			
			regiments = {
				heavy_tank_destroyer_brigade = 1
				mountaineers = 8
				anti_air_brigade = 1
			}
		}
	}
	mountaineers_1_GER = {
	
		upgrade_prio = {
			factor = 500

			modifier = {
				factor = 0
				has_flame_tank = yes
				has_assault_engineer = yes
			}
			modifier = {
				factor = 0
				OR = {
					has_all_the_fancy_stuffs = yes
					has_country_flag = spacemarine_gbp
				}
			}
		}
		target_template = {
			support = {
				engineer = 1
				artillery = 1
				anti_air = 1
				recon = 1
			}
			
			regiments = {
				medium_armor = 5
				mountaineers = 14
			}
		}
	}
	mountaineers_2_GER = {
	
		upgrade_prio = {
			factor = 3000

			modifier = {
				factor = 0
				OR = {
					has_flame_tank = no
					has_assault_engineer = no
					has_all_the_fancy_stuffs = yes
					has_country_flag = spacemarine_gbp
				}
			}
		}
		target_template = {
			support = {
				assault_engineer = 1
				artillery = 1
				anti_air = 1
				recon = 1
				medium_flame_tank = 1
			}
			
			regiments = {
				medium_armor = 5
				mountaineers = 14
			}
		}
	}
	mountaineers_3_GER = {
	
		upgrade_prio = {
			factor = 5000

			modifier = {
				factor = 0
				OR = {
					has_flame_tank = no
					has_assault_engineer = no
					has_all_the_fancy_stuffs = yes
					has_country_flag = spacemarine_gbp
				}
			}

			modifier = {
				factor = 0
				OR = {
					has_field_hospital = no
					has_logistics = no
				}
			}
		}
		target_template = {
			support = {
				assault_engineer = 1
				field_hospital = 1
				medium_flame_tank = 1
				logistics_company = 1
				rangers_support = 1
			}
			
			regiments = {
				medium_armor = 5
				mountaineers = 14
			}
		}
	}
	mountaineers_4_GER = {
	
		upgrade_prio = {
			factor = 50000

			modifier = {
				factor = 0
				OR = {
					has_all_the_fancy_stuffs = no
					has_country_flag = spacemarine_gbp
				}
			}
		}
		target_template = {
			support = {
				assault_engineer = 1
				field_hospital = 1
				medium_flame_tank = 1
				logistics_company = 1
				rangers_support = 1
			}
			
			regiments = {
				medium_armor = 5
				mountaineers = 14
			}
		}
	}
}
mountaineers_GER_MW = {
	
	role = mountaineers

	available_for = {
		GER
	}	
	upgrade_prio = {
		factor = 20000

		modifier = {
			factor = 0
			NOT = { has_tech = tech_mountaineers }
		}

		modifier = {
			factor = 0
			NOT = { has_country_flag = mobile_warfare_flag }
		}
	}
	mountaineers_1_GER = {
	
		upgrade_prio = {
			factor = 500

			modifier = {
				factor = 0
				has_flame_tank = yes
				has_assault_engineer = yes
			}
			modifier = {
				factor = 0
				has_all_the_fancy_stuffs = yes
			}
		}
		target_template = {
			support = {
				engineer = 1
				artillery = 1
				anti_air = 1
				recon = 1
			}
			
			regiments = {
				heavy_armor = 5
				mountaineers = 14
			}
		}
	}
	mountaineers_2_GER = {
	
		upgrade_prio = {
			factor = 3000

			modifier = {
				factor = 0
				OR = {
					has_flame_tank = no
					has_assault_engineer = no
					has_all_the_fancy_stuffs = yes
				}
			}
		}
		target_template = {
			support = {
				assault_engineer = 1
				artillery = 1
				anti_air = 1
				recon = 1
				medium_flame_tank = 1
			}
			
			regiments = {
				heavy_armor = 5
				mountaineers = 14
			}
		}
	}
	mountaineers_3_GER = {
	
		upgrade_prio = {
			factor = 5000

			modifier = {
				factor = 0
				OR = {
					has_flame_tank = no
					has_assault_engineer = no
					has_all_the_fancy_stuffs = yes
				}
			}

			modifier = {
				factor = 0
				OR = {
					has_field_hospital = no
					has_logistics = no
				}
			}
		}
		target_template = {
			support = {
				assault_engineer = 1
				field_hospital = 1
				medium_flame_tank = 1
				logistics_company = 1
				rangers_support = 1
			}
			
			regiments = {
				heavy_armor = 5
				mountaineers = 14
			}
		}
	}
	mountaineers_4_GER = {
	
		upgrade_prio = {
			factor = 50000

			modifier = {
				factor = 0
				has_all_the_fancy_stuffs = no
			}
		}
		target_template = {
			support = {
				assault_engineer = 1
				field_hospital = 1
				medium_flame_tank = 1
				logistics_company = 1
				rangers_support = 1
			}
			
			regiments = {
				heavy_armor = 5
				mountaineers = 14
			}
		}
	}
}

marines_GER = {
	
	role = marines

	available_for = {
		GER
	}	
	upgrade_prio = {
		factor = 2000

		modifier = {
			factor = 0
			NOT = { has_tech = marines }
		}
	}
	marine_sp_gbp_GER_1 = {
	
		upgrade_prio = {
			factor = 5500

			modifier = {
				factor = 0
				NOT = { has_country_flag = spacemarine_gbp }
			}
		}
		target_template = {
			support = {
				assault_engineer = 1
				medium_flame_tank = 1
				rangers_support = 1
				sturmtruppe_battalion = 1
				logistics_company = 1
			}
			
			regiments = {
				heavy_tank_destroyer_brigade = 1
				marine = 8
				anti_air_brigade = 1
			}
		}
	}
	marine_default_GER = {
	
		upgrade_prio = {
			factor = 2000

			modifier = {
				factor = 0
				has_all_the_fancy_stuffs = no
			}
		}

		target_template = {
			support = {
				assault_engineer = 1
				field_hospital = 1
				logistics_company = 1
				rangers_support = 1
				medium_flame_tank = 1
			}
			
			regiments = {
				heavy_tank_destroyer_brigade = 1
				medium_armor = 4
				marine = 13
			}
		}

	}
}


paratroopers_GER = {
	
	role = paratroopers

	available_for = {
		GER
	}	
	upgrade_prio = {
		factor = 2

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

			modifier = {
				factor = 1
			}
		}

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

# REGIMENTS:
# infantry
# light_armor
# super_medium_armor
# modern_armor
# medium_armor
# medium_armor
# light_armor
# anti_tank
# cavalry
# motorized
# mechanized
# marine
# mountaineers
# paratrooper
# rocket_artillery
# light_tank_destroyer
# 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
