
import('personality/base_standard.ai')
import('personality/axis/buildorder_lib.ai')

-- randomly choose a build order from the given list defined in the axis lib of buildorders
s_personality.buildorder = RandomlyChooseBuildorder( axis_buildorder )

-- randomly choose a command-tree order from the given list
s_personality.command_tree_pref_tbl = ChooseRandomCommandTree( command_trees.axis )


	s_personality.defensiveness = 0.4					-- how defensive a player this AI is (from 0-1) with 1 being very defensive
	s_personality.vp_aggressiveness = 0.6				-- how hard will the player go for VP (from 0-1) NOTE: they will still go after them to prevent a loss
	s_personality.chance_to_occupy = 0.9					-- general random factor, how often to occupy (larger the more chance it will happen if it becomes a good choice)
	
	--------------------------------
	-- company command tree info
	s_personality.prefered_command_tree = 0				-- 
	s_personality.command_tree_presets = nil				-- if set this is the exact commandtree items this AI will choose
	s_personality.command_tree_pref_tbl = {}				-- list of preferences this personality has, AI will pick randomly from the list
	
	--------------------------------
	-- military info
	s_personality.start_attack_time = 0				-- when the AI will attack for the first time (minimum)
	s_personality.start_attack_time_variance = 2*60		-- what random variation of time should be added to the start attack time
	s_personality.military_strength_modifier = 1.0		-- how many times more powerful should the AI military be before attacking a target
	
	s_personality.default_attack_percentage = 0.5		-- when attacking what is the default percentage
	s_personality.max_attack_percentage = 0.8 			-- [0,1] what attack percentage do we never want to go over no matter what
	s_personality.attack_percentage_increment_per_minute = 0 -- attack percentage increase each minute
	s_personality.advance_percentage = 0.6			-- how much more military we need to advance on an enemy
	
	s_personality.fallback_percentage = 0.45				-- how much less military we need to fallback from an enemy (this is a maybe, depending on a random factor)
	s_personality.fallback_health_percentage = 0.5	-- how little health we need for vehicles to fallback (this is a maybe, depending on a random factor)
	s_personality.fallback_capacity_percentage = 0.33		-- how little squad capacity we need for soldiers to fallback (this is a maybe, depending on a random factor)
	s_personality.fallback_chance = 1.0					-- the chance of falling back within a certain time frame once the above fallback conditions are met
	s_personality.fallback_chance_reevaluate_ticks = 20	-- how long to wait before reevaluating whether to fallback
	s_personality.fallback_health_percentage_always = 0.3 -- below this health, the vehicle will ALWAYS fallback
	
	s_personality.retreat_capacity_percentage = 0.33		-- the capacity percentage below which soldier squads will retreat
	s_personality.retreat_suppressed_percentage = 0.61	-- if this percent or more of squads in the area are suppressed, the squad will retreat
	s_personality.retreat_chance = 1.0
	s_personality.retreat_chance_reevaluate_ticks = 20
	
	s_personality.defend_prefer_threat = false
	s_personality.attack_prefer_threat = false
	s_personality.min_engineers_below_50_owned = 2		-- how many engineers minimum do we need to have when we have less than 50 of the map
	s_personality.min_engineers_after_50_owned = 2		-- how many engineers minimum do we need to have when we have more than 50 of the map
	
	--------------------------------
	-- unit purchasing
	-- 	s_personality.demand_variance = 0.0						-- how much variance in the demand this personality will overlook (eg. units with a demand of 10 and 12 will both be considered in variances are greater than 0.2)
	-- 	s_personality.eta_unit_wait_time = 100					-- how long will AI wait for the unit it wants
	-- 	s_personality.eta_production_wait_time = 90				-- how long will AI wait for the production item it wants (upgrades,etc)
	-- 	s_personality.eta_structure_wait_time = 90				-- how long will AI wait for the structure it wants
	-- 	s_personality.eta_squadaddon_wait_time = 40				-- how long will AI wait for a squad-add (flamethrower, etc)

	s_personality.eta_unit_wait_time = 25					-- how long will AI wait for the unit it wants
	s_personality.eta_production_wait_time = 45				-- how long will AI wait for the production item it wants (upgrades,etc)
	s_personality.eta_structure_wait_time = 30				-- how long will AI wait for the structure it wants
	s_personality.eta_squadaddon_wait_time = 15				-- how long will AI wait for a squad-add (flamethrower, etc)

	s_personality.occupy_near_spawner_limit = 120			-- minimum distance that the AI will require from an existing spawner building before occupying
	s_personality.occupy_max_active = 1						-- max number of ambient occupied buildings the AI will attempt to use
	s_personality.max_engineers = 2							-- max number of engineers you should build
	s_personality.max_engineers_with_teammates = 2			-- max number of engineers when their are teammates
	s_personality.use_military_strength_percentage_cap=false	-- if the military cap should be used
	s_personality.military_strength_percentage_cap = 1.0		-- [-N -> N] what percentage of the enemies military should the AI try to stay near
	s_personality.purchase_delay_pace = 0					-- the amount of seconds between purchase choices
	s_personality.min_military_value_start = -1				-- used to cap the military_value of the AI, this is the military value the AI is allowed to have without constraint (this grows over time)
	s_personality.min_military_value_increment_per_minute = 0 -- this is the amount the allowed military_value the AI will increase by every minute (starts at start_attack_time)
	s_personality.glue_military_percentage = 1				-- [0,1] if the AI is this much better than the enemy it will stop producing military units
	
	--------------------------------
	-- 
	s_personality.axis_quarter_master_chance = 85			-- what percentage chance the axis will build a quartermaster
	s_personality.mine_preference_demand = 20				-- bonus demand given to building allied mines
	s_personality.phase4_random_wait_time = 220			-- the amount of time the AI will wait to purchase phase4 after buying a sturm armormy
	s_personality.tankdepot_random_wait_time = 110		-- the amount of time the AI will wait to purchase tank depot after buying a motorpool
	
	--------------------------------
	-- resourcing/securing
	s_personality.min_captured_pts_before_securing = 2	-- how many points should the AI capture before deciding to secure
	s_personality.max_secured_pts = 7					-- how many points max should the AI secure
	s_personality.default_percentage_to_capture = 1		-- [0,1] capture percentage to start with (which can then grow if an increment is defined)
	s_personality.max_percentage_to_capture = 1			-- [0-1], how much of the map we will stop at capturing
	s_personality.max_percentage_vp_wanted = .75			-- [0-1], how many VP points the AI will want to grab
	s_personality.vp_ticker_warning_level = 250			-- how many tickers should be left before we start really worrying about them (increasing their priority)
	s_personality.prefer_munitions = false				-- the norm is to prefer to fuel, but this flips it
	s_personality.max_num_capturers = 3					-- the max number of capturers we will ever have (used to slow AI pace)
	s_personality.capture_percentage_growth_start_time = 0 -- the time at which we start to apply the capture percentage growth
	s_personality.capture_percentage_growth_per_min = 0 -- the increase in capture percentage we apply every minute after growth timer expires
	
	--------------------------------
	-- tactics info
	s_personality.ability_avoidance_percentage = 0.95 		-- what percentage of the time will the AI try to avoid avoidable abilities (artillery)
	s_personality.tankmove_tactic_enabled = true			-- is the tankmove tactic enabled
