# unit_ratio is the base value used for evaluating how important it is to deploy the various categories
# Written by Henrik "Groogy" Hansson
default_unit_production = {
	enable = {
		always = yes
	}
	abort = {
		always = no
	}

	ai_strategy = {
		type = unit_ratio
		id = paratroopers
		value = 5
	}

	ai_strategy = {
		type = unit_ratio
		id = mountaineers
		value = 5
	}

	ai_strategy = {
		type = unit_ratio
		id = marines
		value = 0
	}

	ai_strategy = {
		type = unit_ratio
		id = cavalry
		value = 0
	}

	ai_strategy = {
		type = unit_ratio
		id = motorized
		value = 50
	}

	ai_strategy = {
		type = unit_ratio
		id = mechanized
		value = 30
	}
	
	ai_strategy = {
		type = unit_ratio
		id = anti_tank
		value = 0
	}

	ai_strategy = {
		type = unit_ratio
		id = armor
		value = 10
	}

	ai_strategy = {
		type = unit_ratio
		id = infantry
		value = 10
	}


	# These values are used only by when evaluating for producing factories
	ai_strategy = {
		type = unit_ratio
		id = capital_ship
		value = 0
	}

	ai_strategy = {
		type = unit_ratio
		id = submarine
		value = 3
	}

	ai_strategy = {
		type = unit_ratio
		id = screen_ship
		value = 3
	}

	ai_strategy = {
		type = unit_ratio
		id = convoy
		value = 3
	}
	
	
	ai_strategy = {
		type = equipment_production_factor
		id = armor
		value = 10
	}
	
	ai_strategy = {
		type = equipment_production_factor
		id = infantry
		value = 800
	}
	
	ai_strategy = {
		type = equipment_production_factor
		id = motorized
		value = 10
	}
	
	ai_strategy = {
		type = equipment_production_factor
		id = mechanized
		value = 10
	}
	
	ai_strategy = {
		type = equipment_production_factor
		id = anti_tank
		value = 100
	}
	
}

default_paratroopers_production = {
	enable = {
		ai_wants_divisions > 90
	}
	abort = {
		ai_wants_divisions < 89
	}


	ai_strategy = {
		type = unit_ratio
		id = infantry
		value = 20
	}
}


default_marines_production = {
	enable = {
		ai_wants_divisions > 49
	}
	abort = {
		ai_wants_divisions < 50
	}

	ai_strategy = {
		type = unit_ratio
		id = marines
		value = 3
	}

}


default_motorized_production = {
	enable = {
		ai_wants_divisions > 0
	}
	abort = {
		ai_wants_divisions > 95
	}

	ai_strategy = {
		type = unit_ratio
		id = motorized
		value = 30
	}
}

default_mechanized_production = {
	enable = {
		ai_wants_divisions > 0
	}
	abort = {
		ai_wants_divisions > 70
	}

	ai_strategy = {
		type = unit_ratio
		id = mechanized
		value = 20
	}
}

default_armored_production = {
	enable = {
		ai_wants_divisions > 0
	}
	abort = {
		ai_wants_divisions > 60
	}

	ai_strategy = {
		type = unit_ratio
		id = armor
		value = 15
	}

}

small_nation_focus = {
	enable = {
		num_of_military_factories < 30
	}
	
	
	abort = {
		num_of_military_factories > 30
	}
	
	ai_strategy = {
		type = unit_ratio
		id = infantry
		value = 20
	}
	ai_strategy = {
		type = unit_ratio
		id = marines
		value = 5
	}
	ai_strategy = {
		type = unit_ratio
		id = motorized
		value = 15
	}
	ai_strategy = {
		type = unit_ratio
		id = armor
		value = -10
	}
	ai_strategy = {
		type = unit_ratio
		id = mechanized
		value = -5
	}

}

large_nation_focus = {
	enable = {
		num_of_military_factories > 35
		
	}
	abort = {
		num_of_military_factories < 35
	}
	
	ai_strategy = {
		type = unit_ratio
		id = infantry
		value = 5
	}
	ai_strategy = {
		type = unit_ratio
		id = armor
		value = 10
	}
	ai_strategy = {
		type = unit_ratio
		id = mechanized
		value = 20
	}
	ai_strategy = {
		type = unit_ratio
		id = motorized
		value = 20
	}
	
	ai_strategy = {
		type = equipment_production_factor
		id = fighter
		value = 5
	}
	
	ai_strategy = {
		type = equipment_production_factor
		id = cas
		value = 5
	}
		ai_strategy = {
		type = equipment_production_factor
		id = strategic_bomber
		value = 5
	}
}
china = {
	enable = { tag = PRC}
	
	ai_strategy = {
		type = unit_ratio
		id = infantry
		value = 30
	}
	
	ai_strategy = {
		type = unit_ratio
		id = motorized
		value = 30
	}
	
	ai_strategy = {
		type = unit_ratio
		id = mechanized
		value = 20
	}
	ai_strategy = {
		type = unit_ratio
		id = armor
		value = 20
	}
	
	
	
	ai_strategy = {
		type = unit_ratio
		id = infantry
		value = 30
	}
	
}
india = {
	enable = {
		tag = RAJ
	}
	
	ai_strategy = {
		type = unit_ratio
		id = infantry
		value = 30
	}
	ai_strategy = {
		type = unit_ratio
		id = armor
		value = 20
	}
	
}

