﻿NAI = {
	DECLARE_BANKRUPTCY_MIN_DAYS_IN_DEFAULT = 1 # After this many days in default, the AI will declare bankruptcy
	DECLARE_BANKRUPTCY_COOLDOWN_DAYS = 10 # If AI declares bankruptcy, don't do it again for this many days as chain bankruptcies will radicalize everyone
	
	MOBILIZATION_BASE_DESIRED_RATIO_TO_ENEMY = 1.0   		# AI wants to have a total amount of mobilized army power that is equal to enemy mobilized army power * this

	# Below data is used to determine which states the AI should incorporate
	INCORPORATE_STATE_MAX_YEARS = 10 # Max years that incorporation is allowed to take for the AI to incorporate a state
	INCORPORATE_STATE_MIN_POPULATION = 1000 # Min population in a state for the AI to incorporate it

	# 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 = 1.0 # Multiply desire to tax staple goods by this
	CONSUMPTION_TAX_LUXURY_MULT = 1.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 = 4 # 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

	# Government construction applies this multiplier to domestic states when determining where to construct
	GOVERNMENT_CONSTRUCTION_DOMESTIC_INVESTMENT_BIAS = 5.0
	GOVERNMENT_CONSTRUCTION_SUBJECT_INVESTMENT_BIAS = 1.5

	# The factors below are only applied to autonomous investments
	PRODUCTION_BUILDING_AUTONOMOUS_INVESTMENT_COMPANY_MULT = 0.0 # Multiply score by 1 + this if we have at least one established company for the building type, scales by fraction of investment pool coming from companies compared to historical amount of investment by companies
	PRODUCTION_BUILDING_AUTONOMOUS_INVESTMENT_COMPANY_MONOPOLY_MULT = 0.25 # Replaces PRODUCTION_BUILDING_COMPANY_MULT for buildings on which a company has a monopoly
	PRODUCTION_BUILDING_AUTONOMOUS_INVESTMENT_COMPANY_CHARTERED_COUNTRY_MULT = 0.1 # Additional multiplier to company weights above if the investment is targeting a company's chartered country
	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_TRADE_CAPACITY_FACTOR_MULT = 1.5 # Multiplies value from produced trade capacity for autonomous investment pool constructions
	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 = 1.0 # Multiply the total score for privatizing self-owned building levels by this

	# 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 = 5.0
	AUTONOMOUS_INVESTMENT_DOMESTIC_INVESTMENT_BIAS_MAX = 20.0

	# Chance for ai to do privatization instead of building a new building level when evaluating an existing building
	BUILDING_PRIVATIZATION_CHANCE = 99.0

	# Investment AI owner building location selection weights and multipliers
	OWNER_BUILDING_LOCATION_BASE_SCORE = 10							# Base score for selecting state as owner building location
	OWNER_BUILDING_LOCATION_POPULATION_SCORE = 0					# 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 = 1000000
	OWNER_BUILDING_LOCATION_HAS_OWNER_BUILDING_MULT = 1.0			# Multiply owner building location score by this for any state which already has the requisite owner building type
	OWNER_BUILDING_LOCATION_CAPITAL_MULT = 5.0						# Multiply owner building location score by this for our capital
	OWNER_BUILDING_LOCATION_SAME_STATE_MULT = 100.0					# Multiply owner building location score by this for the same state we're building/privatizing in
	OWNER_BUILDING_LOCATION_NOT_HOMELANDS_MULT = 0.1				# 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 = 1.0					# 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 = 1.0	# 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_EXPANSION_CHANCE_MULTIPLIER = 0.001					# Base chance for a company to be selected as the owner of a new investment of one of their relevant building types, scales by fraction of investment pool coming from companies compared to historical amount of investment by companies
	OWNER_COMPANY_PRIVATIZATION_CHANCE_MULTIPLIER = 0.1			# Used instead of OWNER_COMPANY_EXPANSION_CHANCE for privatization, uses the same scaling
	OWNER_COMPANY_OWN_STATE_MULT = 00.1							# Multiply the chance for a company to be selected as the owner of a building (compared to other companies) if it's being built/invested in their HQ state

	# Below data is used to calculate AI's desire for peace
	AI_PEACE_AGREEMENT_BASE_VALUE = 50
	AI_PEACE_AGREEMENT_WHITE_PEACE_BASE = 0 # 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 = -0.5	# 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 = 0	# How much does the AI value each wargoal (base)
	AI_PEACE_AGREEMENT_WARGOAL_VALUE_MIN = -100 # Wargoal value cannot be lower than this
	AI_PEACE_AGREEMENT_WARGOAL_VALUE_MAX = 100	# Wargoal value cannot be higher than this
	AI_PEACE_AGREEMENT_WARGOAL_VALUE_SCALED = 1.0	# 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 = 2 # For each wargoal we have that's being pressed, apply wargoal value * this
	AI_PEACE_AGREEMENT_ENEMY_WARGOAL_SELF_MULT = -2 # 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 = 2 # Value of wargoals held by enemy that aren't being contested is multiplied by this
	AI_PEACE_AGREEMENT_ACHIEVABLE_ALLY_WARGOAL = -2.0 # 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 = -1.0 # 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 = -0
	AI_CAPITULATE_WAR_LEADER_FACTOR = 0 # If warleader
	AI_CAPITULATE_WAR_SUPPORT_FACTOR = -0.5
	AI_CAPITULATE_SELF_WARGOAL_FACTOR = -20 # For each wargoal we hold in the war
	AI_CAPITULATE_ENEMY_WARGOAL_FACTOR = -40 # For each wargoal targeting us in the war
	AI_CAPITULATE_PEACE_DESIRE_FACTOR = 1.0 # Peace desire is multiplied by this when added to capitulation score

	AI_MONTHS_OF_REDUCED_PEACE_DESIRE = 6 # 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 = 25 # 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 = 100 # Add this amount of peace desire at 100% debt level
	AI_PEACE_DESIRE_FROM_BANKRUPTCY = 500 # Add this amount of peace desire when bankrupt
	AI_PEACE_DESIRE_FROM_GOLD_RESERVES = -50 # 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

	AUTONOMOUS_TRADE_RANDOM_FACTOR = 0.5		# The higher this is, the more random autonomous trade will be in goods selection
	AUTONOMOUS_TRADE_STICKYNESS = 1.25 			# A new trade has to generate at least this many times more revenue to replace an older trade when trade capacity is fully used up
	AUTONOMOUS_TRADE_WEEKS_BEFORE_TRADE_REDUCTION = 8 # For this many weeks after increasing trade in a good, a state won't reduce the trade volume for that same good, so that effects such as goods substitution have time to kick in
	AUTONOMOUS_TRADE_MIN_DESIRABILITY_PER_QUANTITY_TO_MAINTAIN_TRADE = 25 # If a current trade has lower desirability than this per base traded quantity, decrease trade volume
	AUTONOMOUS_TRADE_MIN_DESIRABILITY_PER_QUANTITY_TO_INCREASE_TRADE = 50 # If a new trade has lower desirability than this per base traded quantity, don't increase trade volume
	AUTONOMOUS_TRADE_MIN_DESIRABILITY_INITIALIZATION_MULTIPLIER = 0.75 # During bookmark initialization, desirability requirements for trade are multiplied by this

	TRADE_VALUE_DELTA_FACTOR = 3.0							# When calculating treaty trade value, the delta between production/consumption counts for this much more than base production/consumption values
	TRADE_VALUE_BASE_MULTIPLIER = 0.001							# Base multiplier applied to the value for treaty trade based purely on production & consumption
	TRADE_VALUE_RELATIVE_MULTIPLIER = 100						# Relative multiplier applied to the value for treaty trade and divided by the total value in the market
	TRADE_VALUE_FAVORED_GOODS_DIRECTION_MULT = 1.25 			# Potential for trading a good is multiplied by this when determining AI trade value, if the trade direction matches the AI's goods stance
	TRADE_VALUE_DISFAVORED_GOODS_DIRECTION_MULT = 0.25 			# Potential for trading a good is multiplied by this when determining AI trade value, if the trade direction is opposite of the AI's goods stance

	MIN_RANK_TO_FORM_POWER_BLOC = 5						# 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
}

