------
------
------------

------Diplomacy, Country, Balancing------
NDefines.NCountry.BASE_FUEL_CAPACITY = 50000 --no change
NDefines.NDiplomacy.WARGOAL_VERSUS_MAJOR_AT_WAR_REDUCTION = -0.80
NDefines.NGame.LAG_DAYS_FOR_LOWER_SPEED = 1000
NDefines.NGame.LAG_DAYS_FOR_PAUSE = 100
NDefines.NDiplomacy.TENSION_JOIN_ATTACKER = 0.25
NDefines.NDiplomacy.OPINION_FOR_DEMO_FROM_WT_GENERATION = -0.5
NDefines.NDiplomacy.EMBARGO_NEIGHBOUR_AI_WEIGHT = -50
NDefines.NDiplomacy.EMBARGO_THREAT_THRESHOLD = 30
NDefines.NAI.MAX_VOLUNTEER_ARMY_FRACTION = 1.00
--NDefines.NDiplomacy.FRONT_IS_DANGEROUS = -200
NDefines.NAI.DIPLOMACY_ACCEPT_VOLUNTEERS_BASE = 150
NDefines.NDiplomacy.TENSION_FACTION_JOIN = 2
NDefines.NBuildings.OWNER_CHANGE_EXTRA_SHARED_SLOTS_FACTOR = 1
NDefines.NCountry.BASE_FUEL_GAIN_PER_OIL = 2.0
NDefines.NAI.DIPLOMACY_SEND_MAX_FACTION = 0.0
NDefines.NAI.DIPLO_PREFER_OTHER_FACTION = -400
NDefines.NDiplomacy.TENSION_VOLUNTEER_FORCE_DIVISION = 0
NDefines.NDiplomacy.LICENSE_ACCEPTANCE_SAME_FACTION = 1000
NDefines.NDiplomacy.WARGOAL_COST_DOCKING_RIGHTS = -0.25
NDefines.NCountry.CIVIL_WAR_INVOLVEMENT_MIN_TENSION = 0.5
NDefines.NAI.PEACE_BID_FOLD_TURNS_AGAINST_OTHER_AI = 20
NDefines.NAI.DAYS_FUEL_REMAINING_TO_ENTER_FUEL_SAVING_MODE = 10
NDefines.NAI.MAX_FUEL_CONSUMPTION_RATIO_FOR_NAVY_TRAINING = 0.60
NDefines.NMilitary.PREFERRED_TACTIC_COMMAND_POWER_COST = 0
NDefines.NAI.DIPLOMACY_LEND_LEASE_MONTHS_TO_CANCEL = 1
NDefines.NAI.MINIMUM_FUEL_DAYS_TO_ASK_LEND_LEASE = 120
NDefines.NAI.MINIMUM_FUEL_DAYS_TO_ACCEPT_LEND_LEASE = 60
NDefines.NCountry.ATTACHE_XP_SHARE = 0.25

------Construction------
NDefines.NAI.BUILDING_TARGETS_BUILDING_PRIORITIES = {
		'air_base',
		'infrastructure',
		'nuclear_reactor',
		'nuclear_reactor_heavy_water',
		'synthetic_refinery',
		'dockyard',
		'industrial_complex',
	}
NDefines.NAI.CONSTRUCTION_PRIO_SUPPLY_BUILDING = 3.50
NDefines.NAI.CONSTRUCTION_PRIO_RAILWAY = 20.0
NDefines.NAI.CONSTRUCTION_PRIO_FACTOR_OWNED_CORE = 5.0
NDefines.NAI.CONSTRUCTION_PRIO_FACTOR_OWNED_NONCORE = 3.0
NDefines.NSupply.MIN_DIFF_FOR_AUTO_UPDATING_EXISTING_RAILWAYS = 1

------Technology------
NDefines.NAI.RESEARCH_DAYS_BETWEEN_WEIGHT_UPDATE = 1
NDefines.NAI.RESEARCH_AHEAD_BONUS_FACTOR = 10.0
NDefines.NAI.RESEARCH_AHEAD_OF_TIME_FACTOR = 1.5
NDefines.NAI.RESEARCH_BONUS_FACTOR = 2
NDefines.NAI.MAX_AHEAD_RESEARCH_PENALTY = 7
--NDefines.NAI.RESEARCH_BASE_DAYS = 1000
NDefines.NAI.RESEARCH_YEARS_BEHIND_FACTOR = 0.20

