# Dyson Swarm First Stage dyson_swarm_1 = { entity = "dyson_swarm_phase_1_entity" construction_entity = "dyson_swarm_phase_1_entity" portrait = "GFX_megastructure_dyson_swarm_background" entity_offset = { x = 0.1 y = 0.1 } rotate_to_center = no scale_offset = yes place_entity_on_planet_plane = yes #show_in_outliner = no use_planet_resource = yes build_time = 1080 # 3 years resources = { category = megastructures cost = { unity = 1000 } cost = { trigger = { country_uses_bio_ships = no } alloys = 500 } cost = { trigger = { country_uses_bio_ships = yes } alloys = 500 mult = 0.5 } cost = { trigger = { country_uses_bio_ships = yes } food = 500 mult = @halved_alloy_to_food_cost_ratio } upkeep = { alloys = 5 } } construction_blocks_and_blocked_by = none custom_tooltip_requirements = "MEGASTRUCTURE_TOOLTIP_REQUIREMENTS_DYSON_SWARM" dismantle_cost = { category = megastructures cost = { energy = 500 } } dismantle_time = 360 dismantle_potential = { always = yes } dismantle_possible = { can_dismantle_megastructure = { TECH = tech_dyson_swarm } } on_dismantle_complete = { random_system_planet = { limit = { has_modifier = dyson_swarm_1_mod } remove_planet_flag = has_megastructure remove_modifier = dyson_swarm_1_mod } from = { add_resource = { alloys = 500 mult = modifier:megastructure_dismantle_refund_mult } if = { limit = { check_variable = { which = dyson_swarm_counter value >= 1 } } change_variable = { which = dyson_swarm_counter value = -1 } } } } prerequisites = { "tech_dyson_swarm" } potential = { has_machine_age_dlc = yes } possible = { hidden_trigger = { exists = starbase } custom_tooltip = { fail_text = "requires_inside_border" is_inside_border = from } custom_tooltip = { fail_text = "requires_surveyed_system" NOT = { any_system_planet = { is_surveyed = { who = prev.from status = no } } } } custom_tooltip = { fail_text = "requires_no_binary_trinary" is_binary_star = no is_trinary_star = no } custom_tooltip = { fail_text = "requires_no_black_hole_neutron_star_pulsar" NOT = { is_star_class = sc_black_hole is_star_class = sc_neutron_star is_star_class = sc_pulsar } } custom_tooltip = { fail_text = "requires_less_than_x_dyson_swarms" from = { check_variable = { which = dyson_swarm_counter value <= value:dyson_swarm_limit } } } } placement_rules = { planet_possible = { custom_tooltip = { fail_text = "must_build_around_star" is_star = yes } custom_tooltip = { fail_text = "requires_no_anomaly" NOT = { has_anomaly = yes } } custom_tooltip = { fail_text = "requires_no_existing_megastructure" NOR = { has_planet_flag = megastructure has_planet_flag = has_megastructure } } if = { limit = { from = { is_ai = yes } } NOR = { has_deposit = d_energy_1 has_deposit = d_energy_2 } } } } country_modifier = { custom_tooltip = dyson_swarm_1_mod_tooltip } # root = system # from = country ai_weight = { factor = 5 modifier = { factor = 0.1 starbase = { NOT = { has_starbase_size >= starbase_starfortress } } } modifier = { factor = 0.1 any_neighbor_system = { exists = owner NOT = { owner = { is_same_value = from } } } } modifier = { factor = 0 from = { check_variable = { which = dyson_swarm_counter value >= value:dyson_swarm_limit } } } } on_build_start = { from = { change_variable = { which = dyson_swarm_counter value = 1 } } } on_build_cancel = { from = { if = { limit = { check_variable = { which = dyson_swarm_counter value >= 1 } } change_variable = { which = dyson_swarm_counter value = -1 } } } } on_build_complete = { set_star_flag = conduit_excluded from = { country_event = { id = cybernetics.1020 } } fromfrom.planet = { set_planet_flag = has_megastructure if = { limit = { has_orbital_station = yes } orbital_station = { dismantle = yes } } } } } # Dyson Swarm Middle Stage dyson_swarm_2 = { entity = "dyson_swarm_phase_2_entity" construction_entity = "dyson_swarm_phase_2_entity" portrait = "GFX_megastructure_dyson_swarm_background" entity_offset = { x = -0.1 y = -0.1 } rotate_to_center = no scale_offset = yes place_entity_on_planet_plane = yes #show_in_outliner = no use_planet_resource = yes build_time = 1080 # 3 years resources = { category = megastructures cost = { unity = 2500 } cost = { trigger = { country_uses_bio_ships = no } alloys = 1000 } cost = { trigger = { country_uses_bio_ships = yes } alloys = 1000 mult = 0.5 } cost = { trigger = { country_uses_bio_ships = yes } food = 1000 mult = @halved_alloy_to_food_cost_ratio } upkeep = { alloys = 10 } } construction_blocks_and_blocked_by = none dismantle_cost = { category = megastructures cost = { energy = 1000 } } dismantle_time = 360 dismantle_potential = { always = yes } dismantle_possible = { can_dismantle_megastructure = { TECH = tech_dyson_swarm } } on_dismantle_complete = { random_system_planet = { limit = { has_modifier = dyson_swarm_2_mod } remove_planet_flag = has_megastructure remove_modifier = dyson_swarm_2_mod } from = { add_resource = { alloys = 1000 mult = modifier:megastructure_dismantle_refund_mult } if = { limit = { check_variable = { which = dyson_swarm_counter value >= 1 } } change_variable = { which = dyson_swarm_counter value = -1 } } } } upgrade_from = { dyson_swarm_1 } prerequisites = { "tech_dyson_swarm" } potential = { always = yes } country_modifier = { custom_tooltip = dyson_swarm_2_mod_tooltip } on_build_complete = { from = { country_event = { id = cybernetics.1025 } } } } # Dyson Swarm Final Stage dyson_swarm_3 = { entity = "dyson_swarm_phase_3_entity" construction_entity = "dyson_swarm_phase_3_entity" portrait = "GFX_megastructure_dyson_swarm_background" entity_offset = { x = -0.1 y = -0.1 } rotate_to_center = no scale_offset = yes place_entity_on_planet_plane = yes use_planet_resource = yes outliner_trigger = { exists = owner system_has_arc_furnace = no NOT = { solar_system = { has_star_flag = arc_furnace_construction } } NOT = { solar_system = { any_system_planet = { is_colony = yes is_artificial = no exists = owner owner = { is_primitive = no } } } } if = { limit = { solar_system = { any_system_planet = { exists = owner owner = { is_primitive = yes } } } } owner = { has_policy_flag = interference_aggressive } } owner = { has_technology = tech_dyson_sphere OR = { NOR = { has_country_flag = built_dyson_sphere_swarm has_country_flag = built_dyson_sphere } AND = { has_relic = r_contingency_core NOR = { has_country_flag = built_dyson_sphere_contingency_swarm has_country_flag = built_dyson_sphere_contingency } } } } } construction_blocks_and_blocked_by = none dismantle_cost = { category = megastructures cost = { energy = 1500 } } dismantle_time = 360 dismantle_potential = { always = yes } dismantle_possible = { can_dismantle_megastructure = { TECH = tech_dyson_swarm } } on_dismantle_complete = { random_system_planet = { limit = { has_modifier = dyson_swarm_3_mod } remove_planet_flag = has_megastructure remove_modifier = dyson_swarm_3_mod } from = { add_resource = { alloys = 1500 mult = modifier:megastructure_dismantle_refund_mult } if = { limit = { check_variable = { which = dyson_swarm_counter value >= 1 } } change_variable = { which = dyson_swarm_counter value = -1 } } } ##Deal with Dyson Sphere flag shenanigans if = { limit = { solar_system = { has_star_flag = dyson_sphere_construction } } from = { if = { limit = { has_country_flag = built_dyson_sphere_contingency_swarm } remove_country_flag = built_dyson_sphere_contingency_swarm } if = { limit = { has_country_flag = built_dyson_sphere_swarm } remove_country_flag = built_dyson_sphere_swarm } } } } build_time = 1080 # 3 years resources = { category = megastructures cost = { unity = 5000 } cost = { trigger = { country_uses_bio_ships = no } alloys = 1500 } cost = { trigger = { country_uses_bio_ships = yes } alloys = 1500 mult = 0.5 } cost = { trigger = { country_uses_bio_ships = yes } food = 1500 mult = @halved_alloy_to_food_cost_ratio } upkeep = { alloys = 20 } } upgrade_from = { dyson_swarm_2 } prerequisites = { "tech_dyson_swarm" } potential = { always = yes } country_modifier = { custom_tooltip = dyson_swarm_3_mod_tooltip } on_build_complete = { from = { country_event = { id = cybernetics.1030 } } if = { limit = { any_system_megastructure = { OR = { is_megastructure_type = orbital_arc_furnace_4 is_megastructure_type = orbital_arc_furnace_restored } } } from = { set_country_flag = burning_brightly_achievement } } } }