﻿NAI = {
	DEFAULT_STRATEGY_STRING = "ai_strategy_default"

	STRATEGY_RANDOM_FACTOR = 20.0 # The higher this is, the more random AI strategy selection will be

	TICKS_FOR_FULL_SPENDING_VARIABLES_UPDATE = 100 # The higher this is, the less often AIs will fully refresh their spending variables
	NUM_FAILED_MONEY_SPENDING_ATTEMPTS_FOR_UPDATE = 50 # After this many failed attempts to change money spending/construct government buildings, force an update of money spending priorities
	NUM_FAILED_AUTHORITY_SPENDING_ATTEMPTS_FOR_UPDATE = 20 # After this many failed attempts to change authority spending, force an update of authority spending priorities
	
	# When a potential AI building spending has its state calculcated, add a randomly set number of ticks between these two values for when to update it again
	# Before this amount of ticks has passed, unless there is a specific reason to update the state, we only update the score and keep the state the same
	MIN_TICKS_TO_UPDATE_BUILDING_SPENDING_STATE = 100
	MAX_TICKS_TO_UPDATE_BUILDING_SPENDING_STATE = 200

	MIN_SUBJECT_TYPE_VALUE = 1 # ai_value for a subject type is never below this

	GOVERNMENT_MONEY_SPENDING_ENABLED = yes  	 # If this is set to no, the AI for government money spending will be disabled
	GOVERNMENT_AUTHORITY_SPENDING_ENABLED = yes  # If this is set to no, the AI for authority spending will be disabled
	TAX_LEVEL_CHANGES_ENABLED = yes	 			 # If this is set to no, the AI will not change its tax levels (but might still use consumption taxes if GOVERNMENT_AUTHORITY_SPENDING_ENABLED = yes)
	PRODUCTION_BUILDING_CONSTRUCTION_ENABLED = yes	 # If this is set to no, the country-level AI will not construct any production buildings
	AUTONOMOUS_INVESTMENT_CONSTRUCTION_ENABLED = yes # If this is set to no, the autonomous investment AI won't construct anything even if the game rule for it is enabled

	CHANGE_STRATEGY_THRESHOLD = 100	# At this threshold of 'change points', the AI will roll a new strategy
	CHANGE_STRATEGY_INCREASE_WEEKLY_CHANCE = 20 # Chance per week of AI gaining a 'change point' towards rolling a new strategy (1 = 1%)

	CHANGE_STRATEGY_POLITICAL_NEW_RULER = 100 # How many 'change points' are added to each strategy when a country gets a new ruler
	CHANGE_STRATEGY_POLITICAL_REGIME_CHANGE = 100 # How many 'change points' are added to each strategy when a country is the target of a regime change
	CHANGE_STRATEGY_POLITICAL_LAW_ENACTED = 25 # How many 'change points' are added to politics strategy when a law is enacted

	CHANGE_STRATEGY_DIPLOMATIC_STATE_GAINED_OR_LOST = 10 # How many 'change points' are added to diplomatic strategy when a state is acquired or lost
	CHANGE_STRATEGY_DIPLOMATIC_UNIFICATION_CANDIDATE = 100 # How many 'change points' are added to diplomatic strategy when we become or stop being a unification candidate
	CHANGE_STRATEGY_DIPLOMATIC_LIBERTY_DESIRE_CHANGE = 2 # How many 'change points' are added to diplomatic strategy when liberty desire changes (multiplied by size of the change)

	COUNTRY_GOAL_STRATEGIC_UPDATE_COUNT = 5 # How many AIs have their protector scores set every day
	COUNTRY_GOAL_ADJUSTMENT_UPDATE_COUNT = 50 # How many AIs have their antagonize/befriend/threat scores, neighbor/relevance status and attitude adjusted each day

	DECLARE_BANKRUPTCY_MIN_DAYS_IN_DEFAULT = 30 # After this many days in default, the AI will declare bankruptcy
	DECLARE_BANKRUPTCY_COOLDOWN_DAYS = 365 # If AI declares bankruptcy, don't do it again for this many days as chain bankruptcies will radicalize everyone 

	BASE_AGGRESSION = 0.25 # Base chance that AI will consider starting a diplo play each time the goal is checked (1 = 1%)
	UNIFICATION_AGGRESSION_MULT_HIGHER_TIER = 20 # AI aggression is multiplied by this for calculating whether they should try to start a unification/leadership play, if the country would end up forming a nation of a higher tier
	UNIFICATION_AGGRESSION_MULT_SAME_TIER = 0.1 # AI aggression is multiplied by this for calculating whether they should try to start a unification/leadership play, if the country would end up forming a nation of the same tier

	DIPLO_PROPOSAL_DAYS_LEFT_MAX = 28  	# AI will not answer a proposal when it has more than this amount of days left (should map to DIPLOMATIC_ACTION_PENDING_APPROVAL_DAYS)
	DIPLO_PROPOSAL_DAYS_LEFT_MIN = 20	# AI will always answer a proposal when it has this or less amount of days left (should map to DIPLOMATIC_ACTION_PENDING_APPROVAL_DAYS)
	DIPLO_PROPOSAL_ANSWER_CHANCE = 5 	# Chance per tick of AI answering a proposal (1 = 1%)
	DIPLO_PROPOSAL_TO_PLAYER_COOLDOWN_MONTHS = 120 # Do not make the same exact proposal to the player for this amount of months
    DIPLO_PROPOSAL_LIKELY_NON_ACCEPTED_COOLDOWN_MONTHS = 120 # When AI rolls the dice on whether or not to attempt a proposal it thinks will be rejected, don't try again for this time
    DIPLO_PROPOSAL_NO_OBLIGATION_COOLDOWN_MONTHS = 120 # If the AI decides not to offer an obligation for a proposal, remember that decision for this many months

	DIPLO_PROPOSAL_ACCEPT_THRESHOLD = 0					# At this or more acceptance on a diplomatic action without uses_random_approval flag, AI says yes to a proposal. Each point above it increases chance to accept a uses_random_approval proposal
	DIPLO_PROPOSAL_LIKELY_RANDOM_ACCEPTANCE_THRESHOLD = 50		# At this or more acceptance on a diplomatic action with uses_random_approval flag, AI considers it to be accepted for the purpose of proposing it
	DIPLO_PROPOSAL_GUARANTEED_RANDOM_ACCEPTANCE_THRESHOLD = 100		# At this or more acceptance on a diplomatic action with uses_random_approval flag, the AI will always accept it
	DIPLO_PROPOSAL_BREAK_THRESHOLD = -100				# At this or less acceptance, AI breaks off an existing pact
	DIPLO_PROPOSAL_TRANSFER_PACT_RELUCTANCE = 25		# Add this to acceptance value for existing pact in transfer-pact proposals

	OBLIGATION_RECENTLY_REPUDIATED_DESIRE_MULT = 0.1	# Multiply AI's desire for an obligation by this if the offering country has recently repudiated another obligation

	DIPLO_ACCEPTANCE_CALL_IN_OBLIGATION = 50						# Add this acceptance to diplo action when calling in an obligation
	DIPLO_ACCEPTANCE_CALL_IN_OBLIGATION_RECENTLY_REPUDIATED = 25	# Add this acceptance instead of the above to diplo action when calling in an obligation if we've recently repudiated another obligation

	DIPLO_BREAK_PACT_WEIGHT = 1000

	DIPLOMATIC_DEMAND_ALWAYS_ACCEPT_THRESHOLD = 100			# At this amount of acceptance, the AI will always give in to diplomatic demands. If it's less than this but above 0, there is a scaled random chance of accepting.
	DIPLOMATIC_DEMAND_DAYS_LEFT_MAX = 13  					# AI will not answer a demand when it has more than this amount of days left (should map to DIPLOMATIC_DEMAND_PENDING_APPROVAL_DAYS)
	DIPLOMATIC_DEMAND_DAYS_LEFT_MIN = 7						# AI will always answer a demand when it has this or less amount of days left (should map to DIPLOMATIC_DEMAND_PENDING_APPROVAL_DAYS)
	DIPLOMATIC_DEMAND_ANSWER_CHANCE = 10 					# Chance per tick of AI answering a demand (1 = 1%)

	DIPLOMATIC_DEMAND_ACCEPTANCE_BASE = -50
	DIPLOMATIC_DEMAND_ACCEPTANCE_WARGOAL_IMPACT = -1			 # Scales with maneuver cost of demanded wargoal
	DIPLOMATIC_DEMAND_ACCEPTANCE_MILITARY_POWER_SCALE = 4.0 	 # At this amount of relative expected military power, max/min value of DIPLOMATIC_DEMAND_ACCEPTANCE_MILITARY_POWER_FACTOR is applied
	DIPLOMATIC_DEMAND_ACCEPTANCE_MILITARY_POWER_FACTOR = 100	 # Scales with relative expected military power of the demanding country in a potential play, maximum is this value and minimum is this value * -1
	DIPLOMATIC_DEMAND_ACCEPTANCE_INCORPORATED_STATE_FACTOR = -25 # Added to acceptance if the wargoal is demanding they cede an incorporated state
	DIPLOMATIC_DEMAND_ACCEPTANCE_SUBJUGATION_FACTOR = 0.5		 # Multiplied by country's desire to become a subject of the specified type if the wargoal is demanding subjugation
	DIPLOMATIC_DEMAND_ACCEPTANCE_ANNEXATION_FACTOR = -75		 # Added to acceptance if the wargoal is demanding their full annexation
	DIPLOMATIC_DEMAND_ACCEPTANCE_LOYAL_SUBJECT_FACTOR = 75		 # Added to acceptance for demands by overlords against loyal subjects
	DIPLOMATIC_DEMAND_ACCEPTANCE_ANNEXATION_AS_LOYAL_SUBJECT_FACTOR = 100 # Added to acceptance scores for annexations by overlord when at lowest Liberty Desire level, scaled by LD (with this value added at LD = 0)

	INFLUENCE_DEFICIT_BREAK_PACT_BASE_VALUE = 50						# Added to accept/propose score for a pact
	INFLUENCE_DEFICIT_BREAK_PACT_RANDOM_FACTOR = 1.0					# The higher this is, the more random AI pact breaking due to influence deficit will be
	INFLUENCE_DEFICIT_BREAK_PACT_OVER_SPENDING_LIMIT_MULT = 0.1			# AI multiplies the value of pacts that are over their action-type spending limit by this when in an Influence deficit

	MIN_AVAILABLE_LABOR_FOR_NEW_BUILDING = 5000		# If state has less than this in available labor, we should be much less likely to build something (multiplied by 1 + number of ongoing constructions)

	# Formations with fewer units than whichever is smaller of these two values should not have a commander recruited for them
	MIN_COMBAT_UNITS_FOR_COMMANDER_ABSOLUTE = 5		# Absolute number of combat units
	MIN_COMBAT_UNITS_FOR_COMMANDER_RELATIVE = 0.2	# Number of combat units relative to total army size

	# Formations with at least the number of units than whichever is smaller of these two values should always have at least two commanders, so they can be dynamically split to cover multiple fronts
	MIN_COMBAT_UNITS_FOR_MULTIPLE_COMMANDERS_ABSOLUTE = 10  # Absolute number of combat units
	MIN_COMBAT_UNITS_FOR_MULTIPLE_COMMANDERS_RELATIVE = 0.5	# Number of combat units relative to total army size

	RETIRE_COMMANDER_INTERACTION_KEY = "retire_commander" # The AI will use this character interaction to retire excessive commanders

	COMMANDER_DESIRED_RANK_DISPARITY_IN_ARMY = 1 		  # Prefer promoting over recruiting new commanders if there isn't at least this rank disparity between any two generals in an army
	COMMANDER_DESIRED_RANK_DISPARITY_IN_FLEET = 1 		  # Prefer promoting over recruiting new commanders if there isn't at least this rank disparity between any two admirals in a fleet

	RECRUITABLE_COMMANDER_BASE_SCORE = 100 				# The base score assigned to each recruitable commander in the pool
	RECRUITABLE_COMMANDER_RANDOM_FACTOR = 3.0			# The higher this is, the more random AI recruitment selection will be
	RECRUITABLE_COMMANDER_SKILL_TRAIT_SCORE = 25		# A recruitable commander's total value of skill traits is multiplied by this
	RECRUITABLE_COMMANDER_PERSONALITY_TRAIT_SCORE = 0	# A recruitable commander's total value of personality traits is multiplied by this
	RECRUITABLE_COMMANDER_CONDITION_TRAIT_SCORE = -25	# A recruitable commander's total value of condition traits is multiplied by this
	RECRUITABLE_COMMANDER_FAVORED_IG_FACTOR	= 1.5		# If a recruitable commander comes from an IG the AI likes, multiply score by this
	RECRUITABLE_COMMANDER_DISFAVORED_IG_FACTOR = 0.5	# If a recruitable commander comes from an IG the AI dislikes, multiply score by this

	MOBILIZATION_OPTION_RANDOM_FACTOR = 0.5					# The higher this is, the more random AI is about which mobilization options to activate
	MOBILIZATION_OPTION_MONEY_COST_FACTOR = 20 				# When checking whether the AI should activate a mobilization option, the monetary cost of activation is multiplied by this and compared against AI value to determine if it's worth it
	MOBILIZATION_OPTION_NUM_ACTIVE_OPTIONS_DIVISOR = 0.25	# Divide the value of each non-activated mobilization option by ( 1 + number of already active options * this )
	MOBILIZATION_OPTION_GOODS_SHORTAGE_MULT = 0.0			# Multiply value of mobilization option by this if there is a goods shortage of any of its input goods

	MOBILIZATION_BASE_DESIRED_RATIO_TO_ENEMY = 0.5   		# AI wants to have a total amount of mobilized army power that is equal to enemy mobilized army power * this
	MOBILIZATION_MAIN_ATTACKER_ADDED_RATIO = 1.0  			# Add this to desired ratio for the main attacker in the war
	MOBILIZATION_MAIN_DEFENDER_ADDED_RATIO = 1.0  			# Add this to desired ratio for the main defender in the war
	MOBILIZATION_LOYAL_SUBJECT_OF_MAIN_PARTICIPANT_ADDED_RATIO = 0.75 # Add this to desired ratio for loyal subjects of main attacker/defender in the war
	MOBILIZATION_PEACE_NEGOTIATOR_ADDED_RATIO = 0.5 		# Add this to desired ratio for any country that is or would become a peace negotiator (but isn't main attacker or defender)
	MOBILIZATION_LOCAL_FRONTS_ADDED_RATIO = 0.5 			# Add this to desired ratio for any country that has least one local front
	MOBILIZATION_UNINCORPORATED_OCCUPATION_ADDED_RATIO = 0.5	# Add this to desired ratio for any country whose unincorporated states are being occupied
	MOBILIZATION_INCORPORATED_OCCUPATION_ADDED_RATIO = 1.0		# Add this to desired ratio for any country whose incorporated states are being occupied (overrides multiplier for unincorporated occupation)
	MOBILIZATION_EXISTENTIAL_WAR_FACTOR = 2.0 				# If the AI is in an existential war/diplo play (could cease to exist after peace), add this to its desired mobilization ratio
	MOBILIZATION_MINOR_ALLY_MAX_RELATIVE_POWER = 0.15		# To be counted as a minor ally, a country must have equal or less than this amount of the alliance's total combat power. It must also have no fronts.
    MOBILIZATION_MINOR_ALLY_ADVANTAGE_TO_NOT_MOBILIZE = 2.0	# If a minor ally's side in the conflict has at least this army power advantage when their forces are not counted in, don't bother mobilizing
    MOBILIZATION_MIN_ESCALATION_START = 50 	# Before this amount of escalation in a play, AI will only mobilize as a response to the enemy mobilizing (base)
	MOBILIZATION_MIN_ESCALATION_BOLDNESS_FACTOR = 0.2 # Boldness is multiplied by this and subtracted from MOBILIZATION_MIN_MOBILIZATION_ESCALATION_START
    MOBILIZATION_MIN_MOBILIZATION_PEACE_NEGOTIATOR = 0.15   # AI will always mobilize at least this amount of forces if they are or would become a peace negotiator
	MOBILIZATION_MIN_MOBILIZATION_LOYAL_SUBJECT_OF_MAIN_PARTICIPANT = 0.15   # AI will always mobilize at least this amount of forces if they are a loyal subject of main attacker/defender
	MOBILIZATION_MIN_MOBILIZATION_TERRITORIAL_RISK = 0.15   #  AI will always mobilize at least this amount of forces if they might lose territory from the war/play
	MOBILIZATION_MIN_MOBILIZATION_UNINCORPORATED_OCCUPATION = 0.25   #  AI will always mobilize at least this amount of forces if their unincorporated states are occupied
	MOBILIZATION_MIN_MOBILIZATION_INCORPORATED_OCCUPATION = 0.5   #  AI will always mobilize at least this amount of forces if their incorporated states are occupied (overrides the multiplier for unincorporated occupation)
	MOBILIZATION_MIN_MOBILIZATION_LOCAL_FRONTS = 0.25       # AI will always mobilize at least this amount of forces if they have any local fronts
	MOBILIZATION_MIN_MOBILIZATION_CONTAINMENT_WAR = 1.0   # AI will always mobilize at least this amount of forces if fighting in a containment war

	CONSCRIPTION_INSUFFICIENT_FORCES_FACTOR = 1 					# For each 1% of mobilization the AI isn't able to meet, raise a base of 1% * this conscripts
	CONSCRIPTION_RELATIVE_CONSCRIPTED_COMBAT_POWER_DIVISOR = 1		# Conscripted forces fraction of combat power is multiplied by this, then the result of CONSCRIPTION_INSUFFICIENT_FORCES_FACTOR is divided by (1 + the result)
	CONSCRIPTION_SMALL_STANDING_ARMY_THRESHOLD = 0.75				# An AI whose conscripted combat power is above this fraction of total combat power is affected by the below factor
	CONSCRIPTION_SMALL_STANDING_ARMY_MIN_CONSCRIPTS_FACTOR = 0.02   # For each 1% the conscripted combat power fraction above CONSCRIPTION_SMALL_STANDING_ARMY_THRESHOLD, always raise at last this fraction of conscripts

	MIN_GOVERNMENT_LEGITIMACY = 25				# If legitimacy is below this, consider adding IGs we don't really like to the government
	DESIRED_GOVERNMENT_LEGITIMACY = 50				# Apply a bonus to the score of governments which have at least this much legitimacy
	REFORM_GOVERNMENT_MONTHS_BETWEEN_CHANGES = 30 		# If the AI doesn't have elections, it won't consider changing government composition more often than this to avoid lots of radicals
	REFORM_GOVERNMENT_NUM_OPTIONS_TO_CHECK = 5 			# How many top legitimacy possible government constellations will the AI consider
	REFORM_GOVERNMENT_STICKINESS = 1.25 				# Multiply score of the current government by this when checking whether to reform the government
	REFORM_GOVERNMENT_PRO_IG_CLOUT_FACTOR = 1.0			# When scoring IGs for putting in government, add to the score multiplier (scaled by clout)
	REFORM_GOVERNMENT_ANTI_IG_CLOUT_FACTOR = 10.0		# When scoring IGs for putting in government, add to the score divisor (scaled by clout)
	REFORM_GOVERNMENT_ABOVE_DESIRED_LEGITIMACY_FACTOR = 1.5	# Multiply score of governments that meet the desired legitimacy threshold by this
	REFORM_GOVERNMENT_BELOW_MIN_LEGITIMACY_FACTOR = 0.1 # If a government option has less than MIN_GOVERNMENT_LEGITIMACY, multiply its score by this

	MAX_CANDIDATES_TO_COMBINE_FOR_GOVERNMENT_ALTERNATIVES = 8	# Max number of interest groups or parties to combine when checking government alternatives. 8 will give 2^8=256 possible governments. Higher values will affect performance exponentially

	REGIME_CHANGE_NUM_GOVERNMENT_OPTIONS_TO_CHECK = 100 # Replaces REFORM_GOVERNMENT_NUM_OPTIONS_TO_CHECK when attempting to form a government during a regime change - it's fine for this value to be very high as it's executed rarely
	REGIME_CHANGE_MIN_GOVERNMENT_LEGITIMACY = 5			# Replaces MIN_GOVERNMENT_LEGITIMACY when scoring IGs for government in a regime change
	REGIME_CHANGE_REFORM_GOVERNMENT_STICKINESS= 0.1 	# Replaces REFORM_GOVERNMENT_STICKINESSwhen scoring IGs for government in a regime change
	REGIME_CHANGE_REFORM_GOVERNMENT_CLOUT_FACTOR_MULTIPLIER = 100.0	# When scoring IGs for government in a regime change, multiply pro/anti AI clout factors by this

	IDEOLOGICAL_OPINION_LAW_APPROVAL_THRESHOLD = 0.5		# If ruling IGs have at least this much approval/disapproval for a law on average, it affects ideological opinion
	IDEOLOGICAL_OPINION_STRONG_STANCE_THRESHOLD = 1.5		# If ruling IGs have at least this much approval/disapproval for a law on average, IDEOLOGICAL_OPINION_STRONG_STANCE_EFFECT_MULT comes into effect
	IDEOLOGICAL_OPINION_SAME_LAW_STANCE_EFFECT = 0.5		# Added to ideological opinion for each law both governments approve or disapprove of
	IDEOLOGICAL_OPINION_DIFFERENT_LAW_STANCE_EFFECT = -1	# Added to ideological opinion for each law where one government approves and the other disapproves
	IDEOLOGICAL_OPINION_STRONG_STANCE_EFFECT_MULT = 2		# If AI has a strong stance on a law, multiply its effects on ideological opinion by this

	UNIFICATION_MIN_SUPPORT_SCORE = 50	# Support for one country-formation candidate needs to be at least this much above all competitors to support unification
	UNIFICATION_BASE_VALUE = 0
	UNIFICATION_SUPPORTER_DEFAULT_RANK_VALUE = 4 # Rank value is compared to this value for computing supporter rank factor
	UNIFICATION_SUPPORTER_RANK_FACTOR = -10 # Multiplied by rank value delta to supporter default rank
	UNIFICATION_CANDIDATE_DEFAULT_RANK_VALUE = 6 # Rank value is compared to this value for computing candidate rank factor
	UNIFICATION_CANDIDATE_RANK_FACTOR = 10 # Multiplied by rank value delta to candidate default rank
	UNIFICATION_RELATIONS_HOSTILE_FACTOR = -50
	UNIFICATION_RELATIONS_COLD_FACTOR = -25
	UNIFICATION_RELATIONS_POOR_FACTOR = -10
	UNIFICATION_RELATIONS_CORDIAL_FACTOR = 10
	UNIFICATION_RELATIONS_AMICABLE_FACTOR = 25
	UNIFICATION_RELATIONS_FRIENDLY_FACTOR = 50
	UNIFICATION_ATTITUDE_DISINTERESTED_FACTOR = -25
	UNIFICATION_ATTITUDE_CAUTIOUS_FACTOR = -25
	UNIFICATION_ATTITUDE_CONCILIATORY_FACTOR = 0
	UNIFICATION_ATTITUDE_COOPERATIVE_FACTOR = 25
	UNIFICATION_ATTITUDE_GENIAL_FACTOR = 50
	UNIFICATION_ATTITUDE_WARY_FACTOR = -50
	UNIFICATION_ATTITUDE_BELLIGERENT_FACTOR = -100
	UNIFICATION_ATTITUDE_ANTAGONISTIC_FACTOR = -100
	UNIFICATION_ATTITUDE_LOYAL_FACTOR = 100
	UNIFICATION_ATTITUDE_ALOOF_FACTOR = 25
	UNIFICATION_ATTITUDE_DEFIANT_FACTOR = -50
	UNIFICATION_ATTITUDE_REBELLIOUS_FACTOR = -100
	UNIFICATION_ATTITUDE_PROTECTIVE_FACTOR = -50
	UNIFICATION_ATTITUDE_DOMINEERING_FACTOR = -100
	UNIFICATION_POWER_BLOC_FACTOR = 25					# Added to the unification support if both countries are in the same power bloc

	CHANGE_TAX_START_OF_GAME_DAYS_TO_WAIT = 30 # Don't change any tax levels for this amount of days after bookmark initialization, so that economic state has a chance to stabilize
	CHANGE_TAX_SIGNIFICANT_DEBT_THRESHOLD = 0.1 # At this amount of debt to max credit ratio, the logic for 'significant debt' outlined below kicks in
	RAISE_TAX_TO_DESIRED_INCOME_THRESHOLD = 1.25 # If income to expenses ratio is this or below, and tax level is below desired level, raise taxes
	RAISE_TAX_ABOVE_DESIRED_INCOME_MAX_GOLD_RESERVES_THRESHOLD = 0.1 # If gold reserves are at least this full, don't raise taxes above desired level
	RAISE_TAX_ABOVE_DESIRED_INCOME_NO_DEBT_THRESHOLD = 0.9 # If income to expenses ratio is this or below, there is no or little debt, and tax level is at or above desired level, raise taxes
	RAISE_TAX_ABOVE_DESIRED_INCOME_WITH_DEBT_THRESHOLD = 1.1 # If income to expenses ratio is this or below, there is significant debt, and tax level is at or above desired level, raise taxes
	LOWER_TAX_TO_DESIRED_INCOME_NO_DEBT_THRESHOLD = 1.25 # If income to expenses ratio is this or above, there is no or little debt, and tax level is at or above desired level, raise taxes
	LOWER_TAX_TO_DESIRED_INCOME_WITH_DEBT_THRESHOLD = 1.5 # If income to expenses ratio is this or above, there is significant debt, and tax level is at or above desired level, raise taxes
	LOWER_TAX_BELOW_DESIRED_INCOME_THRESHOLD = 2.0 # If income to expenses ratio is this or above and tax level below desired level, raise taxes
	RAISE_TAX_HIGH_DEBT_OVERRIDE_RATIO = 0.5 # At this amount of debt, any level of tax is OK to deal with it

	CONSTRUCTION_MAX_NUM_PRODUCTION_BUILDING_CONSTRUCTIONS_BASE = 1 # If country has this number of production building constructions queued, don't add anymore (base)
	CONSTRUCTION_MAX_NUM_PRODUCTION_BUILDING_CONSTRUCTIONS_SCALED = 0.05 # If country has this number of production building constructions queued, don't add anymore (scaled by construction production)
	CONSTRUCTION_MAX_NUM_PRODUCTION_BUILDING_CONSTRUCTIONS_SCALED_MAX = 999 # CONSTRUCTION_MAX_NUM_PRODUCTION_BUILDING_CONSTRUCTIONS_SCALED can't be higher than this
	CONSTRUCTION_MAX_NUM_GOVERNMENT_BUILDING_CONSTRUCTIONS_BASE = 1 # If country has this number of government building constructions queued, don't add anymore (base)
	CONSTRUCTION_MAX_NUM_GOVERNMENT_BUILDING_CONSTRUCTIONS_SCALED = 0.05 # If country has this number of government building constructions queued, don't add anymore (scaled by construction production)
	CONSTRUCTION_MAX_NUM_GOVERNMENT_BUILDING_CONSTRUCTIONS_SCALED_MAX = 99 # CONSTRUCTION_MAX_NUM_GOVERNMENT_CONSTRUCTIONS_SCALED can't be higher than this
	CONSTRUCTION_RESERVES_NEW_CONSTRUCTIONS = 0.1 # If gold reserves are less than this after adding the cost of a new construction, don't queue it
	CONSTRUCTION_DEBT_RESUME = 0.2 # If constructions are paused, resume once debt is this low relative to ceiling
	CONSTRUCTION_DEBT_PAUSE = 0.4 # If in this much relative debt to debt ceiling, pause all non-critical constructions
	CONSTRUCTION_DEBT_RESUME_CRITICAL_CONSTRUCTION = 0.95 # If critical constructions are paused, resume once debt is this low relative to ceiling
	CONSTRUCTION_DEBT_PAUSE_CRITICAL_CONSTRUCTION = 0.99 # If in this much relative debt to debt ceiling, pause all critical constructions

	CONTAINMENT_PLAY_PARTICIPATION_RANK = 7 # Ranks of this value or above should be keen on joining containment plays to beat down threats

	START_DIPLO_PLAY_RANDOM_FACTOR = 2.0 # The higher this is, the more random AI will be on where to target when starting diplo plays
	START_DIPLO_PLAY_ALLY_STRENGTH_WEIGHT = 0.75 # Consider participants that will for sure join a side with this amount of their forces
	START_DIPLO_PLAY_LIKELY_ALLY_STRENGTH_WEIGHT = 0.5 # Consider participants that will likely to join a side with this amount of their forces

	DIPLO_PLAY_BACK_DOWN_CHANCE_THRESHOLD = 0 # If ( confidence + boldness ) is less than this, consider backing down
	DIPLO_PLAY_BACK_DOWN_CHANCE_ESCALATION = 30 # Above this escalation, AI will consider backing down
	DIPLO_PLAY_BACK_DOWN_INCREASE_CHANCE_THRESHOLD = -50 # If ( confidence + boldness ) is less than this, increase the chance of backing down
	DIPLO_PLAY_BACK_DOWN_INCREASE_CHANCE_MULTIPLIER = 4.0 # If ( confidence + boldness ) is less than DIPLO_PLAY_BACK_DOWN_INCREASE_CHANCE_THRESHOLD, increase the chance of backing down by this factor
	DIPLO_PLAY_BACK_DOWN_GUARANTEED_THRESHOLD = -75 # If ( confidence + boldness ) is less than this, always back down before the play goes to war
	DIPLO_PLAY_BACK_DOWN_GUARANTEED_ESCALATION = 95 # Above this escalation, AI will always back down if it's supposed to
	DIPLO_PLAY_BACK_DOWN_CHANCE_LOW_ESCALATION = 0.1 # 1.0 = 1% (chance each tick) - used before countdown to war starts
	DIPLO_PLAY_BACK_DOWN_CHANCE_HIGH_ESCALATION = 0.5 # 1.0 = 1% (chance each tick) - used after countdown to war starts
	DIPLO_PLAY_BACK_DOWN_CHANCE_WAR_LOSSES_MULT = 1.5 # Multiply chance of backing down due to additional wargoal demands by 1 + ( impact of additional wargoals / impact of original wargoal * this )
	DIPLO_PLAY_BACK_DOWN_CHANCE_WAR_LOSSES_MAX = 3.0 # Max multiplier for impact of additional wargoal demands (including the base of 1)
	DIPLO_PLAY_FREELY_ADD_WARGOALS_ESCALATION_THRESHOLD = 70 # After this amount of escalation, the AI will freely add wargoals instead of reserving manuevers for swaying
	DIPLO_PLAY_ADD_WARGOALS_THRESHOLD = 0.5 # If AI doesn't have at least this much military strength compared to enemy, don't add more wargoals for themselves after the first
	DIPLO_PLAY_FORCE_DIPLOMATIC_PLAY_THRESHOLD = 2.0 # If the AI believes it will have this much military strength compared to enemy and wants multiple things from them, then don't bother sending a diplomatic demand
	DIPLO_PLAY_SWAY_THRESHOLD = 2.0 # If AI has this much military strength compared to enemy, don't bother trying to sway anyone
	DIPLO_PLAY_REVERSE_SWAY_THRESHOLD = 2.0 # If AI has this much military strength compared to enemy, consider reverse sways to have less value
	DIPLO_PLAY_SWAY_LEANING_SIDE_MILITARY_STRENGTH_MULT = 0.25 # When determining strength compared to enemy, add in undecided countries leaning towards a side with this part of their strength
	DIPLO_PLAY_DECIDE_ON_SUPPORT_ESCALATION = 30 # Above this escalation, AI will potentially start taking sides (or declare neutrality) even if not swayed
	DIPLO_PLAY_TAKE_SIDES_MIN_BOLDNESS = 25 # Boldness must be at least this for AI to want to take a side with no gain (ignored for Great Powers in containment plays)
	DIPLO_PLAY_TAKE_SIDES_CHANCE = 0.001 # Multiplied by boldness for chance of taking sides each tick
	DIPLO_PLAY_DECLARE_NEUTRALITY_ESCALATION_MIN_BASE = 80 # Lowest escalation at which AI can declare neutrality, AIs with a preference will never declare neutrality before countdown to war
	DIPLO_PLAY_DECLARE_NEUTRALITY_IMPACT_OF_NEUTRALITY_SCORE = 0.5 # AI's neutrality score * this is subtracted from DIPLO_PLAY_DECLARE_NEUTRALITY_ESCALATION_MIN_BASE
	DIPLO_PLAY_DECLARE_NEUTRALITY_IMPACT_OF_NEUTRALITY_SCORE_MAX = 50 # DIPLO_PLAY_DECLARE_NEUTRALITY_IMPACT_OF_NEUTRALITY_SCORE cannot be higher than this
	DIPLO_PLAY_DECLARE_NEUTRALITY_ESCALATION_MAX = 99 # Highest escalation at which AI can declare neutrality
	DIPLO_PLAY_ABANDON_SUPPORT_CHANCE = 0.1 # Multiplied with negative support score
	DIPLO_PLAY_SWAY_COUNTRIES_ESCALATION = 10 # Above this escalation, AI will potentially start swaying countries
	DIPLO_PLAY_REVERSE_SWAY_COUNTRIES_CHANCE_SCALED = 0.005 # Chance each tick that the AI will try to reverse-sway (scaled by boldness)
	DIPLO_PLAY_REVERSE_SWAY_COUNTRIES_CHANCE_MAX = 0.5 # Max chance each tick that the AI will try to reverse-sway
	DIPLO_PLAY_REVERSE_SWAY_LEANING_MULT = 5.0 # Applied to both scaled and max chance if the swaying country is already leaning towards a side
	DIPLO_PLAY_SWAY_COUNTRIES_CHANCE_SCALED = 5 # Chance each tick that the AI will try to sway someone (scaled by relative strength of the two sides)
	DIPLO_PLAY_SWAY_COUNTRIES_CHANCE_MAX = 25 # Max chance each tick that the AI will try to sway someone
	DIPLO_PLAY_TIMED_WEIGHT_DURATION = 12 # When AI randomly determines sympathy for one side of a diplo play, how long does that weight stay
	DIPLO_PLAY_PREFERENCE_THRESHOLD = 25 # At this delta, an AI country is considered to have a preference for that side of the diplo play
	DIPLO_PLAY_WEAK_ABANDON_SUPPORT_THRESHOLD = -25 # If support for the side an AI country is backing drops below this, consider abandoning it
	DIPLO_PLAY_STRONG_ABANDON_SUPPORT_THRESHOLD = -50 # If support for the side an AI country is backing drops below this, abandon it immediately
	DIPLO_PLAY_ABANDON_ALLY_OR_SUBJECT_MIN_ENEMY_STRENGTH = 0.75 # If the enemy doesn't have at least this amount of troops compared to our side, never abandon an ally or subject
	DIPLO_PLAY_ABANDON_ALLY_RELUCTANCE = 50 # Added to support score when considering whether to abandon an ally
	DIPLO_PLAY_ABANDON_SUBJECT_RELUCTANCE = 100 # Added to support score when considering whether to abandon a subject
	DIPLO_PLAY_SWAY_DAYS_LEFT_MAX = 12  # AI will not answer a sway offer when it has more than this amount of days left (should map to SWAY_OFFER_TIMEOUT_DAYS)
	DIPLO_PLAY_SWAY_DAYS_LEFT_MIN = 8	# AI will always answer a sway offer when it has this or less amount of days left (should map to SWAY_OFFER_TIMEOUT_DAYS)
	DIPLO_PLAY_SWAY_ANSWER_CHANCE = 20 # Chance per tick of AI answering a sway offer (1 = 1%)
	DIPLO_PLAY_WEAK_ARMY_THRESHOLD = 0.5 # If our army strength compared to the average for each country involved in the play is less than this, weak army effects will apply
	DIPLO_PLAY_STRONG_ARMY_THRESHOLD = 1.0 # If our army strength compared to the average for each country involved in the play is at least than this, strong army effects will start to apply
	DIPLO_PLAY_STRONG_ARMY_MAX = 3.0 # Maximum strong army effects apply at this threshold
	DIPLO_PLAY_FORCE_BALANCE_SCALE = 4.0 # At this military-strength-to-enemies ratio, max effects from the balance of the two sides' militaries is applied
	DIPLO_PLAY_FORCE_BALANCE_NAVY_FACTOR = 0.1 # Naval power projection counts for this much compared to army power projection when determining military strength to enemies
	DIPLO_PLAY_FORCE_BALANCE_MOBILIZATION_FACTOR = 1.0 # A country's military forces are considered to be ( 1 + this * fully mobilized unit ratio ) much stronger in a play for purposes of confidence, etc
	DIPLO_PLAY_STATE_STABILITY_UNINCORPORATED_WEIGHT_MULT = 0.25 # Weight for devastation, radicals & loyalists in unincorporated states is multiplied by this
	DIPLO_PLAY_CONTAINMENT_PLAY_FACTOR = 100 # Added to preference for initiator in a containment play if the country is a Great Power

	DIPLO_PLAY_SWAY_LOW_IMPACT_FACTOR = -100 # Maximum effect applied to acceptance of a reverse-sway if a country has little to lose from the enemy side's wargoals 
	DIPLO_PLAY_SWAY_LOW_IMPACT_THRESHOLD = 50 # At this total enemy wargoal impact or below, acceptance is reduced by up to DIPLO_PLAY_SWAY_LOW_IMPACT_FACTOR (at 0 impact) 
	DIPLO_PLAY_SWAY_NON_PRIMARY_DEMAND_IMPACT_MULT = 0.5 # Secondary demands have their impact multiplied by this factor for the purpose of measuring the low impact factor above
	DIPLO_PLAY_SWAY_SUBJECT_IMPACT_VALUE_DIVISOR = 500 # Wargoals on subjects have their impact multiplied by (the subject's value for overlord divided by this) for the purpose of measuring the low impact factor above (clamped to 0-1) 
	DIPLO_PLAY_SWAY_INCOME_TRANSFER_PACTS_OF_SAME_TYPE_FACTOR = -30 # Added to acceptance score for each income transfer pact the target country has of the same type (where they are the receiver of the money) 

	# AI uses these values to determine how 'impactful' a wargoal is, ie how much they would like to avoid having it enforced on them etc
	DIPLO_PLAY_WAR_GOAL_IMPACT_MANEUEVERS_MULT = 1 	 	# Maneuvers cost of a wargoal is multiplied by this and added to impact
	DIPLO_PLAY_WAR_GOAL_IMPACT_INFAMY_MULT = 0.5 		# Infamy generation of a wargoal is multiplied by this and added to impact
	DIPLO_PLAY_WAR_GOAL_IMPACT_CONQUEST_MULT = 2.0		# Wargoals that outright conquer states or annex whole countries have their overall impact multiplied by this

	# Boldness determines the confidence threshold at which the AI will back down in a play
	# Each individual boldness factor is multiplied a dice roll range of (x0 to x1) for actual boldness value in each play - boldness can end up negative!
	# Boldness also plays a role for determining whether undecided countries will join a play unprompted
	# Base boldness is set by the country's AI strategies
	DIPLO_PLAY_BOLDNESS_FROM_RANK = 3 			# Multiplied by country's rank value and added to boldness range
	DIPLO_PLAY_BOLDNESS_WEAK_ARMY_FACTOR = -25 	# Scaled by our relative forces compared to DIPLO_PLAY_WEAK_ARMY_THRESHOLD
	DIPLO_PLAY_BOLDNESS_CONTAINMENT_PLAY = 100	# Add this boldness to all involved countries for a containment play

	# The below is a special boldness factor in diplomatic plays that is always calculated on the spot, not randomized and added to saved boldness score, as the amount of primary demands can grow
	DIPLO_PLAY_BOLDNESS_PRIMARY_DEMANDS = 0.5	# Add this amount of non-randomized boldness for each wargoal impact point of primary demands against our side

	# Confidence is added to boldness to determine whether the AI is willing to back down
	DIPLO_PLAY_CONFIDENCE_FORCE_BALANCE_FACTOR = 75	 # Confidence level if force balance to the enemy is at DIPLO_PLAY_FORCE_BALANCE_SCALE, scaled down if lower
	DIPLO_PLAY_CONFIDENCE_STRONG_ARMY_FACTOR = 15 	 # Scaled by our relative forces compared to DIPLO_PLAY_STRONG_ARMY_MAX
	DIPLO_PLAY_CONFIDENCE_CIVIL_WAR_OR_UPRISING = 75 	 # Add this confidence to both sides in a civil war or native uprising (overrides DIPLO_PLAY_CONFIDENCE_EXISTENTIAL_PLAY)
	DIPLO_PLAY_CONFIDENCE_EXISTENTIAL_PLAY = 50		# Add this confidence if backing down would result in annexation
	DIPLO_PLAY_CONFIDENCE_FROM_TURMOIL = -15 		 # At 100% turmoil across the country (weighted by state population), subtract this amount of confidence
	DIPLO_PLAY_CONFIDENCE_FROM_LOYALISTS = 15 		 # At 100% turmoil across the country (weighted by state population), add this amount of confidence
	DIPLO_PLAY_CONFIDENCE_FROM_DEVASTATION = -15	 # At 100% devastation, subtract this amount of confidence
	DIPLO_PLAY_CONFIDENCE_FROM_DEBT_LEVEL = -25		 # At 100% debt level, subtract this amount of confidence
	DIPLO_PLAY_CONFIDENCE_FROM_BANKRUPTCY = -25		 # Subtract this amount of confidence when bankrupt
	DIPLO_PLAY_CONFIDENCE_FROM_GOLD_RESERVES = 15	 # At 100% gold reserves, add this amount of confidence
	DIPLO_PLAY_CONFIDENCE_FROM_OWN_CONFLICTS = -25 # If we are in another conflict where military strength compared to our enemies is equal to or above DIPLO_PLAY_FORCE_BALANCE_SCALE, subtract this amount of confidence
	DIPLO_PLAY_CONFIDENCE_FROM_ENEMY_TURMOIL = 10 		 # At 100% turmoil across the enemy country (weighted by state population), add this amount of confidence
	DIPLO_PLAY_CONFIDENCE_FROM_ENEMY_DEVASTATION = 10	 # At 100% devastation for enemy, add this amount of confidence
	DIPLO_PLAY_CONFIDENCE_FROM_ENEMY_DEBT_LEVEL = 10	 # At 100% debt level for enemy, add this amount of confidence
	DIPLO_PLAY_CONFIDENCE_FROM_ENEMY_BANKRUPTCY = 10	 # If enemy is bankrupt, add this amount of confidence
	DIPLO_PLAY_CONFIDENCE_FROM_ENEMY_CONFLICTS = 25 # If the other side is in another conflict where military strength compared to their enemies is equal to or above DIPLO_PLAY_FORCE_BALANCE_SCALE, add this amount of confidence
	DIPLO_PLAY_CONFIDENCE_VERY_LOW_THRESHOLD = -50 		# If confidence is this or below, show it as very low
	DIPLO_PLAY_CONFIDENCE_LOW_THRESHOLD = -25 		# If confidence is this or below, show it as low
	DIPLO_PLAY_CONFIDENCE_HIGH_THRESHOLD = 25 		# If confidence is this or above, show it as high
	DIPLO_PLAY_CONFIDENCE_VERY_HIGH_THRESHOLD = 50 		# If confidence is this or above, show it as very high

	# Below data is used to determine which side the AI wants to join a diplo play, if any

	# Neutrality is a calculated value that determines how much a country wants to stay out of a diplo play
	# In order for a country to join, their side preference score must beat out both the enemy's side preference score AND the neutrality score
	# Base neutrality is set by the country's AI strategies
	DIPLO_PLAY_NEUTRALITY_MIN = 0
	DIPLO_PLAY_NEUTRALITY_PREFERENCE_DELTA_THRESHOLD = 50 # If the preference delta between the two sides is less than this, add the difference between the delta and this value to neutrality score
	DIPLO_PLAY_NEUTRALITY_FROM_DEBT_LEVEL = 100 # At 100% debt level, add this amount of neutrality score
	DIPLO_PLAY_NEUTRALITY_FROM_BANKRUPTCY = 100 # When bankrupt, add this amount of neutrality score
	DIPLO_PLAY_NEUTRALITY_FROM_DEVASTATION_LEVEL = 100 # At 100% devastation across the country (weighted by state population), add this amount of neutrality score
	DIPLO_PLAY_NEUTRALITY_FROM_TURMOIL = 100 # At 100% turmoil across the country (weighted by state population), add this amount of neutrality score
	DIPLO_PLAY_NEUTRALITY_IN_SUBJECT_CONFLICT = -50 # If either side in the play is a subject, subtract this amount of neutrality score
	DIPLO_PLAY_NEUTRALITY_IN_NATIVE_UPRISING = 50 # Added to neutrality score for native uprising type conflicts
	DIPLO_PLAY_NEUTRALITY_FROM_ONGOING_CONFLICTS = 200 # If in a conflict where military strength compared to the enemy is equal to or above DIPLO_PLAY_FORCE_BALANCE_SCALE, add this amount of neutrality score
	DIPLO_PLAY_NEUTRALITY_FROM_LOWER_RANK = 5 # For each rank value difference between us and the lowest ranked participant in the play, if we're higher rank than them
	DIPLO_PLAY_NEUTRALITY_FROM_NO_ARMY = 1000 # If we have no army at all, add this to neutrality score
	DIPLO_PLAY_NEUTRALITY_WEAK_ARMY_FACTOR = 100 # Scaled by our relative forces compared to DIPLO_PLAY_WEAK_ARMY_THRESHOLD
	DIPLO_PLAY_NEUTRALITY_TRUCE_FACTOR = 50 # If we have a truce with either primary participant and no alliance or subject relationship, and it's not a civil war

	# Sympathy is added together and then multiplied by a dice roll range of (DIPLO_PLAY_SYMPATHY_RANGE_MIN to DIPLO_PLAY_SYMPATHY_RANGE_MAX) to give the AI a random preference for each side in a particular play
	# Sympathy above 0 is added directly to the willingness to join that side in the play
	# Sympathy for a side can be below 0, but has no additional effect other than acting as a buffer against sympathy increases
	DIPLO_PLAY_SYMPATHY_RANGE_MIN = 0.1 # The minimum range for the initial sympathy random roll (additions during play are fully random)
	DIPLO_PLAY_SYMPATHY_RANGE_MAX = 1.0 # The maximum range for the initial sympathy random roll (additions during play are fully random)
	DIPLO_PLAY_SYMPATHY_BASE_INITIATOR = 20 # The base size of the random sympathy range for attacker in diplomatic play
	DIPLO_PLAY_SYMPATHY_BASE_TARGET = 40 # The base size of the random sympathy range for defender in diplomatic play
	DIPLO_PLAY_SYMPATHY_ENEMY_OF_SUBJECT_INITIATOR = -100 # Subtracted from sympathy range for enemies of our subjects if the enemy is the attacker
	DIPLO_PLAY_SYMPATHY_ENEMY_OF_SUBJECT_TARGET = -50 # Subtracted from sympathy range for enemies of our subjects if the enemy is the defender
	DIPLO_PLAY_SYMPATHY_ENEMY_OF_ALLY_INITIATOR = -100 # Subtracted from sympathy range for enemies of our allies if the enemy is the attacker
	DIPLO_PLAY_SYMPATHY_ENEMY_OF_ALLY_TARGET = -50 # Subtracted from sympathy range for enemies of our allies if the enemy is the defender
	DIPLO_PLAY_SYMPATHY_ENEMY_OF_INFAMOUS_COUNTRY = 15 # Added to sympathy range for enemy of infamous country (does not apply to allies & subjects)
	DIPLO_PLAY_SYMPATHY_ENEMY_OF_NOTORIOUS_COUNTRY = 30 # Added to sympathy range for enemy of notorious country (does not apply to allies & subjects)
	DIPLO_PLAY_SYMPATHY_ENEMY_OF_PARIAH_COUNTRY = 100 # Added to sympathy range for enemy of pariah country (does not apply to allies & subjects)
	DIPLO_PLAY_SYMPATHY_LENIENT_AI_GAME_RULE = 25 # Added to sympathy range for player when using lenient AI game rule
	DIPLO_PLAY_SYMPATHY_HARSH_AI_GAME_RULE = -25 # Subtracted to sympathy range for player when using harsh AI game rule
	DIPLO_PLAY_SYMPATHY_FROM_INITIAL_WARGOAL = 0.75 # Initial sympathy for target is increased by up to this amount * accured infamy on the primary wargoal
    DIPLO_PLAY_SYMPATHY_INCREASE_NEW_WARGOAL = 1 # Sympathy is increased by up to this amount * accured infamy for enemy of a side which adds a new wargoal
    DIPLO_PLAY_SYMPATHY_INCREASE_SWAYED_WITH_WARGOAL = 0.75 # Sympathy is increased by up to this amount * accured infamy for enemy of a side which adds a new wargoal through swaying
	DIPLO_PLAY_SYMPATHY_INCREASE_ADDED_PRIMARY_WARGOAL = 0.5 # Sympathy is increased by up to this amount * accured infamy for enemy of a side which makes a new wargoal into a primary demand

	DIPLO_PLAY_SWITCH_SIDES_FACTOR = -10 # If AI has already picked a side, add reluctance to accept further sway offers
	DIPLO_PLAY_IDEOLOGICAL_OPINION_POSITIVE_FACTOR = 0.2 # Positive ideological opinion is multiplied by this and added to acceptance to join a side
	DIPLO_PLAY_IDEOLOGICAL_OPINION_NEGATIVE_FACTOR = 1 # Negative ideological opinion is multiplied by this and added to acceptance to join a side
	DIPLO_PLAY_IDEOLOGICAL_OPINION_REVOLUTION_MULT = 3 # DIPLO_PLAY_IDEOLOGICAL_OPINION_FACTOR is multiplied by this in a revolution play
	DIPLO_PLAY_SECESSION_OWN_SECESSION_RISK_FACTOR = -100 # Add this amount of reluctance for AI to back a secession of a culture that has enough pops in their own country to secede
	DIPLO_PLAY_NON_ALLY_UNRECOGNIZED_BASE_FACTOR = -25 #  Add this amount of reluctance for AI to back a non-allied unrecognized power against a recognized one
	DIPLO_PLAY_NON_ALLY_UNRECOGNIZED_INCONSEQUENTAL_ENEMY_DEMANDS_FACTOR = -50 #  Add this amount of reluctance for AI to back a non-allied unrecognized power against a recognized power that isn't demanding significant territorial concessions (conquer/make subject etc)
	DIPLO_PLAY_NON_ALLY_UNRECOGNIZED_CONSEQUENTAL_DEMANDS_FACTOR = -100 # Add this amount of reluctance for AI to back significant demands from a non-allied unrecognized power
	DIPLO_PLAY_ALLY_INITIATOR_FACTOR = 25 # Added to desire for ally of initiator to join their side
	DIPLO_PLAY_ALLY_TARGET_FACTOR = 50 # Added to desire for ally of target to join their side
	DIPLO_PLAY_GUARANTEE_TARGET_FACTOR = 50 # Added to desire for guarantor of target to join their side
	DIPLO_PLAY_OVERLORD_INITIATOR_FACTOR = 25 # Added to desire for overlord of initiator to join their side
	DIPLO_PLAY_OVERLORD_TARGET_FACTOR = 50 # Added to desire for overlord of target to join their side
	DIPLO_PLAY_SAME_POWER_BLOC_INITIATOR_FACTOR = 15 # Added to desire for fellow power bloc member of initiator to join their side
	DIPLO_PLAY_SAME_POWER_BLOC_TARGET_FACTOR = 25 # Added to desire for fellow power bloc member of target to join their side
	
	# Diplo play scoring for relations levels
	DIPLO_PLAY_RELATIONS_HOSTILE_FACTOR = -50
	DIPLO_PLAY_RELATIONS_COLD_FACTOR = -25
	DIPLO_PLAY_RELATIONS_POOR_FACTOR = -10
	DIPLO_PLAY_RELATIONS_CORDIAL_FACTOR = 10
	DIPLO_PLAY_RELATIONS_AMICABLE_FACTOR = 25
	DIPLO_PLAY_RELATIONS_FRIENDLY_FACTOR = 50

	# Diplo play scoring for attitudes (with scoring against both primary and backers)
	DIPLO_PLAY_ATTITUDE_DISINTERESTED_FACTOR = 0
	DIPLO_PLAY_ATTITUDE_DISINTERESTED_BACKER_FACTOR = 0
	DIPLO_PLAY_ATTITUDE_CAUTIOUS_FACTOR = 0
	DIPLO_PLAY_ATTITUDE_CAUTIOUS_BACKER_FACTOR = 0
	DIPLO_PLAY_ATTITUDE_CONCILIATORY_FACTOR = 10
	DIPLO_PLAY_ATTITUDE_CONCILIATORY_BACKER_FACTOR = 5
	DIPLO_PLAY_ATTITUDE_COOPERATIVE_FACTOR = 15
	DIPLO_PLAY_ATTITUDE_COOPERATIVE_BACKER_FACTOR = 5
	DIPLO_PLAY_ATTITUDE_GENIAL_FACTOR = 25
	DIPLO_PLAY_ATTITUDE_GENIAL_BACKER_FACTOR = 10
	DIPLO_PLAY_ATTITUDE_WARY_FACTOR = -10
	DIPLO_PLAY_ATTITUDE_WARY_BACKER_FACTOR = -5
	DIPLO_PLAY_ATTITUDE_BELLIGERENT_FACTOR = -50
	DIPLO_PLAY_ATTITUDE_BELLIGERENT_BACKER_FACTOR = -25
	DIPLO_PLAY_ATTITUDE_ANTAGONISTIC_FACTOR = -50
	DIPLO_PLAY_ATTITUDE_ANTAGONISTIC_BACKER_FACTOR = -25
	DIPLO_PLAY_ATTITUDE_LOYAL_FACTOR = 100
	DIPLO_PLAY_ATTITUDE_LOYAL_BACKER_FACTOR = 25
	DIPLO_PLAY_ATTITUDE_ALOOF_FACTOR = 25
	DIPLO_PLAY_ATTITUDE_ALOOF_BACKER_FACTOR = 10
	DIPLO_PLAY_ATTITUDE_DEFIANT_FACTOR = -25
	DIPLO_PLAY_ATTITUDE_DEFIANT_BACKER_FACTOR = -10
	DIPLO_PLAY_ATTITUDE_REBELLIOUS_FACTOR = -100
	DIPLO_PLAY_ATTITUDE_REBELLIOUS_BACKER_FACTOR = -50
	DIPLO_PLAY_ATTITUDE_PROTECTIVE_FACTOR = 25
	DIPLO_PLAY_ATTITUDE_PROTECTIVE_BACKER_FACTOR = 10
	DIPLO_PLAY_ATTITUDE_DOMINEERING_FACTOR = -10
	DIPLO_PLAY_ATTITUDE_DOMINEERING_BACKER_FACTOR = 0

	DIPLO_PLAY_SWAY_RANDOM_FACTOR = 1.0 # The higher this is, the more random the AI will be about which countries it tries to sway first
	DIPLO_PLAY_SWAY_UNWANTED_OFFER = -1000 # For being offered something they don't want
	DIPLO_PLAY_SWAY_CALL_IN_OBLIGATION = 100 # When calling in an obligation
	DIPLO_PLAY_SWAY_MINIMUM_OBLIGATION_VALUE = 10 # Obligations worth less than this are rejected
	DIPLO_PLAY_SWAY_CALL_ALLY_FACTOR = 25 # Added to acceptance for Call Ally sway
	DIPLO_PLAY_SWAY_MINIMUM_PREFERENCE_FOR_SUBJUGATION = 1 # The AI will not sway or reverse-sway with 'become subject' unless the supporter's preference for the supported is at least this
	DIPLO_PLAY_SWAY_WARGOAL_WEAK_SWAYER_CONFIDENT_IN_OWN_ARMY_FACTOR = 0.25 # This much of the penalty for a 'weak' sway offer is removed if the target believes they can achieve the wargoal themselves
	DIPLO_PLAY_SWAY_WARGOAL_FACTOR = 1.0 # Multiplied by wargoal value
	DIPLO_PLAY_SWAY_WARGOAL_THRESHOLD = 10 # A wargoal needs at least this base value to be wanted as part of sway offer
	DIPLO_PLAY_SWAY_WARGOAL_MINIMUM_SWAYER_MULTIPLIER_INITIATOR = 0.2 # If a wargoal sway offer from initiator is less than this fraction of its base value due to weakness of the swayer, consider it an unwanted wargoal
	DIPLO_PLAY_SWAY_WARGOAL_MINIMUM_SWAYER_MULTIPLIER_TARGET = 0.05 # If a wargoal sway offer from target is less than this fraction of its base value due to weakness of the swayer, consider it an unwanted wargoal
	DIPLO_PLAY_SWAY_LEANING_PLAYER_FACTOR = 100 # Added to acceptance for players leaning towards a side to make AI more likely to sway them
	DIPLO_PLAY_SWAY_BECOME_SUBJECT_VALUE_FACTOR = 1.0 # Multiplies AI desire for the swaying country to become their subject
	DIPLO_PLAY_SWAY_TRANSFER_SUBJECT_VALUE_FACTOR = 1.0 # Multiplies AI desire for the swaying country's offered transfer of subject to become their subject
	DIPLO_PLAY_SWAY_STATE_DESIRE_FACTOR = 2.0 # Multiplies AI strategy value for a state to determine if AI wants a transfer state sway
	DIPLO_PLAY_SWAY_DIPLOMATIC_PACT_DESIRE_FACTOR = 1.0 # Multiplies diplomatic acceptance score for the diplomatic action to determine if AI wants a diplomatic action sway

	# Determines how much the AI values a reverse-sway based on the military power it would add to their side
	# If that power would make up the full difference between no military at all and DIPLO_PLAY_REVERSE_SWAY_THRESHOLD, use the full value, otherwise scale it against the amount of the difference made up
	# For example, if the new supporter would bring military power compared to enemy from 1.0x to 2.0x, and DIPLO_PLAY_REVERSE_SWAY_THRESHOLD is 2.0, we would apply half this value
	DIPLO_PLAY_REVERSE_SWAY_ADDED_MILITARY_POWER_FACTOR = 50

	# If the added military power value is below this, consider the country's help to not be worth anything and reject the offer
	DIPLO_PLAY_REVERSE_SWAY_MIN_ADDED_MILITARY_POWER = 5

	# Multiply added military power factor by the amount they are currently outmatched against the enemy
	# IE; at 0x enemy military power this full modifier gets applied, at 0.5x military power half of it is applied, and at 1x+ none of it is
	DIPLO_PLAY_REVERSE_SWAY_ADDED_MILITARY_POWER_OUTMATCHED_MULT = 4.0

	# If the AI's side is outmatching the enemy by more than DIPLO_PLAY_REVERSE_SWAY_THRESHOLD, the difference between their military power ratio and DIPLO_PLAY_REVERSE_SWAY_THRESHOLDis multiplied by this and added to acceptance
	DIPLO_PLAY_REVERSE_SWAY_OUTMATCHING_FACTOR = -25.0

	DIPLO_PLAY_REVERSE_SWAY_BASE_FACTORS_MULT = 0.5 # Apply basic factors such as relations, attitude, ideological opinion etc to reverse-sway with this multiplier
	DIPLO_PLAY_REVERSE_SWAY_WARGOAL_VALUE_FACTOR = -2.0 # Multiply by how much the AI wants a requested wargoal themselves if they were the holder and apply to reverse-sway acceptance
	DIPLO_PLAY_REVERSE_SWAY_WARGOAL_IMPACT_FACTOR = -0.5 # Multiply by wargoal maneuvers cost (to determine how impactful it is) and apply to reverse-sway acceptance for a requested wargoal
	DIPLO_PLAY_REVERSE_SWAY_WARGOAL_INFAMY_FACTOR = -0.5 # Multiply by infamy impact and apply to reverse-sway acceptance for a requested wargoal
	DIPLO_PLAY_REVERSE_SWAY_OFFER_OBLIGATION_MIN_VALUE = 5 # AI value for an obligation is never lower than this when it's considering whether to accept a reverse-sway
	DIPLO_PLAY_REVERSE_SWAY_OFFER_OBLIGATION_FACTOR = -6.0 # Multiply by how much the AI would value the obligation if it was the country offering support and apply to reverse-sway acceptance for an obligation
	DIPLO_PLAY_REVERSE_SWAY_CALL_IN_OBLIGATION_FACTOR = -3.0 # Multiply by how much the AI values the obligation it holds and apply to reverse-sway acceptance for calling in obligation
	DIPLO_PLAY_REVERSE_SWAY_STATE_VALUE_FACTOR = -2.0 # Multiplied by AI strategy value for owned state to determine reluctance to cede it in a reverse-sway
	DIPLO_PLAY_REVERSE_SWAY_BECOME_SUBJECT_VALUE_FACTOR = 1.0 # Multiplied by how much the AI wants to become a subject of the sway target
	DIPLO_PLAY_REVERSE_SWAY_TRANSFER_SUBJECT_VALUE_FACTOR = -1.0 # Multiplied by how much the AI values the subject they're offering to transfer to the sway target
	DIPLO_PLAY_REVERSE_SWAY_CALL_ALLY_DESIRE = 25 # Added to AI scoring for reverse sway call ally even though call ally isn't actually valid for reverse-sways, so they can score it against other sway types

	DIPLO_PLAY_ADD_WARGOAL_MIN_SCORE = 20 # A wargoal needs at least this value for AI to add it to the play

	LOW_AGGRESSION_BASE_EFFECT_MULT = 0.5 # The impact of low ai aggression game rule on how often the AI starts diplomatic plays
	HIGH_AGGRESSION_BASE_EFFECT_MULT = 2.0 # The impact of high ai aggression game rule on how often the AI starts diplomatic plays
	LOW_AGGRESSION_INFAMY_ACCEPTANCE_MULT = 0.5 # The amount of infamy the AI considers undesirable/unacceptable is multiplied by this for low aggression AI
	HIGH_AGGRESSION_INFAMY_ACCEPTANCE_MULT = 1.5 # The amount of infamy the AI considers undesirable/unacceptable is multiplied by this for low aggression AI
	AI_AGGRESSION_MAX_ACCEPTABLE_INFAMY = 100 # Undesirable/unacceptable infamy will not be set above this from high aggression

	# Below data is used to determine which wargoals the AI will pick
	WAR_GOAL_RANDOM_FACTOR = 2.0 					# The higher this is, the more random AI wargoal selection will be
	WAR_GOAL_UNDESIRABLE_INFAMY_FACTOR = 0.5 		# Wargoal value is multiplied by this if it would bring the country above undesirable infamy levels
	WAR_GOAL_UNACCEPTABLE_INFAMY_FACTOR = 0			# Wargoal value is multiplied by this if it would bring the country above unacceptable infamy levels
	WAR_GOAL_NOT_PRIMARY_DEMAND_FACTOR = 0.5		# Wargoal value for sway offers is multiplied by this if it would not be added as a primary demand

	WAR_GOAL_MAKE_PRIMARY_DEMAND_SCORE_MULT = 0.75   # Multiply score of an existing wargoal by this when determining whether to make it into a primary demand instead of adding a new wargoal
	WAR_GOAL_MAKE_PRIMARY_DEMAND_RETURN_STATE_SCORE_MULT = 1.25 # Overrides WAR_GOAL_MAKE_PRIMARY_DEMAND_SCORE_MULT for return state wargoals
	WAR_GOAL_MIN_SCORE_TO_MAKE_PRIMARY_DEMAND = 30	 # A wargoal needs to have at least this much score (before applying WAR_GOAL_MAKE_PRIMARY_DEMAND_SCORE_MULT) for AI to make it a primary demand

	# Below data is used to determine which techs the AI will research
	TECH_RANDOM_FACTOR = 1.0 # The higher this is, the more random AI tech research will be
	TECH_COST_PENALTY_FACTOR = 5.0 # AI tendency to research a tech is divided by ( 1 + this * ahead of time penalty / era base cost )

	# Below data is used to determine which states the AI should incorporate
	INCORPORATE_STATE_MIN_POPULATION = 200000 # Min population in a homeland state for the AI to incorporate it

	# Below data is used to determine which states are most important to defend
	DEFEND_STATE_BARRACKS_WEIGHT = 1 # Per level of barracks
	DEFEND_STATE_BARRACKS_MAX_WEIGHT = 20 # Per state
	DEFEND_STATE_NAVAL_BASE_WEIGHT = 0.5 # Per level of naval base
	DEFEND_STATE_NAVAL_BASE_MAX_WEIGHT = 10 # Per state
	DEFEND_STATE_CAPITAL_WEIGHT = 25
	DEFEND_STATE_CAPITAL_WAR_NEGOTIATOR_WEIGHT = 100
	DEFEND_STATE_OWN_CAPITAL_WEIGHT_MULT = 5
	DEFEND_STATE_WARGOAL_WEIGHT = 100
	DEFEND_STATE_INCORPORATED_WEIGHT_MULT = 1.5

	# Below data is used to determine which states are most important to invade
	INVADE_STATE_BARRACKS_WEIGHT = 1 # Per level of barracks
	INVADE_STATE_BARRACKS_MAX_WEIGHT = 20 # Per state
	INVADE_STATE_NAVAL_BASE_WEIGHT = 0.5 # Per level of naval base
	INVADE_STATE_NAVAL_BASE_MAX_WEIGHT = 10 # Per state
	INVADE_STATE_CAPITAL_WEIGHT = 25
	INVADE_STATE_CAPITAL_WAR_NEGOTIATOR_WEIGHT = 100
	INVADE_STATE_OWN_CAPITAL_WEIGHT_MULT = 5
	INVADE_STATE_WARGOAL_WEIGHT = 100
	INVADE_STATE_INCORPORATED_WEIGHT_MULT = 1.5

	# Below data is used for naval invasions:
	NAVAL_INVASION_RANDOM_FACTOR = 0.5 								# The higher this is, the more random AI naval invasion theater selection will be
	NAVAL_INVASION_MIN_RELATIVE_LOCAL_ARMY_STRENGTH = 0.25 			# AI wants at least this fraction of defending army strength to risk a naval invasion
	NAVAL_INVASION_MIN_RELATIVE_LOCAL_NAVY_STRENGTH = 0.5 			# AI wants at least this fraction of defending naval strength to risk a naval invasion
	NAVAL_INVASION_MIN_RELATIVE_GLOBAL_NAVY_STRENGTH_ATTACKER = 0.25 # AI wants at least this fraction of naval strength in the overall war to risk a naval invasion as the attacking war side
	NAVAL_INVASION_MIN_RELATIVE_GLOBAL_NAVY_STRENGTH_DEFENDER = 0.5 # AI wants at least this fraction of naval strength in the overall war to risk a naval invasion as the defending war side
	NAVAL_INVASION_COOLDOWN_DAYS = 20 								# After launching a naval invasion, the AI will wait at least this long before launching another
	NAVAL_INVASION_MIN_SCORE = 100									# AI won't bother launching naval invasions against theaters with a lower total state score than this
	NAVAL_INVASION_MAX_LOCAL_FRONT_SCORE = 100						# Don't launch a naval invasion if there is a local front of at least this total score for the general

	NAVAL_INVASION_MAX_AVAILABLE_ARMY_FRACTION = 0.5				# No more than this fraction of available armies can be used in naval invasions at the same time
	NAVAL_INVASION_MAX_AVAILABLE_FLEET_FRACTION = 0.5				# No more than this fraction of available fleets can be used in naval invasions at the same time

    # Below data is used for General Orders:
	HQ_DEFENSE_MIN_THEATER_SCORE = 100								# Theater of local HQ must have at least this importance score to have a minimum garrison
	HQ_DEFENSE_MIN_WANTED_GARRISON = 0.15							# Keep at least this number of local troops to garrison important HQs against enemy invasion

	MAX_CONVOY_USAGE_FOR_SUPPLY_ROUTES = 0.5						# AI will not commit more than this fraction of its convoys to supporting overseas operations

	NUM_DAYS_TO_REMEMBER_FAILED_FRONT_OR_HQ_ASSIGNMENT = 10 				# For how many days should the AI remember failing to assign a general to a front or HQ (and thus not try with that front again)

	# If a front is worth less than this, the AI will not assign any generals to it
	FRONT_OR_HQ_IMPORTANCE_MIN_SCORE = 50

	# Below data is for evaluating Commander Orders
	FRONT_IMPORTANCE_OWN_FRONT_WEIGHT_MULT = 2.0 # Fronts that we 'own' have the importance of their states multiplied by this
	HQ_STATIONING_IMPORTANCE_NOT_OWN_HQ_WEIGHT_MULT = 0.25 # HQs of allies have their importance multiplied by this as the AI prefers stationing in its own HQs

	# Undefended HQs and Fronts are given preference by this multiplier for assignment of formations there
	HQ_OR_FRONT_UNDEFENDED_ASSIGNMENT_WEIGHT = 2.0

	# If splitting a force to cover undefended HQs/fronts, this is the fraction of the source formation that is sent when the two locations have an equal disparity in needed forces IF the army considered for splitting was not present
	HQ_OR_FRONT_SPLIT_FORCE_BASE_FRACTION = 1.0

	# If splitting a force to cover undefended HQs/fronts, never send or leave behind less than this fraction of the source formation
	HQ_OR_FRONT_SPLIT_FORCE_MIN_FRACTION = 0.1

	# If splitting a force to cover undefended HQs/fronts, don't send splinter armies to already defended fronts if the split of the source formation ends up smaller than this
	HQ_OR_FRONT_SPLIT_FORCE_DEFENDED_LOCATION_MIN_FRACTION_TO_SEND = 0.33

	# A percentage [0.0, 1.0] representing how many AI units are on a front out of the total (AI's + Enemy's) units, used to
	# determine when to start applying FRONT_IMPORTANCE_WEIGHT_WHEN_IN_DISADVANTAGE.
    UNITS_PERCENTAGE_TO_BE_CONSIDERED_IN_DISADVANTAGE = 0.50

	# When considering whether to move a general to a particular location, the disparity between wanted and current units of the new location is divided 1 + any relevant values below
	# This is done to prevent the AI from making costly moves that would only result in small efficiency increases
	FRONT_OR_HQ_UNIT_DISPARITY_FOR_MOVE_TRAVEL_TIME_FACTOR = 0.02 # Each day of travel time adds this much to the divisor
	FRONT_OR_HQ_ACTIVE_WAR_MOVE_FACTOR = 1.0 # If a general is in an active war front, add this value to the divisor

	# The values below are all applied *after* FRONT_IMPORTANCE_MIN_SCORE is checked, so a front/HQ isn't going to be qualified or disqualified for AI actually caring about it by these multipliers
	FRONT_CAPITAL_HQ_IMPORTANCE_MULT = 2.0 		# Fronts that threaten the AI's own capital HQ have their importance multiplied by this
	FRONT_NON_WAR_ZONE_IMPORTANCE_MULT = 1.0 	# Fronts that are not being contested by the enemy have their importance multiplied by this
	FRONT_WAR_ZONE_IMPORTANCE_MULT = 1.5		# Fronts that *are* being contested by the enemy have their importance multiplied by this
	HQ_LANDLOCKED_IMPORTANCE_MULT = 0.0 	# Friendly HQs without a coast have their importance multiplied by this
	HQ_COASTAL_NON_WAR_ZONE_IMPORTANCE_MULT = 0.5 	# Friendly HQs with a coast that are not under naval invasion have their importance multiplied by this
	HQ_COASTAL_WAR_ZONE_IMPORTANCE_MULT = 3.0		# Friendly HQs that *are* under naval invasion have their importance multiplied by this

	# At what fraction of combat strength and morale/org will the AI attack
	FRONT_MIN_OVERALL_STRENGTH_FACTOR_TO_ATTACK = 0.8			# Must have at least this multiplier of overall power projection on the front compared to the enemy's to want to attack
	FRONT_MIN_INDIVIDUAL_ARMY_STRENGTH_FACTOR_TO_ATTACK = 0.95 	# Must have at least this multiplier of average power projection of allied formations on the front to want to attack
	FRONT_MIN_MORALE_TO_ATTACK = 0.8							# As a fraction of max morale (1)
	FRONT_MIN_ORGANIZATION_TO_ATTACK = 0.8						# As a fraction of formation's max organization

	# Below data is used for Admiral Orders:
	ADMIRAL_ORDERS_RANDOM_FACTOR = 0.5									# The higher this is, the more random AI will be in selection of admiral orders
	ADMIRAL_ORDERS_MIN_OFFENSIVE_FRACTION = 0.25 						# Min fraction the AI will use for offensive operations
	ADMIRAL_ORDERS_MAX_OFFENSIVE_FRACTION = 0.50 						# Max fraction the AI will use for offensive operations
	ADMIRAL_ORDERS_BASE_OFFENSIVE_FRACTION = 0.375 						# How much of its naval forces will the AI use for offensive operations at 100% relative navy strength
	ADMIRAL_ORDERS_OFFENSIVE_FRACTION_SCALING = 0.25					# Fraction the AI will use for offensive operations will be multiplied or divided by (1 + ((stronger side strength ratio - 1) * this)) based on who in the war has the stronger navy

	ADMIRAL_ORDERS_STANCE_CHANGE_CHANCE = 0.33							# The chance that an admiral will change their stance from offensive to defensive or vice versa each AI update (1 = 100%)

	ADMIRAL_ORDERS_RAID_CONVOYS_LANE_SIZE_FACTOR = 1					# Multiplied by the number of convoys that the target shipping lane uses
	ADMIRAL_ORDERS_RAID_CONVOYS_MILITARY_IMPORTS_MULT = 5.0				# Score for shipping lanes that are importing military goods to enemies is multiplied by this
	ADMIRAL_ORDERS_RAID_CONVOYS_ARMY_SUPPLY_ROUTE_MULT = 3.0			# Score for shipping lanes supporting overseas armies is multiplied by this
	ADMIRAL_ORDERS_RAID_CONVOYS_ARMY_OWN_TERRITORY_SUPPLY_ROUTE_MULT = 10.0	# Score for shipping lanes supporting overseas armies on our fronts is multiplied by this

	ADMIRAL_ORDERS_ESCORT_CONVOYS_RELATIVE_LANE_SIZE_FACTOR = 100		# Apply this score relative to fraction of owning country's convoys used
	ADMIRAL_ORDERS_ESCORT_CONVOYS_ABSOLUTE_LANE_SIZE_FACTOR = 0.1		# Apply this score per actual convoy used by the route
	ADMIRAL_ORDERS_ESCORT_CONVOYS_LANE_SIZE_FACTOR_MAX = 200			# Total lane size factor cannot be above this
	ADMIRAL_ORDERS_ESCORT_CONVOYS_PORT_CONNECTION_WAR_MULT = 0.1		# Score for shipping lanes supporting overseas ports multiplied by this while at war
	ADMIRAL_ORDERS_ESCORT_CONVOYS_PORT_CONNECTION_PEACE_MULT = 1.0		# Score for shipping lanes supporting overseas ports multiplied by this while not at war
	ADMIRAL_ORDERS_ESCORT_CONVOYS_MILITARY_IMPORTS_WAR_MULT = 2.0		# Score for shipping lanes that are importing military goods to our market while at war is multiplied by this
	ADMIRAL_ORDERS_ESCORT_CONVOYS_ARMY_SUPPLY_ROUTE_MULT = 2.0			# Score for shipping lanes supporting our overseas armies is multiplied by this
	ADMIRAL_ORDERS_ESCORT_CONVOYS_ACTIVE_RAIDERS_MULT = 2.0				# Score for shipping lanes that are being actively raided by the enemy is multiplied by this
	ADMIRAL_ORDERS_ESCORT_CONVOYS_PROTECTED_CONVOYS_MULT = 0.01			# Score for shipping lanes multiplied by (1 + ( this * number of convoys that the fleet protects or would potentially protect in the sea node))

	ADMIRAL_ORDERS_INTERCEPTION_PEACE_NEGOTIATOR_CAPITAL_FACTOR = 300	# Score for defending allied peace negotiator capital region with interception order
	ADMIRAL_ORDERS_INTERCEPTION_OWN_CAPITAL_FACTOR = 1000				# Score for defending our capital region with interception order
	ADMIRAL_ORDERS_INTERCEPTION_WARGOAL_FACTOR = 100					# Score for defending wargoal targeting ally with interception order
	ADMIRAL_ORDERS_INTERCEPTION_WARGOAL_OWN_TERRITORY_FACTOR = 500	    # Score for defending wargoal targeting us with interception order
	ADMIRAL_ORDERS_INTERCEPTION_HOSTILE_NAVAL_INVASION_MULT = 10.0		# Score for defending nodes that are under active hostile naval invasion is multiplied by this

	# Below data is used to determine which regions are most important to declare an interest in
	DECLARE_INTEREST_RANDOM_FACTOR = 0.5 # The higher this is, the more random AI declare interest will be
	DECLARE_INTEREST_BASE_SCORE = 100
	DECLARE_INTEREST_GDP_DIVISOR = 200000
	DECLARE_INTEREST_GDP_WEIGHT = 5 # Per DECLARE_INTEREST_GDP_DIVISOR GDP
	DECLARE_INTEREST_GDP_MAX_WEIGHT = 50
	DECLARE_INTEREST_RIVAL_FACTOR = 25 # For each rival with an interest in the region
	DECLARE_INTEREST_SUPPORTS_TRADE_ROUTE_FACTOR = 1000 # Add if this interest is in a market with which we have a trade route (and there is no other interest that would support it)
	DECLARE_INTEREST_SUPPORTS_DIPLOMATIC_PACT_FACTOR = 1000 # Add if this interest is in a country with which we have a diplomatic pact (and there is no other interest that would support it)
	DECLARE_INTEREST_SUPPORTS_GROWING_COLONY_FACTOR = 1000 # Add if this interest is in a region where we have a growing colony
	DECLARE_INTEREST_ADJACENT_REGION_MULT = 2.5 # Multiply score by this if the region is adjacent to the AI country

	# If an AI country has too many colonial/non-colonial interests, subtract the score of those type of interests by this
	DECLARE_INTEREST_WRONG_INTEREST_TYPE_FACTOR = -100

	# Below data is used to determine which states should be colonized first
	NUM_GROWING_COLONIES_BASE = 1 # How many colonies will the AI keep growing at once (base amount)
	NUM_GROWING_COLONIES_SCALED = 0.01 # 1 extra colony at once per this amount of colonial growth points
	NUM_GROWING_COLONIES_MAX = 5 # No more than this amount of growing colonies at once, regardless of amount of colonial growth points
	COLONY_BASE_WEIGHT = 50
	COLONY_POPULATION_WEIGHT = 0.2	# Per 10000 pops
	COLONY_ARABLE_LAND_WEIGHT = 10
	COLONY_ADJACENT_WEIGHT_MULT = 10.0
	COLONY_UNCONTESTED_WEIGHT_MULT = 3.0
	COLONY_RANDOM_FACTOR = 2

	# This determines how much of their potential conscripts' needed military goods the AI will try to supply even when those conscripts are not raised
	CONSCRIPTION_CENTER_MILITARY_SPENDING_TARGET_BASE = 0.05 # Multiplied by the country's ratio of conscripts to regular troops
	CONSCRIPTION_CENTER_MILITARY_SPENDING_TARGET_MAX = 0.25 # Spending target cannot exceed this amount

	# Below data is used to determine how the AI invests into institution
	INSTITUTION_INVESTMENT_RANDOM_FACTOR = 1.0 # The higher this is, the more random AI institution selection will be
	INSTITUTION_CURRENT_INVESTMENT_DIVISOR = 0.25 # Score for institution is divided by 1 + ( current levels after the first * this )
	MAX_INSTITUTION_SPENDING_BASE = 0.015 # AI will not spend more BUR than this on institutions (scaled by weekly GDP)
	MAX_INSTITUTION_SPENDING_PER_INSTITUTION = 0.005 # Added to MAX_INSTITUTION_SPENDING_BASE for each institution a country has
	INSTITUTION_SPENDING_INCREASE_SPENDING_RATIO = 1.0 # If current + additional institution spending is equal or less than max spending * this, try to improve some institutions
	INSTITUTION_SPENDING_DECREASE_SPENDING_RATIO = 2.0 # If current institution spending is at least max spending * this, try to degrade some institutions

	# Below data is used to calculate how much weight the AI places on different things it can spend its weekly money income on
	MONEY_SPENDING_RANDOM_FACTOR = 2.0 # The higher this is, the more random new AI money spending will be
	MONEY_SPENDING_MAX_RATIO_TO_REMOVE_SHOULD_HAVE = 1.05 # How low of a income-to-expenses ratio does the AI need to have to consider reducing spending on a 'should-have'
	MONEY_SPENDING_MAX_RATIO_TO_REMOVE_WANTS_TO_HAVE = 1.10 # How low of a income-to-expenses ratio does the AI need to have to consider reducing spending on a 'wants-to-have'
	MONEY_SPENDING_MAX_RATIO_TO_REMOVE_NICE_TO_HAVE = 1.20 # How low of a income-to-expenses ratio does the AI need to have to consider reducing spending on a 'nice-to-have'
	MONEY_SPENDING_MIN_RATIO_TO_ADD_SHOULD_HAVE = 1.2 # How much of a income-to-expenses ratio does AI want to have after increasing spending for a 'should-have' project
	MONEY_SPENDING_MIN_RATIO_TO_ADD_WANTS_TO_HAVE = 1.3 # How much of a income-to-expenses ratio does AI want to have after increasing spending for a 'wants-to-have' project
	MONEY_SPENDING_MIN_RATIO_TO_ADD_NICE_TO_HAVE = 1.4 # How much of a income-to-expenses ratio does AI want to have after increasing spending for a 'nice-to-have' project
	MONEY_SPENDING_MIN_SURPLUS_TO_ADD_SHOULD_HAVE = 2000 # How much of a surplus in absolute money does AI want to have after increasing spending for a 'should-have' project
	MONEY_SPENDING_MIN_SURPLUS_TO_ADD_WANTS_TO_HAVE = 5000 # How much of a surplus in absolute money does AI want to have after increasing spending for a 'wants-to-have' project
	MONEY_SPENDING_MIN_SURPLUS_TO_ADD_NICE_TO_HAVE = 10000 # How much of a surplus in absolute money does AI want to have after increasing spending for a 'nice-to-have' project
	MONEY_SPENDING_MIN_SURPLUS_TO_IGNORE_RATIO_FOR_SHOULD_HAVE = 15000 # If AI has this surplus in absolute money, it's always fine to increase spending on a 'should-have' project, regardless of income ratio
	MONEY_SPENDING_MIN_SURPLUS_TO_IGNORE_RATIO_FOR_WANTS_TO_HAVE = 30000 # If AI has this surplus in absolute money, it's always fine to increase spending on a 'wants-to-have' project, regardless of income ratio
	MONEY_SPENDING_MIN_SURPLUS_TO_IGNORE_RATIO_FOR_NICE_TO_HAVE = 50000 # If AI has this surplus in absolute money, it's always fine to increase spending on a 'nice-to-have' project, regardless of income ratio
	MONEY_SPENDING_ACCEPTABLE_WAR_DEBT = 0.5 # If the AI has less than this % debt to ceiling, avoid doing cost-cutting at war for 'wants to have' and above
	MONEY_SPENDING_MIN_RATIO_TO_CONSIDER_GOLD_RESERVES = 0.8 # How low of a income-to-expenses ratio does the AI need to have to try to cut spending regardless of how plentiful its gold reserves are (when at peace)
	MONEY_SPENDING_MIN_WEEKS_OF_GOLD_RESERVES_TO_NOT_REMOVE_SHOULD_HAVE = 20 # If we have enough gold reserves to maintain our current spending for this long, don't decrease spending on a 'should-have'
	MONEY_SPENDING_MIN_WEEKS_OF_GOLD_RESERVES_TO_NOT_REMOVE_WANTS_TO_HAVE = 40 # If we have enough gold reserves to maintain our current spending for this long, don't decrease spending on a 'wants-to-have'
	MONEY_SPENDING_MIN_GOLD_RESERVE_FRACTION_TO_ADD_SHOULD_HAVE = 0.1 # If we don't have at least this fraction of gold reserves, don't increase spending on a 'should-have'
	MONEY_SPENDING_MIN_GOLD_RESERVE_FRACTION_TO_ADD_WANTS_TO_HAVE = 0.2 # If we don't have at least this fraction of gold reserves, don't increase spending on a 'wants-to-have'
	MONEY_SPENDING_MIN_GOLD_RESERVE_FRACTION_TO_ADD_NICE_TO_HAVE = 0.3 # If we don't have at least this fraction of gold reserves, don't increase spending on a 'nice-to-have'

	MONEY_SPENDING_LAND_THREAT_THRESHOLD = 0.25 # If a hostile country has a more than this much larger army than AI does, it wants to increase military spending
	MONEY_SPENDING_NAVY_THREAT_THRESHOLD = 0.50 # If a hostile country has a more than this much larger navy than AI does, it wants to increase military spending
	MONEY_SPENDING_PRESTIGE_RIVAL_THRESHOLD = 0.5 # If a rival has this much more prestige than AI does, it wants to increase spending on art academies

	MONEY_SPENDING_MILITARY_CRITICAL_THRESHOLD = 0.5 # If actual-to-wanted number of barracks/naval bases is below this, AI will not consider downsizing them further
	MONEY_SPENDING_MILITARY_EXCESSIVE_THRESHOLD = 2.0 # If actual-to-wanted number of barracks/naval bases is above this, AI considers it a target for cutting spending when needed
	MONEY_SPENDING_CONSTRUCTION_CRITICAL_THRESHOLD = 0.75 # If actual-to-wanted number of construction sector buildings is below this, AI considers it very important to get more
	MONEY_SPENDING_INNOVATION_CRITICAL_THRESHOLD = 0.75 # If innovation production compared to cap is worse than this, AI considers it very important to improve
	MONEY_SPENDING_INNOVATION_DESIRED_THRESHOLD = 1.0 # If innovation production compared to cap is worse than this, AI considers it important to improve
	MONEY_SPENDING_SUPPLY_NETWORK_CRITICAL_THRESHOLD = 0.75 # If supply network is worse than this, AI considers it critical to improve it
	MONEY_SPENDING_SUPPLY_NETWORK_DESIRED_THRESHOLD = 1.25 # If supply network is worse than this, AI wants to improve it
	MONEY_SPENDING_SUPPLY_NETWORK_EXCESSIVE_CONVOYS = 2000 # If AI has more than this amount of free convoys, it's fine to downsize ports to save money
	MONEY_SPENDING_WANTED_CONVOYS_PER_BARRACKS_LEVEL = 5 # If the AI has fewer free convoys than this per level of barracks, it wants more ports
	MONEY_SPENDING_BUREAUCRACY_CRITICAL_THRESHOLD = 1.0 # If bureaucracy income to expenses is worse than this, AI considers it critical to improve it
	MONEY_SPENDING_BUREAUCRACY_DESIRED_THRESHOLD = 1.20 # If bureaucracy income to expenses is worse than this, AI wants to improve it
	MONEY_SPENDING_BUREAUCRACY_EXCESSIVE_THRESHOLD = 1.30 # If bureaucracy income to expenses is better than this, AI will not improve it
	MONEY_SPENDING_INFRASTRUCTURE_CRITICAL_THRESHOLD = 0.80 # If infra production to usage is worse than this, AI considers it critical to improve it
	MONEY_SPENDING_INFRASTRUCTURE_DESIRED_THRESHOLD = 1.20 # If infra production to usage is worse than this, AI wants to improve it

	# Below data is used to calculate how much weight the AI places on specific government buildings
	GOVERNMENT_BUILDING_BASE_VALUE = 1000 # If no ai_value is scripted in the building
	GOVERNMENT_BUILDING_FAVORED_GOODS_FACTOR = 0.25 # Total weight is multiplied by ( 1 + this ) for each building output that the AI favors for either import or export
	GOVERNMENT_BUILDING_DISFAVORED_GOODS_FACTOR = -0.10 # Total weight is multiplied by ( 1 + this ) for each building output good that the AI disfavors
	GOVERNMENT_BUILDING_NO_AVAILABLE_WORKFORCE_FACTOR = 0.05 # Total weight is multiplied by this if the state lacks enough workforce to staff the building

	# Below data is used to calculate where the AI will locate new government buildings
	GOVERNMENT_BUILDING_STATE_CAPITAL_FACTOR = 250 # Add this score for certain types of government buildings in the capital
	GOVERNMENT_BUILDING_STATE_MARKET_CAPITAL_FACTOR = 250 # Add this score for certain types of government buildings in the market capital
	GOVERNMENT_BUILDING_STATE_ARMY_NON_ACCEPTED_POP_FACTOR = -250 # Multiply this score by fraction of discriminated Pops in the state
	GOVERNMENT_BUILDING_STATE_ARMY_ACCEPTED_POP_FACTOR = 250 # Multiply this score by fraction of accepted Pops in the state
	GOVERNMENT_BUILDING_STATE_NAVY_NON_ACCEPTED_POP_FACTOR = -250 # Multiply this score by fraction of discriminated Pops in the state
	GOVERNMENT_BUILDING_STATE_NAVY_ACCEPTED_POP_FACTOR = 250 # Multiply this score by fraction of accepted Pops in the state
	GOVERNMENT_BUILDING_STATE_UNINCORPORATED_MULT = 0.25 # Multiply score by this if the state is unincorporated
	GOVERNMENT_BUILDING_STATE_MISSING_QUALIFICATIONS_MULT = 0.10 # Multiply score by this if there's not enough qualifications to staff the building
	GOVERNMENT_BUILDING_STATE_MISSING_INFRASTRUCTURE_DIV = 0.50 # Divide score by ( 1 + this * number of missing infrastructure after adding this building )
	GOVERNMENT_BUILDING_STATE_POP_CONSTRUCTION_SECTOR_IMPORTANCE_THRESHOLD = 250000 # Above this amount of state population, AI considers it important to have a construction sector in the state
	GOVERNMENT_BUILDING_STATE_POP_CONSTRUCTION_SECTOR_IMPORTANCE_MULT = 1.5 # Multiply score by this if state GDP is at least the above value for purposes of scoring the first level of construction sector

	# Below data is used to calculate how much weight the AI places on specific subsidies
	SUBSIDIZE_BASE_VALUE = 1000
	SUBSIDIZE_SHARE_OF_INFRA_FACTOR = 4000		# How highly is subsidization of a building valued if it provides 100% of the infrastructure in the state region
	SUBSIDIZE_SHARE_OF_SUPPLY_FACTOR = 2000		# How highly is subsidization of a building valued if it provides 100% of the sell orders for a good in the market
	SUBSIDIZE_FAVORED_GOODS_MULT = 1.5 			# Share of supply factor is multiplied by this for a good that the AI wants a high supply of
	SUBSIDIZE_DISFAVORED_GOODS_MULT = 0.75 		# Share of supply factor is multiplied by this for a good that the AI disfavors

	# Below data is used to calculate how much weight the AI places on different things it can spend its authority on
	AUTHORITY_SPENDING_RANDOM_FACTOR = 0.5 # The higher this is, the more random new AI authority spending will be

	# Below data is used to calculate how much weight the AI places on promoting an IG
	PROMOTION_BASE_VALUE = 50

	# Below data is used to calculate how much weight the AI places on suppressing an IG
	SUPPRESSION_BASE_VALUE = 75

	# Below data is used to calculate how much weight the AI places on consumption taxes
	CONSUMPTION_TAX_INCOME_VALUE = 10 # Per percent of state expenses in taxable value (this is then multiplied by relative authority cost of the good)
	CONSUMPTION_TAX_STAPLE_MULT = 0.5 # Multiply desire to tax staple goods by this
	CONSUMPTION_TAX_LUXURY_MULT = 2.0 # Multiply desire to tax luxury goods by this
	CONSUMPTION_TAX_LOW_INCOME_THRESHOLD = 1.25 # Income-to-expenses threshold below which consumption taxes are a must-have
	CONSUMPTION_TAX_HIGH_INCOME_THRESHOLD = 1.5 # Income-to-expenses threshold at which consumption taxes should be removed (if removal would not put us below this)
	CONSUMPTION_TAX_MAX_NUM_TAXED_GOODS_BASE = 0 # Base max number of goods AI wants to tax
	CONSUMPTION_TAX_MAX_NUM_TAXED_GOODS_PER_MISSING_TAX_TYPE = 2 # Added to max number of goods AI wants to tax for each other type of tax it does not collect

	# Below data is used to calculate how much weight the AI places on a production building
	PRODUCTION_BUILDING_RANDOM_FACTOR = 10.0 # The higher this is, the more random AI construction will be
	PRODUCTION_BUILDING_STATE_RANDOM_FACTOR = 1.0 # The higher this is, the more random AI state selection for building types will be
	PRODUCTION_BUILDING_BASE_VALUE = 1000 # If no ai_value is scripted in the building
	PRODUCTION_BUILDING_NO_AVAILABLE_WORKFORCE_FACTOR = 0.25 # Total weight is multiplied by this if the state lacks enough workforce to staff the building
	PRODUCTION_BUILDING_GOODS_PROFIT_FACTOR = 5000 # Per pound of predicted building profit (divided by employee count per level)
	PRODUCTION_BUILDING_GOODS_DEFICIT_FACTOR = 10000 # Per pound of predicted building deficit (divided by employee count per level and multiplies a negative value)
	PRODUCTION_BUILDING_GOODS_DEFICIT_SUBSIDIZE_FACTOR = 5000 # Overrides PRODUCTION_BUILDING_GOODS_DEFICIT_FACTOR for subsidized buildings
	PRODUCTION_BUILDING_PRODUCED_VALUE_FACTOR = 0.25 # Per pound of produced goods in base value
	PRODUCTION_BUILDING_INCORPORATED_INFRASTRUCTURE_USAGE_FACTOR = 0.05 # Total weight is divided by ( 1 + this * building infrastructure usage ) in incorporated states
	PRODUCTION_BUILDING_UNINCORPORATED_INFRASTRUCTURE_USAGE_FACTOR = 1.0 # Total weight is divided by ( 1 + this * building infrastructure usage ) in unincorporated states
	PRODUCTION_BUILDING_INPUT_NO_LOCAL_PRODUCTION_FACTOR = -0.5 # Add this value to a building for each unit of money worth of goods consumed that are not produced in the state but *are* produced by buildings in the market
	PRODUCTION_BUILDING_OUTPUT_NO_LOCAL_CONSUMPTION_FACTOR = -0.5 # Add this value to a building for each unit of money worth of goods produced that are not consumed in the state but *are* consumed by buildings in the market
	PRODUCTION_BUILDING_OUTPUT_HIGH_PRICE_THRESHOLD = 1.25 # Lower threshold multiplier of base price for applying 'high price' modifier below
	PRODUCTION_BUILDING_OUTPUT_HIGH_PRICE_FACTOR = 0.25 # Add this value to a building for each unit of money worth of goods above high price threshold that this building produces
	PRODUCTION_BUILDING_OUTPUT_HIGH_PRICE_WANTS_HIGH_SUPPLY_FACTOR = 0.75 # Add this value to a building for each unit of money worth of goods above high price threshold that this building produces and which we want a high supply of
	PRODUCTION_BUILDING_OUTPUT_HIGH_PRICE_LOCAL_CONSUMPTION_MULTIPLIER = 2.0 # All factors for high prices are multiplied by this value if any buildings in the state consume the good in question
	PRODUCTION_BUILDING_OUTPUT_LOW_PRICE_THRESHOLD = 0.75 # Upper threshold multiplier of base price for applying 'low price' modifier below
	PRODUCTION_BUILDING_OUTPUT_LOW_PRICE_FACTOR = -0.5 # Add this value to a building for each unit of money worth of goods below low price threshold that this building produces
	PRODUCTION_BUILDING_SUBSIDIZE_PRICE_FACTOR_MULT = 1.25 # Multiply the effects of price factors on buildings that the AI will consider subsidizing
	PRODUCTION_BUILDING_OUTPUT_NEW_GOODS_FACTOR = 100.0 # Add this value to a building for each unit of money worth of goods that currently isn't available in our market/state but the AI wants to prioritize
	PRODUCTION_BUILDING_OUTPUT_NEW_GOODS_STATE_INCORPORATED_POPULATION_THRESHOLD = 250000 # When the AI prioritizes 'new goods' in a state rather than a market (because of local goods) it only cares about incorporated states with at least this much population
	PRODUCTION_BUILDING_OUTPUT_NEW_GOODS_STATE_UNINCORPORATED_POPULATION_THRESHOLD = 1000000 # When the AI prioritizes 'new goods' in a state rather than a market (because of local goods) it only cares about unincorporated states with at least this much population
	PRODUCTION_BUILDING_OUTPUT_WANTED_INDUSTRIAL_GOODS_FACTOR = 0.25 # Add this value to a building for each unit of money worth of industrial goods that aren't overproduced in the country and are used by buildings
	PRODUCTION_BUILDING_OUTPUT_WANTED_MILITARY_GOODS_FACTOR = 0.25 # Add this value to a building for each unit of money worth of military goods that aren't overproduced in the country and are used by buildings
	PRODUCTION_BUILDING_OUTPUT_NEEDED_INDUSTRIAL_GOODS_FACTOR = 0.5 # Add this value to a building for each unit of money worth of industrial goods that are underproduced in the country and are used by buildings
	PRODUCTION_BUILDING_OUTPUT_NEEDED_MILITARY_GOODS_FACTOR = 0.5 # Add this value to a building for each unit of money worth of military goods that are underproduced in the country and are used by buildings
	PRODUCTION_BUILDING_FAVORED_GOODS_FACTOR = 0.5 # Add this value to a building for each unit of money worth of building goods output that the AI favors
	PRODUCTION_BUILDING_DISFAVORED_GOODS_FACTOR = -0.25 # Add this value to a building for each unit of money worth of building goods output that the AI disfavors
	PRODUCTION_BUILDING_MISSING_QUALIFICATIONS_MULT = 0.50 # Multiply score by this if there's not enough qualifications to staff the building (disabled for now)
	PRODUCTION_BUILDING_DESIRED_INFRASTRUCTURE_SURPLUS = 2 # If infrastructure 'surplus' in state is less than this, AI wants to improve it
	PRODUCTION_BUILDING_FREE_INFRASTRUCTURE_TARGET_WHEN_LACKING_WORKFORCE = 5 # When lacking workforce, the AI will stop building in the state once available infrastructure is this or less
	PRODUCTION_BUILDING_EXCESSIVE_INFRASTRUCTURE_SURPLUS = 10 # If infra 'surplus' in state is at least this, AI doesn't want to improve it
	PRODUCTION_BUILDING_REDUCE_SHORTAGE_MULT = 5 # Multiply score by this if we're reducing the state region's shortages
	PRODUCTION_BUILDING_INCREASE_SHORTAGE_MULT = 0.01 # Multiply score by this if we're increasing the state region's shortages
	PRODUCTION_BUILDING_OTHER_BUILDING_TYPES_UNDER_CONSTRUCTION_DIV = 0.5 # Divide score by (1 + this * number of other building types queued in the state)
	PRODUCTION_BUILDING_LONG_CONSTRUCTION_TIME_THRESHOLD = 40
	PRODUCTION_BUILDING_LONG_CONSTRUCTION_TIME_MULT = 0.5 # Multiply score by this if construction time would take more than PRODUCTION_BUILDING_LONG_CONSTRUCTION_TIME_THRESHOLD weeks at full construction industry usage (ignores MAX_WEEKLY_CONSTRUCTION_PROGRESS)
	PRODUCTION_BUILDING_VERY_LONG_CONSTRUCTION_TIME_THRESHOLD = 60
	PRODUCTION_BUILDING_VERY_LONG_CONSTRUCTION_TIME_MULT = 0.25 # Multiply score by this if construction time would take more than PRODUCTION_BUILDING_VERY_LONG_CONSTRUCTION_TIME_THRESHOLD weeks at full construction industry usage (ignores MAX_WEEKLY_CONSTRUCTION_PROGRESS)
	PRODUCTION_BUILDING_COMPANY_MULT = 2.0 # Multiply score by this if we have at least one established company for the building type
	PRODUCTION_BUILDING_FOREIGN_INVESTMENT_HAS_RECENT_NATIONALIZATION_MULT = 0.1 # Multiply score by this if the construction is a foreign investment into a country that has recently nationalized buildings held by investor country

	# Government construction applies this multiplier to domestic states when determining where to construct
	GOVERNMENT_CONSTRUCTION_DOMESTIC_INVESTMENT_BIAS = 2.0
	GOVERNMENT_CONSTRUCTION_SUBJECT_INVESTMENT_BIAS = 1.5
	
	PRODUCTION_BUILDING_AUTONOMOUS_INVESTMENT_WANTED_COST_COVERAGE = 1 # If investment pool has less money than this in it, don't do any autonomous construction
	PRODUCTION_BUILDING_AUTONOMOUS_INVESTMENT_CONSTRUCTION_COST_DIVISOR_SCALING = 0.001 # Value for autonomous investment pool constructions is divided by ( 1 + construction point cost * this )
	PRODUCTION_BUILDING_AUTONOMOUS_INVESTMENT_RANDOM_FACTOR_MULT = 2.0 # Multiplies PRODUCTION_BUILDING_RANDOM_FACTOR for autonomous investment pool constructions
	PRODUCTION_BUILDING_AUTONOMOUS_INVESTMENT_STATE_RANDOM_FACTOR_MULT = 1.5 # Multiplies PRODUCTION_BUILDING_RANDOM_FACTOR for autonomous investment pool constructions
	PRODUCTION_BUILDING_AUTONOMOUS_INVESTMENT_PROFIT_FACTOR_MULT = 1.5 # Multiplies PRODUCTION_BUILDING_GOODS_PROFIT_FACTOR for autonomous investment pool constructions
	PRODUCTION_BUILDING_AUTONOMOUS_INVESTMENT_PROFIT_PRIVATIZE_FACTOR_MULT = 5.0 # Multiplies PRODUCTION_BUILDING_GOODS_PROFIT_FACTOR for autonomous investment pool constructions, gives higher weight to buildings that have levels to privatize
	PRODUCTION_BUILDING_AUTONOMOUS_INVESTMENT_PRODUCED_VALUE_FACTOR_MULT = 1.25 # Multiplies PRODUCTION_BUILDING_PRODUCED_VALUE_FACTOR for autonomous investment pool constructions
	PRODUCTION_BUILDING_AUTONOMOUS_INVESTMENT_PRODUCED_VALUE_PRIVATIZE_FACTOR_MULT = 0.5 # Multiplies PRODUCTION_BUILDING_PRODUCED_VALUE_FACTOR for autonomous investment pool constructions, gives higher weight to buildings that have levels to privatize
	PRODUCTION_BUILDING_AUTONOMOUS_INVESTMENT_PRODUCED_MODIFIER_FACTOR_MULT = 0.75 # Multiplies value from produced modifiers for autonomous investment pool constructions
	PRODUCTION_BUILDING_AUTONOMOUS_INVESTMENT_PRICE_COMPENSATION_FACTOR_MULT = 1.0 # Multiplies high/low price compensation factors for autonomous investment pool constructions
	PRODUCTION_BUILDING_AUTONOMOUS_INVESTMENT_BELOW_DESIRED_INFRASTRUCTURE_FACTOR_MULT = 0.25 # Multiplies PRODUCTION_BUILDING_BELOW_DESIRED_INFRASTRUCTURE_FACTOR for autonomous investment pool constructions
	PRODUCTION_BUILDING_AUTONOMOUS_INVESTMENT_LOW_INVESTMENT_RESET_TIME = 12  # Every this number of months, reset the historical construction values for each pop type to ensure system can handle significant economic changes over time
	PRODUCTION_BUILDING_AUTONOMOUS_INVESTMENT_MILITARY_GOODS_FACTOR_MULT = 1.5 # Multiplies PRODUCTION_BUILDING_OUTPUT_NEEDED_MILITARY_GOODS_FACTOR & PRODUCTION_BUILDING_OUTPUT_WANTED_MILITARY_GOODS_FACTOR for autonomous investment pool constructions
	PRODUCTION_BUILDING_AUTONOMOUS_INVESTMENT_INDUSTRIAL_GOODS_FACTOR_MULT = 4.0 # Multiplies PRODUCTION_BUILDING_OUTPUT_NEEDED_INDUSTRIAL_GOODS_FACTOR & PRODUCTION_BUILDING_OUTPUT_WANTED_INDUSTRIAL_GOODS_FACTOR for autonomous investment pool constructions
	PRODUCTION_BUILDING_AUTONOMOUS_INVESTMENT_PROFIT_PRIVATIZE_SELF_OWNED_BUILDING_MULT = 0.75 # Multiply the total score for privatizing self-owned building levels by this
	
	# For each this amount of money going into the investment pool, we execute one autonomous investment update per tick (minimum of 1)
	# This is to ensure that even very large investment pools can be properly utilized
	# Be careful with this value as setting it too low can badly impact performance
	AUTONOMOUS_INVESTMENT_UPDATE_COUNT_DIVISOR = 500000 
	
	# When the amount of saved value for foreign investment exceeds saved value for domestic investment, we start applying this bias to score for domestic autonomous constructions
	# This is calculated as 1 + ( ( foreign investment / domestic investment - 1 ) * AUTONOMOUS_INVESTMENT_DOMESTIC_INVESTMENT_BIAS )
	# The resulting multiplier is capped at AUTONOMOUS_INVESTMENT_DOMESTIC_INVESTMENT_BIAS_MAX
	AUTONOMOUS_INVESTMENT_DOMESTIC_INVESTMENT_BIAS = 2.0 
	AUTONOMOUS_INVESTMENT_DOMESTIC_INVESTMENT_BIAS_MAX = 10.0
	
	# Every this number of months, the saved values for domestic/foreign investment are reset to 0 
	# This is to ensure that a prolonged period of domestic investment early game doesn't produce such high saved numbers that anything that comes after it doesn't matter
	AUTONOMOUS_INVESTMENT_DOMESTIC_INVESTMENT_BIAS_RESET_TIME_IN_MONTHS = 60 
	
	# The AI for autonomous investment weights alters the weights for buildings based on how much of the investment pool originates from a certain ownership type building
	# For example, if a high proportion of investment pool income is from Manor Houses, the building groups that manor houses have high investment weights for are weighted up
	# Here we clamp the bounds for this effect, ie how low/high is the weight allowed to get
	AUTONOMOUS_INVESTMENT_MIN_PROPORTIONAL_INVESTMENT_WEIGHT = 0.25 	
	AUTONOMOUS_INVESTMENT_MAX_PROPORTIONAL_INVESTMENT_WEIGHT = 1.0
	
	# When scoring an ownership building for a new investment, always consider them to be contributing a minimum of this amount of the investment pool
	# This is to ensure that financial centers can appear in countries that lack them, etc
	AUTONOMOUS_INVESTMENT_MIN_OWNERSHIP_BUILDING_INVESTMENT_SHARE = 0.25
	
	# Chance for ai to do privatization instead of building a new building level when evaluating an existing building
	BUILDING_PRIVATIZATION_CHANCE = 50.0

	# Investment AI owner building location selection weights and multipliers
	OWNER_BUILDING_LOCATION_BASE_SCORE = 1							# Base score for selecting state as owner building location
	OWNER_BUILDING_LOCATION_POPULATION_SCORE = 1					# For each 10000 population, increase score for selecting state as owner building location by this
	OWNER_BUILDING_LOCATION_GDP_SCORE = 1							# For each INVESTMENT_LOCATION_GDP_DIVISOR yearly state gdp, increase score for selecting state as owner building location by this
	OWNER_BUILDING_LOCATION_GDP_DIVISOR = 100000	
	OWNER_BUILDING_LOCATION_HAS_OWNER_BUILDING_MULT = 2.0			# Multiply owner building location score by this for any state which already has the requisite owner building type
	OWNER_BUILDING_LOCATION_CAPITAL_MULT = 2.0						# Multiply owner building location score by this for our capital
	OWNER_BUILDING_LOCATION_SAME_STATE_MULT = 4.0					# Multiply owner building location score by this for the same state we're building/privatizing in
	OWNER_BUILDING_LOCATION_NOT_HOMELANDS_MULT = 0.5				# Multiply owner building location score by this if the state isn't a homeland of the country's primary cultures
	OWNER_BUILDING_LOCATION_LOWER_GDP_MULT = 0.25					# Multiply owner building location score by this for any state that has lower GDP than the state we're building/privatizing in
	OWNER_BUILDING_LOCATION_NO_AVAILABLE_WORKFORCE_MULT = 0.1		# Multiply owner building location score by this if the state lacks workers
	OWNER_BUILDING_LOCATION_NO_AVAILABLE_INFRASTRUCTURE_MULT = 0.1	# Multiply owner building location score by this if the state lacks infrastructure
	OWNER_BUILDING_LOCATION_UNINCORPORATED_MULT = 0.01				# Multiply owner building location score by this if the state is unincorporated
	OWNER_COMPANY_SCORE_MULT = 3.0									# Multiply owner company score by this in case of new construction, the higher this is, the more likely a company building is chosen instead of other owning building types
	OWNER_COMPANY_PRIVATIZATION_SCORE_MULT = 7.0					# Multiply owner company score by this in case of privatization, the higher this is, the more likely a company building is chosen instead of other owning building types
	OWNER_COMPANY_MIN_LEVELS_IN_OWN_STATE = 10						# How many levels should the company building invest in buildings in its own state
	OWNER_COMPANY_MIN_LEVELS_IN_OWN_STATE_PENALTY_MULT = 0.05		# Multiply owner company score by this if the number of levels in its own state is below minimum
	OWNER_COMPANY_MIN_LEVELS_IN_OWN_COUNTRY = 100					# How many levels should the company building invest in buildings in its own country
	OWNER_COMPANY_MIN_LEVELS_IN_OWN_COUNTRY_PENALTY_MULT = 0.05		# Multiply owner company score by this if the number of levels in its own country is below minimum

	# Below data is used to calculate how much weight the AI places on enacting/revoking a law
	CHANGE_LAW_RANDOM_FACTOR = 1.0 # The higher this is, the more random AI law enactment will be
	CHANGE_LAW_PRO_IG_IDEOLOGIES_FACTOR = 100 # For enacting laws, per ideology match for IGs we approve of
	CHANGE_LAW_ANTI_IG_IDEOLOGIES_FACTOR = -25 # For enacting laws, per ideology match for IGs we disapprove of
	CHANGE_LAW_POLITICAL_MOVEMENT_FACTOR = 1000 # Scales against ( support * radicalism ) for each movement that would increase the law's chance to be enacted
	CHANGE_LAW_POTENTIAL_CIVIL_WAR_THRESHOLD = 0.70 # If a political movement to preserve would have at least this much radicalism, AI considers it a potential civil war cause
	CHANGE_LAW_POTENTIAL_CIVIL_WAR_ENACT_CHANCE = 100 # Base chance that the AI will proceed with a law change that could cause a civil war - revolution aversion is subtracted from this value for final chance (1 = 1%)
	CHANGE_LAW_POTENTIAL_CIVIL_WAR_MEMORY_DURATION = 24 # Number of months after deciding not to enact a law due to civil war risk that the AI should remember and stick to this decision
	CHANGE_LAW_CIVIL_WAR_BOLDNESS_RANGE = 100 # AI boldness (the score that revolution aversion must beat to cancel enactment) for a particular law is set on a random range of 0 - this
	CHANGE_LAW_CIVIL_WAR_BOLDNESS_TIMED_WEIGHT_DURATION = 24 # When the AI randomly sets its boldness for a particular law, how many months does that timed weight last
	CHANGE_LAW_CIVIL_WAR_AVERSION_MOVEMENT_SUPPORT_FACTOR = 0.005 # Chance that the AI will stop enacting a law to avoid a civil war is multiplied by ( 1 + highest revolutionary movement support * this )
	CHANGE_LAW_CIVIL_WAR_AVERSION_SUBJECT_MULTIPLIER = 5 # Chance that AI stops enacting a law to avoid a civil war is multiplied by this for subjects
	CHANGE_LAW_CIVIL_WAR_AVERSION_LAW_DIRECTION_FLEXIBILITY = 2 # Revolution aversion is multiplied by this and added to the max progressiveness/regressiveness the AI is willing to stomach to avoid a revolution

	# Below data is used to calculate how much weight the AI places on a production method
	PRODUCTION_METHOD_BASE_VALUE = 1000
	PRODUCTION_METHOD_PROFIT_FACTOR = 1 # Per pound of profit the produced goods would generate
	PRODUCTION_METHOD_DEFICIT_FACTOR = 1.5 # Per pound of deficit the produced goods would generate (multiplies a negative value)
	PRODUCTION_METHOD_PRODUCED_VALUE_FACTOR = 0.25 # Per pound of produced goods in base value
	PRODUCTION_METHOD_EMPLOYMENT_CHANGE_FACTOR = 2.0 # The total score of a PM will be multiplied or divided by 1 + ( this * the proportion of labor that is added or saved by the change )
	PRODUCTION_METHOD_REDUCE_OUTPUT_PENALTY_FACTOR = 10 # Multiply method score by this if we're reducing the building's output penalties
	PRODUCTION_METHOD_INCREASE_OUTPUT_PENALTY_FACTOR = 0.01 # Multiply method score by this if we're increasing the building's output penalties
	PRODUCTION_METHOD_FAVORED_GOODS_FACTOR = 0.25 # Per base cost * units of goods produced that the AI favors (for non military goods)
	PRODUCTION_METHOD_FAVORED_MILITARY_GOODS_FACTOR = 0.5 # Per base cost * units of goods produced that the AI favors (for military goods)
	PRODUCTION_METHOD_DISFAVORED_GOODS_FACTOR = -0.25 # Per base cost * units of goods produced that the AI disfavors
	PRODUCTION_METHOD_UNDESIRABLE_GOODS_PRICE_THRESHOLD = 1.5 # If a PM using the 'most productive' logic makes use of a good whose price is above ( base * this ), reduce the score
	PRODUCTION_METHOD_UNDESIRABLE_GOODS_PRICE_FACTOR = -0.25 # Per base cost * units of goods whose price is above undesirable price threshold
	PRODUCTION_METHOD_STICKINESS_UPGRADE = 0.95 # Score of non-current method is multiplied by this when it produces more goods base value in total
	PRODUCTION_METHOD_STICKINESS_DOWNGRADE = 0.75 # Score of non-current method is multiplied by this when it produces less (or equal) goods base value in total
	PRODUCTION_METHOD_CHANCE_TO_CHANGE = 0.1 # Chance that the AI will consider changing a production method when evaluating methods
	PRODUCTION_METHOD_LOW_POP_THRESHOLD = 50000 # If a state's population is less than this, use the scoring factor below for low-pop PMs
	PRODUCTION_METHOD_LOW_POP_FACTOR = 100 # If a state's population is less than PRODUCTION_METHOD_LOW_POP_THRESHOLD, multiply score by this

	# At this amount or above of Nationalization Desire (set in ai strategies & building type), the AI will want to nationalize production buildings
	NATIONALIZATION_DESIRE_NATIONALIZE_THRESHOLD = 1.0
	
	# At this amount or below of Nationalization Desire (set in ai strategies & building type), the AI will want to privatize production buildings
	NATIONALIZATION_DESIRE_PRIVATIZE_THRESHOLD = 0.0
	
	# At this % of radicals in the country after a nationalization, AI will avoid further nationalization
	# Ignored when the state is recently liberated/conquered
	NATIONALIZATION_RADICALS_THRESHOLD_TO_AVOID_NATIONALIZATION = 0.3 
	
	# At this % of radicals in the country after a nationalization, AI always uses compensated nationalization
	NATIONALIZATION_RADICALS_THRESHOLD_TO_ALWAYS_COMPENSATE = 0.1 
		
	# Added to nationalization desire when a state has the recently_liberated_state/recently_conquered_state modifiers
	# Only applied to foreign-owned buildings and not considered for privatization
	NATIONALIZATION_DESIRE_FROM_RECENTLY_LIBERATED = 2.0
	NATIONALIZATION_DESIRE_FROM_RECENTLY_CONQUERED = 1.0	
	
	# AI will want at least this much of its gold reserves remaining (as a percentage) after nationalizing if using compensation
	NATIONALIZATION_GOLD_RESERVES_THRESHOLD = 0.5	
	
	# The max number of building levels the AI will nationalize of each building in a single update
	NATIONALIZATION_MAX_LEVELS_PER_UPDATE = 5 
	
	# Below data is used to calculate AI's desire for peace
	AI_PEACE_AGREEMENT_BASE_VALUE = -10
	AI_PEACE_AGREEMENT_WHITE_PEACE_BASE = 10 # If no wargoals are being enforced on either side
	AI_PEACE_AGREEMENT_WHITE_PEACE_WAR_DURATION = 1 # For each month the war goes on add this to the acceptance for a white peace
	AI_PEACE_AGREEMENT_WAR_SUPPORT_FACTOR = -1	# Each point of war support affects peace acceptance by this amoun
	AI_PEACE_AGREEMENT_UNACCEPTABLE_WARGOAL_VALUE = -1000 # Fixed wargoal value that will be added to peace acceptance if an unacceptable wargoal (such as cut down to size) is being enforced on us
	AI_PEACE_AGREEMENT_WARGOAL_VALUE_BASE = 10	# How much does the AI value each wargoal (base)
	AI_PEACE_AGREEMENT_WARGOAL_VALUE_MIN = -1000 # Wargoal value cannot be lower than this
	AI_PEACE_AGREEMENT_WARGOAL_VALUE_MAX = 1000	# Wargoal value cannot be higher than this
	AI_PEACE_AGREEMENT_WARGOAL_VALUE_SCALED = 0.5	# How much does the AI value each wargoal (scaled with maneuver cost)
	AI_PEACE_AGREEMENT_ALLY_WARGOAL_MULT = 1 # For each wargoal that our allies are pressing, apply wargoal value * this
	AI_PEACE_AGREEMENT_SELF_WARGOAL_MULT = 3 # For each wargoal we have that's being pressed, apply wargoal value * this
	AI_PEACE_AGREEMENT_ENEMY_WARGOAL_SELF_MULT = -8 # For each wargoal that the enemy is pressing against us, apply wargoal value * this
	AI_PEACE_AGREEMENT_ENEMY_WARGOAL_ALLY_MULT = -1 # For each wargoal that's being pressed against our allies, apply wargoal value * this
	AI_PEACE_AGREEMENT_NON_CONTESTED_ENEMY_WARGOAL_MULT = 5 # Value of wargoals held by enemy that aren't being contested is multiplied by this
	AI_PEACE_AGREEMENT_ACHIEVABLE_ALLY_WARGOAL = -1.5 # For each wargoal our side holds that isn't being pressed where the target will run out of war support before the holder does (multiplies self/ally wargoal value)
	AI_PEACE_AGREEMENT_ACHIEVABLE_ENEMY_WARGOAL = -0.9 # For each wargoal the enemy side holds (pressed or not) where the target will run out of war support before the holder does (multiplies self/ally enemy wargoal value)
	AI_PEACE_AGREEMENT_WAR_SUPPORT_TO_HOLD_ON_TO_ACHIEVABLE_WARGOALS = 0 # Below this war support an AI will be much more open to ceding achievable wargoals to the enemy in a peace deal
	AI_PEACE_AGREEMENT_PEACE_DESIRE_FACTOR = 1.0 # Peace desire is multiplied by this when added to peace agreement acceptance score

	AI_CAPITULATE_COMPLETELY_DEFEATED = 1000 # If entire allied side is 100% occupied
	AI_CAPITULATE_BASE_VALUE = -10
	AI_CAPITULATE_WAR_LEADER_FACTOR = -10 # If warleader
	AI_CAPITULATE_WAR_SUPPORT_FACTOR = -1
	AI_CAPITULATE_SELF_WARGOAL_FACTOR = -3 # For each wargoal we hold in the war
	AI_CAPITULATE_ENEMY_WARGOAL_FACTOR = -3 # For each wargoal targeting us in the war
	AI_CAPITULATE_PEACE_DESIRE_FACTOR = 0.8 # Peace desire is multiplied by this when added to capitulation score

	AI_MONTHS_OF_REDUCED_PEACE_DESIRE = 10 # Before this amount of months, reduce AI peace desire
	AI_PEACE_DESIRE_FROM_SHORT_WAR = -10 # Subtract this amount of peace desire for the above number of months (multiplied by AI_MONTHS_OF_REDUCED_PEACE_DESIRE - months of war duration)
	AI_PEACE_DESIRE_FROM_TURMOIL = 50 # Add this amount of peace desire at 100% radicals
	AI_PEACE_DESIRE_FROM_DEVASTATION = 50 # Add this amount of peace desire at 100% devastation
	AI_PEACE_DESIRE_FROM_LOYALISTS = -25 # Subtract this amount of peace desire at 100% loyalists
	AI_PEACE_DESIRE_FROM_DEBT_LEVEL = 300 # Add this amount of peace desire at 100% debt level
	AI_PEACE_DESIRE_FROM_BANKRUPTCY = 1000 # Add this amount of peace desire when bankrupt
	AI_PEACE_DESIRE_FROM_GOLD_RESERVES = -25 # Subtract this amount of peace desire at 100% gold reserves
	AI_PEACE_DESIRE_FROM_FORCE_BALANCE = 50 # Up to this amount is added or subtracted from war support based on DIPLO_PLAY_FORCE_BALANCE_SCALE of the two sides
	AI_PEACE_DESIRE_FACTOR_FROM_ANNEXATION = 0.5 # If peace will cause the country to be annexed then all positive peace desire factors will be multiplied by this value

	# AI country-specific goal data
	SECRET_GOAL_STICKINESS = 2.0 # The higher this is, the less likely the AI is to change an established secret goal during recalculation
	ATTITUDE_STRONG_GOAL_SCORE_THRESHOLD = 100
	ATTITUDE_WEAK_GOAL_SCORE_THRESHOLD = 50

	GOAL_THREAT_INFAMOUS_FACTOR = 25
	GOAL_THREAT_NOTORIOUS_FACTOR = 50
	GOAL_THREAT_PARIAH_FACTOR = 1000
	GOAL_THREAT_NEIGHBOR_FACTOR = 25
	GOAL_THREAT_SP_MAX_MULT = 2
	GOAL_THREAT_CUSTOMS_UNION_MULT = 0.5 # Reduce neighbor threat score by this if in a customs union

	GOAL_ANTAGONIZE_POOR_RELATIONS_FACTOR = 25
	GOAL_ANTAGONIZE_COLD_RELATIONS_FACTOR = 50
	GOAL_ANTAGONIZE_HOSTILE_RELATIONS_FACTOR = 100
	GOAL_ANTAGONIZE_LIBERTY_DESIRE_FACTOR = 1 # Multiplied by liberty desire for subjects against their overlords
	GOAL_ANTAGONIZE_CONQUER_SCORE_MULT = 1.0 # Multiplied by the total score of the states we want to take from them
	GOAL_ANTAGONIZE_CONQUER_SCORE_MAX = 200 # Total score of territory we want to take cannot exceed this
	GOAL_ANTAGONIZE_TREATY_PORT_SCORE_MULT = 0.5 # Multiplied by the total score of the treaty ports we want to take from them
	GOAL_ANTAGONIZE_TREATY_PORT_SCORE_MAX = 100 # Total score of treaty ports we want to take cannot exceed this
	GOAL_ANTAGONIZE_DOMINATE_SCORE_MULT = 1.0 # Multiplied by the total score of make-subject wargoals we want to enforce on them
	GOAL_ANTAGONIZE_DOMINATE_SCORE_MAX = 200
	GOAL_ANTAGONIZE_RIVAL_FACTOR = 100
	GOAL_ANTAGONIZE_WAR_FACTOR = 1000
	GOAL_ANTAGONIZE_NATURAL_ENEMY_FACTOR = 75

	GOAL_BEFRIEND_CORDIAL_RELATIONS_FACTOR = 25
	GOAL_BEFRIEND_AMICABLE_RELATIONS_FACTOR = 50
	GOAL_BEFRIEND_FRIENDLY_RELATIONS_FACTOR = 100
	GOAL_BEFRIEND_PROTECTOR_THRESHOLD = 15
	GOAL_BEFRIEND_PROTECTOR_FACTOR = 1.0
	GOAL_BEFRIEND_PROTECTOR_RIVAL_MULT = 2.0 # Score multiplied by this if they can protect against our rival
	GOAL_BEFRIEND_PROTECTOR_MAX_FACTOR = 100
	GOAL_BEFRIEND_PROTECTOR_SP_MAX_MULT = 2
	GOAL_BEFRIEND_SUBJECT_FACTOR = 25
	GOAL_BEFRIEND_ALLIANCE_FACTOR = 50
	GOAL_BEFRIEND_NATURAL_ALLY_FACTOR = 75
	GOAL_BEFRIEND_RECONCILE_FACTOR = 500
	GOAL_BEFRIEND_WAR_ALLY_FACTOR = 1000
	GOAL_BEFRIEND_WANTS_TO_PROTECT_FACTOR = 100

	FRIENDLY_AI_JOIN_DIPLO_PLAY_FACTOR = 100

	VIOLATE_SOVEREIGNTY_ACTION_NAME = "violate_sovereignty"
	VIOLATE_SOVEREIGNTY_MIN_RELATIVE_STRENGTH = 2.0 # We must have their army x this in SP to want to violate their sovereignty
	VIOLATE_SOVEREIGNTY_RANDOM_FACTOR = 2.0 # The higher this is, the more random the AI will be about who it violates the sovereignty of
	VIOLATE_SOVEREIGNTY_MIN_THEATER_IMPORTANCE = 150 # A theater must have at least this much war value for AI to consider violating sovereignty to get access to it
	VIOLATE_SOVEREIGNTY_COOLDOWN_DAYS = 100

	EXPEL_DIPLOMATS_ACTION_NAME = "expel_diplomats"

	NUM_DAYS_TO_REMEMBER_FAILED_TRADE = 90	# For how many days should the AI remember failing to trade a particular good (and thus not try that good again)

	# The AI never cancels current trade routes of this level or above
	TRADE_ROUTE_MAX_LEVEL_TO_CANCEL_SCALING = 0.002 # Scales with (acting market trade potential * goods quantity per trade route level)
	TRADE_ROUTE_MAX_LEVEL_TO_CANCEL_MIN = 1
	TRADE_ROUTE_MAX_LEVEL_TO_CANCEL_MAX = 9

	TRADE_ROUTE_MIN_MARKET_SHARE = 0.25 # If the AI is junior in a customs union and has less than this market share in a market, don't make any trade routes
	TRADE_ROUTE_MIN_ACCEPTABLE_PRODUCTIVITY = 3.0 # If a potential trade route would result in lower productivity than this, don't create it unless it's to resolve a shortage
	TRADE_ROUTE_MIN_WANTED_RELATIVE_VOLUME = 0.1 # If a trade route won't account for at least this fraction of buy/sell orders in the market, don't create it
	TRADE_ROUTE_MIN_VALUE_TO_IGNORE_VOLUME_CHECK = 1000 # If a trade route is trading at least this much base value worth of goods, ignore the relative check above
	TRADE_ROUTE_ACCEPTABLE_SPENDING = 0.002 # AI will not spend more BUR than this on trade routes (scaled by weekly GDP)
	TRADE_ROUTE_ACCEPTABLE_SPENDING_MINIMUM = 20 # If TRADE_ROUTE_ACCEPTABLE_SPENDING is less than this, this is used instead (so even small countries can do some trading other than their free routes)

	TRADE_ROUTE_MARKET_RANDOM_FACTOR = 1.0 # The higher this is, the more random the AI will be about which markets it trades with
	TRADE_ROUTE_GOODS_RANDOM_FACTOR = 1.0 # The higher this is, the more random the AI will be about which goods it selects for trading
	TRADE_ROUTE_EXPORT_VS_IMPORT_TOLERANCE = 3.0 # The AI is OK with having up to this amount more import than export routes or vice versa
	TRADE_ROUTE_TRADE_VALUE_FACTOR = 1.0 # The expected final trade volume * base price of goods is multiplied by this
	TRADE_ROUTE_RELATIVE_VOLUME_FACTOR = 2.0 # Multiply trade route score by ( 1 + supplied fraction of buy/sell orders in the market * this )
	TRADE_ROUTE_WANTED_NEW_GOODS_MULT = 100 #  Multiply trade route score by this if the trade route is importing a good to the market that the AI wants and has no local production or other import routes for
	TRADE_ROUTE_DISTANCE_DIVISOR = 0.002 # Divide the trade route value by 1 + (absolute distance between the two market capitals * this) to encourage AI to trade with nearby markets (we use this instead of more expensive convoy distance calc)
	TRADE_ROUTE_TARIFF_DIVISOR = 2 # Divide the trade route value by 1 + ( total tariff rate * this )
	TRADE_ROUTE_EXISTING_ROUTES_DIVISOR = 0.5 # Score for trade route is divided by (1 + this) for each trade route the market has of the same goods
	TRADE_ROUTE_FAVORED_GOODS_MULT = 2.0 # Total weight is multiplied by this if the trade route is trading a good in a way the AI favors
	TRADE_ROUTE_DISFAVORED_GOODS_MULT = 0.5 # Total weight is multiplied by this if the trade route is trading a good in a way the AI disfavors
	TRADE_ROUTE_REPLACE_THRESHOLD = 5.0 # If there is a sufficiently better new trade route (old route score x this), remove the old one
	TRADE_ROUTE_SUPPLY_NETWORK_STRENGTH_THRESHOLD = 1.0 # If supply network strength less than this, don't make new trade routes
	TRADE_ROUTE_REDUCE_SHORTAGE_MULT = 10 # Multiply score by this if we're reducing the market's shortages
	TRADE_ROUTE_INCREASE_SHORTAGE_MULT = 0 # Multiply score by this if we're increasing the market's shortages
	TRADE_ROUTE_IMPORT_SCORE_MULT = 1.0 # How much does AI multiply score of import routes
	TRADE_ROUTE_EXPORT_SCORE_MULT = 1.5 # How much does AI multiply score of export routes
	TRADE_ROUTE_DURATION_FACTOR = 10.0 # AI multiplies value of a route by ( 1 + this ) at COMPETITIVENESS_DURATION_BONUS_MAX_MONTHS (scales linearly up to this value at a lower duration)

	UNUSED_CAPPED_RESOURCE_RATIO_TO_START_DISCOURAGING_EXPORT = 0.5	# If the untapped potential production of a resource-capped good in the country is not at least market buy orders * this, switch to punitive export tariffs
	UNUSED_CAPPED_RESOURCE_RATIO_TO_STOP_DISCOURAGING_EXPORT = 1.0	# If the untapped potential production of a resource-capped good in the country is at least market buy orders * this, stop applying punitive export tariffs

	COMPANY_TYPE_DEFAULT_BASE_WEIGHT = 1	 			# Base weight for companies, can be overriden by ai_weight in database
	COMPANY_TYPE_RANDOM_FACTOR = 1						# The higher this is, the more random AI selection of companies will be
	COMPANY_TYPE_PRODUCTIVITY_FACTOR = 0.25				# Multiplier for AI weight of companies is increased by ( this * predicted building productivity )
	COMPANY_TYPE_PRODUCTIVITY_MAX = 4.0					# Effects of COMPANY_TYPE_PRODUCTIVITY_FACTOR  cannot be higher than this
	COMPANY_TYPE_BUILDING_LEVELS_FACTOR	= 0.1			# Multiplier for AI weight of companies is increased by ( this * num building levels )
	COMPANY_TYPE_BUILDING_LEVELS_MAX = 2.0				# Effects of COMPANY_TYPE_NUM_BUILDING_LEVELS_FACTOR cannot be higher than this
	COMPANY_TYPE_COMPETITION_FACTOR = 2					# Divisor for AI weight of companies is increased by 1 + ( number of building types on existing companies that compete * this )
	COMPANY_TYPE_BUILDING_GROUP_WEIGHT_IMPACT = 1.5		# The AI's average strategy weight mult for the building groups associated with this company is modulated towards 1 by this value and applied to AI preference for the company (ie; if this is 0.5, then the difference between the average AI preference and 1 is halved - 1.5 becomes 1.25, 0.5 becomes 0.75 etc)

	MILITARY_UNITS_PER_FORMATION_ARMY = 50				# The AI aims to have armies of roughly this size, and will create new formations in land HQs accordingly
	MILITARY_UNITS_PER_FORMATION_FLEET = 30				# The AI aims to have fleets of roughly this size, and will create new formations in naval HQs accordingly
	MILITARY_UNITS_MIN_FOR_GARRISON_FORMATION = 15 		# If a land HQ has at least this number of units we set the minimum number of formations to 2, so that there will be a garrison formation present
	MILITARY_UNITS_MIN_FOR_GARRISON_FORMATION_IN_CAPITAL_HQ = 5 		# Overrides MILITARY_UNITS_MIN_FOR_GARRISON_FORMATION for the capital land HQ, since not leaving the capital undefended is extremely critical
	MILITARY_UNITS_GARRISON_BATTALION_MULT = 0.33		# The garrison formation in each HQ should receive this portion of its total number of battalions
	MILITARY_UNITS_MIN_DELTA_TO_TRANSFER_UNITS = 0.05   # There must be at least this delta between the fraction of a HQ's units that a formation wants and the fraction that it has to bother with transfering units to/from it

	MIN_RANK_TO_FORM_POWER_BLOC = 6						# AIs with a lower rank value than this will never try to form power blocs
	POWER_BLOC_IDENTITY_RANDOM_FACTOR = 1				# The higher this is, the more random AI selection of power bloc identities will be
	POWER_BLOC_PRINCIPLE_RANDOM_FACTOR = 1				# The higher this is, the more random AI selection of power bloc principles will be
	POWER_BLOC_STATUE_RANDOM_FACTOR = 1					# The higher this is, the more random AI selection of power bloc statues will be

	LEAVE_POWER_BLOC_SCORE_THRESHOLD = -100 				# Leave the power bloc if score is less than this. Score is the acceptance value for 'invite_to_power_bloc' diplomatic action
	POWER_BLOC_KICK_MEMBER_LOW_COHESION_THRESHOLD = 40					# If current cohesion is less than this consider it low and add the corresponding score
	POWER_BLOC_KICK_MEMBER_LOW_COHESION_SCORE = 5						# Score to kick a member (which is anyone) if current cohesion is low (multiplied by delta between cohesion and threshold)
	POWER_BLOC_KICK_MEMBER_COHESION_CHANGE_SCORE = 2					# Score to kick the member if cohesion change is high enough (multiplied by cohesion chance)
	POWER_BLOC_KICK_MEMBER_LEVERAGE_ADVANTAGE_SCORE = -0.1			# Score to kick the member if active leverage on them is high enough (multiplied by active leverage)
	POWER_BLOC_KICK_MEMBER_POOR_RELATIONS_SCORE = 25				# Score to kick the member if relations with the member are Poor, x2 if Cold, x3 if Hostile
	POWER_BLOC_KICK_MEMBER_HOSTILE_ATTITUDE_SCORE = 25 				# Score to kick the member if attitude towards them is Hostile, x2 if Very Hostile
	POWER_BLOC_KICK_MEMBER_MARKET_SHARE_SCORE = -50					# Score to kick the member based on their market share in the bloc (if PB has a unified market)
	POWER_BLOC_KICK_MEMBER_HIGH_ARMY_MILITARY_STRENGTH_SCORE = -25		# Score to kick the member if their army strength is above average (if PB is a military alliance)
	POWER_BLOC_KICK_MEMBER_HIGH_NAVY_MILITARY_STRENGTH_SCORE = -15		# Score to kick the member if their navy strength is above average (if PB is a military alliance)
	POWER_BLOC_KICK_MEMBER_SCORE_THRESHOLD = 100						# Kick the member if the total score is less than this
	POWER_BLOC_KICK_MEMBER_RANDOM_FACTOR = 0.5							# The higher this is, the more random AI will be about which member to kick from the power bloc

	IMPOSE_LAW_NO_POTENTIAL_LAW_COOLDOWN_MONTHS = 24					# If the AI doesn't find any law with at least a chance to be imposed on a target, don't check them again for this number of months
	IMPOSE_LAW_RANDOM_FACTOR = 1 										# The higher this is, the more random the AI is about which country to try and impose a law on
	IMPOSE_LAW_MAX_IDEOLOGICAL_OPINION = 25								# The AI's ideological opinion of a country must be this or below to consider imposing a law on them 		
	IMPOSE_LAW_MAX_LIBERTY_DESIRE = 50									# The AI will not impose laws on subjects with LD higher than this
	IMPOSE_LAW_MIN_ENACTMENT_CHANCE = 0.2								# The AI will not impose laws on subjects if the enactment chance is less than this

	EXILE_INTERACTION_FAILED_COOLDOWN_MONTHS = 24						# If a character interaction was invalid against an exiled character, don't check them again for this amount of months
}