------Training------
NDefines.NAI.DEPLOY_MIN_TRAINING_SURRENDER_FACTOR = 0.5
NDefines.NAI.DEPLOY_MIN_EQUIPMENT_SURRENDER_FACTOR = 0.90 
NDefines.NAI.DEPLOY_MIN_TRAINING_PEACE_FACTOR = 1
NDefines.NAI.DEPLOY_MIN_EQUIPMENT_PEACE_FACTOR = 0.70
NDefines.NAI.DEPLOY_MIN_TRAINING_WAR_FACTOR = 1
NDefines.NAI.DEPLOY_MIN_EQUIPMENT_WAR_FACTOR = 0.85
NDefines.NAI.DEPLOY_MIN_EQUIPMENT_CAP_DEPLOY_FACTOR = 0.85
--NDefines.NAI.WANTED_UNITS_THREAT_BASE = 0.7 
--NDefines.NAI.WANTED_UNITS_THREAT_MAX = 25.0
--NDefines.NMilitary.BATALION_CHANGED_EXPERIENCE_DROP = 0.5
--NDefines.NDeployment.BASE_DEPLOYMENT_TRAINING = 1.5
--NDefines.NMilitary.DEPLOY_TRAINING_MAX_LEVEL = 1
NDefines.NAI.UPGRADE_DIVISION_RELUCTANCE = 3
NDefines.NMilitary.BASE_LEADER_TRAIT_GAIN_XP = 0.45
NDefines.NAI.UPGRADE_PERCENTAGE_OF_FORCES = 0.10
NDefines.NAI.DAYS_BETWEEN_CHECK_BEST_TEMPLATE = 7
NDefines.NAI.DAYS_BETWEEN_CHECK_BEST_EQUIPMENT = 7
NDefines.NAI.STOP_TRAINING_FULLY_TRAINED_FACTOR = 0.99
NDefines.NAI.UPGRADES_DEFICIT_LIMIT_DAYS = 60
NDefines.NAI.LOW_PRIO_TEMPLATE_BONUS_FOR_GARRISONS = 300000
NDefines.NAI.LOW_PRIO_TEMPLATE_PENALTY_FOR_FRONTS = -2000


------XP related------
NDefines.NAI.DESIRE_USE_XP_TO_UPDATE_LAND_TEMPLATE = 25.0
NDefines.NAI.VARIANT_CREATION_XP_RESERVE_LAND = 10
NDefines.NMilitary.MAX_ARMY_EXPERIENCE = 999
NDefines.NMilitary.MAX_NAVY_EXPERIENCE = 999
NDefines.NMilitary.MAX_AIR_EXPERIENCE = 999
NDefines.NAI.DESIRE_USE_XP_TO_UNLOCK_LAND_DOCTRINE = 10
NDefines.NAI.DESIRE_USE_XP_TO_UNLOCK_NAVAL_DOCTRINE = 0.5
NDefines.NAI.DESIRE_USE_XP_TO_UNLOCK_AIR_DOCTRINE = 0.5
NDefines.NAI.DESIRE_USE_XP_TO_UNLOCK_ARMY_SPIRIT = 0.4
NDefines.NAI.DESIRE_USE_XP_TO_UPGRADE_LAND_EQUIPMENT = 50.0
NDefines.NAI.DESIRE_USE_XP_TO_UPGRADE_NAVAL_EQUIPMENT = 1.0
NDefines.NAI.DESIRE_USE_XP_TO_UPGRADE_AIR_EQUIPMENT = 15.0
NDefines.NMilitary.BASE_DIVISION_BRIGADE_GROUP_COST = 1
NDefines.NMilitary.BASE_DIVISION_BRIGADE_CHANGE_COST = 1
NDefines.NMilitary.BASE_DIVISION_SUPPORT_SLOT_COST = 1
NDefines.NMilitary.LAND_EQUIPMENT_BASE_COST = 3
NDefines.NMilitary.LAND_EQUIPMENT_RAMP_COST = 0
NDefines.NMilitary.NAVAL_EQUIPMENT_BASE_COST = 1
NDefines.NMilitary.AIR_EQUIPMENT_BASE_COST = 1
NDefines.NMilitary.AIR_EQUIPMENT_RAMP_COST = 0
NDefines.NMilitary.NAVAL_EQUIPMENT_RAMP_COST = 0
NDefines.NAI.DEFAULT_LEGACY_VARIANT_CREATION_XP_CUTOFF_LAND = 20
NDefines.NAI.DEFAULT_MODULE_VARIANT_CREATION_XP_CUTOFF_LAND = 10
NDefines.NAI.DEFAULT_MODULE_VARIANT_CREATION_XP_CUTOFF_NAVY = 50
NDefines.NAI.DEFAULT_MODULE_VARIANT_CREATION_XP_CUTOFF_AIR = 25
NDefines.NAI.DEFAULT_LEGACY_VARIANT_CREATION_XP_CUTOFF_AIR = 20
NDefines.NAI.VARIANT_CREATION_XP_RESERVE_NAVY = 30
NDefines.NAI.VARIANT_CREATION_XP_RESERVE_AIR  = 30
--NDefines.NAI.LAND_DESIGN_ALTERNATIVE_ABSENT = 1
--NDefines.NAI.LAND_DESIGN_ALTERNATIVE_OF_LESSER_TECH = 1
--NDefines.NAI.LAND_DESIGN_ALTERNATIVE_OF_EQUAL_TECH = 1
--NDefines.NAI.LAND_DESIGN_ALTERNATIVE_OF_GREATER_TECH = 1
--NDefines.NAI.LAND_DESIGN_DEMAND_FIELD_DIVISION = 36
--NDefines.NAI.LAND_DESIGN_DEMAND_TRAINING_DIVISION = 24
--NDefines.NAI.LAND_DESIGN_DEMAND_GARRISON_DIVISION = 12
--NDefines.NAI.LAND_DESIGN_DEMAND_UNUSED_TEMPLATE = 0
--NDefines.NAI.LAND_DESIGN_DEMAND_ABSENT = 0
--NDefines.NAI.LAND_DESIGN_CUTOFF_AS_PERCENTAGE_OF_MAX = 0.01