NGame = {
	MAX_NUMBER_OF_AUTOSAVES = 10 	# The game will only keep the MAX_NUMBER_OF_AUTOSAVES latest autosaves.
}

NCountry = {
	CONSTRUCTION_QUEUE_INCREMENT_SHIFT = 5  # Increment/Decrement used for buildings construction queue when holding down Shift
	CONSTRUCTION_QUEUE_INCREMENT_CONTROL = 10 # Increment/Decrement used for buildings construction queue when holding down Ctrl
	WEEKS_TO_STORE_LOYALIST_RADICAL_STATISTICS = 52 # Number of weeks of statistics for loyalists/radicals that is stored and shown
	INCORPORATION_TIME_SAME_CULTURE = 1				# Years if the state is a Homeland of one of the country's primary cultures
	INCORPORATION_TIME_SAME_HERITAGE = 5			# Years if the state is a Homeland of a culture that matches of one of the country's primary cultures' Heritage traits
	INCORPORATION_TIME_SAME_TRAIT = 5				# Years if the state is a Homeland of a culture with any trait in common with a country's primary cultures
	INCORPORATION_TIME_NO_MATCH = 20				# Years if the state's Homeland cultures have nothing in common with the country's primary cultures
	INCORPORATION_TIME_MIN_MULTIPLIER = 0.1			# Incorporation speed cannot be reduced below this by modifiers
}

NPolitics = {
	IG_APPROVAL_FROM_LOYALISTS = 5		# If 100% of the political strength of the IG is loyalist, change approval by this amount
	IG_APPROVAL_FROM_RADICALS = -10		# If 100% of the political strength of the IG is radical, change approval by this amount

	STATE_BUREAUCRACY_BASE_COST = 0		# The base cost per incorporated state
	STATE_BUREAUCRACY_POP_BASE_COST = 5		# The base BUR multiplier per population multiple
	STATE_BUREAUCRACY_POP_MULTIPLE = 100000	# Number of people BUR cost is based on
	MINIMUM_INVESTMENT_COST = 1			# The absolute minimum cost in BUR per investment level

	IG_SUPPRESSION_COST = 50						# The amount of AUT it costs to Suppress an IG
	IG_BOLSTER_COST = 50							# The amount of AUT it costs to Bolster an IG
	DEFAULT_GOODS_TAX_COST = 50					# The amount of AUT it costs to tax a good by default

	LEGITIMACY_PENALTY_FOR_EACH_EXCESS_ENTITY = 30		# How much Legitimacy is lost for each group in government above the allowance determined by country_legitimacy_govt_size_add
}

