# Add global variables here that will be available in all script files.
# @something = 42
# They can be overridden in each normal script file.

@discovery_weight = 3

# Habitat capital buildings - district slots per major celestial body
# Base value used in on_all_habitat_capital_buildings inline script (multiplied by capital-tier factor in districts_from_major_celestial_objects_value)
@hab_districts_per_major_body = 0.25
# Effective per-body value shown in tooltips, after tier multiplier (tier2 * 2, tier3+ * 3)
@hab_districts_per_major_body_tier2 = 0.50
@hab_districts_per_major_body_tier3 = 0.75
@hab_districts_per_major_body_tier4 = 1.00

@faction_improved_output = 					0.15
@faction_base_output = 						0.10
@faction_major_output = 					0.05
@faction_minor_output = 					0.025

@faction_extortion_energy_ratio = 			2.00
@faction_extortion_minerals_ratio = 		1.50
@faction_extortion_food_ratio = 			1.50
@faction_extortion_alloys_ratio = 			0.50
@faction_extortion_consumer_goods_ratio = 	1.00
@faction_extortion_research_ratio = 		0.125

@media_conglomerate_multiplier =			3
@crowdsourcing_multiplier =					2.5
@crowdsourcing_manifesti_multiplier =		5.00
@faction_extortion_crowdsourcing_ratio = 	3.75

@resettlement_energy = 100
@resettlement_energy_reduced = 50
@resettlement_unity = 10
@resettlement_unity_high = 25

# Edict and Campaign weights
@EdictHighPrio = 100
@EdictMedPrio = 10
@EdictLowPrio = 3

### CIVIC PICKS
@civic_default_random_weight = 5
@civic_uncommon_random_weight = 3
@civic_rare_random_weight = 1

### EVENT REWARDS

@tier1materialreward = 6
@tier1materialmin = 100
@tier1materialmax = 1000
@tier2materialreward = 12
@tier2materialmin = 150
@tier2materialmax = 2000
@tier3materialreward = 18
@tier3materialmin = 250
@tier3materialmax = 5000
@tier4materialreward = 24
@tier4materialmin = 350
@tier4materialmax = 10000
@tier5materialreward = 48
@tier5materialmin = 700
@tier5materialmax = 30000

@tier1influencereward = 6
@tier1influencemin = 40
@tier1influencemax = 100
@tier2influencereward = 12
@tier2influencemin = 80
@tier2influencemax = 175
@tier3influencereward = 18
@tier3influencemin = 125
@tier3influencemax = 250
@tier4influencereward = 24
@tier4influencemin = 150
@tier4influencemax = 300
@tier5influencereward = 36
@tier5influencemin = 250
@tier5influencemax = 500
@tier6influencereward = 48
@tier6influencemin = 300
@tier6influencemax = 600

@tier1researchreward = 12
@tier1researchmin = 250
@tier1researchmax = 100000
@tier2researchreward = 18
@tier2researchmin = 350
@tier2researchmax = 100000
@tier3researchreward = 24
@tier3researchmin = 500
@tier3researchmax = 1000000
@tier4researchreward = 48
@tier4researchmin = 1000
@tier4researchmax = 1000000
@tier5researchreward = 96
@tier5researchmin = 2000
@tier5researchmax = 2000000

@tier1unityreward = 6
@tier1unitymin = 100
@tier1unitymax = 100000
@tier2unityreward = 12
@tier2unitymin = 150
@tier2unitymax = 100000
@tier3unityreward = 18
@tier3unitymin = 250
@tier3unitymax = 1000000
@tier4unityreward = 24
@tier4unitymin = 350
@tier4unitymax = 1000000
@tier5unityreward = 48
@tier5unitymin = 700
@tier5unitymax = 2000000

### CONTACT PROJECTS

@tier1influencecontact = 6
@tier1influencecontactxenophile = 9
@tier1influencecontactmin = 20
@tier1influencecontactminxenophile = 30
@tier1influencecontactmax = 80
@tier1influencecontactmaxxenophile = 120
@tier2influencecontact = 10
@tier2influencecontactxenophile = 15
@tier2influencecontactmin = 40
@tier2influencecontactminxenophile = 60
@tier2influencecontactmax = 100
@tier2influencecontactmaxxenophile = 150