england = {
	enable = {
		tag = ENG
	}
	
	ai_strategy = {
		type = unit_ratio
		id = infantry
		value = 10
	}
	
	ai_strategy = {
		type = unit_ratio
		id = marines
		value = 10
	}
	ai_strategy = {
		type = unit_ratio
		id = armor
		value = 20
	}
	ai_strategy = {
		type = unit_ratio
		id = motorized
		value = 30
	}
	ai_strategy = {
		type = unit_ratio
		id = mechanized
		value = 30
	}
}

Russia = {
	enable = {
		tag = SOV
	}
	
	ai_strategy = {
		type = unit_ratio
		id = infantry
		value = 10
	}
	ai_strategy = {
		type = unit_ratio
		id = armor
		value = 30
	}	
	ai_strategy = {
		type = unit_ratio
		id = motorized
		value = 30
	}	
	ai_strategy = {
		type = unit_ratio
		id = mechanized
		value = 40
	}	
	
	
	
}

United_States = {
	enable = {
			tag = USA
		}
		
		ai_strategy = {
			type = unit_ratio
			id = infantry
			value = -10
		}
		ai_strategy = {
			type = unit_ratio
			id = paratroopers
			value = 2
		}
		ai_strategy = {
			type = unit_ratio
			id = armor
			value = 20
		}	
		ai_strategy = {
			type = unit_ratio
			id = motorized
			value = 40
		}	
		ai_strategy = {
			type = unit_ratio
			id = mechanized
			value = 100
		}	

		ai_strategy = {
			type = unit_ratio
			id = mechanized
			value = 50
		}	
		ai_strategy = {
			type = unit_ratio
			id = motorized
			value = 20
		}	

		ai_strategy = {
			type = unit_ratio
			id = armor
			value = 28
		}			
		
}
Germany = {
	enable = {
		AND = {
			tag = GER
			NOT = { has_global_flag = GER_restrictions_500k }
			NOT = { has_global_flag = GER_restrictions_1m }
			NOT = { has_global_flag = GER_restrictions_lifted }
			has_army_manpower = { size > 220000 }
			NOT = { has_country_flag = tried_to_unite_the_EU }
			is_in_faction_with = USA
		}
		
		
	}
	
	abort = {
		OR = { 
		has_global_flag = GER_restrictions_500k
		has_global_flag = GER_restrictions_1m
		has_global_flag = GER_restrictions_lifted
		has_country_flag = tried_to_unite_the_EU
		NOT = { is_in_faction_with = USA }
		}
	}
	
	ai_strategy = { type = unit_ratio id = infantry 									value = -100000			}
	ai_strategy = { type = unit_ratio id = mechanized 								value = -100000 		}
	ai_strategy = { type = unit_ratio id = motorized 								value = -100000 		}
	ai_strategy = { type = unit_ratio id = armor 									value = -100000 	 	}
	ai_strategy = { type = unit_ratio id = mountaineers 								value = -100000  		}
	ai_strategy = { type = unit_ratio id = marines 									value = -100000  		}		
	ai_strategy = { type = unit_ratio id = paratroopers 								value = -100000  		}
	ai_strategy = { type = unit_ratio id = cavalry 									value = -100000  		}

	ai_strategy = { type = unit_ratio id = infantry 								value = -100000					}
	ai_strategy = { type = unit_ratio id = mechanized 								value = -100000					}
	ai_strategy = { type = unit_ratio id = motorized 								value = -100000					}
	ai_strategy = { type = unit_ratio id = armor 									value = -100000		 			}
	ai_strategy = { type = unit_ratio id = mountaineers 							value = -100000	  				}
	ai_strategy = { type = unit_ratio id = marines 									value = -100000	  				}		
	ai_strategy = { type = unit_ratio id = paratroopers 							value = -100000	  				}
	ai_strategy = { type = unit_ratio id = cavalry 									value = -100000	  				}
	
}

