# This is called in initializers for all standard empires, before the empire actually exists generate_empire_home_planet = { } generate_home_system_resources = { optimize_memory every_system_planet = { limit = { colonizable_planet = no NOT = { has_planet_flag = ignore_startup_effect } } prevent_anomaly = yes clear_deposits = yes } system_star = { set_planet_flag = starting_mining_target set_planet_flag = starting_deposit set_deposit = d_energy_5 } random_system_planet = { limit = { NOT = { has_planet_flag = starting_deposit } NOT = { has_planet_flag = ignore_startup_effect } OR = { is_planet_class = pc_a_star is_planet_class = pc_b_star is_planet_class = pc_f_star is_planet_class = pc_g_star is_planet_class = pc_k_star is_planet_class = pc_m_star is_planet_class = pc_molten is_planet_class = pc_gas_giant is_planet_class = pc_t_star } } set_planet_flag = starting_mining_target set_planet_flag = starting_deposit set_deposit = d_energy_5 } while = { count = 2 random_system_planet = { limit = { NOT = { has_planet_flag = starting_deposit } NOT = { has_planet_flag = ignore_startup_effect } OR = { is_asteroid = yes is_planet_class = pc_barren is_planet_class = pc_barren_cold is_planet_class = pc_toxic is_planet_class = pc_frozen } } set_planet_flag = starting_mining_target set_planet_flag = starting_deposit set_deposit = d_minerals_5 } } random_system_planet = { limit = { NOT = { has_planet_flag = starting_deposit } NOT = { has_planet_flag = ignore_startup_effect } OR = { is_planet_class = pc_a_star is_planet_class = pc_b_star is_planet_class = pc_f_star is_planet_class = pc_g_star is_planet_class = pc_k_star is_planet_class = pc_m_star is_planet_class = pc_molten is_planet_class = pc_gas_giant is_planet_class = pc_t_star } } set_planet_flag = starting_deposit random_list = { 50 = { set_deposit = d_energy_2 } 50 = { set_deposit = d_energy_3 } } } random_system_planet = { limit = { NOT = { has_planet_flag = starting_deposit } NOT = { has_planet_flag = ignore_startup_effect } OR = { is_asteroid = yes is_planet_class = pc_barren is_planet_class = pc_barren_cold is_planet_class = pc_toxic is_planet_class = pc_frozen } } set_planet_flag = starting_deposit random_list = { 50 = { set_deposit = d_minerals_2 } 50 = { set_deposit = d_minerals_3 } } } random_system_planet = { limit = { NOT = { has_planet_flag = starting_deposit } NOT = { has_planet_flag = ignore_startup_effect } OR = { is_planet_class = pc_gas_giant is_planet_class = pc_toxic is_planet_class = pc_frozen is_planet_class = pc_barren_cold is_planet_class = pc_barren is_star = yes } } set_planet_flag = starting_research_target set_planet_flag = starting_deposit if = { limit = { is_planet_class = pc_toxic } set_deposit = d_society_3 } else_if = { limit = { OR = { is_planet_class = pc_barren is_star = yes } } set_deposit = d_physics_3 } else = { set_deposit = d_engineering_3 } } random_system_planet = { limit = { NOT = { has_planet_flag = starting_deposit } NOT = { has_planet_flag = ignore_startup_effect } OR = { is_planet_class = pc_gas_giant is_planet_class = pc_toxic is_planet_class = pc_frozen is_planet_class = pc_barren_cold is_planet_class = pc_barren is_star = yes } } set_planet_flag = starting_deposit if = { limit = { is_planet_class = pc_toxic } set_deposit = d_society_2 } else_if = { limit = { OR = { is_planet_class = pc_barren is_star = yes } } set_deposit = d_physics_2 } else = { set_deposit = d_engineering_2 } } } add_random_natural_blocker_and_give_tech = { # see also 'has_natural_blocker', 'wilderness_get_natural_blocker_name' if = { limit = { is_dry = yes } random_list = { 10 = { modifier = { factor = 0.1 owner = { has_technology = tech_deep_sinkhole } } add_blocker = { type = d_deep_sinkhole blocked_deposit = none } owner = { if = { limit = { NOT = { has_technology = tech_deep_sinkhole } } give_technology = { tech = tech_deep_sinkhole message = no } } } } 10 = { modifier = { factor = 0.1 owner = { has_technology = tech_quicksand_basin } } add_blocker = { type = d_quicksand_basin blocked_deposit = none } owner = { if = { limit = { NOT = { has_technology = tech_quicksand_basin } } give_technology = { tech = tech_quicksand_basin message = no } } } } 10 = { modifier = { factor = 0.1 owner = { has_technology = tech_volcano } } modifier = { factor = 0 owner = { has_origin = origin_arc_welders # Starting planet is too small } } add_blocker = { type = d_active_volcano blocked_deposit = none } owner = { if = { limit = { NOT = { has_technology = tech_volcano } } give_technology = { tech = tech_volcano message = no } } } } 10 = { modifier = { factor = 0.1 owner = { has_technology = tech_mountain_range } } modifier = { factor = 0 owner = { has_origin = origin_arc_welders # Starting planet is too small } } add_blocker = { type = d_mountain_range blocked_deposit = none } owner = { if = { limit = { NOT = { has_technology = tech_mountain_range } } give_technology = { tech = tech_mountain_range message = no } } } } 10 = { modifier = { factor = 0.1 owner = { has_technology = tech_dangerous_wildlife } } modifier = { factor = 0 owner = { has_origin = origin_arc_welders # Starting planet is too small } } add_blocker = { type = d_dangerous_wildlife_blocker blocked_deposit = none } owner = { if = { limit = { NOT = { has_technology = tech_dangerous_wildlife } } give_technology = { tech = tech_dangerous_wildlife message = no } } } } } } else_if = { limit = { is_wet = yes } random_list = { 10 = { modifier = { factor = 0.1 owner = { has_technology = tech_dense_jungle } } add_blocker = { type = d_dense_jungle blocked_deposit = none } owner = { if = { limit = { NOT = { has_technology = tech_dense_jungle } } give_technology = { tech = tech_dense_jungle message = no } } } } 10 = { modifier = { factor = 0.1 owner = { has_technology = tech_toxic_kelp } } add_blocker = { type = d_toxic_kelp blocked_deposit = none } owner = { if = { limit = { NOT = { has_technology = tech_toxic_kelp } } give_technology = { tech = tech_toxic_kelp message = no } } } } 10 = { modifier = { factor = 0.1 owner = { has_technology = tech_volcano } } modifier = { factor = 0 owner = { has_origin = origin_arc_welders # Starting planet is too small } } add_blocker = { type = d_active_volcano blocked_deposit = none } owner = { if = { limit = { NOT = { has_technology = tech_volcano } } give_technology = { tech = tech_volcano message = no } } } } 10 = { modifier = { factor = 0.1 owner = { has_technology = tech_mountain_range } } modifier = { factor = 0 owner = { has_origin = origin_arc_welders # Starting planet is too small } } add_blocker = { type = d_mountain_range blocked_deposit = none } owner = { if = { limit = { NOT = { has_technology = tech_mountain_range } } give_technology = { tech = tech_mountain_range message = no } } } } 10 = { modifier = { factor = 0.1 owner = { has_technology = tech_dangerous_wildlife } } modifier = { factor = 0 owner = { has_origin = origin_arc_welders # Starting planet is too small } } add_blocker = { type = d_dangerous_wildlife_blocker blocked_deposit = none } owner = { if = { limit = { NOT = { has_technology = tech_dangerous_wildlife } } give_technology = { tech = tech_dangerous_wildlife message = no } } } } } } else_if = { limit = { is_cold = yes } random_list = { 10 = { modifier = { factor = 0.1 owner = { has_technology = tech_noxious_swamp } } add_blocker = { type = d_noxious_swamp blocked_deposit = none } owner = { if = { limit = { NOT = { has_technology = tech_noxious_swamp } } give_technology = { tech = tech_noxious_swamp message = no } } } } 10 = { modifier = { factor = 0.1 owner = { has_technology = tech_massive_glacier } } add_blocker = { type = d_massive_glacier blocked_deposit = none } owner = { if = { limit = { NOT = { has_technology = tech_massive_glacier } } give_technology = { tech = tech_massive_glacier message = no } } } } 10 = { modifier = { factor = 0.1 owner = { has_technology = tech_volcano } } modifier = { factor = 0 owner = { has_origin = origin_arc_welders # Starting planet is too small } } add_blocker = { type = d_active_volcano blocked_deposit = none } owner = { if = { limit = { NOT = { has_technology = tech_volcano } } give_technology = { tech = tech_volcano message = no } } } } 10 = { modifier = { factor = 0.1 owner = { has_technology = tech_mountain_range } } modifier = { factor = 0 owner = { has_origin = origin_arc_welders # Starting planet is too small } } add_blocker = { type = d_mountain_range blocked_deposit = none } owner = { if = { limit = { NOT = { has_technology = tech_mountain_range } } give_technology = { tech = tech_mountain_range message = no } } } } 10 = { modifier = { factor = 0.1 owner = { has_technology = tech_dangerous_wildlife } } modifier = { factor = 0 owner = { has_origin = origin_arc_welders # Starting planet is too small } } add_blocker = { type = d_dangerous_wildlife_blocker blocked_deposit = none } owner = { if = { limit = { NOT = { has_technology = tech_dangerous_wildlife } } give_technology = { tech = tech_dangerous_wildlife message = no } } } } } } } add_random_natural_blocker = { if = { limit = { is_dry = yes } random_list = { 1 = { add_deposit = d_deep_sinkhole } 1 = { add_deposit = d_quicksand_basin } 1 = { add_deposit = d_active_volcano } 1 = { add_deposit = d_mountain_range } 1 = { add_deposit = d_dangerous_wildlife_blocker } } } else_if = { limit = { is_wet = yes } random_list = { 1 = { add_deposit = d_dense_jungle } 1 = { add_deposit = d_toxic_kelp } 1 = { add_deposit = d_active_volcano } 1 = { add_deposit = d_mountain_range } 1 = { add_deposit = d_dangerous_wildlife_blocker } } } else_if = { limit = { is_cold = yes } random_list = { 1 = { add_deposit = d_noxious_swamp } 1 = { add_deposit = d_massive_glacier } 1 = { add_deposit = d_active_volcano } 1 = { add_deposit = d_mountain_range } 1 = { add_deposit = d_dangerous_wildlife_blocker } } } } add_research_options_for_natural_blockers = { if = { limit = { has_deposit = d_mountain_range } owner = { add_research_option = tech_mountain_range } } if = { limit = { OR = { has_deposit = d_active_volcano has_deposit = d_raging_lavafalls has_deposit = d_rugged_landscape has_deposit = d_seismic_bombing_crater } } owner = { add_research_option = tech_volcano } } if = { limit = { has_deposit = d_dangerous_wildlife_blocker } owner = { add_research_option = tech_dangerous_wildlife } } if = { limit = { has_deposit = d_dense_jungle } owner = { add_research_option = tech_dense_jungle } } if = { limit = { has_deposit = d_toxic_kelp } owner = { add_research_option = tech_toxic_kelp } } if = { limit = { has_deposit = d_deep_sinkhole } owner = { add_research_option = tech_deep_sinkhole } } if = { limit = { has_deposit = d_quicksand_basin } owner = { add_research_option = tech_quicksand_basin } } if = { limit = { has_deposit = d_noxious_swamp } owner = { add_research_option = tech_noxious_swamp } } if = { limit = { has_deposit = d_massive_glacier } owner = { add_research_option = tech_massive_glacier } } } # This is called after game start generate_start_deposits_and_blockers = { optimize_memory clear_deposits = yes # blockers if = { limit = { owner = { is_apocalyptic_empire = yes } } add_deposit = d_tomb_world_ruins if = { limit = { owner = { is_environmental_architects_empire = yes } } add_random_natural_blocker_and_give_tech = yes } else = { add_deposit = d_tomb_world_wasteland } } else_if = { limit = { owner = { has_civic = civic_machine_servitor } } add_deposit = d_unsupervised_settlement if = { limit = { owner = { is_environmental_architects_empire = yes } } add_random_natural_blocker_and_give_tech = yes } else = { add_deposit = d_strip_mine } } else_if = { limit = { owner = { is_environmental_architects_empire = yes } } while = { count = 2 add_random_natural_blocker_and_give_tech = yes } } else_if = { limit = { owner = { has_civic = civic_machine_terminator NOT = { has_origin = origin_machine } } } add_deposit = d_exterminators_ruins add_deposit = d_former_battlefield } else_if = { limit = { owner = { has_civic = civic_machine_assimilator NOT = { has_origin = origin_machine } } } add_deposit = d_strip_mine add_deposit = d_assimilators_ruins } else_if = { limit = { owner = { is_machine_empire = yes NOT = { has_origin = origin_machine } } } add_deposit = d_strip_mine add_deposit = d_machine_empire_ruins } else_if = { # "Unplugged" limit = { owner = { has_origin = origin_unplugged } } add_deposit = d_decrepit_dwellings add_deposit = d_strip_mine add_deposit = d_former_battlefield } else_if = { limit = { owner = { NOR = { has_origin = origin_machine has_origin = origin_synthetic_fertility has_origin = origin_cosmic_dawn is_gestalt = yes } } } add_deposit = d_decrepit_dwellings add_deposit = d_failing_infrastructure add_deposit = d_failing_infrastructure } else_if = { limit = { owner = { is_hive_empire = yes NOT = { has_origin = origin_cosmic_dawn } } } add_deposit = d_collapsed_burrows add_deposit = d_failing_infrastructure add_deposit = d_failing_infrastructure } if = { limit = { has_planet_flag = planet_unity } remove_deposit = d_failing_infrastructure add_deposit = d_forgotten_civilization } if = { limit = { owner = { is_lithoid_empire = yes NOR = { has_valid_civic = civic_hive_devouring_swarm has_origin = origin_lithoid has_origin = origin_broken_shackles } } } while = { count = 4 add_deposit = d_hibernating_lithoids } } if = { limit = { owner = { is_lithoid_devouring_swarm = yes } } while = { count = 2 add_deposit = d_hibernating_lithoids } } if = { limit = { owner = { is_apocalyptic_empire = yes } } # 3 + 3 energy add_deposit = d_hot_springs add_deposit = d_searing_desert add_deposit = d_underwater_vent # 3 + 4 mining add_deposit = d_veiny_cliffs add_deposit = d_ore_rich_caverns add_deposit = d_submerged_ore_veins # 3 + 2 farming add_deposit = d_lichen_fields add_deposit = d_fungal_caves add_deposit = d_fungal_forest } if = { limit = { owner = { has_origin = origin_life_seeded } } create_life_seeded_planet = yes } if = { limit = { is_planet_class = pc_continental } # 3 + 3 energy add_deposit = d_hot_springs add_deposit = d_rushing_waterfalls add_deposit = d_tempestous_mountain if = { limit = { owner = { is_machine_empire = yes } } add_deposit = d_rushing_waterfalls } if = { limit = { owner = { has_valid_civic = civic_machine_servitor } } add_deposit = d_hot_springs } # 3 + 3 mining add_deposit = d_veiny_cliffs add_deposit = d_prosperous_mesa add_deposit = d_rich_mountain # 4 + 3 farming (lithoids swap 3 for minerals) add_deposit = d_rugged_woods add_deposit = d_fertile_lands if = { limit = { owner = { is_machine_empire = no } } add_deposit = d_rugged_woods if = { limit = { owner = { is_lithoid_or_infernal_empire = yes } } add_deposit = d_rich_mountain } else = { add_deposit = d_black_soil } } } if = { limit = { is_planet_class = pc_tropical } # 3 + 3 energy add_deposit = d_hot_springs add_deposit = d_rushing_waterfalls add_deposit = d_tempestous_mountain if = { limit = { owner = { is_machine_empire = yes } } add_deposit = d_rushing_waterfalls } if = { limit = { owner = { has_valid_civic = civic_machine_servitor } } add_deposit = d_hot_springs } # 3 + 3 mining add_deposit = d_mineral_fields add_deposit = d_prosperous_mesa add_deposit = d_submerged_ore_veins # 4 + 3 farming (lithoids swap 3 for minerals) add_deposit = d_green_hills add_deposit = d_lush_jungle if = { limit = { owner = { is_machine_empire = no } } if = { limit = { owner = { is_lithoid_or_infernal_empire = yes } } add_deposit = d_submerged_ore_veins } else = { add_deposit = d_green_hills add_deposit = d_tropical_island } } } if = { limit = { is_planet_class = pc_ocean } # 3 + 3 energy add_deposit = d_hot_springs add_deposit = d_rushing_waterfalls add_deposit = d_underwater_vent if = { limit = { owner = { is_machine_empire = yes } } add_deposit = d_rushing_waterfalls } if = { limit = { owner = { has_valid_civic = civic_machine_servitor } } add_deposit = d_hot_springs } # 3 + 3 mining add_deposit = d_mineral_fields add_deposit = d_ore_rich_caverns add_deposit = d_submerged_ore_veins # 4 + 3 farming (lithoids swap 3 for minerals) add_deposit = d_green_hills add_deposit = d_lush_jungle if = { limit = { owner = { is_machine_empire = no } } add_deposit = d_green_hills if = { limit = { owner = { is_lithoid_or_infernal_empire = yes } } add_deposit = d_submerged_ore_veins } else = { add_deposit = d_teeming_reef } } } if = { limit = { is_planet_class = pc_arctic } # 3 + 3 energy add_deposit = d_hot_springs add_deposit = d_frozen_gas_lake add_deposit = d_geothermal_vent if = { limit = { owner = { is_machine_empire = yes } } add_deposit = d_frozen_gas_lake } if = { limit = { owner = { has_valid_civic = civic_machine_servitor } } add_deposit = d_hot_springs } # 3 + 3 mining add_deposit = d_veiny_cliffs add_deposit = d_ore_rich_caverns add_deposit = d_rich_mountain # 4 + 3 farming (lithoids swap 3 for minerals) add_deposit = d_lichen_fields add_deposit = d_fungal_caves if = { limit = { owner = { is_machine_empire = no } } add_deposit = d_lichen_fields if = { limit = { owner = { is_lithoid_or_infernal_empire = yes } } add_deposit = d_rich_mountain } else = { add_deposit = d_fungal_forest } } } if = { limit = { is_planet_class = pc_tundra } # 3 + 3 energy add_deposit = d_hot_springs add_deposit = d_frozen_gas_lake add_deposit = d_geothermal_vent if = { limit = { owner = { is_machine_empire = yes } } add_deposit = d_frozen_gas_lake } if = { limit = { owner = { has_valid_civic = civic_machine_servitor } } add_deposit = d_hot_springs } # 3 + 3 mining add_deposit = d_mineral_fields add_deposit = d_ore_rich_caverns add_deposit = d_rich_mountain # 4 + 3 farming (lithoids swap 3 for minerals) add_deposit = d_forgiving_tundra add_deposit = d_fungal_caves if = { limit = { owner = { is_machine_empire = no } } add_deposit = d_forgiving_tundra if = { limit = { owner = { is_lithoid_or_infernal_empire = yes } } add_deposit = d_rich_mountain } else = { add_deposit = d_fungal_forest } } } if = { limit = { is_planet_class = pc_alpine } # 3 + 3 energy add_deposit = d_hot_springs add_deposit = d_frozen_gas_lake add_deposit = d_tempestous_mountain if = { limit = { owner = { is_machine_empire = yes } } add_deposit = d_frozen_gas_lake } if = { limit = { owner = { has_valid_civic = civic_machine_servitor } } add_deposit = d_hot_springs } # 3 + 3 mining add_deposit = d_veiny_cliffs add_deposit = d_ore_rich_caverns add_deposit = d_rich_mountain # 4 + 3 farming (lithoids swap 3 for minerals) add_deposit = d_forgiving_tundra add_deposit = d_fungal_caves if = { limit = { owner = { is_machine_empire = no } } add_deposit = d_forgiving_tundra if = { limit = { owner = { is_lithoid_or_infernal_empire = yes } } add_deposit = d_rich_mountain } else = { add_deposit = d_fungal_forest } } } if = { limit = { is_planet_class = pc_desert } # 3 + 3 energy add_deposit = d_arid_highlands add_deposit = d_searing_desert add_deposit = d_geothermal_vent if = { limit = { owner = { is_machine_empire = yes } } add_deposit = d_searing_desert } if = { limit = { owner = { has_valid_civic = civic_machine_servitor } } add_deposit = d_arid_highlands } # 3 + 3 mining add_deposit = d_mineral_fields add_deposit = d_ore_rich_caverns add_deposit = d_rich_mountain # 4 + 3 farming (lithoids swap 3 for minerals) add_deposit = d_nutritious_mudland add_deposit = d_great_river if = { limit = { owner = { is_machine_empire = no } } add_deposit = d_nutritious_mudland if = { limit = { owner = { is_lithoid_or_infernal_empire = yes } } add_deposit = d_rich_mountain } else = { add_deposit = d_marvelous_oasis } } set_planet_flag = tasty_desert } if = { limit = { is_planet_class = pc_arid } # 3 + 3 energy add_deposit = d_arid_highlands add_deposit = d_searing_desert add_deposit = d_geothermal_vent if = { limit = { owner = { is_machine_empire = yes } } add_deposit = d_searing_desert } if = { limit = { owner = { has_valid_civic = civic_machine_servitor } } add_deposit = d_arid_highlands } # 3 + 3 mining add_deposit = d_veiny_cliffs add_deposit = d_ore_rich_caverns add_deposit = d_rich_mountain # 4 + 3 farming (lithoids swap 3 for minerals) add_deposit = d_bountiful_plains add_deposit = d_great_river if = { limit = { owner = { is_machine_empire = no } } add_deposit = d_bountiful_plains if = { limit = { owner = { is_lithoid_or_infernal_empire = yes } } add_deposit = d_rich_mountain } else = { add_deposit = d_tropical_island } } } if = { limit = { is_planet_class = pc_savannah } # 3 + 3 energy add_deposit = d_arid_highlands add_deposit = d_searing_desert add_deposit = d_geothermal_vent if = { limit = { owner = { is_machine_empire = yes } } add_deposit = d_searing_desert } if = { limit = { owner = { has_valid_civic = civic_machine_servitor } } add_deposit = d_arid_highlands } # 3 + 3 mining add_deposit = d_mineral_fields add_deposit = d_prosperous_mesa add_deposit = d_submerged_ore_veins # 4 + 3 farming (lithoids swap 3 for minerals) add_deposit = d_bountiful_plains add_deposit = d_fertile_lands if = { limit = { owner = { is_machine_empire = no } } add_deposit = d_bountiful_plains if = { limit = { owner = { is_lithoid_or_infernal_empire = yes } } add_deposit = d_rich_mountain } else = { add_deposit = d_black_soil } } } if = { limit = { is_planet_class = pc_relic owner = { OR = { has_origin = origin_remnants has_origin = origin_slavers } } } set_planet_size = 22 # 6 blockers add_deposit = d_ruined_arcology add_deposit = d_ruined_arcology add_deposit = d_ruined_arcology add_deposit = d_ruined_arcology add_deposit = d_ruined_arcology add_deposit = d_ruined_arcology # 3 + 3 energy add_deposit = d_arid_highlands add_deposit = d_searing_desert add_deposit = d_geothermal_vent if = { limit = { owner = { is_machine_empire = yes } } add_deposit = d_searing_desert } if = { limit = { owner = { has_valid_civic = civic_machine_servitor } } add_deposit = d_arid_highlands } # 3 + 3 mining add_deposit = d_mineral_fields add_deposit = d_prosperous_mesa add_deposit = d_submerged_ore_veins # 4 + 3 farming add_deposit = d_bountiful_plains add_deposit = d_fertile_lands if = { limit = { owner = { is_machine_empire = no } } add_deposit = d_bountiful_plains add_deposit = d_black_soil } } if = { limit = { is_planet_class = pc_volcanic } # Mining - 9 total # +2 each, RL so not all homeworlds are the same while = { count = 2 random_list = { 1 = { add_deposit = d_volcanic_rich_mountain } 1 = { add_deposit = d_volcanic_mineral_fields } 1 = { add_deposit = d_volcanic_mineral_layers } 1 = { add_deposit = d_volcanic_weak_crust } } } # +1 each add_deposit = d_volcanic_ore_veins add_deposit = d_volcanic_mineral_hills # +3 add_deposit = d_volcanic_lava_river # Polytechnic - 6 total # +2 each, RL so not all homeworlds are the same while = { count = 3 random_list = { 1 = { add_deposit = d_volcanic_stable_plateaus } 1 = { add_deposit = d_volcanic_tranquil_flatlands } 1 = { add_deposit = d_volcanic_intraplate } 1 = { add_deposit = d_volcanic_basalt_plains } } } } # Ocean Paradise Origin if = { limit = { owner = { OR = { has_origin = origin_ocean_paradise has_origin = origin_ocean_machines } } } create_ocean_paradise_planet = yes } # Wilderness Origin if = { limit = { owner = { is_wilderness_empire = yes } } create_wilderness_planet = yes } } # Special for Earth generate_earth_deposits_and_blockers = { optimize_memory clear_deposits = yes add_deposit = d_mesopotamian_urban_corridor add_deposit = d_boswash_metropolitan_axis add_deposit = d_mauritanian_security_zone add_deposit = d_great_albertan_crater add_deposit = d_scandinavian_reclamation_sector add_deposit = d_saharan_irrigation_project add_deposit = d_pearl_river_agglomerate add_deposit = d_great_pacific_garbage_patch if = { limit = { owner = { is_machine_empire = yes } } add_deposit = d_rushing_waterfalls } if = { limit = { owner = { is_environmental_architects_empire = yes } } add_random_natural_blocker_and_give_tech = yes if = { limit = { owner = { has_valid_civic = civic_machine_servitor } } add_deposit = d_unsupervised_settlement } } else = { add_deposit = d_failing_infrastructure_earth if = { limit = { owner = { has_valid_civic = civic_machine_servitor } } add_deposit = d_hot_springs add_deposit = d_strip_mine add_deposit = d_unsupervised_settlement } else_if = { limit = { owner = { is_hive_empire = yes } } add_deposit = d_collapsed_burrows } else = { add_deposit = d_decrepit_dwellings } } if = { limit = { owner = { is_lithoid_empire = yes NOT = { has_valid_civic = civic_hive_devouring_swarm } } } while = { count = 4 add_deposit = d_hibernating_lithoids } } if = { limit = { owner = { is_lithoid_devouring_swarm = yes } } while = { count = 2 add_deposit = d_hibernating_lithoids } } if = { limit = { owner = { has_origin = origin_life_seeded } } set_planet_size = 30 add_deposit = d_dust_caverns add_deposit = d_bubbling_swamp add_deposit = d_crystalline_caverns } if = { limit = { is_planet_class = pc_desert # Just in case players cause trouble } set_planet_flag = tasty_desert } } generate_start_buildings_and_districts = { optimize_memory set_timed_planet_flag = { flag = ignore_ai_building_limitations days = 1 } inline_script = "game_start/rural_districts_initializer" inline_script = "game_start/authority_regular" inline_script = "game_start/authority_hive" inline_script = "game_start/authority_machine" ## End of Default ## Start of Unique District Setup ## Species inline_script = "game_start/species_lithoids" inline_script = "game_start/species_infernals" inline_script = "game_start/species_individual_machine" inline_script = "game_start/species_subspecies" ## Set subspecies flags # Shipsets inline_script = "game_start/shipsets" ## Ethic inline_script = "game_start/ethic_spiritualist" inline_script = "game_start/ethic_materialist" inline_script = "game_start/ethic_pacifist" inline_script = "game_start/ethic_militarist" inline_script = "game_start/ethic_egalitarian" inline_script = "game_start/ethic_authoritarian" inline_script = "game_start/ethic_xenophile" inline_script = "game_start/ethic_xenophobe" # BioGenesis inline_script = "game_start/origin_wilderness" ## Origin # Default inline_script = "game_start/origin_default" # Shadows of the Shroud inline_script = "game_start/origin_shroud_forged" inline_script = "game_start/origin_mindwarden" # Grand Archive inline_script = "game_start/origin_primal_calling" # Machine Age inline_script = "game_start/origin_cybernetic_creed" inline_script = "game_start/origin_synthetic_fertility" inline_script = "game_start/origin_arc_welders" # First Contact inline_script = "game_start/origin_payback" inline_script = "game_start/origin_broken_shackles" # Toxoids inline_script = "game_start/origin_toxic_knights" # Overlord inline_script = "game_start/origin_progenitor_hive" inline_script = "game_start/origin_subterranean" # Aquatics inline_script = "game_start/origin_ocean_paradise" # Necroids inline_script = "game_start/origin_necrophage" # Federations inline_script = "game_start/origin_shattered_ring" inline_script = "game_start/origin_remnants" ## for Void Dwellers see void_dweller_home_planet_setup # Humanoids inline_script = "game_start/origin_clone_army" # Synthetic Dawn inline_script = "game_start/origin_machine" # Utopia inline_script = "game_start/origin_mechanist" ##Civics inline_script = "game_start/civics" # Tankbound civic (removes every farming districts so we want to do that at the end) inline_script = "game_start/civic_tankbound" # Volcanic Worlds use a different district_set and deposits # Keep this above game_start/rural_districts_placement if = { limit = { uses_district_set = volcanic_world } inline_script = "game_start/volcanic_world_setup" } # Apply rural districts depending on variable count inline_script = "game_start/rural_districts_placement" give_starting_resources_effect = yes } add_building_if_not_present = { if = { limit = { NOT = { has_building = $BUILDING$ } } add_building = $BUILDING$ } } generate_start_pops = { optimize_memory # SECONDARY SPECIES STARTS: add Traits, set living standards, etc. if = { limit = { owner = { OR = { has_origin = origin_syncretic_evolution has_origin = origin_necrophage has_valid_civic = civic_machine_servitor has_valid_civic = civic_machine_assimilator has_valid_civic = civic_hive_bodysnatcher } } } if = { # Machines: Add 'Machine' Trait limit = { last_created_species = { is_species_class = MACHINE } } modify_species = { species = last_created_species add_trait = trait_machine_unit add_traits_at_start_of_list = yes } last_created_species = { save_event_target_as = last_created_species } } # Syncretic Evolution & Necrophage: set flag & citizenship type; (Necrophage) spawn prepatent Pops if = { limit = { owner = { OR = { has_origin = origin_syncretic_evolution has_origin = origin_necrophage } } } last_created_species = { set_species_flag = syncretic_species@root.owner if = { limit = { prev.owner = { has_origin = origin_syncretic_evolution } } set_citizenship_type = { country = root.owner type = citizenship_slavery } } } if = { limit = { owner = { has_origin = origin_necrophage OR = { has_valid_civic = civic_fanatic_purifiers has_valid_civic = civic_hive_devouring_swarm is_gestalt = yes } } } create_pop_group = { size = 1200 species = last_created_species } } else = { create_pop_group = { size = 2400 species = last_created_species } } } generate_civic_secondary_pops = yes make_nascent_starting_pops = yes } # Mechanist: spawn robot Pops; add Job-specific Traits; spawn Robot Assembly Plant if = { limit = { owner = { has_origin = origin_mechanists } } owner = { create_built_robot_species = yes } last_created_species = { change_species_characteristics = { add_trait = trait_auto_mod_robotic } } create_pop_group = { size = 800 species = last_created_species } while = { limit = { pop_amount < 2700 } create_pop_group = { species = owner_main_species } } } # MISC: spawn Pops if = { limit = { owner = { is_hive_empire = yes is_wilderness_empire = no } } while = { limit = { pop_amount < 3300 } create_pop_group = { species = owner_main_species } } } if = { limit = { owner = { has_valid_civic = civic_machine_servitor } } while = { limit = { pop_amount < 4800 } # Includes the 2,000 Bio-Trophies that were already created. create_pop_group = { species = owner_main_species } } } if = { limit = { owner = { has_origin = origin_shroud_forged } } while = { limit = { pop_amount < 1900 } create_pop_group = { species = owner_main_species ethos = random } } owner_main_species = { drone_conversion_new_species_effect = yes set_species_flag = original_main_species # After conversion effect, so it's the only species with the flag } while = { limit = { pop_amount < 2900 } create_pop_group = { species = event_target:secondary_main_species category = complex_drone } } } if = { limit = { owner = { is_machine_empire = yes } } while = { limit = { pop_amount < 2800 } create_pop_group = { species = owner_main_species } } } if = { limit = { owner = { is_megacorp = yes has_reduced_pop_origin = no } } while = { limit = { pop_amount < 2800 } create_pop_group = { species = owner_main_species } } } if = { limit = { owner = { has_origin = origin_broken_shackles } pop_amount < 600 } while = { limit = { pop_amount < 600 } create_pop_group = { species = owner_main_species } } } if = { limit = { owner = { is_regular_empire = yes has_reduced_pop_origin = no } } while = { limit = { pop_amount < 2800 } create_pop_group = { species = owner_main_species } } } if = { limit = { owner = { has_origin = origin_payback } pop_amount < 1800 } while = { limit = { pop_amount < 1800 } create_pop_group = { species = owner_main_species } } } if = { limit = { owner = { has_origin = origin_fear_of_the_dark } } while = { limit = { pop_amount < 2000 } create_pop_group = { species = owner_main_species } } } if = { limit = { owner = { has_origin = origin_default } } create_pop_group = { size = 400 species = owner_main_species } } if = { limit = { owner = { is_eager_explorer_empire = yes } } while = { count = 10 random_owned_pop_group = { limit = { is_same_species = root.owner.species } kill_single_pop = yes } } } if = { limit = { exists = owner owner = { has_origin = origin_toxic_knights } } while = { #they get the habitat count = 11 random_owned_pop_group = { kill_single_pop = yes } } } # Nascent Stage pops being generated make_nascent_starting_pops = yes # Permanent Employment: add Zombie Trait if = { limit = { owner = { has_civic = civic_permanent_employment } } while = { count = 4 random_owned_pop_group = { kill_single_pop = yes } } create_zombie_pop_group = { SIZE = 400 } } # Civilians if = { limit = { owner = { NOR = { has_origin = origin_broken_shackles is_wilderness_empire = yes is_tankbound_empire = yes has_valid_civic = civic_machine_servitor } } } while = { count = @civilians_counter if = { limit = { owner = { is_gestalt = no } } create_pop_group = { size = @civilians_gamestart species = owner_main_species category = civilian } } else = { create_pop_group = { size = @civilians_gamestart species = owner_main_species category = maintenance_drone } } } } # Wilderness if = { limit = { owner = { is_wilderness_empire = yes } } while = { limit = { pop_amount < 2000 } create_pop_group = { species = owner_main_species } } } #Synthetic Fertility if = { limit = { owner = { has_origin = origin_synthetic_fertility } } create_pop_group = { size = 900 species = owner_main_species } } } generate_civic_secondary_pops = { # Ensuring that this country flag has been set by this point if = { limit = { owner = { OR = { last_created_species = { is_lithoid = yes } last_created_species = { has_trait = trait_machine_unit } } } } owner = { set_country_flag = lithoid_subspecies } } else_if = { limit = { owner = { last_created_species = { is_infernal = yes } } } owner = { set_country_flag = infernal_subspecies } } else = { owner = { set_country_flag = non_lithoid_subspecies } } # Rogue Servitor & Driven Assimilator setting up pop special traits to make sure that their secondary species have all the cool traits. Spawning of the pops happens next. if = { limit = { owner = { OR = { has_valid_civic = civic_machine_assimilator has_valid_civic = civic_machine_servitor } OR = { has_origin = origin_void_machines has_origin = origin_post_apocalyptic_machines has_origin = origin_subterranean_machines } } } owner = { switch = { trigger = has_origin origin_void_machines = { last_created_species = { modify_species = { species = this add_trait = trait_void_dweller_1 add_traits_at_start_of_list = yes ideal_planet_class = pc_habitat } } } origin_post_apocalyptic_machines = { last_created_species = { change_species_characteristics = { add_trait = trait_survivor add_traits_at_start_of_list = yes } } } origin_subterranean_machines = { last_created_species = { change_species_characteristics = { add_trait = trait_cave_dweller add_traits_at_start_of_list = yes } } } } } } else_if = { limit = { owner = { has_valid_civic = civic_hive_bodysnatcher OR = { has_origin = origin_void_dwellers has_origin = origin_post_apocalyptic has_origin = origin_subterranean has_origin = origin_wilderness } } } owner = { switch = { trigger = has_origin origin_void_dwellers = { last_created_species = { modify_species = { species = this add_trait = trait_void_dweller_1 add_traits_at_start_of_list = yes ideal_planet_class = pc_habitat } } } origin_post_apocalyptic = { last_created_species = { change_species_characteristics = { add_trait = trait_survivor add_traits_at_start_of_list = yes } } } origin_subterranean = { last_created_species = { change_species_characteristics = { add_trait = trait_cave_dweller add_traits_at_start_of_list = yes } } } origin_wilderness = { last_created_species = { change_species_characteristics = { add_trait = trait_wilderness add_traits_at_start_of_list = yes } } } } } } # Rogue Servitor: set citizenship, living standard & preference; spawn Pops if = { limit = { owner = { has_valid_civic = civic_machine_servitor } } last_created_species = { if = { limit = { root = { OR = { is_planet_class = pc_shattered_ring_habitable is_planet_class = pc_gaia } } } modify_species = { species = this ideal_planet_class = home_planet } } set_citizenship_type = { country = root.owner type = citizenship_limited } set_living_standard = { country = root.owner type = living_standard_organic_trophy } } while = { count = @civilians_counter create_pop_group = { size = @civilians_gamestart species = last_created_species } } } # Driven Assimilator and Bodysnatcher set citizenship, living standard & preference; spawn Pops if = { limit = { owner = { OR = { has_valid_civic = civic_machine_assimilator has_valid_civic = civic_hive_bodysnatcher } } } last_created_species = { if = { limit = { root = { OR = { is_planet_class = pc_shattered_ring_habitable is_planet_class = pc_gaia } } } modify_species = { species = this ideal_planet_class = home_planet } } if = { limit = { root.owner = { is_machine_empire = yes } } set_citizenship_type = { country = root.owner type = citizenship_full_machine } } else = { set_citizenship_type = { country = root.owner type = citizenship_full } } set_living_standard = { country = root.owner type = living_standard_hive_mind } } while = { count = @civilians_counter create_pop_group = { size = @civilians_gamestart species = last_created_species } } } } generate_home_planet_final_pass = { optimize_memory # Adjust life-seeded colonies if = { limit = { owner = { has_origin = origin_life_seeded } } owner = { # Nuke other colonies gained from advanced empire, etc every_owned_planet = { limit = { is_capital = no } remove_all_buildings = yes destroy_colony = yes } if = { limit = { NOR = { has_valid_civic = civic_permanent_employment has_valid_civic = civic_machine_servitor has_valid_civic = civic_machine_assimilator has_valid_civic = civic_hive_bodysnatcher species = { has_trait = trait_nascent_stage } } } change_dominant_species = { species = last_created_species change_all = yes } } } } if = { limit = { owner = { OR = { has_origin = origin_shattered_ring has_origin = origin_machine } } } owner = { capital_scope = { system_star = { set_deposit = d_energy_10 } } } } if = { limit = { owner = { has_origin = origin_tree_of_life } } owner = { capital_scope = { add_deposit = d_tree_of_life_home } } } if = { limit = { owner = { has_origin = origin_lithoid } } owner = { capital_scope = { add_deposit = d_lithoid_crater add_deposit = d_buried_lithoids add_deposit = d_buried_lithoids add_deposit = d_buried_lithoids add_deposit = d_buried_lithoids } } } if = { limit = { owner = { has_origin = origin_lost_colony is_gestalt = no } } owner = { capital_scope = { add_modifier = { modifier = colonial_spirit_mod } } } } else_if = { limit = { owner = { has_origin = origin_lost_colony is_gestalt = yes } } owner = { capital_scope = { add_modifier = { modifier = colonial_spirit_gestalt_mod } } } } if = { limit = { owner = { has_origin = origin_progenitor_hive } } owner = { capital_scope = { add_deposit = d_progenitor } } } if = { limit = { owner = { has_origin = origin_default } } owner = { if = { limit = { is_gestalt = no } capital_scope = { add_modifier = { modifier = prosp_uni_mod days = 7200 } } } else = { capital_scope = { add_modifier = { modifier = prosp_uni_mod_gestalt days = 7200 } } } } } if = { limit = { owner = { has_origin = origin_machine } } owner = { capital_scope = { add_deposit = d_machine_minerals solar_system = { every_system_planet = { limit = { colonizable_planet = no is_star = no } clear_deposits = yes } every_system_planet = { limit = { is_asteroid = yes } remove_planet = yes } every_system_planet = { limit = { colonizable_planet = no is_star = no is_asteroid = no NOT = { is_planet_class = pc_gas_giant } } change_pc = pc_broken } every_system_planet = { limit = { colonizable_planet = no is_star = no is_planet_class = pc_gas_giant } change_pc = pc_molten add_modifier = { modifier = chthonian_planet } every_moon = { limit = { colonizable_planet = no } remove_planet = yes } while = { limit = { planet_size >= 20 } change_planet_size = -6 } } } } } } if = { limit = { owner = { any_owned_pop_group = { has_trait = trait_exotic_metabolism } } } add_deposit = d_exotic_mountain } } ### Origins void_dweller_home_planet_setup = { optimize_memory set_planet_flag = habitat_level_2 set_timed_planet_flag = { flag = ignore_ai_building_limitations days = 1 } owner = { save_event_target_as = void_dweller_owner give_technology = { tech = tech_habitat_1 message = no } add_research_option = tech_habitat_2 } solar_system = { random_system_planet = { limit = { has_planet_flag = habitat_1_planet } save_event_target_as = habitat_1_planet solar_system = { spawn_orbital_effect = { TYPE = major HABITAT_OWNER = event_target:void_dweller_owner TARGET_PLANET = event_target:habitat_1_planet } } } random_system_planet = { limit = { has_planet_flag = habitat_2_planet } save_event_target_as = habitat_2_planet solar_system = { spawn_orbital_effect = { TYPE = major HABITAT_OWNER = event_target:void_dweller_owner TARGET_PLANET = event_target:habitat_2_planet } } } random_system_planet = { limit = { has_planet_flag = habitat_3_planet } save_event_target_as = habitat_3_planet solar_system = { spawn_orbital_effect = { TYPE = major HABITAT_OWNER = event_target:void_dweller_owner TARGET_PLANET = event_target:habitat_3_planet } } } if = { limit = { event_target:void_dweller_owner = { is_lithoid_or_infernal_empire = yes } } random_system_planet = { limit = { has_deposit = no can_have_mineral_deposits = yes } add_deposit = d_minerals_4 set_planet_flag = mining_planet } } every_system_planet = { limit = { has_planet_flag = mining_planet } create_mining_station = { owner = event_target:void_dweller_owner } } # Change starting pre-scripted ideal into inhabitable worlds # First pre-sripted is a research system closest_system = { limit = { has_star_flag = neighbor_t1_first_colony } set_star_flag = ideal_habitat_t1 max_steps = 3 random_system_planet = { limit = { is_colonizable = yes is_colony = no has_planet_flag = prescripted_ideal } change_pc = pc_frozen set_deposit = d_engineering_5 } while = { count = 3 random_system_planet = { limit = { is_star = no is_colonizable = no has_deposit = no has_anomaly = no } random_list = { 5 = { set_deposit = d_physics_2 } 5 = { set_deposit = d_society_2 } 5 = { set_deposit = d_engineering_2 } 1 = { set_deposit = d_physics_3 } 1 = { set_deposit = d_society_3 } 1 = { set_deposit = d_engineering_3 } } } } } # Second pre-sripted is a resource system closest_system = { limit = { has_star_flag = neighbor_t2_second_colony } set_star_flag = ideal_habitat_t2 max_steps = 6 random_system_planet = { limit = { is_colonizable = yes is_colony = no has_planet_flag = prescripted_ideal } remove_planet_flag = prescripted_ideal change_pc = pc_molten set_deposit = d_alloys_3 add_deposit = d_minerals_5 } while = { count = 3 random_system_planet = { limit = { is_star = no has_deposit = no has_anomaly = no } random_list = { 5 = { set_deposit = d_minerals_2 } 5 = { set_deposit = d_energy_2 } 1 = { set_deposit = d_minerals_3 } 1 = { set_deposit = d_energy_3 } } } } } } event_target:habitat_1_planet = { set_planet_flag = habitat@PREV } owner = { if = { limit = { OR = { AND = { is_lithoid_empire = no is_mechanical_species = no is_infernal_empire = no } is_catalytic_empire = yes country_uses_bio_ships = yes } } root.solar_system.starbase = { remove_starbase_building = { slot = 1 } set_starbase_building = { slot = 1 building = hydroponics_bay } } } if = { limit = { has_valid_civic = civic_private_healthcare_corporate } give_technology = { message = no tech = tech_frontier_health } add_research_option = tech_subdermal_stimulation } } if = { # First we generate pops for empires without strange pop starts limit = { owner = { NOR = { is_eager_explorer_empire = yes has_valid_civic = civic_machine_servitor has_valid_civic = civic_machine_assimilator has_valid_civic = civic_hive_bodysnatcher } } } create_pop_group = { size = 2800 species = owner_main_species } } else_if = { # Then we generate pops for eager explorer empires limit = { owner = { is_eager_explorer_empire = yes } } if = { #if they have a secondary species spawn that now limit = { owner = { OR = { has_valid_civic = civic_machine_servitor has_valid_civic = civic_machine_assimilator has_valid_civic = civic_hive_bodysnatcher } } } generate_civic_secondary_pops = yes } while = { limit = { pop_amount < 1800 } create_pop_group = { species = owner_main_species } } } else = { # Now we should only have secondary species generating empires left in this chain so spawn the rest generate_civic_secondary_pops = yes while = { limit = { pop_amount < 2800 } create_pop_group = { species = owner_main_species } } } if = { limit = { owner = { is_hive_empire = yes } } create_pop_group = { size = 500 species = owner_main_species } } # Civilians while = { count = @civilians_counter create_pop_group = { size = @civilians_gamestart species = owner_main_species } } if = { limit = { owner = { has_valid_civic = civic_permanent_employment } } while = { count = 4 weighted_random_owned_pop_group = { limit = { is_pop_category = worker is_robotic_species = no } modify_species = { species = this add_trait = trait_zombie add_traits_at_start_of_list = yes } if = { limit = { has_trait = trait_syncretic_proles } modify_species = { species = this remove_trait = trait_syncretic_proles } } } } } set_planet_entity = { entity = "habitat_phase_03_entity" graphical_culture = owner } inline_script = "game_start/rural_districts_initializer" add_building = building_hab_major_capital add_district_and_planet_size_if_needed_effect_amount = { amount = 2 district = district_hab_housing } if = { limit = { owner = { OR = { is_regular_empire = yes has_valid_civic = civic_machine_servitor has_valid_civic = civic_machine_obsessional_directive } } } add_zone = { district = district_hab_housing zone = zone_industrial zone_slot = 2 } add_building = { building = building_factory_1 zone = zone_industrial } } else = { add_zone = { district = district_hab_housing zone = zone_foundry zone_slot = 2 } } add_district_and_planet_size_if_needed_effect_amount = { amount = 1 district = district_hab_science } add_zone = { district = district_hab_housing zone = zone_habitat_research_unity zone_slot = 1 } # Shipsets inline_script = "game_start/shipsets" # Species inline_script = "game_start/species_lithoids" inline_script = "game_start/species_hive_void_dwellers" inline_script = "game_start/species_machine_void_dwellers" inline_script = "game_start/species_individual_machine_void_dwellers" inline_script = "game_start/species_subspecies" ## Set subspecies flags ## Ethic inline_script = "game_start/ethic_spiritualist" inline_script = "game_start/ethic_materialist" inline_script = "game_start/ethic_pacifist" inline_script = "game_start/ethic_militarist" inline_script = "game_start/ethic_egalitarian" inline_script = "game_start/ethic_authoritarian" inline_script = "game_start/ethic_xenophile" inline_script = "game_start/ethic_xenophobe" ##Civics inline_script = "game_start/civics" # Apply rural districts depending on variable count inline_script = "game_start/rural_districts_placement" set_planet_size = 6 give_starting_resources_effect = yes } add_district_and_planet_size_if_needed_effect = { optimize_memory if = { limit = { free_district_slots >= 1 } add_district = { district_type = $district$ ignore_cap = yes } } else_if = { limit = { free_district_slots = 0 planet_size < 25 } change_planet_size = 1 add_district = { district_type = $district$ ignore_cap = yes } } #else do nothing } add_district_if_possible_effect = { optimize_memory if = { limit = { free_district_slots >= 1 } add_district = { district_type = $district$ ignore_cap = yes } } #else do nothing } give_starting_resources_effect = { optimize_memory if = { limit = { owner = { NOT = { has_country_flag = start_resources_granted } } } owner = { add_resource = { energy = 200 } add_resource = { minerals = 200 } add_resource = { alloys = 200 } add_resource = { trade = 200 } add_resource = { influence = 100 } add_resource = { unity = 50 } } if = { limit = { owner = { OR = { country_uses_bio_ships = yes has_valid_civic = civic_hive_cordyceptic_drones is_beastmasters_empire = yes } } } owner = { add_resource = { food = 200 } add_resource = { alloys = -50 } } } if = { limit = { is_infernal_empire = yes } owner = { add_resource = { food = -200 } add_resource = { minerals = 50 } add_resource = { alloys = 50 } } if = { limit = { owner = { has_country_flag = non_lithoid_subspecies } } owner = { add_resource = { food = 200 } #Adding 200 starting food back if theres a food consuming subspecies } } } else_if = { limit = { owner = { OR = { is_regular_empire = yes has_country_flag = non_lithoid_subspecies } } } owner = { add_resource = { food = 200 } } } if = { limit = { owner = { OR = { is_regular_empire = yes has_subspecies_civic_or_origin = yes } } } owner = { add_resource = { consumer_goods = 100 } } } if = { limit = { owner = { is_catalytic_empire = yes } } owner = { add_resource = { food = 200 } } } owner = { set_country_flag = start_resources_granted } } } imperial_origin_start_effect = { # Main Backup if = { # Backup if the main system hasn't already been initialized limit = { NOT = { exists = event_target:origin_imperial_homeland_country } } # Find a random system, hopefully close to a player with the origin random_system = { limit = { has_owner = no has_special_star_flag_trigger = no } weights = { base = 1 modifier = { factor = 100 closest_system = { use_bypasses = no min_steps = 2 max_steps = 4 limit = { has_owner = yes owner = { has_origin = origin_imperial_vassal } } } } } # Start Spawning Systems set_spawn_system_batch = begin origin_spawn_system_effect = { INITIALIZER = overlord_system_init } # Main Empire event_target:origin_imperial_homeland.solar_system = { origin_spawn_system_effect = { INITIALIZER = overlord_system_2_init } origin_spawn_system_effect = { INITIALIZER = overlord_system_3_init } } # Vassals event_target:imperial_homeland_2.solar_system = { origin_spawn_system_effect = { INITIALIZER = overlord_system_4_init } } if = { limit = { NOT = { galaxy_size = tiny } } event_target:imperial_homeland_2.solar_system = { origin_spawn_system_effect = { INITIALIZER = overlord_system_5_init } } } if = { limit = { NOR = { galaxy_size = tiny galaxy_size = small } } event_target:imperial_homeland_3.solar_system = { origin_spawn_system_effect = { INITIALIZER = overlord_system_6_init } } } if = { limit = { NOR = { galaxy_size = tiny galaxy_size = small galaxy_size = medium } } event_target:imperial_homeland_3.solar_system = { origin_spawn_system_effect = { INITIALIZER = overlord_system_7_init } } } set_spawn_system_batch = end # Set up hyperlanes if they are missing imperial_origin_start_hyperlane_effect = { ORIGINAL_STAR_SYSTEM = event_target:imperial_homeland_2.solar_system SECOND_STAR_SYSTEM = event_target:origin_imperial_homeland.solar_system } imperial_origin_start_hyperlane_effect = { ORIGINAL_STAR_SYSTEM = event_target:imperial_homeland_3.solar_system SECOND_STAR_SYSTEM = event_target:origin_imperial_homeland.solar_system } imperial_origin_start_hyperlane_effect = { ORIGINAL_STAR_SYSTEM = event_target:imperial_homeland_4.solar_system SECOND_STAR_SYSTEM = event_target:imperial_homeland_2.solar_system } if = { limit = { exists = event_target:imperial_homeland_5 } imperial_origin_start_hyperlane_effect = { ORIGINAL_STAR_SYSTEM = event_target:imperial_homeland_5.solar_system SECOND_STAR_SYSTEM = event_target:imperial_homeland_2.solar_system } } if = { limit = { exists = event_target:imperial_homeland_6 } imperial_origin_start_hyperlane_effect = { ORIGINAL_STAR_SYSTEM = event_target:imperial_homeland_6.solar_system SECOND_STAR_SYSTEM = event_target:imperial_homeland_3.solar_system } } if = { limit = { exists = event_target:imperial_homeland_7 } imperial_origin_start_hyperlane_effect = { ORIGINAL_STAR_SYSTEM = event_target:imperial_homeland_7.solar_system SECOND_STAR_SYSTEM = event_target:imperial_homeland_3.solar_system } } } } else_if = { limit = { # Backup if any of the other main empire systems are missing OR = { NOT = { any_system = { has_star_flag = overlord_system_2_flag } } NOT = { any_system = { has_star_flag = overlord_system_3_flag } } } } event_target:origin_imperial_homeland.solar_system = { origin_spawn_system_effect = { INITIALIZER = overlord_system_2_init } origin_spawn_system_effect = { INITIALIZER = overlord_system_3_init } imperial_origin_start_hyperlane_effect = { ORIGINAL_STAR_SYSTEM = event_target:imperial_homeland_2.solar_system SECOND_STAR_SYSTEM = event_target:origin_imperial_homeland.solar_system } imperial_origin_start_hyperlane_effect = { ORIGINAL_STAR_SYSTEM = event_target:imperial_homeland_3.solar_system SECOND_STAR_SYSTEM = event_target:origin_imperial_homeland.solar_system } } } # Vassal Backup if = { # Backup for vassal 1 limit = { any_system = { has_star_flag = overlord_system_2_flag } NOT = { any_system = { has_star_flag = overlord_system_4_flag } } } imperial_origin_vassal_backup_effect = { SYSTEM_FLAG = overlord_system_2_flag INITIALIZER = overlord_system_4_init ORIGINAL_STAR_SYSTEM = event_target:imperial_homeland_4.solar_system } } if = { # Backup for vassal 2 limit = { any_system = { has_star_flag = overlord_system_2_flag } NOR = { galaxy_size = tiny any_system = { has_star_flag = overlord_system_5_flag } } } imperial_origin_vassal_backup_effect = { SYSTEM_FLAG = overlord_system_2_flag INITIALIZER = overlord_system_5_init ORIGINAL_STAR_SYSTEM = event_target:imperial_homeland_5.solar_system } } if = { # Backup for vassal 3 limit = { any_system = { has_star_flag = overlord_system_3_flag } NOR = { galaxy_size = tiny galaxy_size = small any_system = { has_star_flag = overlord_system_6_flag } } } imperial_origin_vassal_backup_effect = { SYSTEM_FLAG = overlord_system_3_flag INITIALIZER = overlord_system_6_init ORIGINAL_STAR_SYSTEM = event_target:imperial_homeland_6.solar_system } } if = { # Backup for vassal 4 limit = { any_system = { has_star_flag = overlord_system_3_flag } NOR = { galaxy_size = tiny galaxy_size = small galaxy_size = medium any_system = { has_star_flag = overlord_system_7_flag } } } imperial_origin_vassal_backup_effect = { SYSTEM_FLAG = overlord_system_3_flag INITIALIZER = overlord_system_7_init ORIGINAL_STAR_SYSTEM = event_target:imperial_homeland_7.solar_system } } # Modifier to reduce influence event_target:origin_imperial_homeland_country = { add_modifier = { modifier = imperial_vassal_ai_modifier days = -1 } } # Rival Country if = { limit = { OR = { AND = { is_multiplayer = yes NOT = { count_country = { count >= 2 limit = { is_ai = no has_origin = origin_imperial_vassal } } } } is_multiplayer = no } } random_country = { limit = { is_ai = yes has_origin = origin_imperial_vassal } set_country_flag = origin_imperial_vassal_rival_country } } # Startup event for vassals every_playable_country = { limit = { has_origin = origin_imperial_vassal } country_event = { id = origin.5700 } if = { limit = { is_ai = no } country_event = { id = origin.5703 days = 1 } } else = { country_event = { id = origin.5710 } } } } imperial_origin_start_hyperlane_effect = { if = { limit = { NOT = { $ORIGINAL_STAR_SYSTEM$ = { has_hyperlane_to = $SECOND_STAR_SYSTEM$ } } } add_hyperlane = { from = $ORIGINAL_STAR_SYSTEM$ to = $SECOND_STAR_SYSTEM$ } } } origin_spawn_system_effect = { spawn_system = { min_distance = 10 max_distance = 30 max_jumps = 0 hyperlane = yes initializer = $INITIALIZER$ } } imperial_origin_vassal_backup_effect = { random_system = { limit = { has_star_flag = $SYSTEM_FLAG$ } save_event_target_as = this_system origin_spawn_system_effect = { INITIALIZER = $INITIALIZER$ } imperial_origin_start_hyperlane_effect = { ORIGINAL_STAR_SYSTEM = $ORIGINAL_STAR_SYSTEM$ SECOND_STAR_SYSTEM = event_target:this_system } } } create_life_seeded_planet = { set_planet_size = 30 # 5 + 3 energy add_deposit = d_searing_desert add_deposit = d_underwater_vent add_deposit = d_tempestous_mountain # 5 + 3 mining add_deposit = d_ore_rich_caverns add_deposit = d_prosperous_mesa add_deposit = d_submerged_ore_veins # 5 + 3 farming (lithoids swap 3 for minerals) add_deposit = d_lush_jungle add_deposit = d_teeming_reef if = { limit = { exists = owner owner = { is_lithoid_or_infernal_empire = yes } } add_deposit = d_rich_mountain } else_if = { limit = { exists = owner owner = { is_lithoid_empire = no } } add_deposit = d_black_soil } # In case the owner doesn't exist, as when creating Life-Seeded pre-ftls. else = { random_list = { 50 = { add_deposit = d_rich_mountain } 50 = { add_deposit = d_black_soil } } } # 1 random medium deposit random_list = { 33 = { add_deposit = d_frozen_gas_lake } 33 = { add_deposit = d_prosperous_mesa } 33 = { add_deposit = d_fertile_lands } } add_deposit = d_dust_desert add_deposit = d_fuming_bog add_deposit = d_crystal_forest } create_ocean_paradise_planet = { if = { limit = { exists = owner owner = { is_gestalt = yes } } add_modifier = { modifier = ocean_paradise_hive } } else = { add_modifier = { modifier = ocean_paradise } } clear_deposits = yes clear_blockers = yes # Food add_deposit = d_teeming_reef add_deposit = d_teeming_reef add_deposit = d_teeming_reef add_deposit = d_teeming_reef add_deposit = d_teeming_reef add_deposit = d_teeming_reef add_deposit = d_teeming_reef add_deposit = d_teeming_reef # Minerals add_deposit = d_submerged_ore_veins add_deposit = d_submerged_ore_veins add_deposit = d_submerged_ore_veins # Energy add_deposit = d_underwater_vent add_deposit = d_underwater_vent add_deposit = d_underwater_vent # Bonus add_deposit = d_crystal_reef random_list = { 50 = { add_deposit = d_submerged_ore_veins } 50 = { add_deposit = d_underwater_vent } } # Planetscapers if = { limit = { exists = owner owner = { is_environmental_architects_empire = yes } } add_random_natural_blocker_and_give_tech = yes } } create_wilderness_planet = { clear_deposits = yes clear_blockers = yes # Features # Food add_deposit = d_lichen_fields add_deposit = d_great_river add_deposit = d_forgiving_tundra if = { limit = { exists = owner owner = { is_lithoid_or_infernal_empire = yes } } add_deposit = d_rich_mountain } else = { add_deposit = d_fungal_forest } # Minerals add_deposit = d_veiny_cliffs add_deposit = d_rich_mountain add_deposit = d_rich_mountain # Energy add_deposit = d_arid_highlands add_deposit = d_rushing_waterfalls add_deposit = d_geothermal_vent # Blockers add_deposit = d_scorched_plains add_deposit = d_scorched_plains if = { limit = { owner = { has_valid_civic = civic_machine_servitor } } add_deposit = d_hot_springs add_deposit = d_strip_mine add_deposit = d_unsupervised_settlement } else = { add_deposit = d_decrepit_dwellings } if = { limit = { owner = { is_lithoid_empire = yes NOT = { has_valid_civic = civic_hive_devouring_swarm } } } while = { count = 4 add_deposit = d_hibernating_lithoids } } if = { limit = { owner = { is_lithoid_empire = yes has_valid_civic = civic_hive_devouring_swarm } } while = { count = 2 add_deposit = d_hibernating_lithoids } } if = { limit = { is_planet_class = pc_desert # Just in case players cause trouble } set_planet_flag = tasty_desert } } fear_of_the_dark_binary_planets = { save_event_target_as = fotd_country random_planet_within_border = { limit = { has_planet_flag = delete_me_planet } remove_planet = yes } random_planet_within_border = { limit = { has_planet_flag = haven_flag } save_global_event_target_as = fotd_seperatist_planet@prev set_planet_flag = fotd_seperatist_planet@prev create_fear_of_the_dark_country = yes setup_fear_of_the_dark_pre_ftl = yes if = { limit = { has_planet_flag = planet_mars } set_mars_entity = yes } } random_planet_within_border = { limit = { has_planet_flag = divider_flag } add_deposit = d_alloys_5 } random_planet_within_border = { limit = { has_planet_flag = divider_flag } create_mining_station = { owner = event_target:fotd_country } } } low_tech_start_add_research_options_effect = { if = { limit = { country_uses_bio_ships = yes } add_research_option = tech_maulers } else = { add_research_option = tech_corvettes } add_research_option = tech_basic_science_lab_1 add_research_option = tech_planetary_government } fruitful_start_effect = { # Establish first contact with the Tyanki set_country_flag = tiyanki_encountered create_tiyanki_country = yes # Set up the event chain container for the special proects begin_event_chain = { event_chain = fruitful_partnership_chain target = this } # Set up event for getting the Tyanki technologies later country_event = { id = origin.7000 days = 1800 random = 1800 } random_owned_starbase = { set_starbase_building = { slot = 1 building = feeder } } capital_scope.solar_system = { # Spawn critters to a nearby system random_neighbor_system = { set_star_flag = tiyanki_plantoid_system random_system_planet = { limit = { is_star = yes } event_target:tiyanki_country = { create_fleet = { name = "NAME_Tiyanki_Space_Whale" effect = { set_owner = event_target:tiyanki_country create_ship = { design = "NAME_Tiyanki_Cow" } create_ship = { design = "NAME_Tiyanki_Bull" } create_ship = { design = "NAME_Tiyanki_Calf" } create_ship = { design = "NAME_Tiyanki_Hatchling" } set_location = prevprev set_fleet_stance = passive set_aggro_range_measure_from = self set_aggro_range = 0 set_fleet_flag = NAME_Tiyanki_Space_Whale queue_actions = { wait = { # Cooldown until they start moving duration = 320 random = 80 } } } } } } } # Imprint the space amoeba near your home so they will immediately go to your home system to eat, # instead of vanishing into a natural wormhole closest_system = { limit = { has_star_flag = tiyanki_plantoid_system } every_fleet_in_system = { limit = { owner = { is_country_type = tiyanki } } set_fleet_flag = fruitful_lured_critter auto_move_to_planet = { target = prev.star clear_auto_move_on_arrival = yes } } } } } lost_colony_generate_parent_effect = { if = { # hive parent limit = { event_target:lost_colony_child = { is_hive_empire = yes } } if = { # Parent hive has Progenitor hive if you own the Overlord DLC limit = { has_overlord_dlc = yes } create_country = { species = event_target:lost_colony_child name_list = event_target:lost_colony_child type = default origin = "origin_progenitor_hive" government_restrictions = { civics = { NOT = { value = civic_hive_bodysnatcher } } } authority = auth_hive_mind civics = { civic = civic_hive_divided_attention civic = random } } } else = { create_country = { species = event_target:lost_colony_child name_list = event_target:lost_colony_child type = default origin = "origin_default" government_restrictions = { civics = { NOT = { value = civic_hive_bodysnatcher } } } authority = auth_hive_mind civics = { civic = civic_hive_divided_attention civic = random } } } } else_if = { # machine parent limit = { event_target:lost_colony_child = { is_machine_empire = yes } } create_country = { species = event_target:lost_colony_child name_list = event_target:lost_colony_child type = default origin = "origin_default" government_restrictions = { civics = { NOR = { value = civic_machine_servitor value = civic_machine_assimilator } } } authority = auth_machine_intelligence civics = { civic = civic_machine_delegated_functions civic = random } } } else = { # default parent create_country = { species = event_target:lost_colony_child name_list = event_target:lost_colony_child type = default origin = "origin_default" government_restrictions = { authority = { NOR = { value = auth_machine_intelligence value = auth_hive_mind } } } } } last_created_country = { save_event_target_as = lost_colony_parent add_resource = { minerals = 2400 energy = 2400 food = 2400 alloys = 800 consumer_goods = 1200 influence = 600 } } } lost_colony_generate_parent_human_effect = { if = { # hive parent limit = { event_target:human_lost_colony = { is_hive_empire = yes } } if = { # Parent hive has Progenitor hive if you own the Overlord DLC limit = { has_overlord_dlc = yes } random_list = { 50 = { create_country = { species = event_target:human_species name_list = HUMAN1 type = default origin = "origin_progenitor_hive" authority = auth_hive_mind civics = { civic = civic_hive_divided_attention civic = random } } } 50 = { create_country = { species = event_target:human_species name_list = HUMAN2 type = default origin = "origin_progenitor_hive" authority = auth_hive_mind civics = { civic = civic_hive_divided_attention civic = random } } } } } else = { random_list = { 50 = { create_country = { species = event_target:human_species name_list = HUMAN1 type = default origin = "origin_default" authority = auth_hive_mind civics = { civic = civic_hive_divided_attention civic = random } } } 50 = { create_country = { species = event_target:human_species name_list = HUMAN2 type = default origin = "origin_default" authority = auth_hive_mind civics = { civic = civic_hive_divided_attention civic = random } } } } } } else = { # default parent random_list = { 50 = { create_country = { species = event_target:human_species name_list = HUMAN1 type = default origin = "origin_default" government_restrictions = { authority = { NOR = { value = auth_machine_intelligence value = auth_hive_mind } } } } } 50 = { create_country = { species = event_target:human_species name_list = HUMAN2 type = default origin = "origin_default" government_restrictions = { authority = { NOR = { value = auth_machine_intelligence value = auth_hive_mind } } } } } } } last_created_country = { save_event_target_as = lost_colony_parent add_resource = { minerals = 2400 energy = 2400 food = 2400 alloys = 800 consumer_goods = 1200 influence = 600 } } } add_district_and_planet_size_if_needed_effect_amount = { optimize_memory while = { count < $amount$ if = { limit = { free_district_slots >= 1 } add_district = { district_type = $district$ ignore_cap = yes } } else_if = { limit = { free_district_slots = 0 planet_size < 25 } change_planet_size = 1 add_district = { district_type = $district$ ignore_cap = yes } } } } unplugged_origin_start_effect = { if = { limit = { NOT = { exists = event_target:origin_unplugged_assimilator_empire } } create_species = { name = NAME_Unplugged_Assimilator_species class = MACHINE namelist = MACHINE2 portrait = sd_art_robot traits = { ideal_planet_class = pc_machine trait = trait_machine_unit trait = random_traits } extra_trait_points = 2 allow_negative_traits = yes } last_created_species = { save_event_target_as = unplugged_assimilator_species } create_country = { name = NAME_Unplugged_Assimilator type = faction auto_delete = no flag = { icon = { category = "legion" file = "flag_opus.dds" } background = { category = "backgrounds" file = "00_solid.dds" } colors = { "burgundy" "burgundy" "null" "null" } } origin = origin_machine species = event_target:unplugged_assimilator_species effect = { every_playable_country = { limit = { has_origin = origin_unplugged } establish_communications_no_message = prev set_country_flag = Story2 # already encountered complex space-dwelling life set_country_flag = Story5 # already encountered sapient lifeforms } set_country_flag = unplugged_assimilator_empire save_global_event_target_as = origin_unplugged_assimilator_empire set_faction_hostility = { set_hostile = yes set_neutral = no set_friendly = no } random_playable_country = { limit = { has_origin = origin_unplugged } save_event_target_as = random_unplugged_country } set_graphical_culture = event_target:random_unplugged_country } } } # Spawn the Machine capital if = { limit = { NOT = { exists = event_target:origin_unplugged_machine_legacy_core } } random_system = { limit = { has_owner = no has_special_star_flag_trigger = no } weights = { base = 1 modifier = { factor = 1000000 closest_system = { use_bypasses = no min_steps = 3 max_steps = 4 limit = { has_owner = yes owner = { has_origin = origin_unplugged } } } } modifier = { factor = 0.5 closest_system = { use_bypasses = no min_steps = 1 max_steps = 3 limit = { has_owner = yes owner = { NOT = { has_origin = origin_unplugged } } } } } modifier = { factor = 2 count_neighbor_system = { count > 2 } } } set_spawn_system_batch = begin random_list = { 1 = { spawn_system = { min_distance = 15 max_distance = 15 max_jumps = 0 hyperlane = no # angle of 270 +- 60 min_orientation_angle = 210 max_orientation_angle = 330 initializer = origin_unplugged_machine_legacy_core_system_init } set_star_flag = machine_legacy_connect_periphery_1 } 1 = { spawn_system = { min_distance = 15 max_distance = 15 max_jumps = 0 hyperlane = no # angle of 30 +- 60 min_orientation_angle = 330 max_orientation_angle = 90 initializer = origin_unplugged_machine_legacy_core_system_init } set_star_flag = machine_legacy_connect_periphery_2 } 1 = { spawn_system = { min_distance = 15 max_distance = 15 max_jumps = 0 hyperlane = no # angle of 150 +- 60 min_orientation_angle = 90 max_orientation_angle = 210 initializer = origin_unplugged_machine_legacy_core_system_init } set_star_flag = machine_legacy_connect_periphery_3 } } event_target:origin_unplugged_machine_legacy_core.solar_system = { spawn_system = { min_distance = 6 max_distance = 6 max_jumps = 0 hyperlane = no min_orientation_angle = 90 max_orientation_angle = 90 initializer = origin_unplugged_machine_legacy_periphery_system_init } last_created_system = { save_event_target_as = origin_unplugged_machine_legacy_periphery_system_1 } spawn_system = { min_distance = 6 max_distance = 6 max_jumps = 0 hyperlane = no min_orientation_angle = 210 max_orientation_angle = 210 initializer = origin_unplugged_machine_legacy_periphery_system_init } last_created_system = { save_event_target_as = origin_unplugged_machine_legacy_periphery_system_2 } spawn_system = { min_distance = 6 max_distance = 6 max_jumps = 0 hyperlane = no min_orientation_angle = 330 max_orientation_angle = 330 initializer = origin_unplugged_machine_legacy_periphery_system_init } last_created_system = { save_event_target_as = origin_unplugged_machine_legacy_periphery_system_3 } } set_spawn_system_batch = end imperial_origin_start_hyperlane_effect = { ORIGINAL_STAR_SYSTEM = event_target:origin_unplugged_machine_legacy_core SECOND_STAR_SYSTEM = event_target:origin_unplugged_machine_legacy_periphery_system_1 } imperial_origin_start_hyperlane_effect = { ORIGINAL_STAR_SYSTEM = event_target:origin_unplugged_machine_legacy_core SECOND_STAR_SYSTEM = event_target:origin_unplugged_machine_legacy_periphery_system_2 } imperial_origin_start_hyperlane_effect = { ORIGINAL_STAR_SYSTEM = event_target:origin_unplugged_machine_legacy_core SECOND_STAR_SYSTEM = event_target:origin_unplugged_machine_legacy_periphery_system_3 } imperial_origin_start_hyperlane_effect = { ORIGINAL_STAR_SYSTEM = event_target:origin_unplugged_machine_legacy_periphery_system_1 SECOND_STAR_SYSTEM = event_target:origin_unplugged_machine_legacy_periphery_system_2 } imperial_origin_start_hyperlane_effect = { ORIGINAL_STAR_SYSTEM = event_target:origin_unplugged_machine_legacy_periphery_system_2 SECOND_STAR_SYSTEM = event_target:origin_unplugged_machine_legacy_periphery_system_3 } imperial_origin_start_hyperlane_effect = { ORIGINAL_STAR_SYSTEM = event_target:origin_unplugged_machine_legacy_periphery_system_3 SECOND_STAR_SYSTEM = event_target:origin_unplugged_machine_legacy_periphery_system_1 } switch = { trigger = has_star_flag machine_legacy_connect_periphery_1 = { imperial_origin_start_hyperlane_effect = { ORIGINAL_STAR_SYSTEM = event_target:origin_unplugged_machine_legacy_periphery_system_1 SECOND_STAR_SYSTEM = this } } machine_legacy_connect_periphery_2 = { imperial_origin_start_hyperlane_effect = { ORIGINAL_STAR_SYSTEM = event_target:origin_unplugged_machine_legacy_periphery_system_2 SECOND_STAR_SYSTEM = this } } machine_legacy_connect_periphery_3 = { imperial_origin_start_hyperlane_effect = { ORIGINAL_STAR_SYSTEM = event_target:origin_unplugged_machine_legacy_periphery_system_3 SECOND_STAR_SYSTEM = this } } } } # every unplugged player should have some machine legacy around them every_country = { limit = { has_origin = origin_unplugged } capital_star.solar_system = { every_neighbor_system = { limit = { has_owner = no } set_star_flag = unplugged_machine_legacy_flag set_star_flag = unplugged_machine_legacy_border_flag_3 } } } unplugged_origin_expand_machine_legacy_border_effect = yes set_spawn_system_batch = begin unplugged_origin_place_special_system_effect = { SYSTEM_FLAG = unplugged_machine_legacy_border_flag_3 INITIALIZER = unplugged_machine_legacy_tomb_1_system_init } unplugged_origin_place_special_system_effect = { SYSTEM_FLAG = unplugged_machine_legacy_border_flag_3 INITIALIZER = unplugged_machine_legacy_tomb_2_system_init } unplugged_origin_place_special_system_effect = { SYSTEM_FLAG = unplugged_machine_legacy_border_flag_1 INITIALIZER = unplugged_machine_legacy_tomb_3_system_init } unplugged_origin_place_special_system_effect = { SYSTEM_FLAG = unplugged_machine_legacy_border_flag_2 INITIALIZER = unplugged_machine_legacy_tomb_4_system_init } set_spawn_system_batch = end unplugged_origin_mark_exisiting_tomb_worlds_effect = yes unplugged_origin_system_backup_effect = yes unplugged_origin_find_available_machine_legacy_world_effect = { LOCAL_EVENT_TARGET = maker_planet } event_target:maker_planet = { save_global_event_target_as = origin_unplugged_maker_planet } unplugged_origin_find_available_machine_legacy_world_effect = { LOCAL_EVENT_TARGET = taken_planet } event_target:taken_planet = { save_global_event_target_as = origin_unplugged_taken_planet } unplugged_origin_find_available_machine_legacy_world_effect = { LOCAL_EVENT_TARGET = creators_planet } event_target:creators_planet = { save_global_event_target_as = origin_unplugged_creators_planet } every_country = { limit = { has_origin = origin_unplugged } unplugged_origin_find_available_machine_legacy_world_effect = { LOCAL_EVENT_TARGET = unplugged_homeworld } event_target:unplugged_homeworld = { save_global_event_target_as = origin_unplugged_unplugged_planet_@prev } } unplugged_origin_populate_machine_legacy_effect = yes } } generate_starting_rural_districts = { add_district_and_planet_size_if_needed_effect_amount = { amount = 2 district = district_generator } add_district_and_planet_size_if_needed_effect_amount = { amount = 2 district = district_mining } add_district_and_planet_size_if_needed_effect_amount = { amount = 3 district = district_farming } }