------Production------
NDefines.NAI.PRODUCTION_EQUIPMENT_SURPLUS_FACTOR = 0.6
NDefines.NAI.PRODUCTION_LINE_SWITCH_SURPLUS_NEEDED_MODIFIER = 0.4
NDefines.NProduction.LICENSE_EQUIPMENT_UPGRADE_XP_FACTOR = 1
NDefines.NProduction.EQUIPMENT_MODULE_ADD_XP_COST = 1
NDefines.NProduction.EQUIPMENT_MODULE_REPLACE_XP_COST = 1
NDefines.NProduction.EQUIPMENT_MODULE_CONVERT_XP_COST = 1
NDefines.NProduction.EQUIPMENT_MODULE_REMOVE_XP_COST = 1
NDefines.NProduction.BASE_LICENSE_IC_COST = 0
NDefines.NProduction.LICENSE_IC_COST_YEAR_INCREASE = 0
NDefines.NProduction.EQUIPMENT_BASE_LEND_LEASE_WEIGHT = 1.0
NDefines.NProduction.EQUIPMENT_LEND_LEASE_WEIGHT_FACTOR = 0.0025
NDefines.NProduction.LEND_LEASE_DELIVERY_TOTAL_DAYS = 14
NDefines.NIndustrialOrganisation.DESIGN_TEAM_CHANGE_XP_COST = 0
NDefines.NIndustrialOrganisation.FUNDS_FOR_RESEARCH_COMPLETION_PER_RESEARCH_COST = 750
NDefines.NIndustrialOrganisation.ASSIGN_DESIGN_TEAM_PP_COST_PER_DAY = 0.05
NDefines.NIndustrialOrganisation.DEFAULT_INITIAL_POLICY_ATTACH_COST = 0
NDefines.NIndustrialOrganisation.FUNDS_FROM_MANUFACTURER_PER_IC_PER_DAY = 0.10
NDefines.NAI.RAILWAY_GUN_PRODUCTION_BASE_DIVISIONS_RATIO_PERCENT = 5
NDefines.NAI.RAILWAY_GUN_PRODUCTION_MIN_DIVISONS = 100
NDefines.NAI.RAILWAY_GUN_PRODUCTION_MIN_FACTORIES = 50
NDefines.NProduction.RAILWAY_GUN_MAX_MIL_FACTORIES_PER_LINE = 10
NDefines.NProduction.RAILWAY_GUN_REPAIR_SPEED = 25.0
NDefines.NProduction.BASE_FACTORY_EFFICIENCY_VARIANT_CHANGE_FACTOR = 100

NDefines.NAI.INDUSTRIAL_ORG_TRAIT_UNLOCK_RANDOMNESS = 1.0
NDefines.NAI.INDUSTRIAL_ORG_RESEARCH_ASSIGN_RANDOMNESS = 1.0
NDefines.NAI.INDUSTRIAL_ORG_PRODUCTION_ASSIGN_RANDOMNESS = 1.0
NDefines.NProduction.LICENSE_EQUIPMENT_SPEED_NOT_FACTION = 0.0