NEconomy = {
	MIN_CONSTRUCTION_EFFICIENCY = 0.05					# Construction efficiency cannot go below this amount

	# The more times you run this the more accurate setup will be for Pop wealth compared to income
	NUM_TIMES_TO_INITIALIZE_WEALTH = 10
	NUM_TIMES_TO_UPDATE_TRADE_DURING_INITIALIZATION = 10 # Extra times that separate trade update step is run
	
	COUNTRY_GDP_MODIFIER_DIVISOR = 1000					# Scale the country_gdp static modifier by this divisor
	COUNTRY_GDP_MODIFIER_MAX_MULTIPLIER = 10000000		# The country_gdp modifier multiplier cannot be higher than this
	
	ECONOMY_OF_SCALE_START_LEVEL = 1					# Level at which buildings start getting economy of scale bonuses. Levels lower than this value provide no bonus [>=1]
	ECONOMY_OF_SCALE_NATIONALIZED_FRACTION_MULT = 1	# Non-government building economy of scale modifier if multiplied by (1 - the fraction of nationalized levels * this)
	
	IN_DEFAULT_MINIMUM_PENALTY_SCALE = 0.025				# This amount of the 'in default' throughput penalty is applied right away
	IN_DEFAULT_DAYS_TO_FULL_PENALTY = 39				# How many days of being in default does it take to get the full throughput penalty
	DECLARE_BANKRUPTCY_PENALTY_DURATION_YEARS = 5		# How many years does it take for penalties from declaring bankruptcy to fully decay
	DECLARE_BANKRUPTCY_RADICALIZATION_SHARES_FACTOR = 0.2 # For each per-pop shares in their building, radicalize this percentage of a pop on declaring bankruptcy
	DECLARE_BANKRUPTCY_RADICALIZATION_SHARES_FACTOR = 0.05 # For each per-pop shares in their building, radicalize this percentage of a pop on declaring bankruptcy

	AUTO_DOWNSIZE_BUILDING_MIN_EMPTY_PRIVATE_LEVELS = 1.0							# A (non Trade Center) building must be missing at least this many privately held levels of employment to start considering auto-downsizing (both this and the below requirement are applied)
	AUTO_DOWNSIZE_BUILDING_MIN_EMPTY_FRACTION = 0.6						# A (non Trade Center) building must be missing at least this many levels of employment (in relative numbers) to start considering auto-downsizing (both this and the above requirement are applied)
	AUTO_DOWNSIZE_BUILDING_MIN_UNUSED_TRADE_CAPACITY_FRACTION = 0.1				# A Trade Center must have at least this much unused Trade Capacity (as a fraction of the whole) to consider auto downsizing
	AUTO_DOWNSIZE_BUILDING_MIN_UNUSED_TRADE_CAPACITY = 20						# A Trade Center must have at least this much unused Trade Capacity (in absolute numbers) to consider auto downsizing
	AUTO_DOWNSIZE_BUILDING_MONTHS_TO_WAIT = 60							# After a building decides to start auto-downsizing, wait this many months before actually starting to downsize, in case conditions change

	MIN_GOODS_PRICE	= 1							# A good cannot have a lower base price than this
	PRICE_RANGE = 0.75							# min price of a good is base * (1 - PRICE_RANGE), Max price is base * (1 + PRICE_RANGE), PRICE_RANGE is locked to [0-1]
	BUY_SELL_DIFF_AT_MAX_FACTOR = 3				# the difference between buy/consumption and sell/production at min/max pricing, e.g. if set to 4 then if buy orders are 4x sell orders price is maxed

	GOODS_SHORTAGE_PENALTY_THRESHOLD = 0.33		# If supply / demand is lower than this, start applying output penalties, by default this should be ( 1 / BUY_SELL_DIFF_AT_MAX_FACTOR )
	GOODS_SHORTAGE_PENALTY_INCREASE_SPEED = 0.01  	# Goods shortage penalty increases by this fraction of the target each day
    GOODS_SHORTAGE_PENALTY_DECREASE_SPEED = 0.01  	# Goods shortage penalty goes down by this fraction of GOODS_SHORTAGE_PENALTY_MAX each day
    GOODS_SHORTAGE_PENALTY_MIN = 0.01			# Goods shortage penalty can't be lower than this if there is any shortage
	GOODS_SHORTAGE_PENALTY_MAX = 1.0			# Goods shortage penalty can't be higher than this, so long as all the input goods exist in some quantity
	GOODS_SHORTAGE_PENALTY_MISSING_INPUTS = 1.0  # This penalty is applied when an input good is missing entirely from local supply
	GOODS_SHORTAGE_PENALTY_MILITARY_BUILDING_SPEED_MULT = 5.0 # Shortage penalties increase and decrease at this multiplier rate for military buildings

	MINIMUM_GOODS_TRADED_QUANTITY = 1 # Traded quantity for a good can never be lower than this

	# The below value exists to ensure the world market imports are seeded with 'new' goods by adding the trade quantity of the good * times this to world market demand
	# This is so that it's always profitable to be the first country exporting something
	WORLD_MARKET_GOODS_DEMAND_BUFFER = 20

	# How many days must pass between updating trade potential in states that do not have a Trade Center
	# The lower this is the more recent data the AI will have for evaluating new Trade Center construction, but performance will be impacted
	NON_TRADE_CENTER_STATE_TRADE_POTENTIAL_UPDATE_FREQUENCY = 28

	# This much of relative advantage translates into a multiplier on price
	# Applied to the delta between relative advantage and 1
	# For example, if TRADE_CENTER_ADVANTAGE_PRICE_MULTIPLIER is 0.5 and relative advantage is 2, then the price multiplier is 1 + ( ( 2 - 1 ) * 0.5 ) = 1.5
	TRADE_CENTER_ADVANTAGE_PRICE_MULTIPLIER = 0.2

	TRADE_CENTER_ADVANTAGE_BASE = 200 										# Base amount of advantage that Trade Centers have
	TRADE_CENTER_ADVANTAGE_MARKET_AREA_PRODUCTION_FACTOR = 200 				# Trade Centers get this amount of export advantage for market area production (scaled against global production/consumption, multiplied by Market Access)
	TRADE_ADVANTAGE_COMPANY_CHARTER_FACTOR = 50								# Company charters get this amount of export advantage for market production
	TRADE_CENTER_ADVANTAGE_MARKET_PRESTIGE_GOOD_FACTOR = 100 				# Trade Centers get this amount of export advantage based on the fraction of goods production in their market that is prestige goods (prestige goods have no effect on import advantage)
	TRADE_CENTER_ADVANTAGE_TRADE_AGREEMENT_FACTOR = 100 					# Trade Centers get this amount of export/import advantage, scaled against % of opposite-direction trade is from markets covered by trade agreements
	TRADE_CENTER_ADVANTAGE_TREATY_PORT_FACTOR = 200 						# Trade Centers get this amount of export/import advantage, scaled against % of opposite-direction trade from Treaty Ports owned by their parent country

	# Only one of the penalties below is ever applied, in the following priority order: Embargo, War, Lack of Interest
	TRADE_CENTER_ADVANTAGE_NO_INTEREST_FACTOR = -50 						# Trade Centers lose this amount of export/import advantage, scaled against % of opposite-direction trade is from markets where the owner has no interest
	TRADE_CENTER_ADVANTAGE_AT_WAR_FACTOR = -75 								# Trade Centers lose this amount of export/import advantage, scaled against % of opposite-direction trade is from markets where the owner is at war with the market controller
	TRADE_CENTER_ADVANTAGE_EMBARGO_FACTOR = -100							# Trade Centers lose this amount of export/import advantage, scaled against % of opposite-direction trade is from markets where the owner is embargoed by the market controller

	# Weights for Trade Center preference in importing/exporting to other specific Trade Centers
	TRADE_CENTER_PREFERENCE_BASE = 1										# Base weight in preference for each other Trade Center
	TRADE_CENTER_PREFERENCE_SAME_POWER_BLOC_MULTIPLIER = 0.5				# Added to weight multiplier if both Trade Centers are part of the same Power Bloc
	TRADE_CENTER_PREFERENCE_TRADE_AGREEMENT_MULTIPLIER = 4.0				# Added to weight multiplier for each Trade Agreement between the two countries
	TRADE_CENTER_PREFERENCE_EMBARGO_DIVISOR = 2.0							# Added to weight divisor for each Embargo between the two countries
	TRADE_CENTER_PREFERENCE_NO_INTEREST_DIVISOR = 0.25						# Added to weight divisor for each side that lacks an Interest in the other's market
	TRADE_CENTER_PREFERENCE_DISTANCE_DIVISOR = 0.25							# Weight is divided by 1 + ( distance in sea nodes * this ) between the two Trade Centers' hubs, this is done last after other multipliers/divisors

	MARKET_SHARE_FROM_GDP = 1.0					# Get this many points of market share per pound of GDP in states
	MARKET_SHARE_MARKET_CONTROLLER_FACTOR = 1.33	# Market controller's market points count for this much more
	MARKET_SHARE_MARKET_ACCESS_BASE = 0.5		# How much of market points is always gained regardless of market access
	MARKET_SHARE_MARKET_ACCESS_SCALED = 0.5		# How much of market points is gained based on market access

	COUNTRY_MIN_CREDIT_BASE = 10000			# Added to the total Building Cash Reserves to determine credit limit (base)
	COUNTRY_MIN_CREDIT_SCALED = 0.1 			# Added to the total Building Cash Reserves to determine credit limit (multiplied by GDP)
	CREDIT_RATIO_MAX_OVERRUN = 0.5 			# Countries can accumulate this percentage more of a debt "hole" than their credit limit when in default
	GOLD_RESERVE_RATIO_AT_START = 0.2	# Unless a country history's 'treasury' parameter is set to a non-zero value, countries start with this ratio of their gold reserve in gold
	

	MINIMUM_EMPLOYEES = 100						# If a building has fewer employees than this, it will always attempt to hire
	BUILDING_RAISE_WAGES_DIVIDEND_INCOME_FACTOR = 0 # A pop with dividend income has its wealth multiplied by 1 - ( the fraction of their income that is dividends * this ) to ensure buildings don't start wage dumping just because all employees are getting dividends
	BUILDING_RAISE_WAGES_MIN_RELEVANT_POP_SIZE = 50 # Pops with less workforce than this are ignored when checking whether a profitable building should raise wages because of radicalizing workers
	BUILDING_RAISE_WAGES_DISCRIMINATION_FACTOR = 1 # Profitable buildings only care to raise wages for discriminated pops if their wealth to expected SoL ratio is less than this
	BUILDING_LOWER_WAGES_TARGET_WEALTH_MULT = 1.2 # Buildings will consider lowering wages if all significant pops working in them have this * the target wealth to expected SoL ratio
	BUILDING_MIN_EARNINGS_TO_HIRE_EMPLOYEES = 1  # Non-subsidized buildings will not hire if it would result in their annual earnings/employee falling below this threshold
	BUILDING_PROFIT_TARGET_TO_RAISE_WAGES = 0.3		# Required profit margin to consider raising wages for SoL or employment reasons, with BUILDING_WEEKS_BETWEEN_PAY_CHANGES weeks cooldown
	BUILDING_PROFIT_TARGET_TO_LOWER_WAGES = 0.1	# If profit margin is this or below, consider lowering wages for SoL or employment reasons, with BUILDING_WEEKS_BETWEEN_PAY_CHANGES weeks cooldown
	BUILDING_PROFIT_TARGET_TO_WITHDRAW_CASH = 0.2	# If profit margin is this or below, buildings should withdraw money from the cash reserves to make up the difference
	OWNERSHIP_BUILDING_PROFIT_TARGET_TO_RAISE_WAGES = 0.3	# Overrides BUILDING_PROFIT_TARGET_TO_RAISE_WAGES for buildings that own other buildings
	OWNERSHIP_BUILDING_PROFIT_TARGET_TO_LOWER_WAGES = 0.1	# Overrides BUILDING_PROFIT_TARGET_TO_LOWER_WAGES for buildings that own other buildings
	OWNERSHIP_BUILDING_PROFIT_TARGET_TO_WITHDRAW_CASH = 0.2	# Overrides BUILDING_PROFIT_TARGET_TO_WITHDRAW_CASH for buildings that own other buildings
	SUBSISTENCE_BUILDING_PROFIT_TARGET_TO_RAISE_WAGES = 0.3	# Overrides BUILDING_PROFIT_TARGET_TO_RAISE_WAGES for subsistence buildings
	SUBSISTENCE_BUILDING_PROFIT_TARGET_TO_LOWER_WAGES = 0.1	# Overrides BUILDING_PROFIT_TARGET_TO_LOWER_WAGES for subsistence buildings
	SUBSISTENCE_BUILDING_PROFIT_TARGET_TO_WITHDRAW_CASH = 0.2	# Overrides BUILDING_PROFIT_TARGET_TO_WITHDRAW_CASH for subsistence buildings
	BUILDING_MAX_EMPLOYMENT_FRACTION_TO_RAISE_WAGES = 0.9 # If the employment fraction of a building is above this, don't raise wages just to try and snipe employees from other buildings
	BUILDING_WEEKS_BETWEEN_PAY_CHANGES = 8		# Cooldown between changes in pay, so buildings don't overcompensate for a temporary change in circumstances. If the building is unprofitable it uses BUILDING_WEEKS_BETWEEN_PAY_CHANGES_WHEN_UNPROFITABLE instead.
	BUILDING_WEEKS_BETWEEN_PAY_CHANGES_WHEN_UNPROFITABLE = 4 # Cooldown between changes in pay, so buildings don't overcompensate for a temporary change in circumstances. Only used when unprofitable.
	MIN_RAISE_TO_HIRE = 0.2					# The minimum required increase in wages for an employee to switch jobs (1.0 = +100% = x2)
	SUBSISTENCE_OUTPUT_AVERAGE_WAGE_RATE_FACTOR = 150   # Each 1.0 of subsistence output counts as this much wage rate when setting normal wages
	PEASANT_STARTING_WAGE_RATE_FACTOR = 1.0		# For the sake of calculating starting normal wages, treat peasants as having this pop type wage multiplier
	STARTING_WAGE_RATE_MULTIPLIER = 0.5			# Starting wage rate is multiplied by this (for easy balancing)
	STARTING_WAGE_RATE_SUBSISTENCE_MULTIPLIER = 1.5		# STARTING_WAGE_RATE_MULTIPLIER is further multiplied by this for subsistence buildings
	GOLD_RESERVE_LIMIT_FACTOR = 1	# The base factor of annual GDP that should be provided as a Gold Reserve
	
	SLAVE_BASKET_DEFAULT = 5					# Default level of consumer goods that a building will buy for its slaves
	SLAVE_BASKET_MIN = 1						# Min level of consumer goods that a building will buy for its slaves (the highest of this and SLAVE_BASKET_SCALED_MIN is used)
	SLAVE_BASKET_MAX = 9						# Max level of consumer goods that a building will buy for its slaves (the lowest of this and SLAVE_BASKET_SCALED_MAX is used)
	SLAVE_BASKET_SCALED_MIN = 0.8				# Multiplied by lowest non-slave wealth in the building 
	SLAVE_BASKET_SCALED_MAX = 1				# Multiplied by lowest non-slave wealth in the building
	SLAVE_BASKET_SUBSISTENCE_GOODS_MULT = 0.25 	# Goods consumed for slaves in subsistence buildings are multiplied by this

	GOODS_DEFAULT_TRADE_QUANTITY = 10				# Base quantity traded by trade centers if not otherwise specified in goods type

	REINVESTMENT_EFFICIENCY_MAX = 2.0					# Maximum conversion of reinvestment to investment pool
	REINVESTMENT_BASE_EFFICIENCY_THRESHOLD = 100000000	# Below this amount of GDP, increase reinvestment multiplier on a linear scale up to REINVESTMENT_EFFICIENCY_MAX at 0
	REINVESTMENT_SUBSISTENCE_FRACTION_REDUCTION = 0.0	# Reinvestment from pops in ownership buildings is multiplied by ( 1 - this * the share of levels owned that are subsistence buildings )

	NATIONALIZATION_PER_LEVEL_COST = 2000				# How much it costs to nationalize one level of a building per construction point
	PRIVATIZATION_PER_LEVEL_COST = 800					# How much it costs to privatize one level of a building per construction point

	COMPANY_MINIMUM_LEVELS_PER_HQ = 1					# Minimum building levels per HQ required to establish or maintain a company
	BASE_REGIONAL_HQS = 1								# Base level of regional HQs available to a company after granted investment charter
	LEVELS_PER_REGIONAL_HQ = 1							# How many levels company needs to aquire to get a new regional HQ
	COMPANY_ON_ESTABLISH_COOLDOWN_MONTHS = 60			# Cooldown in months after establishing a company before you can disband it
	COMPANY_ON_DISBAND_COOLDOWN_MONTHS = 60				# Cooldown in months after disbanding a company before you can re-establish it

	BUILDING_LEVEL_BUREAUCRACY_COST = 0					# Cost of owning one level of the goverment building
	COLLECTIVIZATION_DEBT_RATIO = 1					# Ratio of the country max debt can be used for collectivizing
	MIN_COLLECTIVIZATION_BUDGET = 1000000				# Min size of a collectivizing budget
	DYNAMIC_INDUSTRY_CHARTER = no						# Do we want to use dynamic industry charter instead of scripted ones
	COMPANY_INFLUENCE_LEVEL_STEPS = { 10 25 50 100 250 500 }
	COMPANY_CHARTER_AUTHORITY_COST = 100				# Cost of establishing a company charter

	# Currently only used in loc, not logic
	HARVEST_CONDITION_MIN_INTENSITY = 0.0					# Lowest intensity value a harvest condition can roll ( 0 <= this < max)
	HARVEST_CONDITION_MAX_INTENSITY = 9.0					# Highest intensity value a harvest condition can roll (min < this)

	COMPANY_MONOPOLY_COOLDOWN_MONTHS = 60				# Cooldown in months after establishing a companies monopoly before you can revoke its monopoly
	COUNTRY_MONOPOLY_MAX_COUNT = 5						# Maximum number of country monopolies a country can have
	COUNTRY_MONOPOLY_AUTHORITY_COST = 100				# Cost of establishing a country monopoly

	WORLD_MARKET_MONOPOLY_MIN_SHARE	= 0.0				# For a market to be considered to have a world market monopoly, it has to control a greater share of exports than this
	MONOPOLY_PRICE_IMPACT = 0.0						# The price of a good is increased by this multiplier based on how much of its supply is considered to be under a monopoly

	PRIVATIZATION_DISCOUNT_MONOPOLY = 0.0				# The cost of privatizing a building is multiplied by this for companies with a monopoly on that building type
}