### MANDATES
@unityreward = 6
@unitymin = 50
@unitymax = 1000

### MARAUDERS
@raidcooldown = 600
@largemercallow = 9000
@largemerccost = -9000
@mediummercallow = 6500
@mediummerccost = -6500
@smallmercallow = 4000
@smallmerccost = -4000
@tributeallow = 500
@tributecost = -500
@tributefoodallow = 500
@tributefoodcost = -500
@tributeallowraided = 1000
@tributecostraided = -1000
@tributefoodallowraided = 1000
@tributefoodcostraided = -1000
@leaderallow = 2000
@leadercost = -2000
@raidallow = 3000
@raidcost = -3000
@raidhighallow = 5000
@raidhighcost = -5000

### UNREST EVENTS
@stabilitylevel1 = 10
@stabilitylevel2 = 25
@stabilitylevel3 = 40

### SHROUD EVENTS
@shroudreq1 = 3000
@shroudreq2 = 2500
@shroudreq3 = 2000
@shroudreq4 = 1500
@shroudreq5 = 1000

@shroudcost1 = -3000
@shroudcost2 = -2500
@shroudcost3 = -2000
@shroudcost4 = -1500
@shroudcost5 = -1000

# PLANET VARIABLES
@planet_standard_scale = 11
@habitable_planet_max_size = 25
@habitable_planet_min_size = 12
@habitable_moon_max_size = 15
@habitable_moon_min_size = 10
@habitable_min_distance = 60
@habitable_max_distance = 100
@habitable_spawn_odds = 0.3
@habitable_volcanic_spawn_odds = 0.2
@carry_cap_high = 600
@carry_cap_normal = 400
@carry_cap_low = 300

@civilians_counter = 4
@civilians_gamestart = 500

@volcanic_min_distance = 40
@volcanic_max_distance = 80

@deposit_chance_high = 16
@deposit_chance_med = 8
@deposit_chance_low = 4

@deposit_chance_high_rare = 2
@deposit_chance_med_rare = 1
@deposit_chance_low_rare = 0.5

@deposit_chance_gaia_bonus = 2
@deposit_chance_planet_type_bonus = 1.5

# INITIALIZERS
@distance = 50
@base_moon_distance = 10

# SYSTEM INITIALIZERS
@spawn_system_rare = 0.1
@spawn_system_uncommon = 0.5
@spawn_system_base = 1
@spawn_system_slightlycommon = 2
@spawn_system_common = 4
@spawn_system_verycommon = 8
@spawn_system_extreme = 16
@spawn_system_max = 99999

@spawn_system_enclave = 100 # first enclave uses this, rest use extreme

# TECH COSTS
@tier0cost1 = 500
@tier0cost2 = 625
@tier0cost3 = 750

@tier1cost1 = 1000
@tier1cost2 = 1250
@tier1cost3 = 1500

@tier2cost1 = 2000
@tier2cost2 = 2500
@tier2cost3 = 3000

@tier3cost1 = 4000
@tier3cost2 = 5000
@tier3cost3 = 6000

@tier4cost1 = 8000
@tier4cost2 = 10000
@tier4cost3 = 12000

@tier5cost1 = 16000
@tier5cost2 = 20000
@tier5cost3 = 24000

# TECH WEIGHTS
@tier1weight1 = 100
@tier1weight2 = 95
@tier1weight3 = 90

@tier2weight1 = 85
@tier2weight2 = 75
@tier2weight3 = 70

@tier3weight1 = 65
@tier3weight2 = 60
@tier3weight3 = 50

@tier4weight1 = 45
@tier4weight2 = 40
@tier4weight3 = 35

@tier5weight1 = 30
@tier5weight2 = 25
@tier5weight3 = 20


# REPEATABLE TECHS
@repeatableTechBaseCost = 50000
@repeatableTechLevelCost = 5000
@repeatableTechTier = 5

@repeatableTechWeight = 15
@repatableTechFactor = 0.5

# FALLEN EMPIRE TECHS
@fallentechcost = 70000
@fallentechtier = 5

