universal_airfield_construction = {
	allowed = {
		always = yes
	}
	enable = {
		check_variable = {global.days_to_war < 0}
	}
	abort_when_not_enabled = yes
	ai_strategy = {
		type = build_building
		id = air_base
		target = 44
		value = 6000
	}	
    ai_strategy = {
		type = build_building
		id = air_base
		target = 43
		value = 6000
	}
	ai_strategy = {
		type = build_building
		id = air_base
		target = 27
		value = 6000
	}	
    ai_strategy = {
		type = build_building
		id = air_base
		target = 30
		value = 6000
	}	
	ai_strategy = {
		type = build_building
		id = air_base
		target = 47
		value = 6000
	}	
    ai_strategy = {
		type = build_building
		id = air_base
		target = 32
		value = 6000
	}	
	ai_strategy = {
		type = build_building
		id = air_base
		target = 36
		value = 6000
	}	
    ai_strategy = {
		type = build_building
		id = air_base
		target = 49
		value = 6000
	}	
	ai_strategy = {
		type = build_building
		id = air_base
		target = 45
		value = 6000
	}	
    ai_strategy = {
		type = build_building
		id = air_base
		target = 29
		value = 6000
	}	

	ai_strategy = {
		type = build_building
		id = air_base
		target = 37
		value = 6000
	}	
    ai_strategy = {
		type = build_building
		id = air_base
		target = 53
		value = 6000
	}	
	ai_strategy = {
		type = build_building
		id = air_base
		target = 2
		value = 6000
	}	
    ai_strategy = {
		type = build_building
		id = air_base
		target = 13
		value = 6000
	}	
}




#Wild_Aggression = {
#	allowed = { 
#		always = yes 
#	}
#	enable = {
#		always = yes
#	}
#	
#	#ai_strategy = {
#	#	type = added_military_to_civilian_factory_ratio
#	#	value = 50
#	#}
#
#	#ai_strategy = {
#	#	type = building_target
#	#	id = arms_factory
#	#	value = 200
#	#}
#	
#}

#save_xp_for_divs = {
#	allowed = {
#		always = yes
#	}
#	enable = {
#		always = yes
#	}
#
#	ai_strategy = {
#		type = template_xp_reserve
#		value = 30
#	}
#}

default_unit_production = { #If adding country-unique ones, bear in mind that they STACK
	allowed = {
		always = no
	}
	enable = {
		always = yes
	}
	abort_when_not_enabled = yes

#	ai_strategy = {
#		type = role_ratio
#		id = paratroopers
#		value = 0
#	}
#
#	ai_strategy = {
#		type = role_ratio
#		id = mountaineers
#		value = 0
#	}
#
#	ai_strategy = {
#		type = role_ratio
#		id = marines
#		value = 0
#	}
#
#	ai_strategy = {
#		type = role_ratio
#		id = armor
#		value = 0
#	}
#
#	ai_strategy = {
#		type = role_ratio
#		id = infantry
#		value = 80
#	}
#
#	#Air unit factors
#	ai_strategy = {
#		type = unit_ratio
#		id = fighter
#		value = 60
#	}
#
#	ai_strategy = {
#		type = unit_ratio
#		id = cas
#		value = 0
#	}
#
#	ai_strategy = {
#		type = unit_ratio
#		id = tactical_bomber
#		value = 0
#	}
#
#	ai_strategy = {
#		type = unit_ratio
#		id = strategic_bomber
#		value = 0
#	}
#
#	ai_strategy = {
#		type = unit_ratio
#		id = naval_bomber
#		value = 0
#	}


	# Naval unit factors
	ai_strategy = {
		type = unit_ratio
		id = capital_ship
		value = 0
	}

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

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

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

	ai_strategy = {
		type = equipment_production_factor
		id = fighter
		value = 35
	}

	ai_strategy = {
		type = equipment_production_factor
		id = infantry
		value = 60
	}

	ai_strategy = {
		type = equipment_production_factor
		id = artillery
		value = 10
	}
}