NMilitary = {
	MANPOWER_LOST_DUE_TO_ATTRITION_PER_WEEK_MIN = 0.03 	# The minimum percentage of manpower a unit can lose each week due to attrition
	MANPOWER_LOST_DUE_TO_ATTRITION_PER_WEEK_MAX = 0.01 	# The maximum percentage of manpower a unit can lose each week due to attrition
	MIN_USABLE_MANPOWER = 500	# Lowest manpower engaged in a battle limit (otherwise determined by combat width)
	COMBAT_UNITS_PER_LEVEL = 1						# Number of combat units each level of military building can support. Must be the same for all recruitable buildings (barracks/conscription centers/naval bases)
	BASE_MORALE_RECOVERED_PER_DAY = 0.01			# Default morale recovered is 3% per day

	CONVOY_RAIDING_STRENGTH_MULT = 0.1						# How strong each Convoy raiding point is ( num flotillas * ce offense )
	CONVOY_RAIDING_COOLDOWN_DAYS_MIN = 9					# Min days until the next convoy raiding in the sea node
	CONVOY_RAIDING_COOLDOWN_DAYS_MAX = 10					# Max days until the next convoy raiding in the sea node
	CONVOY_RAIDING_DAMAGE_MIN_RANDOM_FACTOR = 0.99			# Actual convoy raiding damage is scaled between CONVOY_RAIDING_DAMAGE_MIN_RANDOM_FACTOR and CONVOY_RAIDING_DAMAGE_MAX_RANDOM_FACTOR to provide some random variability
	CONVOY_RAIDING_DAMAGE_MAX_RANDOM_FACTOR = 1.0			# Actual convoy raiding damage is scaled between CONVOY_RAIDING_DAMAGE_MIN_RANDOM_FACTOR and CONVOY_RAIDING_DAMAGE_MAX_RANDOM_FACTOR to provide some random variability
	CONVOY_RAIDING_DEFENSE_MULT = 0.2						# How much is Convoy raiding strength reduced by patrolling flotillas  ( num flotillas * ce defense )
	CONVOY_RAIDING_MAX_DEFENSE = 0.99						# Example: the defender can never block more than 90% of the convoy damage they're currently taking

	## Convoy recovery rate after being raided is based on a global and a local rate, using whichever is lower
	CONVOY_RAIDING_GLOBAL_RECOVERY_RATE = 0.001				# The rate at which damaged convoys are replaced each day, relative to total number of produced convoys in the raided country
	CONVOY_RAIDING_LOCAL_RECOVERY_RATE = 0.001				# The rate at which damaged convoys are replaced each day, relative to total number of convoys passing through the sea node
	CONVOY_RAIDING_RECOVERY_RATE_PEACETIME_FACTOR = 5		# While a country is at peace, convoys will be restored this much faster

	INTERCEPTION_DELAY_BASE_DAYS = 1						# atleast this many days between each admiral interception attempt
	INTERCEPTION_DELAY_MAX_RANDOM_DAYS_FACTOR = 1			# up to this many extra days between each admiral interception attempt
	INTERCEPTION_BASE_CHANCE = 100							# base chance when trying to intercept enemy admirals

	BASE_BATTALION_CONVOY_COST = 5				# Cost in convoys per Battalion for shipping lanes

	MILITARY_FORMATION_ORGANIZATION_MAX = 100				# The maximum amount of Organization a Military Formation requires to be considered at full Organization
	MILITARY_FORMATION_ORGANIZATION_MIN = 0					# The minimum amount of Organization a Military Formation will always retain despite exceeding their Command Limit 
	MOBILIZATION_OPTION_DIFFERENCE_ORGANIZATION_IMPACT = 20 # The penalty to Organization gained for each difference by merging units between Formations with different Mobilization Options
	FLEET_PRESENCE_GAIN_PER_DAY = 1 						# The amount of Presence a Fleet gains per day while stationary in a Sea Node

	MILITARY_FORMATION_WEEKLY_MAX_UNIT_UPGRADES_ARMY = 0.02		# Each week a mobilized army can upgrade this (0.0-1.0) fraction of its total number of units.
	MILITARY_FORMATION_WEEKLY_MAX_UNIT_UPGRADES_FLEET = 0.02	# Each week a mobilized fleet can upgrade this (0.0-1.0) fraction of its total number of units.
}

