From f02278e92ce0f41a4a88b82186fa7903a5f357c5 Mon Sep 17 00:00:00 2001 From: "FA507RM-KALOSPA\\Kalo" Date: Tue, 30 May 2023 09:33:22 +0800 Subject: [PATCH] bzd --- common/on_actions/RG_on_actions.txt | 7 -- events/!_RG_gray_goo_events.txt | 111 ++++++++++--------- events/RG_gray_leader_event.txt | 160 +++++++++++++++++++++------- events/RG_wsg_graygoo_event.txt | 12 +-- 4 files changed, 190 insertions(+), 100 deletions(-) diff --git a/common/on_actions/RG_on_actions.txt b/common/on_actions/RG_on_actions.txt index 67aaa0d..353b8f9 100644 --- a/common/on_actions/RG_on_actions.txt +++ b/common/on_actions/RG_on_actions.txt @@ -12,13 +12,6 @@ on_single_player_save_game_load = { on_custom_diplomacy = { events = { graygoo.505 - - rg_graygoo.500 - rg_graygoo.501 - rg_graygoo.502 - rg_graygoo.503 - rg_graygoo.504 - rg_graygoo.505 } } diff --git a/events/!_RG_gray_goo_events.txt b/events/!_RG_gray_goo_events.txt index ce52388..e024737 100644 --- a/events/!_RG_gray_goo_events.txt +++ b/events/!_RG_gray_goo_events.txt @@ -321,10 +321,6 @@ country_event = { is_triggered_only = yes trigger = { - NOR = { - has_global_flag = has_wsg_mod - has_global_flag = kdc_event_mod_active - } from = { OR = { is_country_type = gray is_same_value = ROOT @@ -341,7 +337,16 @@ country_event = { } immediate = { - country_event = { id = rg_grayleader.500 } #放行。 + if = { + limit = { + OR = { + has_global_flag = has_wsg_mod + has_global_flag = kdc_event_mod_active + } + } + country_event = { id = rg_graygoo.500 } + } + else = {country_event = { id = rg_grayleader.500 } } } } @@ -352,10 +357,6 @@ country_event = { is_triggered_only = yes trigger = { - NOR = { - has_global_flag = has_wsg_mod - has_global_flag = kdc_event_mod_active - } from = { OR = { is_country_type = gray is_same_value = ROOT @@ -370,7 +371,16 @@ country_event = { } immediate = { - country_event = { id = rg_grayleader.501 } #放行。 + if = { + limit = { + OR = { + has_global_flag = has_wsg_mod + has_global_flag = kdc_event_mod_active + } + } + country_event = { id = rg_graygoo.501 } + } + else = {country_event = { id = rg_grayleader.501 } } } } @@ -381,10 +391,6 @@ country_event = { is_triggered_only = yes trigger = { - NOR = { - has_global_flag = has_wsg_mod - has_global_flag = kdc_event_mod_active - } from = { OR = { is_country_type = gray is_same_value = ROOT @@ -401,7 +407,16 @@ country_event = { } immediate = { - country_event = { id = rg_grayleader.502 } #放行。 + if = { + limit = { + OR = { + has_global_flag = has_wsg_mod + has_global_flag = kdc_event_mod_active + } + } + country_event = { id = rg_graygoo.502 } + } + else = {country_event = { id = rg_grayleader.502 } } } } @@ -412,10 +427,6 @@ country_event = { is_triggered_only = yes trigger = { - NOR = { - has_global_flag = has_wsg_mod - has_global_flag = kdc_event_mod_active - } from = { OR = { is_country_type = gray is_same_value = ROOT @@ -440,25 +451,26 @@ country_event = { } immediate = { - country_event = { id = rg_grayleader.503 } #放行。 + if = { + limit = { + OR = { + has_global_flag = has_wsg_mod + has_global_flag = kdc_event_mod_active + } + } + country_event = { id = rg_graygoo.503 } + } + else = {country_event = { id = rg_grayleader.503 } } } } # Main Menu (Gray Reforming) country_event = { id = graygoo.504 - title = "graygoo.500.title" - desc = "graygoo.504.desc" - - diplomatic = yes - + hide_window = yes is_triggered_only = yes trigger = { - NOR = { - has_global_flag = has_wsg_mod - has_global_flag = kdc_event_mod_active - } from = { OR = { is_country_type = gray is_same_value = ROOT @@ -467,23 +479,17 @@ country_event = { has_country_flag = gray_reforming } - option = { - name = OK - } - - option = { - name = rg_graygoo.504.a - allow = { - has_country_flag = gray_reforming - resource_stockpile_compare = { resource = nanites value >= 1000 } - resource_stockpile_compare = { resource = alloys value >= 50000 } + immediate = { + if = { + limit = { + OR = { + has_global_flag = has_wsg_mod + has_global_flag = kdc_event_mod_active + } + } + country_event = { id = rg_graygoo.504 } } - add_resource = { - nanites = -1000 - alloys = -50000 - } - remove_country_flag = gray_reforming - remove_modifier = "gray_scattered" + else = {country_event = { id = rg_grayleader.504 } } } } @@ -494,10 +500,6 @@ country_event = { is_triggered_only = yes trigger = { - NOR = { - has_global_flag = has_wsg_mod - has_global_flag = kdc_event_mod_active - } from = { OR = { is_country_type = gray is_same_value = ROOT @@ -515,7 +517,16 @@ country_event = { } immediate = { - country_event = { id = rg_grayleader.505 } #放行。 + if = { + limit = { + OR = { + has_global_flag = has_wsg_mod + has_global_flag = kdc_event_mod_active + } + } + country_event = { id = rg_graygoo.505 } + } + else = {country_event = { id = rg_grayleader.505 } } } } diff --git a/events/RG_gray_leader_event.txt b/events/RG_gray_leader_event.txt index 6b1b2d8..24652e5 100644 --- a/events/RG_gray_leader_event.txt +++ b/events/RG_gray_leader_event.txt @@ -11,29 +11,35 @@ country_event = { has_global_flag = has_wsg_mod has_global_flag = kdc_event_mod_active } + fromfrom = { OR = { + is_country_type = gray + is_same_value = ROOT + }} is_same_value = event_target:gray_owner - NOR = { - has_country_flag = gray_reforming - } } immediate = { if = { limit = { #500.initial - NOR = { - has_global_flag = has_wsg_mod - has_global_flag = kdc_event_mod_active - } - is_same_value = event_target:gray_owner - NOR = { - has_country_flag = gray_constship_active - has_country_flag = gray_governor_active - has_country_flag = gray_warship_active - has_country_flag = gray_army_active - has_country_flag = gray_reforming - } + NOR = { + has_global_flag = has_wsg_mod + has_global_flag = kdc_event_mod_active } - country_event = { id = graygoo.500 } + fromfrom = { OR = { + is_country_type = gray + is_same_value = ROOT + }} + is_same_value = event_target:gray_owner + NOR = { + has_country_flag = gray_constship_active + has_country_flag = gray_governor_active + has_country_flag = gray_warship_active + has_country_flag = gray_army_active + has_country_flag = gray_reforming + has_country_flag = gray_diplomacy_engaged + } + } + country_event = { id = rg_grayleader.500 } } else_if = { #501.governor limit = { @@ -41,14 +47,19 @@ country_event = { has_global_flag = has_wsg_mod has_global_flag = kdc_event_mod_active } + fromfrom = { OR = { + is_country_type = gray + is_same_value = ROOT + }} is_same_value = event_target:gray_owner has_country_flag = gray_governor_active - exists = event_target:gray_governor - NOR = { - has_country_flag = gray_reforming + NOR = { + has_country_flag = gray_reforming + has_country_flag = gray_diplomacy_engaged } + exists = event_target:gray_governor } - country_event = { id = graygoo.501 } + country_event = { id = rg_grayleader.501 } } else_if = { #502.warship limit = { @@ -56,16 +67,21 @@ country_event = { has_global_flag = has_wsg_mod has_global_flag = kdc_event_mod_active } + fromfrom = { OR = { + is_country_type = gray + is_same_value = ROOT + }} is_same_value = event_target:gray_owner has_country_flag = gray_warship_active + NOR = { + has_country_flag = gray_reforming + has_country_flag = gray_diplomacy_engaged + } exists = event_target:gray_warship any_owned_fleet = { is_same_value = event_target:gray_warship } event_target:gray_warship = { num_ships > 0 } - NOR = { - has_country_flag = gray_reforming - } } - country_event = { id = graygoo.502 } + country_event = { id = rg_grayleader.502 } } else_if = { #503.army limit = { @@ -73,7 +89,16 @@ country_event = { has_global_flag = has_wsg_mod has_global_flag = kdc_event_mod_active } + fromfrom = { OR = { + is_country_type = gray + is_same_value = ROOT + }} has_country_flag = gray_army_active + NOR = { + has_country_flag = gray_reforming + has_country_flag = gray_diplomacy_engaged + + } is_same_value = event_target:gray_owner any_owned_army = { army_type = gray_army @@ -85,11 +110,8 @@ country_event = { } } } - NOR = { - has_country_flag = gray_reforming - } } - country_event = { id = graygoo.503 } + country_event = { id = rg_grayleader.503 } } else_if = { #505.scienceship limit = { @@ -97,17 +119,38 @@ country_event = { has_global_flag = has_wsg_mod has_global_flag = kdc_event_mod_active } + fromfrom = { OR = { + is_country_type = gray + is_same_value = ROOT + }} is_same_value = event_target:gray_owner has_country_flag = gray_constship_active + NOR = { + has_country_flag = gray_reforming + has_country_flag = gray_diplomacy_engaged + + } exists = event_target:global_gray_constship any_owned_fleet = { is_same_value = event_target:global_gray_constship } event_target:global_gray_constship = { num_ships > 0 } - NOR = { - has_country_flag = gray_reforming - } } - country_event = { id = graygoo.505 } + country_event = { id = rg_grayleader.505 } } + else_if = { #504.gale + limit = { + NOR = { + has_global_flag = has_wsg_mod + has_global_flag = kdc_event_mod_active + } + fromfrom = { OR = { + is_country_type = gray + is_same_value = ROOT + }} + is_same_value = event_target:gray_owner + has_country_flag = gray_reforming + } + country_event = { id = graygoo.504 } + } } } @@ -149,7 +192,7 @@ country_event = { has_global_flag = has_wsg_mod has_global_flag = kdc_event_mod_active } - from = { OR = { + fromfrom = { OR = { is_country_type = gray is_same_value = ROOT }} @@ -259,7 +302,7 @@ country_event = { has_global_flag = has_wsg_mod has_global_flag = kdc_event_mod_active } - from = { OR = { + fromfrom = { OR = { is_country_type = gray is_same_value = ROOT }} @@ -384,7 +427,7 @@ country_event = { has_global_flag = has_wsg_mod has_global_flag = kdc_event_mod_active } - from = { OR = { + fromfrom = { OR = { is_country_type = gray is_same_value = ROOT }} @@ -738,7 +781,7 @@ country_event = { has_global_flag = has_wsg_mod has_global_flag = kdc_event_mod_active } - from = { OR = { + fromfrom = { OR = { is_country_type = gray is_same_value = ROOT }} @@ -1010,6 +1053,49 @@ country_event = { } } +# Main Menu (Gray Reforming) +country_event = { + id = rg_grayleader.504 + title = "graygoo.500.title" + desc = "graygoo.504.desc" + + diplomatic = yes + + is_triggered_only = yes + + trigger = { + NOR = { + has_global_flag = has_wsg_mod + has_global_flag = kdc_event_mod_active + } + from = { OR = { + is_country_type = gray + is_same_value = ROOT + }} + is_same_value = event_target:gray_owner + has_country_flag = gray_reforming + } + + option = { + name = OK + } + + option = { + name = rg_graygoo.504.a + allow = { + has_country_flag = gray_reforming + resource_stockpile_compare = { resource = nanites value >= 1000 } + resource_stockpile_compare = { resource = alloys value >= 50000 } + } + add_resource = { + nanites = -1000 + alloys = -50000 + } + remove_country_flag = gray_reforming + remove_modifier = "gray_scattered" + } +} + # Main Menu (const) country_event = { id = rg_grayleader.505 @@ -1034,7 +1120,7 @@ country_event = { has_global_flag = has_wsg_mod has_global_flag = kdc_event_mod_active } - from = { OR = { + fromfrom = { OR = { is_country_type = gray is_same_value = ROOT }} diff --git a/events/RG_wsg_graygoo_event.txt b/events/RG_wsg_graygoo_event.txt index 9425697..7234845 100644 --- a/events/RG_wsg_graygoo_event.txt +++ b/events/RG_wsg_graygoo_event.txt @@ -35,7 +35,7 @@ country_event = { has_global_flag = kdc_event_mod_active } - from = { OR = { + fromfrom = { OR = { is_country_type = gray is_same_value = ROOT }} @@ -196,7 +196,7 @@ country_event = { has_global_flag = kdc_event_mod_active } - from = { OR = { + fromfrom = { OR = { is_country_type = gray is_same_value = ROOT }} @@ -354,7 +354,7 @@ country_event = { has_global_flag = kdc_event_mod_active } - from = { OR = { + fromfrom = { OR = { is_country_type = gray is_same_value = ROOT }} @@ -750,7 +750,7 @@ country_event = { has_global_flag = kdc_event_mod_active } - from = { OR = { + fromfrom = { OR = { is_country_type = gray is_same_value = ROOT }} @@ -1064,7 +1064,7 @@ country_event = { trigger = { has_global_flag = has_wsg_mod - from = { OR = { + fromfrom = { OR = { is_country_type = gray is_same_value = ROOT }} @@ -1133,7 +1133,7 @@ country_event = { has_global_flag = kdc_event_mod_active } - from = { OR = { + fromfrom = { OR = { is_country_type = gray is_same_value = ROOT }}