# Inter-Agent distribution variables

flags = {
  	testflag = yes
  	invade_albania = no
  	assist_finland = no
    }

combat = { GER ITA }			# declare war on these countries if possible.
influence = { BEL HOL FRA }             # influence these nations ahead of others.

strat_redeploy_threshold = [days]		# The ETA at which the AI uses strat. redeploy.

max_front_ratio			= X		# The max wanted friendly-enemy division ratio along the front 
# NOTE: Disregarded if there is only one front in the area.

max_garrison_prop		= [0.0-1.0] 	# The war-time desired proportion of troops allocated to garrison duty
min_garrison_prop		= [0.0-1.0] 	# The war-time minimum proportion of troops allocated to garrison duty
# NOTE: In areas without fronts, _all_ land units are controlled by the Garrison AI (except forces preparing for an invasion.)

construction = {
	max_factor			= [0.0-1.0]		# Proportion of all _national_ provinces that may construct improvements at the same time
	
	max_AA				= X				# Max number of provinces that may construct AA batteries at the same time
	
	AA_batteries	 	= [yes/no/atwar/not_atwar]	# yes = all the time, no = none, atwar = build during wars, not_atwar = build during peace
	max_AA_level		= X				# Don't improve AA beyond this level.
	
	coastal_fort 		= [yes/no/atwar/not_atwar]
	max_coastal_level	= X				# Don't improve coastal forts beyond this level.
	
	fort_borders = {					# Build land forts along these borders
		GER,
		ITA,
		...
	}
	max_land_level		= X				# Don't improve land forts beyond this level.
	
	ic_at_war			= [yes/no] 		# Normally, we always build IC if there is a large resource surplus. The exception could be during wars.
	force_ic_until		= X				# Ignore presence of a resource surplus and build IC anyway, until year X. (Useful for countries anticipating expansion.)
	
	ic_end_year			= X				# Stop building IC at the end of year X.
}

garrison = {
	
	# OVERSEAS GARRISONING:
	defend_overseas_beaches = [yes/no] # "no" is default
	
	# Basic need is X divisions per area where X is: number of provinces - attrition provinces
	home_multiplier = X # In home area, multiply basic need by X. Default: 0.5
	overseas_multiplier = X # In other area, multiply basic need by X. Default: 0.3333
	home_peace_cap = X
	war_zone_odds = X  # Default: 2.0 (strive to transport in 2x enemy nr of divisions)
	area_multiplier = { # If an area contains a specific province, multiply the basic need by value (overrides overseas_multiplier, but if it is the home area it is ignored.)
		155 = 1.5
		....
	}
	
	# PRIORITIES:

	beach_1 = 50				# Beach level 1
	beach_2 = 55				# Beach level 2
	beach_3 = 60				# Beach level 3
	capital = 100				# Our capital
	human_border = 210			# Ignored for allied human players
	war_target = 100			# The next country targeted for attack by this AI
	
	opposing_alliance = 100		# For neutrals, all alliances are "opposing"
	claim_threat = 100			# If we are neutral, countries with claims on us get this
	unstable_border	= 50		# Bordering countries at war with someone else get this

	# Borders with specific countries
	country_priorities = {
		ENG = 30
		FRA = -1	 # Override "opposing_alliance", "claim_threat" and "unstable_border" values and set to 0.
		...
		...
	}
	
	# Specific provinces
	province_priorities = {
		527 = 50 # Province 527 has prio 50
		...
		...
	}
	
	key_point_prio_mult		= [Value]	# Value * key point value in a province = prio for that province
}

front = {
	river = 		x   	(What to multiply attacking power with if crossing a river. < 1.0 is an advantage..)

	#Unit strength estimation...  1.0 is default..  increase to put more emphasis on value etc..
	strength = x
	organisation = x
	soft_attack = x
	hard_attack = x
	ground_defense = x
	#only applied at defender.
	dig_in = x




	#Odds modifiying variables
	
		# the following is to reduce odds-strength for attacker.
	frozen_attack	= x  #<1.0 to make these bad. 1.0 = no difference.
	snow_attack	= x
	blizzard_attack	= x
	storm_attack	= x
	muddy_attack	= x


		# the following modifies the odds-strength for defender.   (1.0 = no difference.)
	largefort 	= x #for forts above level 6.
	smallfort	= x #for forts 6 and below
	occupied	= x #for surrounded pocket at enemy territory
	owned		= x #for surrounded pocket at own territory


		#reduces the size of odds in total..  (1.0 = no difference, 0.5 = halved.
	jungle_attack 	= x
	mountain_attack = x
	swamp_attack	= x
	forest_attack	= x
	hill_attack 	= x


	recklessness 		= 	[0-3]
	distrib_vs_ai 		= 	[even/reactive]
	distrib_vs_human 	= 	[even/reactive]
	
	# Countries we do not counter-attack for a certain number of days 
	enemy_handicap = {
		# NOTE: These values are ignored for human-controlled enemies.
		# CAUTION: Values apply for _every_new_ war with a set nation.
		ENG = 100
		FRA = 120
		...
		...
	}	
	
	passivity = { # Against specified enemies.
		# Valid values: 0-100 (%)
		ENG = 0
		FRA = 50
		...
		...
	}
	
	reserve_prop			= 	[0.0-1.0]	# Proportion of front troops that should behave as reserves.
	
	panic_ratio_vs_ai		=	X	# Front requests more troops if outnumbered by this factor
	panic_ratio_vs_human	=	X	# Front requests more troops if outnumbered by this factor
	
	enemy_reinf_days 		= 	X	# Count enemy units less than X days from a target province in odds calculations
	
	base_attack_odds		=	X	# Will attack at X odds or better
	min_attack_odds			=	X	# If stalemated for a long period, may go as low as these attack odds
	max_attack_odds			=	X	# Don't use more force than necessary to reach these odds
	reinforce_odds			=	X 	# Send in more troops if the attacking force is at these odds
	withdraw_odds			= 	X	# Break off attacks and withdraw at these odds
	# NOTE: the calculations for retreating from _defensive_ positions are too complex to condense to a few variables
	# NOTE: will _also_ retreat if the average organization is too low
}