NCharacters = {
}

NDiplomacy = {
	DIPLOMATIC_PACT_COST_DEFAULT = 0					# The default maintenance in Influence for a pact
	DIPLOMATIC_PACT_COST_MULT_FROM_INFAMOUS = 0.1		# Maintenance cost of a pact is increased by this when at Infamous level of infamy
	DIPLOMATIC_PACT_COST_MULT_FROM_NOTORIOUS = 0.25		# Maintenance cost of a pact is increased by this when at Notorious level of infamy
	DIPLOMATIC_PACT_COST_MULT_FROM_PARIAH = 0.5		# Maintenance cost of a pact is increased by this when at Pariah level of infamy

	INFAMY_THRESHOLD_INFAMOUS = 33			# Above this, countries are considered infamous and get related penalties
	INFAMY_THRESHOLD_NOTORIOUS = 66			# Above this, countries are considered notorious and get related penalties
	INFAMY_THRESHOLD_PARIAH = 100			# Above this, countries are considered pariah and get related penalties
	BASE_YEARLY_INFAMY_DECAY_RATE = 2.0 	# Decay rate of infamy per year
	
	SWAY_OFFER_TIMEOUT_DAYS = 14
	SWAY_OFFER_REJECTED_COOLDOWN_DAYS = 7 # Must wait this many days before trying to sway a country that rejected your previous sway
	SWAY_OFFER_CALL_IN_OBLIGATION_MANEUVERS_COST = 10
	SWAY_OFFER_OWE_OBLIGATION_MANEUVERS_COST = 10
	SWAY_OFFER_CALL_ALLY_MANEUVERS_COST = 10
	SWAY_OFFER_TRANSFER_STATE_MANEUVERS_COST = 10
	SWAY_OFFER_TRANSFER_SUBJECT_MANEUVERS_COST = 10
	SWAY_OFFER_BECOME_SUBJECT_MANEUVERS_COST = 20
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_JOIN_POWER_BLOC = 10
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_LEAVE_POWER_BLOC = 10
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_COLONIZATION_RIGHTS = 10
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_FORCE_NATIONALIZATION = 10
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_HUMILIATION = 10
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_UNIFICATION_LEADERSHIP = 30
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_OPEN_MARKET = 20
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_REGIME_CHANGE = 5
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_ANNEX_COUNTRY = 5
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_LIBERATE_COUNTRY = 40
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_MAKE_PROTECTORATE = 5
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_REDUCE_AUTONOMY = 5
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_INCREASE_AUTONOMY = 5
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_MAKE_TRIBUTARY = 5
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_MAKE_DOMINION = 5
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_CONQUER_STATE = 5
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_RETURN_STATE = 5
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_REVOKE_CLAIM = 1
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_REVOKE_ALL_CLAIMS = 0 # Can't be added, only for special plays
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_CONTAIN_THREAT = 60	
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_TRANSFER_SUBJECT = 5
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_LIBERATE_SUBJECT = 40
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_UNIFICATION = 60
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_INDEPENDENCE = 40
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_SECESSION = 100
    SWAY_OFFER_WARGOAL_MANEUVERS_COST_POPULATION_SCALING_FACTOR = 125000 # The amount of population by which the factor below is multiplied
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_POPULATION_SCALING_MULTIPLIER = 0.2 # For each SWAY_OFFER_WARGOAL_MANEUVERS_COST_POPULATION_SCALING_FACTOR population in a country/state, multiply maneuvers cost by this
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_POPULATION_SCALING_MULTIPLIER_MAX_PER_STATE = 4 	# Maneuvers population multiplier can't be higher than this for each state affected
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_POPULATION_SCALING_MULTIPLIER_MAX_TOTAL = 8 # Maneuvers population multiplier can't be higher than this, regardless of number of states affected
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_HOMELAND_FACTOR = -0.25 # Maneuvers cost is adjusted by this if the states taken/puppeted etc are Homelands of the aggressor
	SWAY_OFFER_WARGOAL_MANEUVERS_COST_UNINCORPORATED_FACTOR = -0.25 # Maneuvers cost is adjusted by this if the states taken/puppeted etc are unincorporated

	MAKE_WARGOAL_PRIMARY_DEMAND_MANEUVERS_COST = 0.5 	# Fraction of the wargoal's base maneuver cost that it costs to turn it into a primary demand
	MAKE_WARGOAL_PRIMARY_DEMAND_INFAMY_AMOUNT = 0.5 	# Fraction of the wargoal's base infamy that is accured when you turn it into a primary demand
	
	ALLY_WARGOAL_MAX_MANEUVERS_COST = 20				# When an ally adds a 'free' wargoal in a play, it cannot have a maneuvers cost higher than this

	WAR_GOAL_INFAMY_POPULATION_SCALING_FACTOR = 125000 # The amount of population by which the factor below is multiplied
	WAR_GOAL_INFAMY_POPULATION_SCALING_MULTIPLIER = 1 # For each WAR_GOAL_INFAMY_POPULATION_SCALING_FACTOR population in a country/state, multiply infamy by this
	WAR_GOAL_INFAMY_POPULATION_SCALING_MULTIPLIER_MAX_PER_STATE = 20 # Infamy population multiplier can't be higher than this for each state affected
	WAR_GOAL_INFAMY_POPULATION_SCALING_MULTIPLIER_MAX_TOTAL = 40 # Infamy population multiplier can't be higher than this, regardless of number of states affected
	WAR_GOAL_INFAMY_HOMELAND_FACTOR = -0.25 # Infamy is adjusted by this if the states taken/puppeted etc are Homelands of the aggressor
	WAR_GOAL_INFAMY_UNINCORPORATED_FACTOR = -0.25 # Infamy is adjusted by this if the states taken/puppeted etc are unincorporated
	WAR_GOAL_INFAMY_REBELLING_SUBJECT_MULT = 2 # Infamy is multiplied by this for wargoals targeting a rebellious subject
	WAR_GOAL_INFAMY_LOW_LIBERTY_DESIRE_SUBJECT_MULT = 1 # Infamy is multiplied by this for wargoals targeting a subject whose LD is below WAR_GOAL_INFAMY_LOW_LIBERTY_DESIRE_THRESHOLD
	WAR_GOAL_INFAMY_LOW_LIBERTY_DESIRE_THRESHOLD = 25 # Threshold for WAR_GOAL_INFAMY_LOW_LIBERTY_DESIRE_SUBJECT_MULT
	WAR_GOAL_INFAMY_RELATIONS_TARGET_IMPACT = -1 # Each point of infamy generated by an incident also has this impact on relations with the target
	WAR_GOAL_INFAMY_RELATIONS_INTEREST_IMPACT = -0.5 # Each point of infamy generated by an incident also has this impact on relations with countries that have an interest in the target 
	
	WAR_GOAL_INFAMY_CONQUER_STATE = 1
	WAR_GOAL_INFAMY_RETURN_STATE = 0.5
	WAR_GOAL_INFAMY_MAKE_PROTECTORATE = 1
	WAR_GOAL_INFAMY_MAKE_TRIBUTARY = 1
	WAR_GOAL_INFAMY_MAKE_DOMINION = 2.0
	WAR_GOAL_INFAMY_REDUCE_AUTONOMY = 0.1
	WAR_GOAL_INFAMY_TRANSFER_SUBJECT = 1
	WAR_GOAL_INFAMY_ANNEX_COUNTRY = 0.3
	WAR_GOAL_INFAMY_REGIME_CHANGE = 0.1
	WAR_GOAL_INFAMY_FORCE_NATIONALIZATION = 0.5

	WAR_GOAL_INFAMY_DIPLO_PLAY_BACK_DOWN_REFUND = -0.25 # Refund of infamy for war goals that are dropped due to one side backing down in a diplo play (applied to initiator/target)
	WAR_GOAL_INFAMY_DIPLO_PLAY_BACKER_REFUND = -0.25 	# Refund of infamy for war goals that are dropped for backers in a diplo play (due to play not escalating to war or backer switching sides)
	WAR_GOAL_INFAMY_PEACE_REFUND = -0.25 				# Refund of infamy for war goals that are dropped due to a country capitulating or negotating peace without enforcing their wargoal
	WAR_GOAL_INFAMY_REDUCTION_FOR_TARGET = -0.25 		# This much of a war goal's infamy value is removed from the target when target has it enforced on them

	BASE_WAR_SUPPORT = 200
	MAX_WAR_SUPPORT = 200
	MIN_WAR_SUPPORT = 0

	PRESTIGE_FROM_COUNTRY_GDP_DIVISOR = 1000000
	PRESTIGE_FROM_COUNTRY_GDP = 2 # Per PRESTIGE_FROM_COUNTRY_GDP_DIVISOR GDP
	PRESTIGE_FROM_SUBJECT_GDP = 1 # Per PRESTIGE_FROM_COUNTRY_GDP_DIVISOR GDP in subjects
	PRESTIGE_FROM_ARMY_POWER_PROJECTION = 0.01 # Per point of power projection from army combat power
	PRESTIGE_FROM_NAVY_POWER_PROJECTION = 0.05 # Per point of power projection from navy combat power
	PRESTIGE_FROM_SUBJECT_ARMY_POWER_PROJECTION = 0.005 # Per point of power projection from army combat power in subjects
	PRESTIGE_FROM_SUBJECT_NAVY_POWER_PROJECTION = 0.01 # Per point of power projection from navy combat power in subjects

	INTEREST_NUM_DAYS_CHANGE = 3
}