# HORIZON SIGNAL
@horizontechcost1 = 4000
@horizontechcost2 = 10000
@horizontechtier = 3

# LEVIATHANS TECHS
@guardiantechcost = 60000
@guardiantechtier = 5

# "LEVIATHANS" ENCLAVE TRADE DEALS
@traderDealDuration = 3600 #days
# Opinion gained (annually - see leviathans.122)
@traderOpinion1 = 1
@traderOpinion2 = 2
@traderOpinion3 = 3

# BUILDINGS
@b0_time = 180
@b0_minerals = 200
@b0_upkeep = 1
@b0_jobs = 200

@b1_time = 360
@b1_minerals = 400
@b1_upkeep = 2
@b1_jobs = 200
@b1_alloy_upkeep = 2
@b1_rare_cost = 10

@b2_time = 480
@b2_minerals = 600
@b2_upkeep = 5
@b2_rare_cost = 50
@b2_rare_upkeep = 1
@b2_jobs = 400
@b2_alloy_upkeep = 3

@b3_time = 600
@b3_minerals = 800
@b3_upkeep = 8
@b3_rare_cost = 100
@b3_rare_upkeep = 2
@b3_jobs = 600
@b3_alloy_upkeep = 5

@b4_time = 900
@b4_minerals = 2000
@b4_upkeep = 10
@b4_rare_cost = 200
@b4_rare_upkeep = 4
@b4_alloy_upkeep = 7

@b5_time = 1200
@b5_minerals = 3000
@b5_upkeep = 12
@b5_rare_cost = 250
@b5_rare_upkeep = 3

@b1_biomass = 100
@b2_biomass = 200
@b3_biomass = 400
@b4_biomass = 800

@b1_max_districts_add = 2
@b2_max_districts_add = 4
@b3_max_districts_add = 6
@b4_max_districts_add = 8

@natural_equilibrium_happiness = 0.02

@feupkeep = 4
@feproduction = 12
@fecost = 500
@fetime = 720
@fe_jobs = 600
@fe2_jobs = 1200

@fe_alloy_cost_0 = 1000
@fe_alloy_cost_1 = 1500
@fe_alloy_cost_2 = 2500
@fe_sr_cost_1 = 300
@fe_sr_cost_2 = 500
@fe_rr_cost_0 = 20
@fe_rr_cost_1 = 50
@fe_rr_cost_2 = 80
@fe_sr_upkeep_1 = 2
@fe_sr_upkeep_2 = 5
@fe_rr_upkeep_1 = 1
@fe_rr_upkeep_2 = 2
@fe_energy_upkeep_1 = 15
@fe_energy_upkeep_2 = 30
@fe_energy_upkeep_3 = 50
@fe_energy_upkeep_4 = 75
@fe_energy_upkeep_5 = 100

@ap_grasp_the_void_travel_tech = 1.5
@federation_perk_factor = 2
@eager_explorer_effect = 5

@lithoid_trait_resource_production = 0.01
@drake_scaled_trait_resource_production = 0.5

@plantoid_budding_rate = 0.02
@lithoid_crater_budding_rate = 0.03
@tiyanki_budding_rate = 0.1
@tiyanki_trophy_pop_growth = 1

@armies_for_declaring_war = 6

@origin_shoulders_multiplier = 3 # allows 'On the Shoulders of Giants' empires to catch up on precursor content

@archaeostudies_base_jobs = 3
@archaeostudies_ap_jobs = 2

# GALACTIC RESOLUTIONS
@resolution_weight_hated = 3
@resolution_weight_disliked = 4
@resolution_weight_unpopular = 5
@resolution_weight_normal = 6
@resolution_weight_popular = 6.5
@resolution_weight_loved = 7

@resolution_cost_t1 = 100
@resolution_cost_t2 = 150
@resolution_cost_t3 = 200
@resolution_cost_t4 = 250
@resolution_cost_t5 = 300
@resolution_cost_denounce = 25

@resolution_flag_timer = 360

# AI TECH WEIGHTS AND BEHAVIOR VARIABLES