------Supply------
NDefines.NSupply.NODE_INITIAL_SUPPLY_FLOW = 3.05
NDefines.NSupply.NODE_STARTING_PENALTY_PER_PROVINCE = 0.50
NDefines.NSupply.NODE_ADDED_PENALTY_PER_PROVINCE = 0.70
NDefines.NSupply.NAVAL_BASE_INITIAL_SUPPLY_FLOW = 3.60
NDefines.NSupply.NAVAL_BASE_STARTING_PENALTY_PER_PROVINCE = 0.85
NDefines.NSupply.NAVAL_BASE_ADDED_PENALTY_PER_PROVINCE = 1.1
NDefines.NSupply.NODE_FLOW_BONUS_PER_RAIL_LEVEL = 0.35
NDefines.NSupply.RIVER_RAILWAY_LEVEL = 2
NDefines.NSupply.FLOATING_HARBOR_BASE_SUPPLY = 50.0
NDefines.NSupply.FLOATING_HARBOR_INITIAL_SUPPLY_FLOW = 6.0
NDefines.NSupply.FLOATING_HARBOR_ADDED_PENALTY_PER_PROVINCE = 1.8
NDefines.NSupply.SUPPLY_FLOW_DROP_REDUCTION_AT_MAX_INFRA = 0.36
NDefines.NSupply.FLOATING_HARBOR_BASE_DURATION = 60
NDefines.NSupply.SUPPLY_FLOW_PENALTY_CROSSING_RIVERS = 0.40
NDefines.NSupply.SUPPLY_HUB_FULL_MOTORIZATION_BONUS = 2.8
NDefines.NSupply.SUPPLY_HUB_MOTORIZATION_MARGINAL_EFFECT_DECAY = 1.2
NDefines.NSupply.RAILWAY_BASE_FLOW = 15.0
NDefines.NSupply.VP_TO_SUPPLY_BONUS_CONVERSION = 0.1
NDefines.NSupply.SUPPLY_POINTS_PER_TRAIN = 1.25

------Peace Conferences-----
NDefines.NDiplomacy.PEACE_SCORE_SCALE_FACTOR = 1.55
NDefines.NDiplomacy.PEACE_SCORE_DISTRIBUTION = { 0.2, 0.2, 0.2, 0.2, 0.2, 0.1, 0.1, 0.1, 0.1, 0.1, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05 }
NDefines.NDiplomacy.PEACE_CONTEST_REFUND_FACTOR = { 1.0, 0.92, 0.84, 0.76 } 	-- Vanilla is 1.0, 0.92, 0.84, 0.76
NDefines.NAI.PEACE_AI_EVALUATE_FOR_NON_ALLIES = false						-- Vanilla is false
NDefines.NAI.PEACE_AI_EVALUATE_OTHER_ALWAYS = false							-- Vanilla is false

------Trade-related------
NDefines.NTrade.DISTANCE_TRADE_FACTOR = 0
NDefines.NTrade.RELATION_TRADE_FACTOR = 1.1
NDefines.NCountry.CONVOY_RANGE_FACTOR = 0.45
NDefines.NCountry.CONVOY_LENDLEASE_RANGE_FACTOR = 0.45
NDefines.NCountry.CONVOY_INTERNATIONAL_MARKET_RANGE_FACTOR = 0.45
NDefines.NCountry.SURRENDER_LIMIT_REDUCTION_PER_COLLABORATION = 0.20
NDefines.NAI.TRADEABLE_FACTORIES_FRACTION = 1.0
NDefines.NTrade.TRADEABLE_FACTORIES_FRACTION = 2.0
NDefines.NAI.MINIMUM_GOOD_TRADE_RATIO_PER_CIV = 0.025 
NDefines.NAI.MIN_DELIVERED_TRADE_FRACTION = 0.70
NDefines.NTrade.ANTI_MONOPOLY_TRADE_FACTOR = 0

------Navy------
NDefines.NAI.REFIT_SHIP_RELUCTANCE = 5000
NDefines.NAI.REFIT_SHIP_PERCENTAGE_OF_FORCES = 0.33
NDefines.NAI.MIN_NAVAL_MISSION_PRIO_TO_ASSIGN = {
		0, -- HOLD (consumes fuel HOLD_MISSION_MOVEMENT_COST fuel while moving)
		100, -- PATROL
		200, -- STRIKE FORCE
		200, -- CONVOY RAIDING
		200, -- CONVOY ESCORT
		200, -- MINES PLANTING
		100, -- MINES SWEEPING
		0, -- TRAIN
		0, -- RESERVE_FLEET
		100, -- NAVAL INVASION SUPPORT
	}

NDefines.NAI.HIGH_PRIO_NAVAL_MISSION_SCORES = {
		0, -- HOLD (consumes fuel HOLD_MISSION_MOVEMENT_COST fuel while moving)
		2000, -- PATROL
		1000, -- STRIKE FORCE
		1500, -- CONVOY RAIDING
		2000, -- CONVOY ESCORT
		-1, -- MINES PLANTING
		300, -- MINES SWEEPING
		0, -- TRAIN
		0, -- RESERVE_FLEET
		1000, -- NAVAL INVASION SUPPORT
	}

NDefines.NNavy.MISSION_FUEL_COSTS = {  -- fuel cost for each mission
		0.0, -- HOLD (consumes fuel HOLD_MISSION_MOVEMENT_COST fuel while moving)
		1.0, -- PATROL
		1.0, -- STRIKE FORCE (does not cost fuel at base, and uses IN_COMBAT_FUEL_COST in combat. this is just for the movement in between)
		1.0, -- CONVOY RAIDING
		1.0, -- CONVOY ESCORT
		1.0, -- MINES PLANTING
		1.0, -- MINES SWEEPING
		0.4, -- TRAIN
		0.0, -- RESERVE_FLEET (consumes fuel HOLD_MISSION_MOVEMENT_COST fuel while moving)
		1.0, -- NAVAL_INVASION_SUPPORT (does not cost fuel at base, only costs while doing bombardment and escorting units)
	}
