CZE_unit_production = {
	allowed = { 
		original_tag = CZE
	}
	enable = {
		always = yes
	}
	abort = {
		always = no
	}
	
	ai_strategy = {
		type = role_ratio
		id = garrison
		value = 5
	}
	
	ai_strategy = {
		type = role_ratio
		id = paratroopers
		value = 0
	}

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

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

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

	ai_strategy = {
		type = role_ratio
		id = motorized
		value = 5 #because doctrine this = 2
	}

	ai_strategy = {
		type = role_ratio
		id = mechanized
		value = -5 #because doctrine this = 0
	}

	ai_strategy = {
		type = role_ratio
		id = armor
		value = 20 #because doctrine this = 10
	}

	ai_strategy = {
		type = role_ratio
		id = infantry
		value = 70 #88 to 70
	}
	
	#Air unit factors
	ai_strategy = {
		type = unit_ratio
		id = fighter
		value = 50
	}
	
	ai_strategy = {
		type = unit_ratio
		id = cas
		value = 15 #because doctrine this = 15
	}
	
	ai_strategy = {
		type = unit_ratio
		id = tactical_bomber
		value = 5
	}
	
	ai_strategy = {
		type = unit_ratio
		id = strategic_bomber
		value = -10
	}
	
	ai_strategy = {
		type = unit_ratio
		id = naval_bomber
		value = -25
	}
	
	ai_strategy = {
		type = equipment_production_factor
		id = fighter
		value = 10
	}

	ai_strategy = {
		type = equipment_production_factor
		id = strategic_bomber
		value = -10
	}
	
	ai_strategy = {
		type = equipment_production_factor
		id = infantry
		value = 20 #30 to 50
	}
	
	ai_strategy = {
		type = equipment_production_factor
		id = artillery
		value = 20 #20 to 40
	}
	
	ai_strategy = {
		type = equipment_production_factor
		id = armor
		value = 20
	}
	ai_strategy = {
		type = equipment_production_min_factories_archetype
		id = artillery_equipment
		value = 1
	}
	#ai_strategy = {
	#	type = equipment_production_min_factories
	#	id = fighter
	#	value = 3
	#}
	ai_strategy = {
		type = equipment_variant_production_factor
		id = large_plane_airframe
		value = -100
	}
}	



CZE_armored_production = {
	allowed = {
		original_tag = CZE
	}
	enable = {
		ai_wants_divisions > 24 #Decreasing the amount of tanks the AI wants
	}
	abort = {
		ai_wants_divisions < 25 #Decreasing the amount of tanks the AI wants
	}

	ai_strategy = {
		type = role_ratio
		id = armor
		value = 5
	}
}

CZE_shift_production = {
	allowed = {
		original_tag = CZE
	}
	enable = {
		has_equipment = { infantry_equipment > 5000 }
	}
	abort = {
		has_equipment = { infantry_equipment < 5000 }	
	}

	ai_strategy = {
		type = equipment_production_factor
		id = infantry
		value = -25
	}
}

CZE_halt_light_armor_production_in_transitioning = {
	allowed = {
		original_tag = CZE
	}
	enable = {
		has_template_majority_unit = medium_armor
		OR = {
			has_equipment = { light_tank_chassis > 600 }
			date > 1939.1.1
		}		
	}
	abort = {
		always = no  # once we start we never go back to light armor
	}

	ai_strategy = {
		type = equipment_variant_production_factor
		id = light_tank_chassis
		value = -75
	}
}