# physics
@energy_grid_ai_factor = 5 # extra chance for ai to pick energy grid techs
@technician_ai_factor = 2 # extra chance for ai to pick energy grid techs
@physics_research_ai_factor = 2 # extra chance to pick physics bonus
@ai_physics_tech_speed_factor = 1 # Low chance that grows increasingly stronger over time
@ai_research_lab_factor = 5 # extra chance for ai to pick advanced research labs

# engineering
@ai_mining_factor = 2 # bonus chance for AI to pick mining tech
@ai_mining_building_factor = 5 # bonus chance for AI to pick mineral purification plants tech
@ai_engineering_tech_speed_factor = 1 # bonus chance for AI to pick engineering speed tech
@ai_alloy_factor_factor = 5 # bonus chance for AI to pick alloy factories
@ai_civilian_factory_factor = 5 # bonus chance for ai to pick civilian industries
@ai_ship_types_factor = 5 # bonus chance for ai to pick new ship techs
@ai_starbase_types_factor = 5 # extra chance for ai to pick starhold / star fortress / citadel

# society
@farming_ai_weight_factor = 2 # Extra AI chance to pick farming techs
@farming_building_ai_weight_factor = 2 # Extra AI chance to pick farming building tech
@society_research_ai_factor = 2 # Extra chance AI pick the society research speed techs
@capital_tech_ai_factor = 5 # Extra chance for AI to pick capital upgrade tech chain
@pop_growth_tech_ai_factor = 3 # Extra chance for AI to pick pop growth techs
@terraforming_tech_ai_factor = 2 # Extra chance for AI to pick terraforming techs
@ai_society_tech_speed_factor = 1 # Low chance that grows increasingly stronger over time

# weapons
@favored_weapon_ai_tech_factor = 1.5
@disfavored_weapon_ai_tech_factor = 0.75

# defense tech bias
@favored_defense_ai_tech_factor = 1.5
@disfavored_defense_ai_tech_factor = 0.75

# ship AI role tech bias (e.g. weaver buffer/debuffer roles)
@favored_ship_role_ai_tech_factor = 1.5
@disfavored_ship_role_ai_tech_factor = 0.75

# fleet doctrine composition bias (ai_ship_data fraction per ship size; first-pass values pending balance review)
@doctrine_composition_strong_favored = 2.0
@doctrine_composition_favored = 1.5
@doctrine_composition_minor = 1.25
@doctrine_composition_neutral = 1
@doctrine_composition_minor_disfavored = 0.7
@doctrine_composition_disfavored = 0.5

# weapon-preference composition bias (boost a size whose assigned role matches the empire's preferred weapon family)
@weapon_pref_composition_favored = 1.5

# composition technology taper (reduce light-hull share as larger hulls unlock)
@composition_tech_taper = 0.7

# crisis & ascension fleet preference: once an empire unlocks its Nemesis, Cosmogenesis or Hyperthermia
# crisis ships (or Nanotech Ascension ships), strongly favor them over standard and bio hulls in AI fleet
# composition (first-pass value pending balance review)
@special_ship_composition_preference = 10

# misc
@strategic_resource_ai_tech_factor = 3 # Extra AI chance for picking techs that unlock the ability to research many other techs
@best_megastructure_ai_tech_factor = 100 # Extra AI chance for picking certain Megastructure techs. Late game, so can afford very high weight - not picking Mega-Engineering first time is a bug!
@robots_ai_tech_factor = 2 	# Extra AI chance for robot-related techs.
@housing_ai_tech_factor = 1.5 	# Extra AI chance for housing-related techs.
@building_slots_ai_tech_factor = 1.5 	# Extra AI chance for more building slots.
@shattered_ring_ai_tech_factor = 5 # Increased AI chance for shattered ring blocker techs
@zone_clear_ai_tech_factor = 5 # Increase AI chance for techs that open up zones
@amenity_ai_limit = 500 # AI won't build Amenity buildings if it has this many free Amenities
@ranger_small_production = 0.5
@ranger_large_production = 1

