From 8411e7c7bd42b2cf04e83e79f4b8321b4f612c4d Mon Sep 17 00:00:00 2001 From: "ProjectKoi-Kalo\\Kalo" Date: Tue, 24 Sep 2024 22:36:39 +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 --- common/on_actions/RG_on_actions.txt | 10 ++++ common/scripted_effects/RG_event_effects.txt | 3 - .../scripted_effects/RG_scripted_effects.txt | 4 +- .../RG_scripted_triggers.txt | 8 +++ common/traditions/RG_nanotech_tradition.txt | 1 + events/RG_combat_skill_events.txt | 4 +- events/RG_events.txt | 14 ++--- events/RG_planet_event.txt | 60 ++++++++++--------- .../english/RG_tooltips_l_english.yml | 2 +- .../RG_tooltips_l_simp_chinese.yml | 2 +- 10 files changed, 63 insertions(+), 45 deletions(-) diff --git a/common/on_actions/RG_on_actions.txt b/common/on_actions/RG_on_actions.txt index dbfbee3..6163687 100644 --- a/common/on_actions/RG_on_actions.txt +++ b/common/on_actions/RG_on_actions.txt @@ -180,6 +180,16 @@ on_space_battle_won = { } } +# This = owner of fleet 1 (winner) +# From = owner of fleet 2 (loser) +# FromFrom = fleet 1 +# FromFromFrom = fleet 2 +# Fires when a combat is finished from a lack of enemies +on_space_battle_over = { + events = { + } +} + # This = owner of fleet 1 (loser) # From = owner of fleet 2 (winner) # FromFrom = fleet 1 diff --git a/common/scripted_effects/RG_event_effects.txt b/common/scripted_effects/RG_event_effects.txt index 237a17b..6d25b1c 100644 --- a/common/scripted_effects/RG_event_effects.txt +++ b/common/scripted_effects/RG_event_effects.txt @@ -200,9 +200,6 @@ rg_event_effect_planet2027_spawn_maid_species_non_gray = { trait = trait_robot_streamlined_protocols trait = trait_robot_luxurious } - effect = { - save_event_target_as = rg_maid_species - } } } } diff --git a/common/scripted_effects/RG_scripted_effects.txt b/common/scripted_effects/RG_scripted_effects.txt index fd33a74..f98b19c 100644 --- a/common/scripted_effects/RG_scripted_effects.txt +++ b/common/scripted_effects/RG_scripted_effects.txt @@ -1423,7 +1423,7 @@ RG_const_auto_build_effect = { #建造空间站 find_closest_planet = { trigger = { - id = RG_work_bees_trigger.1 + id = RG_work_bees_trigger.11 RG_planet_can_auto_build = yes } found_planet = { @@ -1433,7 +1433,7 @@ RG_const_auto_build_effect = { duration = $station_time$ } effect = { - id = RG_work_bees_effect.2 + id = RG_work_bees_effect.22 #若星系属于母国,则自动建造 if = { limit = { diff --git a/common/scripted_triggers/RG_scripted_triggers.txt b/common/scripted_triggers/RG_scripted_triggers.txt index 84dcc65..0b511c8 100644 --- a/common/scripted_triggers/RG_scripted_triggers.txt +++ b/common/scripted_triggers/RG_scripted_triggers.txt @@ -36,4 +36,12 @@ RG_has_gray_cluster_origin_trigger = { has_country_flag = origin_rg_gray #遥远约定 has_country_flag = origin_gray_country #远星之歌 } +} + +rg_is_main_species_with_maid_trait_trigger = { + has_trait = rg_machine_maid_trait + OR = { + is_same_species = owner_main_species + is_subspecies = owner_main_species + } } \ No newline at end of file diff --git a/common/traditions/RG_nanotech_tradition.txt b/common/traditions/RG_nanotech_tradition.txt index 88ee73b..c37de5e 100644 --- a/common/traditions/RG_nanotech_tradition.txt +++ b/common/traditions/RG_nanotech_tradition.txt @@ -91,6 +91,7 @@ tr_rg_nanotech_3 = { tech = tech_object_gray_7 message = no } + rg_create_gray_planetkiller_testship_2 = yes } #Unlocks Starbase Building and Make Nanite World Decision ai_weight = { diff --git a/events/RG_combat_skill_events.txt b/events/RG_combat_skill_events.txt index af4c3b3..ba8fbd7 100644 --- a/events/RG_combat_skill_events.txt +++ b/events/RG_combat_skill_events.txt @@ -684,6 +684,7 @@ country_event = { hide_window = yes is_triggered_only = yes trigger = { + exists = fromfrom.leader OR = { fromfrom.leader = { has_trait = RG_leader_trait_admiral_nanorebuild_gray @@ -717,8 +718,9 @@ country_event = { hide_window = yes is_triggered_only = yes trigger = { + exists = fromfromfrom.leader OR = { - fromfrom.leader = { + fromfromfrom.leader = { has_trait = RG_leader_trait_admiral_nanorebuild_gray } } diff --git a/events/RG_events.txt b/events/RG_events.txt index 275c675..1a4ab7b 100644 --- a/events/RG_events.txt +++ b/events/RG_events.txt @@ -1193,16 +1193,10 @@ country_event = { # Memorial Valuts Civic Paragon Level Tick / FROM = Leader } immediate = { - random_owned_pop = { - limit = { - is_same_species = root - species = { - NOT = { - has_trait = rg_machine_maid_trait - } - } - } - rg_event_effect_planet2027_spawn_maid_species_non_gray = yes + rg_create_gray_planetkiller_testship_2 = yes + modify_species = { + species = root.species + add_trait = rg_machine_maid_trait } } } diff --git a/events/RG_planet_event.txt b/events/RG_planet_event.txt index 0412b86..a11d59c 100644 --- a/events/RG_planet_event.txt +++ b/events/RG_planet_event.txt @@ -289,30 +289,23 @@ country_event = { else = { random_owned_planet = { limit = { - owner = { - RG_gray_harbitat_active_trigger = yes + is_under_colonization = no + OR = { + is_planet_class = pc_rg_grayhabitat + is_planet_class = pc_nanotech } - # exists = event_target:rg_gray_habitat_target - PREV = { - any_owned_planet = { - is_under_colonization = no - OR = { - is_planet_class = pc_rg_grayhabitat - is_planet_class = pc_nanotech - } - free_jobs > 0 - NOR = { - free_jobs_of_type = { - job = mortal_initiate - value >= 1 - } - free_jobs_of_type = { - category = bio_trophy - value >= 1 - } - } + free_jobs > 0 + NOR = { + free_jobs_of_type = { + job = mortal_initiate + value >= 1 + } + free_jobs_of_type = { + category = bio_trophy + value >= 1 } } + # exists = event_target:rg_gray_habitat_target } planet_event = { id = rg_planet.2027 @@ -388,6 +381,7 @@ planet_event = { if = { limit = { owner = { + exists = event_target:gray_owner is_same_value = event_target:gray_owner exists = event_target:rg_owner_main_maid_species } @@ -402,18 +396,16 @@ planet_event = { else = { if = { limit = { - owner= { + owner = { any_owned_species = { - has_trait = rg_machine_maid_trait - is_subspecies = owner_main_species + rg_is_main_species_with_maid_trait_trigger = yes } } } owner = { random_owned_species = { limit = { - has_trait = rg_machine_maid_trait - is_subspecies = owner_main_species + rg_is_main_species_with_maid_trait_trigger = yes } save_event_target_as = rg_maid_species } @@ -421,10 +413,24 @@ planet_event = { while = { count = num_pops create_pop = { - species = rg_maid_species + species = event_target:rg_maid_species } } } + else_if = { + limit = { + owner = { + NOT = { + any_owned_species = { + rg_is_main_species_with_maid_trait_trigger = yes + } + } + } + } + every_owned_pop = { + rg_event_effect_planet2027_spawn_maid_species_non_gray = yes + } + } } # Kill pops generated in excess (e.g. from forbidden jobs) if = { diff --git a/localisation/english/RG_tooltips_l_english.yml b/localisation/english/RG_tooltips_l_english.yml index 4961a13..83873e7 100644 --- a/localisation/english/RG_tooltips_l_english.yml +++ b/localisation/english/RG_tooltips_l_english.yml @@ -6,7 +6,7 @@ rg_requires_no_nano_ripper: "$TRIGGER_FAIL$Cannot construct in the same system as an existing §Y$rg_nano_ripper_4$§!" rg_requires_no_nano_ripper_construction: "$TRIGGER_FAIL$Cannot construct in the same system as an ongoing §Y$rg_nano_ripper_4$ construction§!" allow_rg_nano_ripper: "§HUnlock megastructures:§!$rg_nano_ripper_4$" - rg_machine_maid_trait_effect_tooltip: "Each online $pops_with_icon$§! require 0.3 £nanites£$nanites$§Y upkeep§!.\nOn $NAME_Gray$ Owner Country:$TABBED_NEW_LINE$$mod_planet_jobs_produces_mult$:§G+10%§!" + rg_machine_maid_trait_effect_tooltip: "Each online $pops_with_icon$§! require 0.3 £nanites£$nanites$§Y upkeep§!.\nPop Housing Usage: §G-90%§!\nSpecies Minimum Habitability: §G+25%§!\nOn $NAME_Gray$ Owner Country:$TABBED_NEW_LINE$$mod_planet_jobs_produces_mult$:§G+10%§!" concept_rg_scion: "$preset_rg_scion$" concept_rg_scion_desc: "$preset_rg_scion_desc$" concept_rg_gray: "$NAME_Gray$" diff --git a/localisation/simp_chinese/RG_tooltips_l_simp_chinese.yml b/localisation/simp_chinese/RG_tooltips_l_simp_chinese.yml index 3747e79..f3f4641 100644 --- a/localisation/simp_chinese/RG_tooltips_l_simp_chinese.yml +++ b/localisation/simp_chinese/RG_tooltips_l_simp_chinese.yml @@ -6,7 +6,7 @@ rg_requires_no_nano_ripper: "$TRIGGER_FAIL$无法与现存的§Y$rg_nano_ripper_4$§!在同一个恒星系建造" rg_requires_no_nano_ripper_construction: "$TRIGGER_FAIL$无法与§Y在建的$rg_nano_ripper_4$§!在同一星系建造" allow_rg_nano_ripper: "§H解锁巨型结构:§!$rg_nano_ripper_4$" - rg_machine_maid_trait_effect_tooltip: "每个在线的$pops_with_icon$§!产生0.3£nanites£$nanites$§Y维护费§!。\n在$NAME_Gray$国家工作时:$TABBED_NEW_LINE$$mod_planet_jobs_produces_mult$:§G+10%§!" + rg_machine_maid_trait_effect_tooltip: "每个在线的$pops_with_icon$§!产生0.3£nanites£$nanites$§Y维护费§!。\n人口住房使用:§G-90%§!\n物种最低宜居性:§G+25%§!\n在$NAME_Gray$国家工作时:$TABBED_NEW_LINE$$mod_planet_jobs_produces_mult$:§G+10%§!" concept_rg_scion: "$preset_rg_scion$" concept_rg_scion_desc: "$preset_rg_scion_desc$" concept_rg_gray: "$NAME_Gray$"