default_role_ratios = {
	enable = {
		not = {
			has_dlc = "Man the Guns"
		}
	}
	abort_when_not_enabled = yes

	ai_strategy = {
		type = role_ratio
		id = naval_capital
		value = 100
	}

	ai_strategy = {
		type = role_ratio
		id = naval_carrier
		value = 100
	}

	ai_strategy = {
		type = role_ratio
		id = naval_sub
		value = 100
	}

	ai_strategy = {
		type = role_ratio
		id = naval_screen
		value = 100
	}
}

default_role_ratios = {
	enable = {
		has_dlc = "Man the Guns"
	}
	abort_when_not_enabled = yes

	ai_strategy = {
		type = role_ratio
		id = naval_capital_bb
		value = -80
	}

	ai_strategy = {
		type = role_ratio
		id = naval_capital_bc
		value = -20
	}

	ai_strategy = {
		type = role_ratio
		id = naval_carrier
		value = -70
	}

	ai_strategy = {
		type = role_ratio
		id = naval_submarine
		value = 100
	}

	ai_strategy = {
		type = role_ratio
		id = naval_screen
		value = 65
	}

	ai_strategy = {
		type = role_ratio
		id = naval_escort
		value = 35
	}

	ai_strategy = {
		type = role_ratio
		id = naval_cruiser_light
		value = 25
	}

	ai_strategy = {
		type = role_ratio
		id = naval_cruiser_heavy
		value = 20
	}

	ai_strategy = {
		type = role_ratio
		id = naval_mine_sweeper
		value = 15
	}

	ai_strategy = {
		type = role_ratio
		id = naval_mine_layer
		value = 20
	}
}

convoy_voy_voy_voy = {
	enable = {
		has_dlc = "Man the Guns"
		convoy_threat > 0.2
	}
	abort = {
		convoy_threat < 0.2
	}

	ai_strategy = {
		type = role_ratio
		id = naval_cruiser_light
		value = -20
	}

	ai_strategy = {
		type = role_ratio
		id = naval_escort
		value = 25
	}

	ai_strategy = {
		type = role_ratio
		id = naval_mine_layer
		value = -10
	}
	ai_strategy = {
		type = unit_ratio
		id = screen_ship
		value = 30
	}

	ai_strategy = {
		type = unit_ratio
		id = capital_ship
		value = -10
	}

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

default_pp_spend_amount = {
	enable = {
		always = yes
	}
	abort_when_not_enabled = yes

	ai_strategy = {
		type = pp_spend_amount
		id = idea
		value = 100
	}

	ai_strategy = {
		type = pp_spend_amount
		id = decision
		value = 100
	}
}

#default_mobile_production = {
#	enable = {
#		ai_wants_divisions > 30
#		has_tech = motorised_infantry
#	}
#	abort = {
#		ai_wants_divisions < 31
#	}
#
#	ai_strategy = {
#		type = role_ratio
#		id = mobile
#		value = 4
#	}
#}





#DEFAULT_template_design = {
#	enable = {
#		always = yes
#	}
#	abort = {
#
#	}
#
#	ai_strategy = {
#		type = template_prio
#		id = cavalry
#		value = 5
#	}
#
#	ai_strategy = {
#		type = template_prio
#		id = infantry
#		value = 80
#	}
#}


do_not_waste_pp_if_saving_for_manpower_laws = {
#AI_TODO - Make it know manpower better
	enable = {
		check_variable = {max_available_manpower_k < 80}
		has_war = yes
	}
	abort = {
		OR = {
			check_variable = {max_available_manpower_k > 80}			
			has_war = no
		}
	}

	ai_strategy = {
		type = pp_spend_priority
		id = relation
		value = -9999
	}

	ai_strategy = {
		type = pp_spend_priority
		id = guarantee
		value = -9999
	}

	ai_strategy = {
		type = pp_spend_amount
		id = idea
		value = -9999
	}

	ai_strategy = {
		type = pp_spend_amount
		id = decision
		value = -9999
	}
}


#put_garrisons_on_high_prio = {
#	enable = {
#		always = yes
#	}
#
#	ai_strategy = {
#		type = garrison_reinforcement_priority
#		value = 100 # positive is high prio, negative is low prio
#	}
#}