Germany2 = {
	enable = {
		AND = {
			tag = GER
			has_global_flag = GER_restrictions_500k
			NOT = { has_global_flag = GER_restrictions_1m }
			NOT = { has_global_flag = GER_restrictions_lifted }
			has_army_manpower = { size > 400000 }
			NOT = { has_country_flag = tried_to_unite_the_EU }
			is_in_faction_with = USA
		}
		
		
	}
	
	abort = {
		OR = {
		has_global_flag = GER_restrictions_1m
		has_global_flag = GER_restrictions_lifted
		NOT = { has_global_flag = GER_restrictions_500k }
		has_country_flag = tried_to_unite_the_EU
		NOT = { is_in_faction_with = USA }
		}
	}
	
	ai_strategy = { type = unit_ratio id = infantry 									value = -100000			}
	ai_strategy = { type = unit_ratio id = mechanized 								value = -100000 		}
	ai_strategy = { type = unit_ratio id = motorized 								value = -100000 		}
	ai_strategy = { type = unit_ratio id = armor 									value = -100000 	 	}
	ai_strategy = { type = unit_ratio id = mountaineers 								value = -100000  		}
	ai_strategy = { type = unit_ratio id = marines 									value = -100000  		}		
	ai_strategy = { type = unit_ratio id = paratroopers 								value = -100000  		}
	ai_strategy = { type = unit_ratio id = cavalry 									value = -100000  		}

	ai_strategy = { type = unit_ratio id = infantry 								value = -100000					}
	ai_strategy = { type = unit_ratio id = mechanized 								value = -100000					}
	ai_strategy = { type = unit_ratio id = motorized 								value = -100000					}
	ai_strategy = { type = unit_ratio id = armor 									value = -100000		 			}
	ai_strategy = { type = unit_ratio id = mountaineers 							value = -100000	  				}
	ai_strategy = { type = unit_ratio id = marines 									value = -100000	  				}		
	ai_strategy = { type = unit_ratio id = paratroopers 							value = -100000	  				}
	ai_strategy = { type = unit_ratio id = cavalry 									value = -100000	  				}
	
}

Germany3 = {
	enable = {
		AND = {
			tag = GER
			NOT = { has_global_flag = GER_restrictions_500k }
			has_global_flag = GER_restrictions_1m
			NOT = { has_global_flag = GER_restrictions_lifted }
			has_army_manpower = { size > 890000 }
			NOT = { has_country_flag = tried_to_unite_the_EU }
			is_in_faction_with = USA
		}
		
		
	}
	
	abort = {
		OR = {
			NOT = { has_global_flag = GER_restrictions_1m }
			has_global_flag = GER_restrictions_lifted
			has_global_flag = GER_restrictions_500k
			has_country_flag = tried_to_unite_the_EU
			NOT = { is_in_faction_with = USA }
		}
		
	}
	
	ai_strategy = { type = unit_ratio id = infantry 									value = -100000			}
	ai_strategy = { type = unit_ratio id = mechanized 								value = -100000 		}
	ai_strategy = { type = unit_ratio id = motorized 								value = -100000 		}
	ai_strategy = { type = unit_ratio id = armor 									value = -100000 	 	}
	ai_strategy = { type = unit_ratio id = mountaineers 								value = -100000  		}
	ai_strategy = { type = unit_ratio id = marines 									value = -100000  		}		
	ai_strategy = { type = unit_ratio id = paratroopers 								value = -100000  		}
	ai_strategy = { type = unit_ratio id = cavalry 									value = -100000  		}

	ai_strategy = { type = unit_ratio id = infantry 								value = -100000					}
	ai_strategy = { type = unit_ratio id = mechanized 								value = -100000					}
	ai_strategy = { type = unit_ratio id = motorized 								value = -100000					}
	ai_strategy = { type = unit_ratio id = armor 									value = -100000		 			}
	ai_strategy = { type = unit_ratio id = mountaineers 							value = -100000	  				}
	ai_strategy = { type = unit_ratio id = marines 									value = -100000	  				}		
	ai_strategy = { type = unit_ratio id = paratroopers 							value = -100000	  				}
	ai_strategy = { type = unit_ratio id = cavalry 									value = -100000	  				}
	
}
slightly_naval_focused_nation = {
	enable = {
		OR = {
			tag = JAP
			tag = USA
			tag = ENG
			tag = FRA
			tag = ITA
			tag = SOV
		}
	}

	ai_strategy = {
		type = unit_ratio
		id = capital_ship
		value = 1
	}

	ai_strategy = {
		type = unit_ratio
		id = submarine
		value = 1
	}

	ai_strategy = {
		type = unit_ratio
		id = screen_ship
		value = 1
	}

	ai_strategy = {
		type = unit_ratio
		id = convoy
		value = 1
	}
}

more_naval_focused_nation = {
	enable = {
		OR = {
			tag = JAP
			tag = USA
			tag = ENG
			tag = PRC
			tag = SOV
		}
	}

	ai_strategy = {
		type = unit_ratio
		id = capital_ship
		value = 1
	}

	ai_strategy = {
		type = unit_ratio
		id = submarine
		value = 2
	}

	ai_strategy = {
		type = unit_ratio
		id = screen_ship
		value = 2
	}

	ai_strategy = {
		type = unit_ratio
		id = convoy
		value = 1
	}
}

