From ff2afb6a1a0eef8a410857c2913675957c7f9e49 Mon Sep 17 00:00:00 2001 From: "ProjectKoi-Kalo\\Kalo" Date: Tue, 24 Sep 2024 20:06:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pop_categories/trait_production.txt | 6 ++++ common/scripted_effects/RG_event_effects.txt | 29 ++++++++++++++++++ events/RG_events.txt | 9 ++---- events/RG_planet_event.txt | 30 ++++++++++++++++--- 4 files changed, 63 insertions(+), 11 deletions(-) diff --git a/common/inline_scripts/pop_categories/trait_production.txt b/common/inline_scripts/pop_categories/trait_production.txt index d974215..1d33e4c 100644 --- a/common/inline_scripts/pop_categories/trait_production.txt +++ b/common/inline_scripts/pop_categories/trait_production.txt @@ -1,5 +1,11 @@ produces = { trigger = { + # exists = planet + # planet = { + # OR = { + # rg_is_pc_nano = yes + # } + # } OR = { has_trait = rg_machine_maid_trait } diff --git a/common/scripted_effects/RG_event_effects.txt b/common/scripted_effects/RG_event_effects.txt index 8246473..237a17b 100644 --- a/common/scripted_effects/RG_event_effects.txt +++ b/common/scripted_effects/RG_event_effects.txt @@ -177,4 +177,33 @@ rg_event_effect_planet2027_spawn_maid_species = { } } } +} + +#Species +rg_event_effect_planet2027_spawn_maid_species_non_gray = { + modify_species = { + effect = { + create_species = { + is_mod = yes + name = "RG_MACHINE" + plural = this + class = RG_MACHINE + portrait = "rg_machine_maid" + can_be_modified = no + homeworld = this + namelist = this + gender = this + traits = { + trait = trait_machine_unit + trait = rg_machine_maid_trait + trait = trait_auto_mod_robotic + trait = trait_robot_streamlined_protocols + trait = trait_robot_luxurious + } + effect = { + save_event_target_as = rg_maid_species + } + } + } + } } \ No newline at end of file diff --git a/events/RG_events.txt b/events/RG_events.txt index 2d877eb..275c675 100644 --- a/events/RG_events.txt +++ b/events/RG_events.txt @@ -1193,8 +1193,7 @@ country_event = { # Memorial Valuts Civic Paragon Level Tick / FROM = Leader } immediate = { - rg_create_gray_planetkiller_testship_2 = yes - every_owned_pop = { + random_owned_pop = { limit = { is_same_species = root species = { @@ -1203,11 +1202,7 @@ country_event = { # Memorial Valuts Civic Paragon Level Tick / FROM = Leader } } } - modify_species = { - species = this - add_trait = rg_machine_maid_trait - } - species = { save_event_target_as = gray_owner_modded_species } + rg_event_effect_planet2027_spawn_maid_species_non_gray = yes } } } diff --git a/events/RG_planet_event.txt b/events/RG_planet_event.txt index 55e5de8..0412b86 100644 --- a/events/RG_planet_event.txt +++ b/events/RG_planet_event.txt @@ -1,4 +1,6 @@ namespace = rg_planet + + # Furnace Lvl 1 country_event = { id = rg_planet.1000 @@ -387,6 +389,7 @@ planet_event = { limit = { owner = { is_same_value = event_target:gray_owner + exists = event_target:rg_owner_main_maid_species } } while = { @@ -397,10 +400,29 @@ planet_event = { } } else = { - while = { - count = num_pops - create_pop = { - species = owner_main_species + if = { + limit = { + owner= { + any_owned_species = { + has_trait = rg_machine_maid_trait + is_subspecies = owner_main_species + } + } + } + owner = { + random_owned_species = { + limit = { + has_trait = rg_machine_maid_trait + is_subspecies = owner_main_species + } + save_event_target_as = rg_maid_species + } + } + while = { + count = num_pops + create_pop = { + species = rg_maid_species + } } } }