NPowerBlocs = {
	MIN_MEMBERS = 1 					# This is the minimum number of members that the bloc needs to have to be considered active. Members include the leader.
}

NPops = {
	ALLOW_ASSIMILATION_IN_HOMELANDS = yes		# Can pops assimilate when living in their homelands?
	ASSIMILATION_RATE = 0.001	# Percentage of pops who will Assimilate into a different Culture each month, if eligible
	MIN_ASSIMILATION = 20	# If there is any assmiliation at least this many people will assimilate

	CONVERSION_RATE = 0.0005	# Percentage of pops who will Convert into a different Religion each month, if eligible
	MIN_CONVERSION = 10			# If there is any conversion at least this many people will convert

	OBSESSION_DEMAND_MIN = 1.0					# The minimum relative demand of an obsession (overrides min demand in buy package goods categories)
	OBSESSION_DEMAND_MULT = 2.0					# Demand of an obsession is multiplied by this
	MIN_POPS_FOR_NEW_OBSESSION = 1000			# At least this many pops of a culture must live in a market to get an obsession from its goods
	MIN_SUPPLY_LEVEL_FOR_NEW_OBSESSION = 0.2	# Supply needs to be at least this times the demand
	MIN_DEMAND_VALUE_FOR_NEW_OBSESSION = 1000	# At this amount of (number of units * goods base price) needs to be demanded in a market to create a new obsession
	MAX_NUM_OBSESSIONS = 3						# A culture can only have this number of obsessions at the same time
	OBSESSION_SPAWN_CHANCE = 10					# Per year (1.0 = 1%), multiplied by goods supply and market size mult
	OBSESSION_SPAWN_CHANCE_MAX_SUPPLY_MULT = 3.0		# Supply relative to demand above this isn't factored into spawn chance
	TABOO_DEMAND_MULT = 2						# Demand of a taboo is multiplied by this

	WORKING_ADULT_RATIO_BASE = 0.3	# Base ratio of working adults to dependents, this can be overridden by pop type definition and country modifiers.

	##### MIGRATION #####

	## General ##
	MIGRATION_MIN_STATE_POPS = 20000											# A state with less population than this will not get emigration
	MIGRATION_STATE_POPULATION_THRESHOLD = 100000								# States with less pops than this have reduced market emigration numbers to avoid total depopulation
	MIGRATION_MAX_PER_STATE_BASE = 500											# No more than this amount of people can move from or to a state in a single week (base)
	MIGRATION_MAX_PER_STATE_INFRASTRUCTURE = 5									# No more than this amount of people can move from or to a state in a single week (scales with infrastructure)
	MIGRATION_MAX_EMIGRATION_AS_POPULATION_FRACTION = 0.005						# Max emigration per week is clamped to this fraction of a state's population
	MIGRATION_MAX_PER_STATE_UNEMPLOYMENT_ORIGIN_FRACTION = 0.05					# The amount of unemployed workers in a state * this value is added to how many people can move from it (after clamping from MIGRATION_MAX_EMIGRATION_AS_POPULATION_FRACTION)
	MIGRATION_MAX_PER_STATE_UNEMPLOYMENT_TARGET_FRACTION = 0.05					# The amount of unemployed workers in a state * this value is removed from how many people can move to it (after clamping from MIGRATION_MAX_EMIGRATION_AS_POPULATION_FRACTION)

	## Migration Attraction ##
	MIGRATION_PULL_EMPTY_STATE = 100											# If a state has no pops at all, give it a huge migration pull
	MIGRATION_PULL_FROM_LIVING_STANDARD = 4										# Migration pull from each point of average living standard in target state
	MIGRATION_PULL_FROM_AVAILABLE_EMPLOYMENT = 2								# Migration pull is increased by for each 10k available non subsistence jobs
	MIGRATION_PULL_FROM_AVAILABLE_EMPLOYMENT_MAX = 40							# Migration pull from available non subsistence jobs cannot exceed this
	MIGRATION_PULL_FROM_AVAILABLE_ARABLE_LAND_MAX_EMPLOYMENT_MULTIPLIER = 0.2	# Count available arable land as though the subsistence farm has only this fraction of its max employment, so that massive states in China with mostly full subsistence farms don't get a huge migration boost
	MIGRATION_PULL_FROM_AVAILABLE_ARABLE_LAND_EMPLOYMENT = 2					# Migration pull is increased by for each 10k available subsistence jobs
	MIGRATION_PULL_FROM_AVAILABLE_ARABLE_LAND_EMPLOYMENT_MAX = 40				# Migration pull from available subsistence jobs cannot exceed this
	MIGRATION_PULL_REDUCTION_FROM_UNEMPLOYMENT = 1								# Migration pull is reduced by this for each 10k unemployed pops
	MIGRATION_PULL_REDUCTION_FROM_UNEMPLOYMENT_MAX = 40							# Migration pull reduction from unemployment cannot exceed this

	##### End Migration #####

	EXPECTED_SOL_FROM_LITERACY_SUBSISTENCE_MULT = 0	# Expected SoL from literacy is multiplied by this for Pops working in subsistence buildings

	JOB_SATISFACTION_BASE = -120							# Base job satisfaction
	JOB_SATISFACTION_FOR_NEWLY_HIRED = 1000					# Job satisfaction gained due to having been newly hired, this state lasts until the pop's next wealth calculation
	JOB_SATISFACTION_PER_SOL_ABOVE_EXPECTED_SOL = 5			# Job satisfaction gained per level of SoL above your expected SoL
	JOB_SATISFACTION_PER_SOL_ABOVE_STATE_STRATA_SOL = 1		# Job satisfaction gained per level of SoL above the state average for your strata
	JOB_SATISFACTION_PER_SOL_ABOVE_COUNTRY_STRATA_SOL = 1	# Job satisfaction gained per level of SoL above the country average for your strata
	JOB_SATISFACTION_PER_PERCENT_WAGE_RATE_ABOVE_NORMAL = 0.5	# Job satisfaction gained per pound of workplace wage rate (weekly wage of 10k laborers) above country normal
	JOB_SATISFACTION_FROM_CAN_AFFORD_EXPENSES = 100		# Job satisfaction gained from being able to afford your bug package (and taxes)
	JOB_SATISFACTION_FROM_CANNOT_AFFORD_EXPENSES = -10		# Job satisfaction gained from not being able to afford your bug package (and taxes)
	JOB_SATISFACTION_PER_PERCENT_HIGHER_STRATA_QUALIFICATION = -0.5 # Job satisfaction gained per percent of workforce qualified for a higher strata. Note that qualifications are assumed to overlap and the largest qualification is used in this calculation
	JOB_SATISFACTION_FROM_EMPLOYMENT = 100					# Job satisfaction gained from having a job
	JOB_SATISFACTION_DIVIDENDS_MAX_MULT = 5					# Max multiplier from the ratio between pop dividends and wages
	JOB_SATISFACTION_DIVIDENDS_BASE = 50					# Base value to be multiplied by the ratio between dividends and wages
	JOB_SATISFACTION_LOSSES_MIN_MULT = -5					# Min multiplier from the ratio between pop losses and wages (or if you will, max magnitude)
	JOB_SATISFACTION_LOSSES_BASE = 50						# Base value to be multiplied by the ratio between losses and wages 
	JOB_SATISFACTION_GOVERNMENT = 50							# Government jobs need a bit more stability
}