NDefines.NNavy.HOLD_MISSION_MOVEMENT_COST = 0.8
NDefines.NNavy.TRAINING_ACCIDENT_CHANCES = 0.01
NDefines.NNavy.TRAINING_ACCIDENT_CRITICAL_HIT_CHANCES = 0.15
NDefines.NNavy.TRAINING_ACCIDENT_STRENGTH_LOSS = 2.0
NDefines.NAI.SEA_PATH_LENGTH_SCORE_BASE = 0

NDefines.NNavy.REPAIR_AND_RETURN_AMOUNT_SHIPS_LOW = 0.1
NDefines.NNavy.REPAIR_AND_RETURN_AMOUNT_SHIPS_MEDIUM = 0.2
NDefines.NNavy.REPAIR_AND_RETURN_AMOUNT_SHIPS_HIGH = 0.3
NDefines.NNavy.REPAIR_AND_RETURN_UNIT_DYING_STR = 0.15
NDefines.NNavy.REPAIR_AND_RETURN_PRIO_MEDIUM_COMBAT = 0.2
NDefines.NNavy.REPAIR_AND_RETURN_PRIO_LOW_COMBAT = 0.3



NDefines.NNavy.TRAINING_ORG = 0.40
NDefines.NNavy.BEST_CAPITALS_TO_SCREENS_RATIO = 0.20
NDefines.NNavy.CONVOY_ATTACK_BASE_FACTOR = 0.15
NDefines.NNavy.SHORE_BOMBARDMENT_CAP = 0.35
NDefines.NNavy.SUB_DETECTION_CHANCE_BASE = 10
NDefines.NNavy.UNIT_TRANSFER_SPOTTING_SPEED_MULT = 3.0
NDefines.NNavy.SUBMARINE_BASE_TORPEDO_REVEAL_CHANCE = 0.06
NDefines.NNavy.CONVOY_DETECTION_CHANCE_BASE = 2.68
NDefines.NNavy.MAX_CAPITALS_PER_AUTO_TASK_FORCE = 12
NDefines.NNavy.BEST_CAPITALS_TO_CARRIER_RATIO = 2
NDefines.NNavy.BEST_CAPITALS_TO_SCREENS_RATIO = 0.25
NDefines.NAI.MAX_SCREEN_TASKFORCES_FOR_MINE_SWEEPING_PRIO_MAX_MINES = 200

NDefines.NAI.NAVY_PREFERED_MAX_SIZE = 80
NDefines.NAI.DOCKYARDS_PER_NAVAL_DESIRE_EFFECT = -50.0
NDefines.NAI.MIN_CAPITALS_FOR_CARRIER_TASKFORCE = 12
NDefines.NAI.CAPITALS_TO_CARRIER_RATIO = 3
NDefines.NAI.SCREENS_TO_CAPITAL_RATIO = 5.0
--NDefines.NAI.CAPITAL_TASKFORCE_MAX_CAPITAL_COUNT = 20
NDefines.NAI.SUB_TASKFORCE_MAX_SHIP_COUNT = 6
NDefines.NAI.SCREEN_TASKFORCE_MAX_SHIP_COUNT = 5
--NDefines.NAI.MAIN_SHIP_RATIO_TO_SPLIT = 1.8
NDefines.NAI.MAX_PATROL_TO_STRIKE_FORCE_RATIO = 4.0
NDefines.NNavy.SUPREMACY_PER_SHIP_PER_MANPOWER = 0.15
NDefines.NNavy.SUPREMACY_PER_SHIP_PER_IC = 0.04

NDefines.NAI.REGION_THREAT_PER_SUNK_CONVOY = 25
NDefines.NAI.REGION_THREAT_LEVEL_TO_BLOCK_REGION = 25 * 400
NDefines.NAI.REGION_CONVOY_DANGER_DAILY_DECAY = 10

NDefines.NAI.MIN_INVASION_AREA_SIZE_FOR_FLOATING_HARBORS = 3

------Army------


NDefines.NAI.AI_PREFERRED_TACTIC_WEEKLY_CHANGE_CHANCE = 0.00