# AI civic picks
@ai_civic_default_base_weight = 5
@ai_civic_uncommon_base_weight = 3
@ai_civic_rare_base_weight = 1
@ai_civic_personality_match_factor = 3
@ai_civic_personality_mismatch_factor = 0.2
@ai_civic_personality_forbid_factor = 0


# Toxoids
@exotic_metabolism = 0.125
@inorganic_breath = 0.02
@overtuned_consequences = 0.2
@overtuned_consequences_hive = 0.5


# AI economic plans
@economic_plan_rare_resource_target = 1
@economic_plan_rare_resource_limit = 10
@economic_plan_energy_target = 10
@economic_plan_energy_target_nomads = -50
@economic_plan_mineral_target = 25
@economic_plan_mineral_target_nomads = -50
@economic_plan_trade_target = 10
@economic_plan_unity_target = 20
@economic_plan_alloy_target = 20
@economic_plan_fleet_cap_alloy_target = 50
@economic_plan_machine_empire_alloy_target = 30
@economic_plan_pops_target = 10000
@economic_plan_food_target = 10
@economic_plan_bio_ships_empire_food_target = 50
@economic_plan_fleet_cap_food_target = 100
@economic_plan_consumer_goods_target = 10
@economic_plan_research_target = 35
@economic_plan_scaling_research_target = 10
@economic_plan_scaling_research_base_limit = 300
@economic_plan_late_research_target = 5000
@economic_plan_late_scaling_research_target = 500
@economic_plan_scaling_consumer_goods_target = 1
@economic_plan_scaling_rare_resource_target = 0.20
@economic_plan_scaling_unity_target = 8
@economic_plan_scaling_alloy_target = 10
@economic_plan_scaling_trade_target = 5
@economic_plan_scaling_pops_target = 10000
@economic_plan_stockpile_threshold = 2500
@economic_plan_stockpile_threshold_high = 25000
@economic_plan_stockpile_threshold_very_high = 35000

# A scaling limit is the base target of the next plan. A resource stops scaling once the empire
# already qualifies for the next tier on it, so one resource cannot run away while another one
# holds the plan open. A limit above the next base never fires and lets that runaway happen.
@economic_plan_scaling_energy_limit = 40
@economic_plan_scaling_energy_limit_nomads = -75
@economic_plan_scaling_minerals_limit = 50
@economic_plan_scaling_minerals_limit_nomads = -75
@economic_plan_scaling_food_limit = 50
@economic_plan_scaling_food_bioship_limit = 200
@economic_plan_scaling_alloy_limit = 100
@economic_plan_scaling_alloy_bioship_limit = 50
@economic_plan_scaling_trade_limit = 25
@economic_plan_scaling_unity_limit = 50
@economic_plan_scaling_consumer_goods_limit = 100
@economic_plan_scaling_obsessional_consumer_goods_limit_base = 50
@economic_plan_scaling_obsessional_consumer_goods_limit_advanced = 100

# How much naval capacity each plan reaches for above what the empire already has. The subplans
# scale, thus the goal rolls up to the next step as the fleet grows.
@economic_plan_naval_cap_target = 100
@economic_plan_intermediate_naval_cap_target = 100
@economic_plan_advanced_naval_cap_target = 200
@economic_plan_mature_naval_cap_target = 250
@economic_plan_endgame_naval_cap_target = 300
@economic_plan_beyond_endgame_naval_cap_target = 350

# Nudges so nomad AI develops secondary Arkship producers despite reserve-negative income targets
@economic_plan_nomad_energy_focus = 25
@economic_plan_nomad_naval_cap_target = 50

@economic_plan_intermediate_energy_target = 40
@economic_plan_intermediate_energy_target_nomads = -75
@economic_plan_intermediate_mineral_target = 50
@economic_plan_intermediate_mineral_target_nomads = -75
@economic_plan_intermediate_alloy_target = 50
@economic_plan_intermediate_non_bioship_alloy_target = 50
@economic_plan_intermediate_trade_target = 25
@economic_plan_intermediate_research_target = 150
@economic_plan_intermediate_unity_target = 50
@economic_plan_intermediate_pops_target = 25000
@economic_plan_intermediate_scaling_research_limit = 400
@economic_plan_intermediate_bioship_food_target = 200
@economic_plan_intermediate_scaling_research_target = 50