military = {
	
	relative_build_scheme 	= [yes/no]	# Should the AI strive to maintain a relative balance between unit types [yes] or simply allocate percentages (see below) of the total production [no]. Default: yes

# Example Build scheme:
	infantry = 			40
	cavalry = 			0
	motorized = 		5
	mechanized = 		5
	panzer = 			15
	paratrooper = 		0
	marine =			0
	bergsjaeger = 		5
					  # 70 %
	
	fighter = 			10
	strategic_bomber = 	0
	tactical_bomber = 	7
	naval_bomber = 		0
	dive_bomber = 		8
	transport_plane = 	0
	torpedo_plane = 	0
					  # 25 %
	
	battleship = 		0
	carrier = 			0
	destroyer = 		0
	cruiser = 			0
	submarine = 		5
	transports = 		0
					  # 5 %
					  
# NOTE: The sum _must_ be exactly 100%!
}


# Factors guiding the use of fighters and strategic bombers.
bomber = {

#defensive fighter ai factors
	defensiveIC = 1.0
	recentlyBombed = 2.0    #protect anything bombed.
	protectOil = 1.0
	protectCoal = 1.0
	protectSteel = 1.0
	protectRubber = 1.0
	
#Evaluation factors for determening which landarea to be strategically bombarded.	
	areaSize = 5.0		#size of area.
	areaDistance = 1.0      #distance
	adjacency = 10.0        #if its neighbor to us.

#Evaluate which province to get a bombing mission.
	targetIC = 1.0		#How important are IC to target..  
	avoidAA = 1.0		#how bad AA are.
	targetCoal = 1.0
	targetSteel = 1.0
	targetOil = 1.0	
	targetRubber = 1.0
	occupied = 20           #Subtract for provinces which are occupied, ie bomb germany ahead of france as UK.
	fighter = 1.0		#how important it is to avoid enemy fighters

}

#Factors regarding amphibious invasions by ai.
invasion = {
  #for evaluating specific province target.
	base = 1.0			#Relative modifier. (lower = specific targets much more important.)
	random = 1.0			#How big a random range.  (1.0 = 1%)
	coastal = 1.0                   #increase to avoid coastal forts more.
	beach = 1.0                     #higher, avoid worst beaches.
	distance = 1.0                  #higher = avoid long distance.
	pocket = 1.0                    #prioritise pockets, ie provinces with no adjacent controlled by same.
	island = 1.0                    #prioritise taking pure islands.
	enemy = 1.0                     #higher = much more vary of troops in province.
	adjacentenemy = 1.0             #higher = much more vary of troops nearby
	
	#specific provinces can be targetted to get special bonuses..

	target = {
		898 = 1000 # Invasion of South Sicily (898) has super high priority.
	}
}

#Factors controlling the naval AI
admiral = {
	#specific provinces can be targetted to get special bonuses..

	target = {
		592 = 200 # patrolling the south north sea have a big priority.
	}

}


#factors to modify for technological development.

 technology = { 
 		#list of endgoals to achieve.
            endgoal = { ... }
            	#list of techs to give bonus too.
            preference = { ... }
            
            #preference to weight importance of research in these field.s
            electronics = 1.000 
            armor = 1.000 
            infantry = 1.000 
            industry = 1.000 
            rocket = 1.000 
            nuclear = 1.000 
            heavy_aircraft = 1.000 
            light_aircraft = 1.000 
            naval = 1.000 
            submarine = 1.000 
            artillery = 1.000 
            naval_doctrine = 1.000 
            land_doctrine = 1.000 
            air_doctrine = 1.000 
            } 