----Battleplanning----
NDefines.NAI.AREA_DEFENSE_CIVIL_WAR_IMPORTANCE = 5.0 --test
--NDefines.NAI.REDEPLOY_DISTANCE_VS_ORDER_SIZE = 0.9 --test
NDefines.NAI.PLAN_ATTACK_MIN_ORG_FACTOR_LOW = 0.75 --test
NDefines.NAI.PLAN_ATTACK_MIN_STRENGTH_FACTOR_LOW = 0.75 --test
NDefines.NAI.PLAN_ATTACK_MIN_ORG_FACTOR_MED = 0.65 --test
NDefines.NAI.PLAN_ATTACK_MIN_STRENGTH_FACTOR_MED = 0.65	 --test
NDefines.NAI.PLAN_ATTACK_MIN_ORG_FACTOR_HIGH = 0.5 --test		
NDefines.NAI.PLAN_ATTACK_MIN_STRENGTH_FACTOR_HIGH = 0.5 --test	
NDefines.NAI.DYNAMIC_STRATEGIES_THREAT_FACTOR = 8.0 --test
--NDefines.NAI.BASE_DISTANCE_TO_CARE = 400.0 --test
NDefines.NAI.AVERAGE_SUPPLY_USE_PESSIMISM = 2.0 --test
NDefines.NAITheatre.FRONT_EVAL_UNIT_SUPPLY_AND_ORG_LACK_IMPACT = 1.5 --test
--NDefines.NAI.REVISITED_PROV_BOOST_FACTOR = 6 --test
NDefines.NAITheatre.AI_THEATRE_DISTRIBUTION_MAX_PERCENT_UNMET_DEMAND_PER_FRONT = 0.5 --test

NDefines.NAI.LAND_DEFENSE_SUPPLY_HUB_IMPORTANCE = 9

NDefines.NAI.ASSIGN_TANKS_TO_MOUNTAINS = -15
NDefines.NAI.ASSIGN_TANKS_TO_JUNGLE = -20

NDefines.NAI.RESERVE_TO_COMMITTED_BALANCE = 0.3

NDefines.NSupply.AI_FRONT_DIVISIONS_PER_SUPPLY_POINT = 0.85
NDefines.NAITheatre.AI_THEATRE_SUPPLY_CRISIS_LIMIT = 0.25

NDefines.NAI.PLAN_VALUE_TO_EXECUTE = -0.61
NDefines.NAI.FRONT_EVAL_UNIT_AIR_SUP_IMPACT = 2.0
NDefines.NAI.AI_FRONT_MOVEMENT_FACTOR_FOR_READY = 0.25

NDefines.NMilitary.PLAN_MIN_AUTOMATED_EMPTY_POCKET_SIZE = 15
NDefines.NMilitary.FRONTLINE_EXPANSION_FACTOR = 0.7
NDefines.NMilitary.LAND_COMBAT_COLLATERAL_FORT_FACTOR = 0.01		
NDefines.NMilitary.LAND_COMBAT_COLLATERAL_INFRA_FACTOR = 0.003	
NDefines.NMilitary.LAND_COMBAT_FORT_DAMAGE_CHANCE = 5	
NDefines.NMilitary.UNIT_LEADER_MODIFIER_COOLDOWN_ON_GROUP_CHANGE = 1
NDefines.NMilitary.UNIT_LEADER_ASSIGN_TRAIT_COST = 10.0
NDefines.NSupply.AI_FRONT_MINIMUM_UNITS_PER_PROVINCE_FOR_SUPPLY_CALCULATIONS = 0	-- Vanilla is 1
NDefines.NMilitary.UNIT_EXP_LEVELS = { 0.10, 0.20, 0.80, 0.95 }
--NDefines.NMilitary.COMBAT_STACKING_START = 10
--NDefines.NMilitary.COMBAT_STACKING_EXTRA = 5
--NDefines.NMilitary.COMBAT_STACKING_PENALTY = -0.03
NDefines.NAI.PLAN_ACTIVATION_MAJOR_WEIGHT_FACTOR = 1.5
NDefines.NAI.PLAN_ACTIVATION_PLAYER_WEIGHT_FACTOR = 2
NDefines.NAI.PLAN_STEP_COST_LIMIT = 15
NDefines.NAI.PLAN_ATTACK_DEPTH_FACTOR = 0.5
NDefines.NAI.AREA_DEFENSE_BASE_IMPORTANCE = 30
NDefines.NAI.STATE_CONTROL_FOR_AREA_DEFENSE = 0.60
NDefines.NMilitary.PLAN_EXECUTE_BALANCED_LIMIT = 0
NDefines.NAI.MAX_SUPPLY_DIVISOR = 1.50
NDefines.NAI.FALLBACK_LOSING_FACTOR = 0.0
NDefines.NAI.DIVISION_SUPPLY_RATIO_TO_MOTORIZE = 1
NDefines.NAI.ENTRENCHMENT_WEIGHT = 4.0
--NDefines.NAI.MIN_AI_UNITS_PER_TILE_FOR_STANDARD_COHESION = 2.0
--NDefines.NAI.MIN_FRONT_SIZE_TO_CONSIDER_STANDARD_COHESION = 2000
NDefines.NAI.MIN_FIELD_STRENGTH_TO_BUILD_UNITS = 0.70
NDefines.NAI.ATTACK_HEAVILY_DEFENDED_LIMIT = 0.5
NDefines.NAI.MAX_MICRO_ATTACKS_PER_ORDER = 5
NDefines.NAI.MICRO_POCKET_SIZE = 3
NDefines.NAI.POCKET_DISTANCE_MAX = 6000

