From f8979629b265a43393aadd2051e97d95622b96b9 Mon Sep 17 00:00:00 2001 From: "ProjectKoi-Kalo\\Kalo" Date: Wed, 25 Sep 2024 12:15:37 +0800 Subject: [PATCH] =?UTF-8?q?Changes=E6=96=87=E4=BB=B6=E5=90=8D=E4=B8=8D?= =?UTF-8?q?=E7=9F=A5=E9=81=93=E6=80=8E=E4=B9=88=E7=83=82=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../events/rg_test_gray_skill_varible.txt | 48 +++++++++++++++++++ .../pop_categories/trait_production.txt | 5 +- .../RG_scripted_triggers.txt | 7 +++ common/traits/RG_machine_species_trait.txt | 20 ++++++-- events/RG_planert_killer_events.txt | 25 ++++++++++ 5 files changed, 97 insertions(+), 8 deletions(-) create mode 100644 common/inline_scripts/events/rg_test_gray_skill_varible.txt diff --git a/common/inline_scripts/events/rg_test_gray_skill_varible.txt b/common/inline_scripts/events/rg_test_gray_skill_varible.txt new file mode 100644 index 0000000..f604e84 --- /dev/null +++ b/common/inline_scripts/events/rg_test_gray_skill_varible.txt @@ -0,0 +1,48 @@ +# event:graygoo.499 +# 初始化小灰领袖等级 +set_variable = { + which = rg_gray_level + value = 1 +} + +#Country event_target:gray_owner +#存储当前领袖等级 +rg_save_gray_leader_level_effect = { + every_owned_leader = { + if = { + ###等级检测 + limit = { + has_leader_flag = rg_gray_leader + } + #由于目前是leader域,所以不能直接导出等级 + #导出等级到暂存 + export_trigger_value_to_variable = { + trigger = has_skill + variable = rg_gray_level_temp + } + #把leader域中的变量存到country域中 + #导入变量 + owner = { + set_variable = { + which = rg_gray_level + value = prev.rg_gray_level_temp + } + } + #清理暂存区 + clear_variable = rg_gray_level_temp + } + } +} + +#Country event_target:gray_owner +#等级导入,把存储的领袖等级赋予到领袖身上 +rg_set_varible_as_leader_level_effect = { + random_owned_leader = { + limit = { + has_leader_flag = rg_gray_leader + } + set_skill = owner.rg_gray_level + } +} + + diff --git a/common/inline_scripts/pop_categories/trait_production.txt b/common/inline_scripts/pop_categories/trait_production.txt index d8d7c48..3918233 100644 --- a/common/inline_scripts/pop_categories/trait_production.txt +++ b/common/inline_scripts/pop_categories/trait_production.txt @@ -3,10 +3,7 @@ produces = { exists = planet planet = { owner = { - OR = { - RG_gray_harbitat_active_trigger = yes - has_active_tradition = tr_rg_nanotech_5 - } + RG_tradition5_or_gray_owner_trigger = yes } rg_is_pc_nano = yes } diff --git a/common/scripted_triggers/RG_scripted_triggers.txt b/common/scripted_triggers/RG_scripted_triggers.txt index 51d54e8..8ac9ade 100644 --- a/common/scripted_triggers/RG_scripted_triggers.txt +++ b/common/scripted_triggers/RG_scripted_triggers.txt @@ -48,4 +48,11 @@ rg_is_main_species_with_maid_trait_trigger = { is_same_species = owner_main_species is_subspecies = owner_main_species } +} + +RG_tradition5_or_gray_owner_trigger = { + OR = { + RG_gray_harbitat_active_trigger = yes + has_active_tradition = tr_rg_nanotech_5 + } } \ No newline at end of file diff --git a/common/traits/RG_machine_species_trait.txt b/common/traits/RG_machine_species_trait.txt index 019f139..f9d3290 100644 --- a/common/traits/RG_machine_species_trait.txt +++ b/common/traits/RG_machine_species_trait.txt @@ -4,12 +4,24 @@ rg_machine_maid_trait = { } custom_tooltip = rg_machine_maid_trait_effect_tooltip initial = no - species_potential_add = { always = no } + species_potential_add = { + FROM = { + RG_tradition5_or_gray_owner_trigger = yes + } + } species_possible_remove = { always = no } - species_possible_merge_add = { always = no } - species_possible_merge_remove = { always = no } + species_possible_merge_add = { + FROM = { + RG_tradition5_or_gray_owner_trigger = yes + } + } + species_possible_merge_remove = { + FROM = { + RG_tradition5_or_gray_owner_trigger = yes + } + } randomized = no - allowed_archetypes = { MACHINE } + allowed_archetypes = { ROBOT MACHINE BIOLOGICAL LITHOID } sorting_priority = 20 potential_crossbreeding_chance = 1.0 diff --git a/events/RG_planert_killer_events.txt b/events/RG_planert_killer_events.txt index b18b81c..a14c26b 100644 --- a/events/RG_planert_killer_events.txt +++ b/events/RG_planert_killer_events.txt @@ -42,6 +42,31 @@ planet_event = { } set_update_modifiers_batch = end } +} option = { + trigger = { has_civic = civic_AG_gray_master } + name = AG_dooropen_master.option + if = { + limit = { + any_country = { + has_civic = civic_AG_gray + } + } + #do nothing + } + else_if = { + limit = { + NOT = { + any_country = { + has_civic = civic_AG_gray + } + } + has_global_flag = has_rg_mod + } + force_remove_civic = civic_AG_gray_master + } + else = { + country_event = { id = graygoo.499 } + } } # Cracked