### Pop Growth Constants
## Base Values per month
@min_birthrate = 0.00051			# Minimum base birthrate per month (at POP_GROWTH_STABLE_SOL)
@max_birthrate = 0.00408			# Maximum base birthrate per month (at SOL = 0 if not modified by malnourishment)
@min_mortality = 0.00050			# Minimum base mortality per month (at POP_GROWTH_STABLE_SOL)
@max_mortality = 0.00800			# Maximum base mortality per month (at SOL = 0 if not modified by malnourishment)

## SoL Thresholds
@pop_growth_equilibrium_sol = 5		# Equilibrium is pops stop starving and where growth first becomes positive
@pop_growth_transition_sol = 10     # Transition determines how long birthrate "lags" behind mortality before starting to drop. Setting to same as equilibrium leads to no "lag" (only matters for birthrate)
@pop_growth_max_sol = 20			# Growth Max is where net growth generally is at it's highest (only matters for mortality)
@pop_growth_stable_sol = 99			# Stable is where birthrate and mortality stop changing and hit their minimum values

NPops = {

}

NTechnology = {
	TECH_AHEAD_OF_TIME_PENALTY_FACTOR = 0.1	# For every tech in a previous era not already researched in this category, take this multiple of the cost as an additional penalty (multiplied by number of eras between the techs)
}

NCharacters = {

}

NBattle = {
	
}

NWar = {
	AUTO_CAPITULATE_WAR_SUPPORT = 0			# When war support is this low, the country will auto capitulate
	DAYS_BETWEEN_WAR_EXHAUSTION = 14		# Every this many days war support will be reduced by the war exhaustion formula
	WAR_EXHAUSTION_BASE = 0
	WAR_EXHAUSTION_KIA_FACTOR = 15	# Scaled by casualties compared to total manpower
	WAR_EXHAUSTION_KIA_BASE_MULTIPLIER = 0.05	#was 0.1  # War Exhaustion from casualties is always multiplied by at least this
	WAR_EXHAUSTION_KIA_BATTLES_LOST_MULTIPLIER = 0.07	#was 0.25	# At 100% of battles lost by our side, War Exhaustion from casualties is further multiplied by this
	WAR_EXHAUSTION_CONTESTED_ENEMY_WARGOALS = 1	#was 1 
	OCCUPATION_STATE_INCORPORATED_WEIGHT = 1 # Must be greater than or equal to 1
    OCCUPATION_STATE_DEFENSIVE_BATTLE_VICTORY_SCORE = 100 # How many occupation "points" each country receives after winning a defensive battle
}