NDefines.NAI.FRONT_CUTOFF_MIN_EDGE_PROXIMITY = 1
NDefines.NAI.FRONT_BULGE_RATIO_LOWER_CUTOFF = 1.2
NDefines.NAI.FRONT_BULGE_RATIO_UPPER_CUTOFF = 1.8

NDefines.NAI.FRONT_EVAL_UNIT_ACCURACY = 1.5
NDefines.NAI.MIN_FORCE_RATIO_TO_PROTECT = 0
NDefines.NAI.FRONT_EVAL_PERCENT_TO_ASSIST_ALLY_FRONT = 0

NDefines.NMilitary.PLAN_SPREAD_ATTACK_WEIGHT = 12.0 --was 56, 300 for test
NDefines.NMilitary.FRONT_MIN_PATH_TO_REDEPLOY = 4

NDefines.NAI.VP_LEVEL_IMPORTANCE_MEDIUM = 1
NDefines.NAI.VP_LEVEL_IMPORTANCE_LOW = 1 --keep high at 30
NDefines.NAI.PLAN_MIN_SIZE_FOR_FALLBACK = 2000
NDefines.NAI.MIN_PLAN_VALUE_TO_MICRO_INACTIVE = 0.15
NDefines.NAI.UNIT_ASSIGNMENT_TERRAIN_IMPORTANCE = 10.0
NDefines.NAI.FRONT_UNITS_CAP_FACTOR = 20.0
NDefines.NAI.RAIDS_CREATE_FREQUENCY_DAYS = 20
NDefines.NAI.RAIDS_COMMAND_POWER_CAP_TO_CREATE = 150.0 
NDefines.NAI.COMMAND_POWER_BEFORE_SPEND_ON_TRAITS = 10.0
NDefines.NAI.ARMY_LEADER_ASSIGN_NR_TRAITS = 0
NDefines.NNavy.AMPHIBIOUS_INVADE_DEFEND_LOW = 1.1
NDefines.NAI.LOCATION_BALANCE_TO_ADVANCE = 0.00
NDefines.NMilitary.RIVER_CROSSING_PENALTY = -0.30
NDefines.NMilitary.RIVER_CROSSING_PENALTY_LARGE = -0.50
NDefines.NAI.MAIN_ENEMY_FRONT_IMPORTANCE = 4.0


NDefines.NMilitary.NAVAL_INVASION_PLANNING_BONUS_MALUS = -0.9
NDefines.NAI.MIN_NUM_CONQUERED_PROVINCES_TO_DEPRIO_NAVAL_INVADED_FRONTS = 100

NDefines.NAI.MAX_INVASION_SIZE = 24
NDefines.MIN_INVASION_ORG_FACTOR_TO_EXECUTE = 0.7
NDefines.NAI.PLAN_FRONT_SECTION_MAX_LENGTH = 6 --test
NDefines.NAI.PLAN_FRONT_SECTION_MIN_LENGTH = 2 --test

----AIFC----
NDefines.NAI.AIFC_CA_DIVISIONS_PER_PROVINCE = 2.5
NDefines.NAI.AIFC_ACTIVATE_AVG_ORG_RATIO_THRESHOLD = 0.4
NDefines.NAI.AIFC_ACTIVATE_IN_POSITION_RATIO_THRESHOLD = 0.3
NDefines.NAI.AIFC_TARGET_SUPPLY_HUB_BASE_SCORE = 30.0
NDefines.NAI.AIFC_TARGET_NAVAL_BASE_BASE_SCORE = 15.0
NDefines.NAI.AIFC_TARGET_NAVAL_BASE_SCORE_PER_LEVEL = 2.0
NDefines.NAI.AIFC_REFRESH_NEED_PER_DAY = 2.0
NDefines.NAI.AIFC_REFRESH_NEED_SUPPLY_FACTOR_PER_DAY = 1.10
NDefines.NAI.AIFC_PATH_COST_TRN_MOUNTAINS = 4.0
NDefines.NAI.AIFC_PATH_COST_TRN_MARSH = 3.0
NDefines.NAI.AIFC_PATH_COST_TRN_PLAINS = 1.5
NDefines.NAI.AIFC_PATH_COST_TRN_FOREST = 1.5
NDefines.NAI.AIFC_PATH_COST_TRN_URBAN = 0.50
NDefines.NAI.AIFC_PATH_COST_ADJ_RIVER = 1.5
NDefines.NAI.AIFC_PATH_COST_ADJ_RIVER_LARGE = 3.25
NDefines.NAI.AIFC_FRESHNESS_ADD_ON_PROGRESS = 22.0
NDefines.NAI.AIFC_PATH_COST_RAILWAY_CONNECTION = 0.80
NDefines.NAI.AIFC_PATH_COST_HAS_SUPPLY_HUB = 0.50
NDefines.NAI.AIFC_TARGET_SHORT_PATH_PENALTY_FACTOR = 0 --short path more ideal now?
NDefines.NAI.AIFC_UNIT_OFFENSIVE_SCORE_FACTOR_HARDNESS = 800.0
NDefines.NAI.AIFC_UNIT_OFFENSIVE_SCORE_FACTOR_EXPERIENCE = 500.0
NDefines.NAI.AIFC_UNIT_OFFENSIVE_SCORE_FACTOR_ARMOR = 80.0
NDefines.NAI.AIFC_UNIT_OFFENSIVE_SCORE_FACTOR_SOFT_ATTACK = 12.0
NDefines.NAI.AIFC_UNIT_OFFENSIVE_SCORE_FACTOR_HARD_ATTACK = 16.0
NDefines.NAI.AIFC_UNIT_NUDGE_FREQUENCY_DAYS = 10.0
NDefines.NAI.AIFC_UPDATE_FREQUENCY_DAYS = 4


