diff --git a/common/on_actions/RG_on_actions.txt b/common/on_actions/RG_on_actions.txt index 56c0447..57752b6 100644 --- a/common/on_actions/RG_on_actions.txt +++ b/common/on_actions/RG_on_actions.txt @@ -52,6 +52,8 @@ on_monthly_pulse_country = { # rg_event.22 #小灰复活检测 # rg_event.23 #月检移除L星门认知防止收容失效 # rg_skill.9 + rg_planet.5025 # Virtual Machine pop creation + rg_planet.5030 # Virtual Machine pop destruction } } @@ -174,4 +176,84 @@ on_space_battle_lost = { events = { rg_skill.15 } +} + +# A planet has been colonized. +# Scope = Planet +on_colonized = { + events = { + rg_planet.2026 # Virtual Machine pop creation + rg_planet.2031 # Virtual Machine pop destruction + } +} + +#A building construction has been completed. +# This = Planet +on_building_complete = { + events = { + rg_planet.2026 # Virtual Machine pop creation + rg_planet.2031 # Virtual Machine pop destruction + } +} + +# A building construction has been completed, which is an upgrade of previous building. +# This = Planet +on_building_upgraded = { + events = { + rg_planet.2026 # Virtual Machine pop creation + rg_planet.2031 # Virtual Machine pop destruction + } +} + +# A building construction has demolished. +# This = Planet +on_building_demolished = { + events = { + rg_planet.2026 # Virtual Machine pop creation + rg_planet.2031 # Virtual Machine pop destruction + } +} +# A building repair has finished +# This = Planet +on_building_repaired = { + events = { + rg_planet.2026 # Virtual Machine pop creation + rg_planet.2031 # Virtual Machine pop destruction + } +} + +#A district construction has been completed. +# This = Planet +on_district_complete = { + events = { + rg_planet.2026 # Virtual Machine pop creation + rg_planet.2031 # Virtual Machine pop destruction + } +} + +# A building construction has finished, replacing another building. +# This = Planet +on_building_replaced = { + events = { + rg_planet.2026 # Virtual Machine pop creation + rg_planet.2031 # Virtual Machine pop destruction + } +} + +# A building construction has been downgraded and replaced. +# This = Planet +on_building_downgraded = { + events = { + rg_planet.2026 # Virtual Machine pop creation + rg_planet.2031 # Virtual Machine pop destruction + } +} + +# A district construction has demolished. +# This = Planet +on_district_demolished = { + events = { + rg_planet.2026 # Virtual Machine pop creation + rg_planet.2031 # Virtual Machine pop destruction + } } \ No newline at end of file diff --git a/common/planet_classes/RG_gray_planet_classes.txt b/common/planet_classes/RG_gray_planet_classes.txt new file mode 100644 index 0000000..9b0eeeb --- /dev/null +++ b/common/planet_classes/RG_gray_planet_classes.txt @@ -0,0 +1,39 @@ +pc_rg_grayhabitat = { + habitat = yes + entity = "gray_goo_planet" + entity_scale = @planet_standard_scale + icon = GFX_planet_type_habitat + enable_tilt = no + fixed_entity_scale = yes + place_entity_on_planet_plane = no + entity_face_object = no #disable rotation towards sun or planet we orbit around + atmosphere_color = hsv { 0.0 0.0 1.0 } + atmosphere_intensity = 1.0 + atmosphere_width = 0.5 + show_city = no + city_color_lut = "gfx/portraits/misc/colorcorrection_continental.dds" + extra_orbit_size = 0 + extra_planet_count = 0 + chance_of_ring = 0.0 + planet_size = 30 + moon_size = 1 + colonizable = yes + district_set = machine_world +# ideal = yes + starting_planet = no + orbit_lines = no + has_colonization_influence_cost = no # applies when within own borders + + is_artificial_planet = yes + default_planet_selection = yes + + modifier = { + planet_colony_development_speed_mult = 2.0 # Habitats should be fast to colonize + pop_environment_tolerance = 0.40 + planet_structures_cost_mult = -10 + planet_buildings_cost_mult = -10 + planet_building_build_speed_mult = 10 + } + + carry_cap_per_free_district = @carry_cap_low +} \ No newline at end of file diff --git a/common/scripted_effects/RG_gray_goo_effects.txt b/common/scripted_effects/RG_gray_goo_effects.txt index 113e491..863a383 100644 --- a/common/scripted_effects/RG_gray_goo_effects.txt +++ b/common/scripted_effects/RG_gray_goo_effects.txt @@ -134,7 +134,7 @@ rg_global_gray_location_check = { } #创造灰风总督 -rg_create_gray_governor = { +rg_create_gray_governor_leader = { if = { limit = { OR = { @@ -181,6 +181,9 @@ rg_create_gray_governor = { } remove_army = yes } + event_target:rg_gray_habitat_target = { + remove_planet = yes + } #存储当前领袖等级 every_owned_leader = { if = { @@ -238,6 +241,7 @@ rg_create_gray_governor = { remove_country_flag = rg_kac_grayfleet_active remove_country_flag = gray_constship_active remove_country_flag = gray_army_active + remove_country_flag = gray_habitat_active #等级导入,把存储的领袖等级赋予到领袖身上 random_owned_leader = { limit = { @@ -248,6 +252,19 @@ rg_create_gray_governor = { } } +rg_create_gray_governor = { + if = { + limit = { + #has_country_flag = gray_warship_is_juggernaut + has_country_flag = rg_habitat_enabled + } + rg_create_gray_governor_habitat = yes + } + else = { + rg_create_gray_governor_leader = yes + } +} + #创造灰风总督 rg_create_gray_governor_habitat = { if = { @@ -463,10 +480,14 @@ rg_create_gray_warship = { destroy_template = yes } } + event_target:rg_gray_habitat_target = { + remove_planet = yes + } remove_country_flag = gray_constship_active remove_country_flag = gray_governor_active #旧版flag remove_country_flag = gray_official_active remove_country_flag = gray_army_active + remove_country_flag = gray_habitat_active random_owned_leader = { limit = { has_leader_flag = gray_admiral @@ -575,11 +596,15 @@ rg_create_gray_army = { destroy_template = yes } } + event_target:rg_gray_habitat_target = { + remove_planet = yes + } remove_country_flag = gray_warship_active remove_country_flag = rg_kac_grayfleet_active remove_country_flag = gray_governor_active #旧版flag remove_country_flag = gray_official_active remove_country_flag = gray_constship_active + remove_country_flag = gray_habitat_active remove_ship_design = last_created_design random_owned_leader = { limit = { @@ -696,11 +721,15 @@ rg_create_gray_const = { } remove_army = yes } + event_target:rg_gray_habitat_target = { + remove_planet = yes + } remove_country_flag = gray_army_active remove_country_flag = gray_warship_active remove_country_flag = rg_kac_grayfleet_active remove_country_flag = gray_governor_active #旧版flag remove_country_flag = gray_official_active + remove_country_flag = gray_habitat_active random_owned_leader = { limit = { has_leader_flag = gray_scientist diff --git a/common/scripted_effects/rg_gray_warship_init_effects.txt b/common/scripted_effects/rg_gray_warship_init_effects.txt index 3a71e13..04bd370 100644 --- a/common/scripted_effects/rg_gray_warship_init_effects.txt +++ b/common/scripted_effects/rg_gray_warship_init_effects.txt @@ -177,51 +177,64 @@ rg_warship_init_mod0 = { } rg_juggernaut_habitat_init = { - capital_scope = { - save_event_target_as = rg_capital_home_planet - } - spawn_planet = { - class = pc_habitat - location = root.home_planet - orbit_location = yes - orbit_angle_offset = 45 - orbit_distance_offset = 9.899 - size = 20 - has_ring = no + event_target:global_gray_location = { + solar_system = { + spawn_planet = { + class = pc_rg_grayhabitat + spawn_beyond_gravity_well = yes + orbit_location = yes + orbit_angle_offset = 45 + orbit_distance_offset = 9.899 + size = 20 + has_ring = no + + init_effect = { + set_surveyed = { + surveyed = yes + surveyor = FROM + } + set_all_comms_surveyed = yes + clear_blockers = yes + + set_owner = root + set_controller = root + create_colony = { + owner = root + species = owner_main_species + ethos = owner + } + set_name = "NAME_rg_gray_habitat_base" + assign_leader = event_target:gray_governor + + add_building = building_ancient_control_center + add_building = building_nourishment_center + add_building = building_ancient_palace + add_building = building_affluence_center + add_building = building_dimensional_fabricator - init_effect = { - set_name = "NAME_rg_gray_habitat_base" - set_planet_entity = { - entity = "grey_tempesttw_juggernaut_entity" - } - set_surveyed = { - surveyed = yes - surveyor = FROM - } - set_all_comms_surveyed = yes - clear_blockers = yes - - set_planet_flag = megastructure - set_planet_flag = habitat - set_planet_flag = advanced_habitat - set_planet_flag = advanced_habitat_2 - set_planet_flag = rg_gray_habitat - save_global_event_target_as = rg_gray_habitat_target - } - } - event_target:spawn_planet = { - set_planet_flag = has_megastructure - # set_planet_flag = has_payback_habitat - } - event_target:rg_capital_home_planet = { - while = { - count = 1 - random_owned_pop = { - resettle_pop = { - pop = this - planet = event_target:rg_gray_habitat_target + if = { + limit = { + NOT = { + exists = event_target:rg_fallen_maid_species + } + } + rg_create_fallen_empire_species_effect = yes + } + + while = { + count = 5 + create_pop = { + species = rg_fallen_maid_species + } + } + + set_planet_flag = megastructure + set_planet_flag = habitat + set_planet_flag = advanced_habitat + set_planet_flag = advanced_habitat_2 + set_planet_flag = rg_gray_habitat + save_global_event_target_as = rg_gray_habitat_target } - unemploy_pop = yes } } } diff --git a/common/traits/RG_machine_species_trait.txt b/common/traits/RG_machine_species_trait.txt index dbfafe2..e0778de 100644 --- a/common/traits/RG_machine_species_trait.txt +++ b/common/traits/RG_machine_species_trait.txt @@ -16,6 +16,11 @@ rg_machine_maid_trait = { opposites = { } + modifier = { + habitability_floor_add = 0.25 + pop_housing_usage_mult = -0.9 + } + assembling_modifier = { planet_pop_assemblers_nanites_upkeep_add = 0.1 } diff --git a/descriptor.mod b/descriptor.mod index d83a124..993bb12 100644 --- a/descriptor.mod +++ b/descriptor.mod @@ -8,5 +8,5 @@ tags={ } name="Real Gray" picture="thumbnail.png" -supported_version="3.12.*" +supported_version="v3.12.*" remote_file_id="2136166095" \ No newline at end of file diff --git a/events/RG_gray_leader_dialog_event.txt b/events/RG_gray_leader_dialog_event.txt index dae0010..7b65a9e 100644 --- a/events/RG_gray_leader_dialog_event.txt +++ b/events/RG_gray_leader_dialog_event.txt @@ -484,6 +484,80 @@ country_event = { } } +country_event = { + id = rg_grayleader_dialog.5026 + title = "graygoo.500.title" + desc = "RG_graygoo.502.f.response" + event_window_type = leader_recruit + picture_event_data = { + portrait = event_target:gray_leader_admiral + room = "ethic_spaceship_room" + } + is_triggered_only = yes + immediate = { + set_country_flag = gray_diplomacy_engaged + } + after = { + hidden_effect = { + remove_country_flag = gray_diplomacy_engaged + } + } + option = { + name = OK + } + option = { + name = graygoo.500.d + tag = hire_leader + default_hide_option = yes + } + option = { + name = graygoo.500.prepage + tag = dismiss_leader + hidden_effect = { + country_event = { + id = rg_grayleader.1 + } + } + } +} + +country_event = { + id = rg_grayleader_dialog.5027 + title = "graygoo.500.title" + desc = "RG_graygoo.502.g.response" + event_window_type = leader_recruit + picture_event_data = { + portrait = event_target:gray_leader_admiral + room = "ethic_spaceship_room" + } + is_triggered_only = yes + immediate = { + set_country_flag = gray_diplomacy_engaged + } + after = { + hidden_effect = { + remove_country_flag = gray_diplomacy_engaged + } + } + option = { + name = OK + } + option = { + name = graygoo.500.d + tag = hire_leader + default_hide_option = yes + } + option = { + name = graygoo.500.prepage + tag = dismiss_leader + hidden_effect = { + country_event = { + id = rg_grayleader.1 + } + } + } +} + country_event = { id = rg_grayleader_dialog.5031 title = "graygoo.500.title" diff --git a/events/RG_gray_leader_event.txt b/events/RG_gray_leader_event.txt index 0cc74d6..16f63b1 100644 --- a/events/RG_gray_leader_event.txt +++ b/events/RG_gray_leader_event.txt @@ -437,6 +437,50 @@ country_event = { } } } + option = { + # Juggernaut + name = RG_graygoo.500.f + response_text = RG_graygoo.502.f.response + trigger = { + has_country_flag = rg_juggernaut_fired + NOT = { + has_country_flag = rg_habitat_enabled + } + } + allow = { + hidden_trigger = { + exists = event_target:gray_governor + } # To prevent exploit + } + custom_tooltip = rg_need_manual_toggle + hidden_effect = { + set_country_flag = rg_habitat_enabled + country_event = { + id = rg_grayleader_dialog.5026 + } + } + } + option = { + # Warship + name = RG_graygoo.500.g + response_text = RG_graygoo.502.g.response + trigger = { + has_country_flag = rg_juggernaut_fired + has_country_flag = rg_habitat_enabled + } + allow = { + hidden_trigger = { + exists = event_target:gray_governor + } # To prevent exploit + } + custom_tooltip = rg_need_manual_toggle + hidden_effect = { + remove_country_flag = rg_habitat_enabled + country_event = { + id = rg_grayleader_dialog.5027 + } + } + } option = { # const name = rg_const diff --git a/events/RG_planet_event.txt b/events/RG_planet_event.txt new file mode 100644 index 0000000..449f62b --- /dev/null +++ b/events/RG_planet_event.txt @@ -0,0 +1,178 @@ +namespace = rg_planet + +##### Virtual Ascension Events + +### Create the Unemployed +### Country scope gatekeeper +### on_monthly_pulse_country +country_event = { + id = rg_planet.5025 + hide_window = yes + + is_triggered_only = yes + + trigger = { + has_country_flag = gray_habitat_active + exists = event_target:rg_gray_habitat_target + event_target:rg_gray_habitat_target = { + is_under_colonization = no + NOT = { is_planet_class = pc_cosmogenesis_world } + free_jobs > 0 + NOR = { + free_jobs_of_type = { + job = mortal_initiate + value >= 1 + } + free_jobs_of_type = { + category = bio_trophy + value >= 1 + } + } + } + } + + immediate = { + event_target:rg_gray_habitat_target = { + planet_event = { id = rg_planet.2027 days = 1 } + } + } +} + +### Create the Unemployed +### Planet scope gatekeeper +### on_building_complete, on_building_upgraded, on_building_demolished, +### on_building_downgraded, on_building_replaced +### on_district_complete, on_district_demolished +planet_event = { + id = rg_planet.2026 + hide_window = yes + + is_triggered_only = yes + + trigger = { + is_same_value = event_target:rg_gray_habitat_target + is_under_colonization = no + NOT = { is_planet_class = pc_cosmogenesis_world } + exists = owner + owner = { + is_fallen_empire = no + has_country_flag = gray_habitat_active + } + free_jobs > 0 + } + + immediate = { + planet_event = { id = rg_planet.2027 days = 1 } + } +} + +### Create the Unemployed +### Fired by cybernetics.2025 and cybernetics.2026 +planet_event = { + id = rg_planet.2027 + hide_window = yes + + is_triggered_only = yes + trigger = { + is_same_value = event_target:rg_gray_habitat_target + is_under_colonization = no + NOT = { is_planet_class = pc_cosmogenesis_world } + exists = owner + owner = { + is_fallen_empire = no + has_country_flag = gray_habitat_active + } + free_jobs > 0 + } + + immediate = { + set_variable = { + which = num_pops + value = value:num_free_virtual_jobs + } + # Create pops for every free job + while = { + count = num_pops + create_pop = { + species = rg_fallen_maid_species + } + } + # Kill pops generated in excess (e.g. from forbidden jobs) + if = { + limit = { + any_owned_pop = { + is_unemployed = yes + } + } + every_owned_pop = { + limit = { + is_unemployed = yes + } + kill_pop = yes + } + } + } +} + +### Kill the unemployed +### Country scope +### on_monthly_pulse_country +country_event = { + id = rg_planet.5030 + hide_window = yes + + is_triggered_only = yes + + trigger = { + is_fallen_empire = no + has_country_flag = gray_habitat_active + event_target:rg_gray_habitat_target = { + any_owned_pop = { + is_unemployed = yes + } + } + } + + immediate = { + event_target:rg_gray_habitat_target = { + every_owned_pop = { + limit = { + is_unemployed = yes + } + kill_pop = yes + } + } + } +} + +### Kill the unemployed +### Planet scope +### on_building_complete, on_building_upgraded, on_building_demolished, +### on_building_downgraded, on_building_replaced +### on_district_complete, on_district_demolished +planet_event = { + id = rg_planet.2031 + hide_window = yes + + is_triggered_only = yes + + trigger = { + exists = owner + owner = { + is_fallen_empire = no + has_country_flag = gray_habitat_active + } + any_owned_pop = { + is_unemployed = yes + } + } + + immediate = { + every_owned_pop = { + limit = { + is_unemployed = yes + } + kill_pop = yes + } + } +} \ No newline at end of file diff --git a/localisation/simp_chinese/RG_event_l_simp_chinese.yml b/localisation/simp_chinese/RG_event_l_simp_chinese.yml index 2c06401..c52651b 100644 --- a/localisation/simp_chinese/RG_event_l_simp_chinese.yml +++ b/localisation/simp_chinese/RG_event_l_simp_chinese.yml @@ -175,6 +175,11 @@ RG_graygoo.500.e:0 "§Y启动旗舰核心§!" RG_graygoo.502.e.response:0 "我能做到。" + RG_graygoo.500.f:0 "§Y启动空间站核心§!" + RG_graygoo.502.f.response:0 "舰体宜居性评估中,全舰核心自检完成。" + RG_graygoo.500.g:0 "§Y关闭空间站核心§!" + RG_graygoo.502.g.response:0 "启动紧急疏散程序,请稍安勿躁。" + # 2.1 奇怪的巨像 rg_story.2.desc:0 "哈喽?有空吗?可以来...咳咳、我有一个有趣的东西想给你看......如果没有空也没有关系。不过我保证这个一定很好玩。" rg_story.2.a:0 "§G有哦§!" diff --git a/localisation/simp_chinese/RG_l_simp_chinese.yml b/localisation/simp_chinese/RG_l_simp_chinese.yml index 8f3043e..23f7ed1 100644 --- a/localisation/simp_chinese/RG_l_simp_chinese.yml +++ b/localisation/simp_chinese/RG_l_simp_chinese.yml @@ -400,6 +400,9 @@ rg_nothing:0 "" rg_nothing_desc:0 "" + pc_rg_grayhabitat: "纳米空间站点" + pc_rg_grayhabitat_desc: "一座由纳米机械组成的深空居所,能提供仿佛行星一般的居住体验,具体而言是指行星上的城市区域。完全由纳米机器人组成使得建筑如梦幻般瞬间出现,由纳米机器组成的实体承担着空间站点的一切生产工作。" + rg_ap_nantiematter:0 "§Y纳米物质构成工程§!" rg_ap_nantiematter_desc:0 "如果能够对L星门建造者的物质与科技进行一次彻底的构成研究,这些强力的纳米机器将极大的提升我们的军备水平。这需要我们获得足够的L星门认知。" rg_ap_nantiematter_tooltip:0 "§Y这表明了一切。§!" diff --git a/realgray-stellaris-mod.code-workspace b/realgray-stellaris-mod.code-workspace index 362d7c2..abb78c1 100644 --- a/realgray-stellaris-mod.code-workspace +++ b/realgray-stellaris-mod.code-workspace @@ -2,6 +2,9 @@ "folders": [ { "path": "." + }, + { + "path": "D:/SteamLibrary/steamapps/common/Stellaris/common" } ] } \ No newline at end of file