minor_navy = {
	enable = {
		is_major = no
	}

	ai_strategy = {
		type = unit_ratio
		id = capital_ship
		value = 1
	}

	ai_strategy = {
		type = unit_ratio
		id = submarine
		value = 2
	}

	ai_strategy = {
		type = unit_ratio
		id = screen_ship
		value = 2
	}

	ai_strategy = {
		type = unit_ratio
		id = convoy
		value = 2
	}
}

minors = {
	enable = {
			AND = { NOT = { OR = { original_tag = ISR original_tag = TUR original_tag = PRC original_tag = SOV original_tag = GER original_tag = USA original_tag = ENG original_tag = JAP original_tag = FRA original_tag = RAJ } } has_army_manpower = { size > 500000} }
		}
		
	abort = {
			OR = { original_tag = ISR original_tag = TUR original_tag = PRC original_tag = SOV original_tag = GER original_tag = USA original_tag = ENG original_tag = JAP original_tag = FRA original_tag = RAJ } NOT = { has_army_manpower = { size > 500000} }
		}
	ai_strategy = { type = unit_ratio id = infantry 							value = -200	}	#INFANTRY
	ai_strategy = { type = unit_ratio id = mountaineers 						value = -200 	}	#MOUNTAINEER
	ai_strategy = { type = unit_ratio id = marines 								value = -200 	}	#MARINES
	ai_strategy = { type = unit_ratio id = motorized 							value = -200 	}	#AT
	ai_strategy = { type = unit_ratio id = mechanized 							value = -200	}	#INFANTRY
	ai_strategy = { type = unit_ratio id = armor 								value = -200 	}	#MOUNTAINEER
	ai_strategy = { type = unit_ratio id = mountaineers 						value = -200 	}	#MARINES
	ai_strategy = { type = unit_ratio id = paratroopers 						value = -200 	}	#AT
	
	ai_strategy = { type = unit_ratio id = infantry 								value = -200	}	#INFANTRY
	ai_strategy = { type = unit_ratio id = mountaineers 							value = -200 	}	#MOUNTAINEER
	ai_strategy = { type = unit_ratio id = marines 								value = -200 	}	#MARINES
	ai_strategy = { type = unit_ratio id = motorized 							value = -200 	}	#AT
	ai_strategy = { type = unit_ratio id = mechanized 							value = -200	}	#INFANTRY
	ai_strategy = { type = unit_ratio id = armor 								value = -200 	}	#MOUNTAINEER
	ai_strategy = { type = unit_ratio id = mountaineers 							value = -200 	}	#MARINES
	ai_strategy = { type = unit_ratio id = paratroopers 							value = -200 	}	#AT
}

majors = {
	enable = {
			AND = { OR = { original_tag = ISR original_tag = TUR original_tag = PRC original_tag = SOV original_tag = GER original_tag = USA original_tag = ENG original_tag = JAP original_tag = FRA original_tag = RAJ } has_army_manpower = { size > 2500000} }
		}
		
	abort = {
			NOT = { has_army_manpower = { size > 5500000} }
		}
	ai_strategy = { type = unit_ratio id = infantry 							value = -1000	}	#INFANTRY
	ai_strategy = { type = unit_ratio id = mountaineers 						value = -1000 	}	#MOUNTAINEER
	ai_strategy = { type = unit_ratio id = marines 								value = -1000 	}	#MARINES
	ai_strategy = { type = unit_ratio id = motorized 							value = -1000 	}	#AT
	ai_strategy = { type = unit_ratio id = mechanized 							value = -1000	}	#INFANTRY
	ai_strategy = { type = unit_ratio id = armor 								value = -1000 	}	#MOUNTAINEER
	ai_strategy = { type = unit_ratio id = mountaineers 						value = -1000 	}	#MARINES
	ai_strategy = { type = unit_ratio id = paratroopers 						value = -1000 	}	#AT
	
	ai_strategy = { type = unit_ratio id = infantry 								value = -1000	}	#INFANTRY
	ai_strategy = { type = unit_ratio id = mountaineers 							value = -1000 	}	#MOUNTAINEER
	ai_strategy = { type = unit_ratio id = marines 								value = -1000 	}	#MARINES
	ai_strategy = { type = unit_ratio id = motorized 							value = -1000 	}	#AT
	ai_strategy = { type = unit_ratio id = mechanized 							value = -1000	}	#INFANTRY
	ai_strategy = { type = unit_ratio id = armor 								value = -1000 	}	#MOUNTAINEER
	ai_strategy = { type = unit_ratio id = mountaineers 							value = -1000 	}	#MARINES
	ai_strategy = { type = unit_ratio id = paratroopers 							value = -1000 	}	#AT
}