CZE_highered_armored_production = {
	allowed = { original_tag = CZE }
	enable = {
		num_of_military_factories > 19
	}
	abort = {
		num_of_military_factories < 20
	}

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

CZE_dont_waste_xp_until_medium_armor = {

	allowed = { original_tag = CZE	}	
	enable = {
		always = yes
	}

	abort = {	
		has_template_majority_unit = medium_armor
	}

	ai_strategy = {
		type = template_prio
		id = paratrooper
		value = -75
	}

	ai_strategy = {
		type = template_prio
		id = mountaineers
		value = -75
	}
}

CZE_super_boost_light_for_med_armor = {

	allowed = { original_tag = CZE }
	
	enable = {
		OR = {
			has_tech = basic_medium_tank
			has_tech = basic_medium_tank_chassis
		}
		NOT = { has_template_ai_majority_unit = medium_armor }
	}

	abort = {	
		has_template_ai_majority_unit = medium_armor
	}

	# lets do changes more often during this period too
	ai_strategy = {
		type = land_xp_spend_priority
		id = division_template
		value = 100
	}

	# this is gateway
	ai_strategy = {
		type = template_prio
		id = light_armor
		value = 100
	}

	ai_strategy = {
		type = template_prio
		id = medium_armor
		value = 150
	}
	
	# Germany is set up to change their SS division into medium armor.
	ai_strategy = {
		type = template_prio
		id = motorized
		value = 200
	}
}

CZE_super_boost_light_for_modern_armor = {
	
	allowed = { original_tag = CZE }
	enable = {
		OR = {
			has_tech = main_battle_tank
			has_tech = main_battle_tank_chassis
		}
		NOT = { has_template_ai_majority_unit = modern_armor }
	}

	abort = {	
		has_template_ai_majority_unit = modern_armor
	}

	# lets do changes more often during this period too
	ai_strategy = {
		type = land_xp_spend_priority
		id = division_template
		value = 100
	}

	# this is gateway
	ai_strategy = {
		type = template_prio
		id = medium_armor
		value = 100
	}

	ai_strategy = {
		type = template_prio
		id = modern_armor
		value = 150
	}
}


CZE_template_design = {
	allowed = { original_tag = CZE }
	enable = {
	
		date < 1940.1.1				
	}
	abort = { 
		date > 1940.1.1
	}

	ai_strategy = {
		type = template_prio
		id = motorized
		value = -50
	}

	ai_strategy = {
		type = template_prio
		id = cavalry
		value = -100
	}
	
	ai_strategy = {
		type = template_prio
		id = light_armor
		value = 30
	}

	ai_strategy = {
		type = template_prio
		id = medium_armor
		value = 50
	}

	ai_strategy = {
		type = template_prio
		id = heavy_armor
		value = -50
	}

	ai_strategy = {
		type = template_prio
		id = paratroopers
		value = -50
	}
}
CZE_industry = {
	allowed = { original_tag = CZE }
	enable = {
		date < 1940.1.1
		date > 1936.1.1
	}
	abort={
		date > 1940.1.1
	}

	ai_strategy = {
		type = added_military_to_civilian_factory_ratio
		value = 50
	}
}

CZE_tank_export = { #TONKS
	allowed = {
		original_tag = CZE
	}
	enable = {
		has_dlc = "Arms Against Tyranny"
		GER = {
			has_war = no
		}
		has_war = no
		controls_state = 69 #Sudetenland
		controls_state = 972 #Southern Sudetenland
	}
	abort_when_not_enabled = yes

	ai_strategy = {
		type = equipment_production_min_factories
		id = armor
		value = 2
	}
	ai_strategy = {
		type = equipment_variant_production_factor
		id = light_tank_chassis
		value = 50
	}
	ai_strategy = {
		type = equipment_market_for_sale_factor
		id = armor
		value = 150
	}
	ai_strategy = {
		type = equipment_market_for_sale_threshold
		id = armor
		value = 10
	}
}

CZE_historical_already_got_our_tanks_mate = {
	allowed = {
		original_tag = CZE
	}
	abort_when_not_enabled = yes
	
	enable = {
		has_dlc = "Arms Against Tyranny"
		is_historical_focus_on = yes
	}
	ai_strategy = {
		type = role_ratio
		id = armor
		value = -25 #because doctrine this = 10
	}
}