------Airforce------

----Balancing----
--NDefines.NAir.AIR_WING_XP_LEVELS = { 50, 300, 700, 900 }
--NDefines.NAir.AIR_WING_XP_TRAINING_MAX = 300.0
--NDefines.NAir.AIR_WING_XP_AIR_VS_AIR_COMBAT_GAIN = 1
--NDefines.NAir.AIR_WING_XP_GROUND_MISSION_COMPLETED_GAIN = 0.35

----Air demand----

NDefines.NAI.NAVAL_STRIKE_PLANES_PER_SHIP = 50
--NDefines.NAI.NAVAL_SHIP_AIR_IMPORTANCE = 5
NDefines.NAI.NAVAL_STRIKE_PLANES_PER_SHIP_ESCORTING = 20
NDefines.NAI.NAVAL_PATROL_PLANES_PER_SHIP_ESCORTING = 20
--NDefines.NAI.NAVAL_PATROL_PLANES_PER_SHIP_PATROLLING = 50
NDefines.NAI.MAX_FUEL_CONSUMPTION_RATIO_FOR_AIR_TRAINING = 3.00
--NDefines.NAir.AI_ALLOWED_PLANES_KEPT_IN_RESERVE = 0.0
--NDefines.NAI.AI_FRACTION_OF_FIGHTERS_RESERVED_FOR_INTERCEPTION = 0
NDefines.NAI.WANTED_MAX_FUEL_BUFFER_IN_DAYS_FOR_AIR_MAX_CONSUMPTION  = 2
NDefines.NAI.LAND_COMBAT_FIGHTERS_PER_PLANE = 3.0
--NDefines.NAI.LAND_COMBAT_AIR_SUPERIORITY_IMPORTANCE = 0.80
--NDefines.NAI.LAND_COMBAT_CAS_PER_COMBAT = 30

NDefines.NAI.LAND_COMBAT_FRIEND_ARMIES_AIR_IMPORTANCE = 2.0
NDefines.NAI.LAND_COMBAT_OUR_ARMIES_AIR_IMPORTANCE = 8.0
NDefines.NAI.LAND_COMBAT_FRIEND_COMBATS_AIR_IMPORTANCE = 5.0
NDefines.NAI.LAND_COMBAT_OUR_COMBATS_AIR_IMPORTANCE = 1000
NDefines.NAI.LAND_COMBAT_ENEMY_COASTAL_FORTS_AIR_IMPORTANCE = 20.0
NDefines.NAir.AIR_WING_FLIGHT_SPEED_MULT = 0.05
--NDefines.NAI.LAND_DEFENSE_INTERCEPTORS_PER_BOMBERS = 1.4
--NDefines.NAI.DAYS_BETWEEN_AIR_PRIORITIES_UPDATE = 7
--NDefines.NAI.NAVAL_COMBAT_AIR_IMPORTANCE = 15.0
--NDefines.NAI.NAVAL_SHIP_AIR_IMPORTANCE = 3.5
--NDefines.NAI.NAVAL_AIR_SUPERIORITY_IMPORTANCE = 1
--NDefines.NAI.NAVAL_IMPORTANCE_SCALE = 1



NDefines.NAI.AI_AIR_MISSION_COVERAGE_TO_STAY_PUT = 0.75
NDefines.NAI.AIR_SCORE_DISTANCE_IMPACT = 0.0
NDefines.NAI.DAYS_BETWEEN_AIR_PRIORITIES_UPDATE = 7

--NDefines.NAI.NAVAL_PATROL_PLANES_PER_SHIP_RAIDING = 30.0

NDefines.NAI.LAND_DEFENSE_FIGHERS_PER_PLANE = 2.5