@economic_plan_advanced_energy_target = 100
@economic_plan_advanced_energy_target_nomads = -100
@economic_plan_advanced_mineral_target = 150
@economic_plan_advanced_mineral_target_nomads = -100
@economic_plan_advanced_alloy_target = 150
@economic_plan_advanced_scaling_alloy_target = 100
@economic_plan_advanced_scaling_alloy_limit = 400
@economic_plan_advanced_scaling_food_bioship_target = 50
@economic_plan_advanced_scaling_food_bioship_limit = 800
@economic_plan_advanced_trade_target = 50
@economic_plan_advanced_research_target = 400
@economic_plan_advanced_scaling_research_target = 100
@economic_plan_advanced_scaling_research_limit = 1000
@economic_plan_advanced_unity_target = 100
@economic_plan_advanced_scaling_unity_target = 50
@economic_plan_advanced_scaling_unity_limit = 200
@economic_plan_advanced_pops_target = 100000
@economic_plan_advanced_bioship_food_target = 300
@economic_plan_advanced_obsessional_consumer_goods_target = 50

@economic_plan_mature_energy_target = 150
@economic_plan_mature_energy_target_nomads = -125
@economic_plan_mature_mineral_target = 200
@economic_plan_mature_mineral_target_nomads = -125
@economic_plan_mature_alloy_target = 200
@economic_plan_mature_non_bioship_alloy_target = 200
@economic_plan_mature_trade_target = 75
@economic_plan_mature_research_target = 1000
@economic_plan_mature_unity_target = 200
@economic_plan_mature_pops_target = 175000
@economic_plan_mature_scaling_research_limit = 2500
@economic_plan_mature_bioship_food_target = 800
@economic_plan_mature_scaling_research_target = 200

@economic_plan_endgame_energy_target = 200
@economic_plan_endgame_energy_target_nomads = -150
@economic_plan_endgame_mineral_target = 300
@economic_plan_endgame_mineral_target_nomads = -150

@economic_plan_beyond_endgame_energy_target = 300
@economic_plan_beyond_endgame_energy_target_nomads = -175
@economic_plan_beyond_endgame_mineral_target = 500
@economic_plan_beyond_endgame_mineral_target_nomads = -175

@ai_ship_budget_desired_min_per_year = 3
@ai_component_strategic_stockpile_min = 150	# Minimum stockpile of a strategic resource before the AI blocks components requiring it

# Nomadic empire AI budget: per-arkship resource reservation
@ai_nomad_alloys_planet_desired_min			= 500
@ai_nomad_strategic_planet_desired_min		= 100
@ai_nomad_strategic_planet_desired_max		= 300
@ai_nomad_strategic_starbase_desired_min	= 500
@ai_nomad_strategic_starbase_desired_max	= 500

@noxious_happiness_penalty = -0.01
@noxious_happiness_bonus = 0.02

@cyborg_energy_upkeep = 0.5

# Instrument of Desire Pop Upkeep
@instrument_upkeep_common = 0.1
@instrument_upkeep_rare = 0.075
@instrument_upkeep_very_rare = 0.02
@instrument_upkeep_legendary = 0.005
@instrument_upkeep_epic = 0.0025

# Kaleidoscope situation
@kaleidoscopeHappy = 15
@kaleidoscopeAngry = 5

# Governors
@planet_empire_size = -0.02
@sector_empire_size = -0.01
@planet_job_mult = 0.02
@sector_job_mult = 0.01
@negative_planet_job_mult = -0.02
@negative_sector_job_mult = -0.01
@planet_job_mult_high = 0.04
@sector_job_mult_high = 0.02

# Relics
@activation_cost = 3000
@triumph_duration = 3600
@triumph_duration_short = 1800
@triumph_duration_veryshort = 900
@triumph_duration_years = 10

# Evolutionary Predators
@evopred_small_progress = 10
@evopred_medium_progress = 20
@evopred_large_progress = 40

# Ascension Path AI
@ap_pending_tech_boost = 10
@ap_pending_tradition_suppress = 0.01

# Colony type weights
@zone_urban = 100
