## Categories used in this file must have use_for_ai_budget = yes defined in economic_categories ## ## It is possible to have multiple entries with the same category and resource ## ################# ## Expenditure ## ################# alloys_expenditure_buffer = { # Buffer, will not be spent resource = alloys type = expenditure category = buffer potential = { always = no } weight = { weight = 0.0 } } alloys_expenditure_ships = { resource = alloys type = expenditure category = ships potential = { always = yes } weight = { weight = 0.6 # spend more alloys building ships while at war modifier = { factor = 2 OR = { recently_lost_war = yes is_at_war = yes } } # If we want to colonize and are at peace then prio that modifier = { factor = 0.25 AND = { ai_colonize_plans > 0 is_at_war = no } } # spend less alloys on ships if over capacity modifier = { factor = 0.5 used_naval_capacity_percent >= 1.0 } # Biological Ships use less alloys modifier = { factor = 0.33 country_uses_bio_ships = yes } modifier = { factor = 5 used_naval_capacity_percent < 1.0 OR = { any_neighbor_country = { has_ascension_perk = ap_become_the_crisis } any_country = { is_crisis_faction = yes } } } } desired_min = { base = 0 modifier = { add = 3 country_uses_bio_ships = no } modifier = { factor = trigger:years_passed } } } alloys_expenditure_ship_upgrades = { resource = alloys type = expenditure category = ship_upgrades potential = { is_at_war = no any_owned_fleet = { controller = { is_same_value = root } can_be_upgraded = yes } } weight = { weight = 0.2 # spend more on ship upgrades if at capacity modifier = { factor = 2.5 used_naval_capacity_percent >= 1.0 } # Biological Ships use less alloys modifier = { factor = 0.33 country_uses_bio_ships = yes } } } alloys_expenditure_planets = { resource = alloys type = expenditure category = planets potential = { always = yes } weight = { weight = 0.1 } desired_min = { modifier = { add = 250 any_owned_planet = { is_planet_class = pc_habitat free_district_slots > 0 } } modifier = { add = 500 any_owned_planet = { is_planet_class = pc_city free_district_slots > 0 } } modifier = { add = 250 is_void_dweller_empire = yes } } desired_max = { base = 5000 } } alloys_expenditure_starbases = { resource = alloys type = expenditure category = starbases potential = { NOT = { is_country_type = fallen_empire } } weight = { weight = 0.4 # spend more on starbase upgrades if at fleet cap modifier = { factor = 2 used_naval_capacity_percent >= 1.0 } # Reduce spending on claiming new systems if we have unclaimed planets modifier = { is_machine_empire = yes has_country_resource = { type = alloys amount < 450 } factor = 0.25 # more aggresive saving for robots since their colony ships cost more ai_colonize_plans > 0 } # Reduce spending on claiming new systems if we have unclaimed planets modifier = { is_machine_empire = no has_country_resource = { type = alloys amount < 250 } factor = 0.50 ai_colonize_plans > 0 } modifier = { factor = 1.5 used_starbase_capacity_percent < 1 any_owned_starbase = { can_be_upgraded = yes } } modifier = { factor = 1.5 OR = { any_owned_starbase = { NOT = { has_starbase_size = starbase_outpost } can_be_upgraded = yes } any_owned_nonprimary_starbase = { can_be_upgraded = yes } } } # Biological Starbases use less alloys modifier = { factor = 0.5 country_uses_bio_ships = yes } } desired_max = { base = 500 modifier = { add = 5000 has_ascension_perk = ap_cosmogenesis } } } alloys_expenditure_starbases_fallen_empires = { resource = alloys type = expenditure category = starbases potential = { is_country_type = fallen_empire } weight = { weight = 0.2 } } alloys_expenditure_starbases_expand = { resource = alloys type = expenditure category = starbases potential = { has_ai_expansion_plan = yes highest_threat < 50 NOT = { is_country_type = fallen_empire is_country_type = awakened_fallen_empire ai_colonize_plans > 0 } has_resource = { type = influence amount > 75 } } weight = { weight = 0.2 # Biological Starbases use less alloys modifier = { factor = 0.5 country_uses_bio_ships = yes } } desired_min = { base = 150 } } alloys_expenditure_colonies_infernal_expand = { resource = alloys type = expenditure category = colonies potential = { is_infernal_empire = yes NOT = { has_origin = origin_synthetic_fertility } has_resource = { type = alloys amount > 400 } has_monthly_income = { resource = alloys value > 0 } } weight = { weight = 0.8 } desired_min = { base = 0 modifier = { add = @colony_cost_base is_hive_empire = no } modifier = { add = @colony_cost_high OR = { is_hive_empire = yes } } } desired_max = { base = 0 modifier = { add = @colony_cost_base_max is_hive_empire = no } modifier = { add = @colony_cost_high_max OR = { is_hive_empire = yes } } } } alloys_expenditure_colonies_expand = { resource = alloys type = expenditure category = colonies potential = { OR = { is_at_war = no mid_game_years_passed > 0 } ai_colonize_plans > 0 OR = { AND = { is_lithoid_empire = no is_infernal_empire = no has_resource = { type = food amount > 400 } has_monthly_income = { resource = food value > 0 } } AND = { is_lithoid_empire = yes has_resource = { type = minerals amount > 400 } has_monthly_income = { resource = minerals value > 0 } } AND = { is_robot_empire = yes has_resource = { type = energy amount > 400 } has_monthly_income = { resource = energy value > 0 } } AND = { is_infernal_empire = yes has_resource = { type = alloys amount > 400 } has_monthly_income = { resource = alloys value > 0 } } } } weight = { weight = 0.5 } desired_min = { base = 0 modifier = { add = @colony_cost_base is_guided_sapience_empire = no is_virtual_empire = no } modifier = { add = @colony_cost_low is_guided_sapience_empire = no is_virtual_empire = yes } modifier = { add = @colony_cost_mid is_guided_sapience_empire = yes is_virtual_empire = no } modifier = { add = @colony_cost_base is_guided_sapience_empire = yes is_virtual_empire = yes } modifier = { mult = 0.5 has_origin = origin_tree_of_life } modifier = { mult = 0.5 country_uses_bio_ships = yes } } desired_max = { base = 0 modifier = { add = @colony_cost_base_max is_guided_sapience_empire = no is_virtual_empire = no } modifier = { add = @colony_cost_low_max is_guided_sapience_empire = no is_virtual_empire = yes } modifier = { add = @colony_cost_mid_max is_guided_sapience_empire = yes is_virtual_empire = no } modifier = { add = @colony_cost_base_max is_guided_sapience_empire = yes is_virtual_empire = yes } modifier = { mult = 0.5 has_origin = origin_tree_of_life } modifier = { mult = 0.5 country_uses_bio_ships = yes } } } alloys_expenditure_megastructures = { resource = alloys type = expenditure category = megastructures potential = { is_country_type = default OR = { is_at_war = no used_naval_capacity_percent > 0.95 } can_build_megastructures = yes } weight = { weight = 0.4 # increase budget if megastructures are unfinished modifier = { factor = 3 used_naval_capacity_percent > 0.8 any_owned_megastructure = { can_be_upgraded = yes } } } desired_max = { base = 20000 # current max alloy cost for a stage } } alloys_expenditure_habitats = { resource = alloys type = expenditure category = megastructures_habitat potential = { ai_should_build_habitats = yes } weight = { weight = 0.2 modifier = { factor = 2 is_void_dweller_empire = yes } modifier = { factor = 2 is_void_dweller_empire = yes count_owned_planet = { limit = { is_planet_class = pc_habitat } count < 4 } } modifier = { factor = 2 is_void_dweller_empire = yes count_owned_planet = { limit = { is_planet_class = pc_habitat } count < 6 } } modifier = { factor = 5 mid_game_years_passed > 0 num_owned_planets < 12 } modifier = { factor = 0.5 has_trait = trait_aquatic } modifier = { #Build fortress habitats factor = 2 used_naval_capacity_percent > 0.95 used_starbase_capacity_percent >= 1 } modifier = { factor = 0.5 is_at_war = yes } } desired_min = { base = 1000 } desired_max = { base = 1500 } } alloys_expenditure_decisions = { resource = alloys type = expenditure category = decisions potential = { OR = { has_ascension_perk = ap_arcology_project has_technology = tech_mega_engineering has_technology = tech_housing_2 } # only consider these kinds of decisions when "wealthy" has_resource = { type = alloys amount > 5000 } any_owned_planet = { OR = { AND = { root = { has_ascension_perk = ap_arcology_project } is_starting_planet_type = yes } AND = { is_planet_class = pc_shattered_ring_habitable root = { has_technology = tech_mega_engineering } num_uncleared_blockers < 1 } AND = { is_planet_class = pc_relic root = { has_technology = tech_housing_2 } num_uncleared_blockers < 1 } } } } weight = { weight = 0.20 } # based on habitat / restore ring desired_max = { base = 2000 modifier = { add = 8000 has_technology = tech_mega_engineering any_owned_planet = { is_planet_class = pc_shattered_ring_habitable num_uncleared_blockers < 1 } } modifier = { add = 8000 OR = { has_ascension_perk = ap_arcology_project AND = { has_technology = tech_housing_2 any_owned_planet = { is_planet_class = pc_relic num_uncleared_blockers < 1 } } } } } } alloys_expenditure_deposit_blockers = { resource = alloys type = expenditure category = deposit_blockers potential = { OR = { any_owned_planet = { is_planet_class = pc_shattered_ring_habitable num_uncleared_blockers > 0 } AND = { OR = { has_technology = tech_climate_restoration has_ascension_perk = ap_machine_worlds } any_owned_planet = { has_deposit = d_machine_prototype_pc_machine } } } } weight = { weight = 0.15 } # base remove blocker cost desired_min = { base = 250 } desired_max = { base = 1250 modifier = { mult = 2 OR = { has_technology = tech_climate_restoration has_ascension_perk = ap_machine_worlds } any_owned_planet = { has_deposit = d_machine_prototype_pc_machine } } } } ############ ## Upkeep ## ############ alloys_upkeep_buffer = { # Buffer, will not be spent resource = alloys type = upkeep category = buffer potential = { always = yes } weight = { weight = 0.3 } } alloys_upkeep_ships = { resource = alloys type = upkeep category = ships potential = { always = yes } weight = { weight = 0.5 modifier = { factor = 1.5 OR = { is_at_war = yes resource_income_compare = { resource = alloys value > 800 } } } } } alloys_upkeep_planets = { resource = alloys type = upkeep category = planets potential = { always = yes } weight = { weight = 0.2 } }