diff --git a/events/!_RG_gray_goo_event_overwrite.txt b/events/!_RG_gray_goo_event_overwrite.txt new file mode 100644 index 0000000..1919d49 --- /dev/null +++ b/events/!_RG_gray_goo_event_overwrite.txt @@ -0,0 +1,732 @@ +############################ +# +# Gray Goo Events +# +# Written by Henrik Thyrwall +# +############################ + +namespace = graygoo +# Entering Empty Cluster +ship_event = { + id = graygoo.550 + title = "graygoo.550.name" + desc = "graygoo.550.desc" + picture = GFX_evt_ruined_system + show_sound = event_radio_chatter + + is_triggered_only = yes + + trigger = { + NOR = { + has_global_flag = gray_goo_crisis_set + has_global_flag = dragon_season + has_global_flag = gray_goo_empire_set + has_global_flag = rg_l_cluster + } + from = { has_star_flag = lcluster1 } + owner = { NOT = { has_country_flag = origin_gray_country }} + } + + option = { + name = graygoo.550.a + } +} + +# Invasion begins +country_event = { + id = graygoo.1 + hide_window = yes + + is_triggered_only = yes + + immediate = { + set_update_modifiers_batch = begin + awaken_guardians_of_the_galaxy = yes + set_global_flag = gray_goo_crisis_active + every_megastructure = { + limit = { + is_megastructure_type = lgate_base + } + activate_gateway = this + set_megastructure_flag = lgate_activated + } + event_target:graygoo_factory_system = { + random_system_planet = { + limit = { has_planet_flag = main_star } + save_event_target_as = main_star + } + create_country = { + name = "NAME_Gray_Goo" + type = "gray_goo" + name_list = "graygoo" + flag = { + icon= { + category = "special" + file = "gray_goo.dds" + } + background= { + category = "backgrounds" + file = "sinus.dds" + } + colors={ + "grey" + "dark_grey" + "null" + "null" + } + } + effect = { + save_event_target_as = graygoo_country + create_ship_design = { + design = "NAME_RG_armed_transport_ship" + } + add_ship_design = last_created_design + create_ship_design = { + design = "NAME_RG_GRAY_scienceship" + } + add_ship_design = last_created_design + create_ship_design = { + design = "NAME_RG_GRAY_constructor" + } + add_ship_design = last_created_design + create_ship_design = { + design = "NAME_Gatebuilder_Starbase" + } + add_ship_design = last_created_design + } + } + create_fleet = { + effect = { + set_owner = event_target:graygoo_country + create_ship = { + name = random + design = "NAME_Nanite_Factory" + graphical_culture = "pirate_01" + } + set_location = { + target = event_target:main_star + distance = 55 + angle = 270 + } + save_event_target_as = nanite_factory + } + } + every_country = { establish_communications_no_message = event_target:graygoo_country } + create_fleet = { + name = "NAME_Tempest_Fleet" + effect = { + set_owner = event_target:graygoo_country + rg_create_graygoo_ships_1 = yes + set_formation_scale = 2 + set_fleet_stance = aggressive + set_aggro_range_measure_from = self + set_aggro_range = 250 + set_location = { + target = event_target:nanite_factory + distance = 80 + angle = 0 + } + } + settings = { + garrison = yes + } + } + create_fleet = { + name = "NAME_Tempest_Fleet" + effect = { + set_owner = event_target:graygoo_country + rg_create_graygoo_ships_1 = yes + set_formation_scale = 2 + set_fleet_stance = aggressive + set_aggro_range_measure_from = self + set_aggro_range = 250 + set_location = { + target = event_target:nanite_factory + distance = 80 + angle = 90 + } + } + settings = { + garrison = yes + } + } + create_fleet = { + name = "NAME_Tempest_Fleet" + effect = { + set_owner = event_target:graygoo_country + rg_create_graygoo_ships_1 = yes + set_formation_scale = 2 + set_fleet_stance = aggressive + set_aggro_range_measure_from = self + set_aggro_range = 250 + set_location = { + target = event_target:nanite_factory + distance = 80 + angle = 180 + } + } + settings = { + garrison = yes + } + } + create_fleet = { + name = "NAME_Tempest_Fleet" + effect = { + set_owner = event_target:graygoo_country + rg_create_graygoo_ships_1 = yes + set_formation_scale = 2 + set_fleet_stance = aggressive + set_aggro_range_measure_from = self + set_aggro_range = 250 + set_location = { + target = event_target:nanite_factory + distance = 80 + angle = 270 + } + } + settings = { + garrison = yes + } + } + every_system = { + limit = { has_star_flag = lcluster } + every_system_planet = { + limit = { is_planet_class = pc_gray_goo } + create_fleet = { + name = "NAME_Tempest_Fleet" + effect = { + set_owner = event_target:graygoo_country + rg_create_graygoo_ships_1 = yes + set_formation_scale = 2 + set_fleet_stance = aggressive + set_aggro_range_measure_from = self + set_aggro_range = 250 + set_location = { + target = prev + distance = 15 + angle = random + } + } + settings = { + garrison = yes + } + } + } + } + event_target:lcluster1 = { + random_system_planet = { + limit = { is_planet_class = pc_gray_goo } + save_event_target_as = start_1 + } + } + event_target:lcluster2 = { + random_system_planet = { + limit = { is_planet_class = pc_gray_goo } + save_event_target_as = start_2 + } + } + event_target:lcluster3 = { + random_system_planet = { + limit = { is_planet_class = pc_gray_goo } + save_event_target_as = start_3 + } + } + event_target:lcluster4 = { + random_system_planet = { + limit = { is_planet_class = pc_gray_goo } + save_event_target_as = start_4 + } + } + event_target:lcluster5 = { + random_system_planet = { + limit = { is_planet_class = pc_gray_goo } + save_event_target_as = start_5 + } + } + event_target:lcluster1b = { + random_system_planet = { + limit = { is_planet_class = pc_gray_goo } + save_event_target_as = start_6 + } + } + rg_create_graygoo_roamers_1 = yes + rg_create_graygoo_roamers_2 = yes + rg_create_graygoo_roamers_3 = yes + rg_create_graygoo_roamers_4 = yes + rg_create_graygoo_roamers_5 = yes + rg_create_graygoo_roamers_6 = yes + rg_create_graygoo_roamers_7 = yes + } + event_target:graygoo_country = { + country_event = { id = graygoo.3 days = 3600 } + } + every_megastructure = { + limit = { + is_megastructure_type = lgate_base + solar_system = { + NOR = { + has_star_flag = lcluster_lgate + has_star_flag = lgate_originating_system + } + } + } + create_fleet = { + name = "NAME_Tempest_Fleet" + effect = { + set_owner = event_target:graygoo_country + rg_create_graygoo_ships_1 = yes + set_formation_scale = 2 + set_fleet_stance = aggressive + set_aggro_range_measure_from = self + set_aggro_range = 250 + set_location = { + target = prev + distance = 0 + angle = 0 + } + } + } + } + set_update_modifiers_batch = end + country_event = { id = graygoo.10 } + every_playable_country = { + limit = { + NOR = { + has_event_chain = l_cluster_chain + has_special_project = RG_LCLUSTER_PROJECT + is_same_value = root + } + } + country_event = { id = graygoo.13 } + } + every_playable_country = { + limit = { + OR = { + has_event_chain = l_cluster_chain + has_special_project = RG_LCLUSTER_PROJECT + } + NOT = { is_same_value = root } + } + country_event = { id = graygoo.11 } + } + observer_event = { id = observer.64 } + } +} + +# The Dessanu Consonance +country_event = { + id = graygoo.110 + title = "distar.10951.name" + desc = "graygoo.110.desc" + picture = GFX_evt_l-gateway + show_sound = event_radio_chatter + + is_triggered_only = yes + + after = { + hidden_effect = { + every_playable_country = { + limit = { + OR = { + has_special_project = RG_LCLUSTER_PROJECT + has_event_chain = l_cluster_chain + } + NOT = { is_same_value = root } + } + country_event = { id = graygoo.111 } + } + every_playable_country = { + limit = { + NOR = { + has_event_chain = l_cluster_chain + has_special_project = RG_LCLUSTER_PROJECT + is_same_value = root + } + } + country_event = { id = graygoo.112 } + } + } + } + + option = { + name = graygoo.10.a + hidden_effect = { + country_event = { id = graygoo.115 } + } + } +} + +# Reinforcements 1 +country_event = { + id = graygoo.3 + hide_window = yes + is_triggered_only = yes + + trigger = { + event_target:graygoo_factory_system = { + any_fleet_in_system = { is_ship_size = graygoo_factory } + } + } + + immediate = { + if = { + limit = { + any_system = { + has_star_flag = lcluster + any_fleet_in_system = { + owner = { + NOT = { is_same_value = root } + } + } + } + } + # Reinforce at factory if someone else is in the cluster... + country_event = { id = graygoo.4 } + # Else spawn reinforcements... + } + else = { + every_megastructure = { + limit = { + is_megastructure_type = lgate_base + solar_system = { + NOR = { + has_star_flag = lcluster_lgate + has_star_flag = lgate_originating_system + } + } + } + create_ambient_object = { + type = "horror_spawn_object" + location = THIS + use_3d_location = yes + duration = 10 + } + create_fleet = { + name = "NAME_Tempest_Fleet" + effect = { + set_owner = event_target:graygoo_country + rg_create_graygoo_roamers_1 = yes + set_formation_scale = 2 + set_fleet_stance = aggressive + set_aggro_range_measure_from = self + set_aggro_range = 250 + set_location = { + target = prev + distance = 0 + angle = 0 + } + } + } + create_fleet = { + name = "NAME_Tempest_Fleet" + effect = { + set_owner = event_target:graygoo_country + rg_create_graygoo_roamers_2 = yes + set_formation_scale = 2 + set_fleet_stance = aggressive + set_aggro_range_measure_from = self + set_aggro_range = 250 + set_location = { + target = prev + distance = 0 + angle = 0 + } + } + } + create_fleet = { + name = "NAME_Tempest_Fleet" + effect = { + set_owner = event_target:graygoo_country + rg_create_graygoo_roamers_3 = yes + set_formation_scale = 2 + set_fleet_stance = aggressive + set_aggro_range_measure_from = self + set_aggro_range = 250 + set_location = { + target = prev + distance = 0 + angle = 0 + } + } + } + create_fleet = { + name = "NAME_Tempest_Fleet" + effect = { + set_owner = event_target:graygoo_country + rg_create_graygoo_roamers_4 = yes + set_formation_scale = 2 + set_fleet_stance = aggressive + set_aggro_range_measure_from = self + set_aggro_range = 250 + set_location = { + target = prev + distance = 0 + angle = 0 + } + } + } + create_fleet = { + name = "NAME_Tempest_Fleet" + effect = { + set_owner = event_target:graygoo_country + rg_create_graygoo_roamers_5 = yes + set_formation_scale = 2 + set_fleet_stance = aggressive + set_aggro_range_measure_from = self + set_aggro_range = 250 + set_location = { + target = prev + distance = 0 + angle = 0 + } + } + } + create_fleet = { + name = "NAME_Tempest_Fleet" + effect = { + set_owner = event_target:graygoo_country + rg_create_graygoo_roamers_6 = yes + set_formation_scale = 2 + set_fleet_stance = aggressive + set_aggro_range_measure_from = self + set_aggro_range = 250 + set_location = { + target = prev + distance = 0 + angle = 0 + } + } + } + create_fleet = { + name = "NAME_Tempest_Fleet" + effect = { + set_owner = event_target:graygoo_country + rg_create_graygoo_roamers_7 = yes + set_formation_scale = 2 + set_fleet_stance = aggressive + set_aggro_range_measure_from = self + set_aggro_range = 250 + set_location = { + target = prev + distance = 0 + angle = 0 + } + } + } + } + country_event = { id = graygoo.3 days = 3600 } + } + } +} + +# Reinforcements 2 +country_event = { + id = graygoo.4 + hide_window = yes + + is_triggered_only = yes + + immediate = { + random_owned_ship = { + limit = { is_ship_size = graygoo_factory } + save_event_target_as = graygoo_factory + } + create_fleet = { + name = "NAME_Tempest_Fleet" + effect = { + set_owner = event_target:graygoo_country + rg_create_graygoo_roamers_1 = yes + set_formation_scale = 2 + set_fleet_stance = aggressive + set_aggro_range_measure_from = self + set_aggro_range = 250 + set_location = { + target = event_target:graygoo_factory + distance = 0 + angle = 0 + } + } + } + create_fleet = { + name = "NAME_Tempest_Fleet" + effect = { + set_owner = event_target:graygoo_country + rg_create_graygoo_roamers_2 = yes + set_formation_scale = 2 + set_fleet_stance = aggressive + set_aggro_range_measure_from = self + set_aggro_range = 250 + set_location = { + target = event_target:graygoo_factory + distance = 0 + angle = 0 + } + } + } + create_fleet = { + name = "NAME_Tempest_Fleet" + effect = { + set_owner = event_target:graygoo_country + rg_create_graygoo_roamers_3 = yes + set_formation_scale = 2 + set_fleet_stance = aggressive + set_aggro_range_measure_from = self + set_aggro_range = 250 + set_location = { + target = event_target:graygoo_factory + distance = 0 + angle = 0 + } + } + } + create_fleet = { + name = "NAME_Tempest_Fleet" + effect = { + set_owner = event_target:graygoo_country + rg_create_graygoo_roamers_4 = yes + set_formation_scale = 2 + set_fleet_stance = aggressive + set_aggro_range_measure_from = self + set_aggro_range = 250 + set_location = { + target = event_target:graygoo_factory + distance = 0 + angle = 0 + } + } + } + create_fleet = { + name = "NAME_Tempest_Fleet" + effect = { + set_owner = event_target:graygoo_country + rg_create_graygoo_roamers_5 = yes + set_formation_scale = 2 + set_fleet_stance = aggressive + set_aggro_range_measure_from = self + set_aggro_range = 250 + set_location = { + target = event_target:graygoo_factory + distance = 0 + angle = 0 + } + } + } + create_fleet = { + name = "NAME_Tempest_Fleet" + effect = { + set_owner = event_target:graygoo_country + rg_create_graygoo_roamers_6 = yes + set_formation_scale = 2 + set_fleet_stance = aggressive + set_aggro_range_measure_from = self + set_aggro_range = 250 + set_location = { + target = event_target:graygoo_factory + distance = 0 + angle = 0 + } + } + } + create_fleet = { + name = "NAME_Tempest_Fleet" + effect = { + set_owner = event_target:graygoo_country + rg_create_graygoo_roamers_7 = yes + set_formation_scale = 2 + set_fleet_stance = aggressive + set_aggro_range_measure_from = self + set_aggro_range = 250 + set_location = { + target = event_target:graygoo_factory + distance = 0 + angle = 0 + } + } + } + country_event = { id = graygoo.3 days = 3600 } + } +} + +# Factory Destroyed +country_event = { + id = graygoo.6 + hide_window = yes + + is_triggered_only = yes + + trigger = { + is_country_type = gray_goo + fromfrom = { is_ship_size = graygoo_factory } + } + + immediate = { + remove_global_flag = active_gray_goo + remove_global_flag = gray_goo_crisis_active + fromfromfrom = { save_event_target_as = goo_slayer_ship } + from = { + save_event_target_as = goo_slayer + country_event = { id = graygoo.15 } + country_event = { id = rg.200 days = 80 random = 120} + } + every_playable_country = { + limit = { + is_ai = no + NOT = { is_same_value = event_target:goo_slayer } + } + country_event = { id = graygoo.16 } + } + observer_event = { id = observer.65 } + every_galaxy_planet = { + limit = { is_planet_class = pc_gray_goo } + add_modifier = { + modifier = "terraforming_candidate" + days = -1 + } + } + every_owned_fleet = { destroy_fleet = this } + destroy_country = yes + } +} + +# Factory Destroyed (Dessanu) +country_event = { + id = graygoo.180 + hide_window = yes + + is_triggered_only = yes + + trigger = { + is_country_type = gate_builders + fromfrom = { is_ship_size = graygoo_factory } + } + + immediate = { + fromfromfrom = { save_event_target_as = goo_slayer_ship } + from = { + save_event_target_as = goo_slayer + country_event = { id = graygoo.181 } + country_event = { id = rg.200 days = 80 random = 120} + } + every_playable_country = { + limit = { + is_ai = no + NOT = { is_same_value = event_target:goo_slayer } + } + country_event = { id = graygoo.182 } + } + observer_event = { id = observer.67 } + every_owned_planet = { + limit = { is_planet_class = pc_gaia } + change_pc = pc_gray_goo + reroll_planet = yes + destroy_colony = yes + add_modifier = { + modifier = "terraforming_candidate" + days = -1 + } + } + every_owned_fleet = { destroy_fleet = this } + destroy_country = yes + } +} \ No newline at end of file diff --git a/events/!_RG_gray_goo_events.txt b/events/!_RG_gray_goo_events.txt index e6906c2..ac45528 100644 --- a/events/!_RG_gray_goo_events.txt +++ b/events/!_RG_gray_goo_events.txt @@ -7,730 +7,6 @@ ############################ namespace = graygoo -# Entering Empty Cluster -ship_event = { - id = graygoo.550 - title = "graygoo.550.name" - desc = "graygoo.550.desc" - picture = GFX_evt_ruined_system - show_sound = event_radio_chatter - - is_triggered_only = yes - - trigger = { - NOR = { - has_global_flag = gray_goo_crisis_set - has_global_flag = dragon_season - has_global_flag = gray_goo_empire_set - has_global_flag = rg_l_cluster - } - from = { has_star_flag = lcluster1 } - owner = { NOT = { has_country_flag = origin_gray_country }} - } - - option = { - name = graygoo.550.a - } -} - -# Invasion begins -country_event = { - id = graygoo.1 - hide_window = yes - - is_triggered_only = yes - - immediate = { - set_update_modifiers_batch = begin - awaken_guardians_of_the_galaxy = yes - set_global_flag = gray_goo_crisis_active - every_megastructure = { - limit = { - is_megastructure_type = lgate_base - } - activate_gateway = this - set_megastructure_flag = lgate_activated - } - event_target:graygoo_factory_system = { - random_system_planet = { - limit = { has_planet_flag = main_star } - save_event_target_as = main_star - } - create_country = { - name = "NAME_Gray_Goo" - type = "gray_goo" - name_list = "graygoo" - flag = { - icon= { - category = "special" - file = "gray_goo.dds" - } - background= { - category = "backgrounds" - file = "sinus.dds" - } - colors={ - "grey" - "dark_grey" - "null" - "null" - } - } - effect = { - save_event_target_as = graygoo_country - create_ship_design = { - design = "NAME_RG_armed_transport_ship" - } - add_ship_design = last_created_design - create_ship_design = { - design = "NAME_RG_GRAY_scienceship" - } - add_ship_design = last_created_design - create_ship_design = { - design = "NAME_RG_GRAY_constructor" - } - add_ship_design = last_created_design - create_ship_design = { - design = "NAME_Gatebuilder_Starbase" - } - add_ship_design = last_created_design - } - } - create_fleet = { - effect = { - set_owner = event_target:graygoo_country - create_ship = { - name = random - design = "NAME_Nanite_Factory" - graphical_culture = "pirate_01" - } - set_location = { - target = event_target:main_star - distance = 55 - angle = 270 - } - save_event_target_as = nanite_factory - } - } - every_country = { establish_communications_no_message = event_target:graygoo_country } - create_fleet = { - name = "NAME_Tempest_Fleet" - effect = { - set_owner = event_target:graygoo_country - rg_create_graygoo_ships_1 = yes - set_formation_scale = 2 - set_fleet_stance = aggressive - set_aggro_range_measure_from = self - set_aggro_range = 250 - set_location = { - target = event_target:nanite_factory - distance = 80 - angle = 0 - } - } - settings = { - garrison = yes - } - } - create_fleet = { - name = "NAME_Tempest_Fleet" - effect = { - set_owner = event_target:graygoo_country - rg_create_graygoo_ships_1 = yes - set_formation_scale = 2 - set_fleet_stance = aggressive - set_aggro_range_measure_from = self - set_aggro_range = 250 - set_location = { - target = event_target:nanite_factory - distance = 80 - angle = 90 - } - } - settings = { - garrison = yes - } - } - create_fleet = { - name = "NAME_Tempest_Fleet" - effect = { - set_owner = event_target:graygoo_country - rg_create_graygoo_ships_1 = yes - set_formation_scale = 2 - set_fleet_stance = aggressive - set_aggro_range_measure_from = self - set_aggro_range = 250 - set_location = { - target = event_target:nanite_factory - distance = 80 - angle = 180 - } - } - settings = { - garrison = yes - } - } - create_fleet = { - name = "NAME_Tempest_Fleet" - effect = { - set_owner = event_target:graygoo_country - rg_create_graygoo_ships_1 = yes - set_formation_scale = 2 - set_fleet_stance = aggressive - set_aggro_range_measure_from = self - set_aggro_range = 250 - set_location = { - target = event_target:nanite_factory - distance = 80 - angle = 270 - } - } - settings = { - garrison = yes - } - } - every_system = { - limit = { has_star_flag = lcluster } - every_system_planet = { - limit = { is_planet_class = pc_gray_goo } - create_fleet = { - name = "NAME_Tempest_Fleet" - effect = { - set_owner = event_target:graygoo_country - rg_create_graygoo_ships_1 = yes - set_formation_scale = 2 - set_fleet_stance = aggressive - set_aggro_range_measure_from = self - set_aggro_range = 250 - set_location = { - target = prev - distance = 15 - angle = random - } - } - settings = { - garrison = yes - } - } - } - } - event_target:lcluster1 = { - random_system_planet = { - limit = { is_planet_class = pc_gray_goo } - save_event_target_as = start_1 - } - } - event_target:lcluster2 = { - random_system_planet = { - limit = { is_planet_class = pc_gray_goo } - save_event_target_as = start_2 - } - } - event_target:lcluster3 = { - random_system_planet = { - limit = { is_planet_class = pc_gray_goo } - save_event_target_as = start_3 - } - } - event_target:lcluster4 = { - random_system_planet = { - limit = { is_planet_class = pc_gray_goo } - save_event_target_as = start_4 - } - } - event_target:lcluster5 = { - random_system_planet = { - limit = { is_planet_class = pc_gray_goo } - save_event_target_as = start_5 - } - } - event_target:lcluster1b = { - random_system_planet = { - limit = { is_planet_class = pc_gray_goo } - save_event_target_as = start_6 - } - } - rg_create_graygoo_roamers_1 = yes - rg_create_graygoo_roamers_2 = yes - rg_create_graygoo_roamers_3 = yes - rg_create_graygoo_roamers_4 = yes - rg_create_graygoo_roamers_5 = yes - rg_create_graygoo_roamers_6 = yes - rg_create_graygoo_roamers_7 = yes - } - event_target:graygoo_country = { - country_event = { id = graygoo.3 days = 3600 } - } - every_megastructure = { - limit = { - is_megastructure_type = lgate_base - solar_system = { - NOR = { - has_star_flag = lcluster_lgate - has_star_flag = lgate_originating_system - } - } - } - create_fleet = { - name = "NAME_Tempest_Fleet" - effect = { - set_owner = event_target:graygoo_country - rg_create_graygoo_ships_1 = yes - set_formation_scale = 2 - set_fleet_stance = aggressive - set_aggro_range_measure_from = self - set_aggro_range = 250 - set_location = { - target = prev - distance = 0 - angle = 0 - } - } - } - } - set_update_modifiers_batch = end - country_event = { id = graygoo.10 } - every_playable_country = { - limit = { - NOR = { - has_event_chain = l_cluster_chain - has_special_project = RG_LCLUSTER_PROJECT - is_same_value = root - } - } - country_event = { id = graygoo.13 } - } - every_playable_country = { - limit = { - OR = { - has_event_chain = l_cluster_chain - has_special_project = RG_LCLUSTER_PROJECT - } - NOT = { is_same_value = root } - } - country_event = { id = graygoo.11 } - } - observer_event = { id = observer.64 } - } -} - -# The Dessanu Consonance -country_event = { - id = graygoo.110 - title = "distar.10951.name" - desc = "graygoo.110.desc" - picture = GFX_evt_l-gateway - show_sound = event_radio_chatter - - is_triggered_only = yes - - after = { - hidden_effect = { - every_playable_country = { - limit = { - OR = { - has_special_project = RG_LCLUSTER_PROJECT - has_event_chain = l_cluster_chain - } - NOT = { is_same_value = root } - } - country_event = { id = graygoo.111 } - } - every_playable_country = { - limit = { - NOR = { - has_event_chain = l_cluster_chain - has_special_project = RG_LCLUSTER_PROJECT - is_same_value = root - } - } - country_event = { id = graygoo.112 } - } - } - } - - option = { - name = graygoo.10.a - hidden_effect = { - country_event = { id = graygoo.115 } - } - } -} - -# Reinforcements 1 -country_event = { - id = graygoo.3 - hide_window = yes - is_triggered_only = yes - - trigger = { - event_target:graygoo_factory_system = { - any_fleet_in_system = { is_ship_size = graygoo_factory } - } - } - - immediate = { - if = { - limit = { - any_system = { - has_star_flag = lcluster - any_fleet_in_system = { - owner = { - NOT = { is_same_value = root } - } - } - } - } - # Reinforce at factory if someone else is in the cluster... - country_event = { id = graygoo.4 } - # Else spawn reinforcements... - } - else = { - every_megastructure = { - limit = { - is_megastructure_type = lgate_base - solar_system = { - NOR = { - has_star_flag = lcluster_lgate - has_star_flag = lgate_originating_system - } - } - } - create_ambient_object = { - type = "horror_spawn_object" - location = THIS - use_3d_location = yes - duration = 10 - } - create_fleet = { - name = "NAME_Tempest_Fleet" - effect = { - set_owner = event_target:graygoo_country - rg_create_graygoo_roamers_1 = yes - set_formation_scale = 2 - set_fleet_stance = aggressive - set_aggro_range_measure_from = self - set_aggro_range = 250 - set_location = { - target = prev - distance = 0 - angle = 0 - } - } - } - create_fleet = { - name = "NAME_Tempest_Fleet" - effect = { - set_owner = event_target:graygoo_country - rg_create_graygoo_roamers_2 = yes - set_formation_scale = 2 - set_fleet_stance = aggressive - set_aggro_range_measure_from = self - set_aggro_range = 250 - set_location = { - target = prev - distance = 0 - angle = 0 - } - } - } - create_fleet = { - name = "NAME_Tempest_Fleet" - effect = { - set_owner = event_target:graygoo_country - rg_create_graygoo_roamers_3 = yes - set_formation_scale = 2 - set_fleet_stance = aggressive - set_aggro_range_measure_from = self - set_aggro_range = 250 - set_location = { - target = prev - distance = 0 - angle = 0 - } - } - } - create_fleet = { - name = "NAME_Tempest_Fleet" - effect = { - set_owner = event_target:graygoo_country - rg_create_graygoo_roamers_4 = yes - set_formation_scale = 2 - set_fleet_stance = aggressive - set_aggro_range_measure_from = self - set_aggro_range = 250 - set_location = { - target = prev - distance = 0 - angle = 0 - } - } - } - create_fleet = { - name = "NAME_Tempest_Fleet" - effect = { - set_owner = event_target:graygoo_country - rg_create_graygoo_roamers_5 = yes - set_formation_scale = 2 - set_fleet_stance = aggressive - set_aggro_range_measure_from = self - set_aggro_range = 250 - set_location = { - target = prev - distance = 0 - angle = 0 - } - } - } - create_fleet = { - name = "NAME_Tempest_Fleet" - effect = { - set_owner = event_target:graygoo_country - rg_create_graygoo_roamers_6 = yes - set_formation_scale = 2 - set_fleet_stance = aggressive - set_aggro_range_measure_from = self - set_aggro_range = 250 - set_location = { - target = prev - distance = 0 - angle = 0 - } - } - } - create_fleet = { - name = "NAME_Tempest_Fleet" - effect = { - set_owner = event_target:graygoo_country - rg_create_graygoo_roamers_7 = yes - set_formation_scale = 2 - set_fleet_stance = aggressive - set_aggro_range_measure_from = self - set_aggro_range = 250 - set_location = { - target = prev - distance = 0 - angle = 0 - } - } - } - } - country_event = { id = graygoo.3 days = 3600 } - } - } -} - -# Reinforcements 2 -country_event = { - id = graygoo.4 - hide_window = yes - - is_triggered_only = yes - - immediate = { - random_owned_ship = { - limit = { is_ship_size = graygoo_factory } - save_event_target_as = graygoo_factory - } - create_fleet = { - name = "NAME_Tempest_Fleet" - effect = { - set_owner = event_target:graygoo_country - rg_create_graygoo_roamers_1 = yes - set_formation_scale = 2 - set_fleet_stance = aggressive - set_aggro_range_measure_from = self - set_aggro_range = 250 - set_location = { - target = event_target:graygoo_factory - distance = 0 - angle = 0 - } - } - } - create_fleet = { - name = "NAME_Tempest_Fleet" - effect = { - set_owner = event_target:graygoo_country - rg_create_graygoo_roamers_2 = yes - set_formation_scale = 2 - set_fleet_stance = aggressive - set_aggro_range_measure_from = self - set_aggro_range = 250 - set_location = { - target = event_target:graygoo_factory - distance = 0 - angle = 0 - } - } - } - create_fleet = { - name = "NAME_Tempest_Fleet" - effect = { - set_owner = event_target:graygoo_country - rg_create_graygoo_roamers_3 = yes - set_formation_scale = 2 - set_fleet_stance = aggressive - set_aggro_range_measure_from = self - set_aggro_range = 250 - set_location = { - target = event_target:graygoo_factory - distance = 0 - angle = 0 - } - } - } - create_fleet = { - name = "NAME_Tempest_Fleet" - effect = { - set_owner = event_target:graygoo_country - rg_create_graygoo_roamers_4 = yes - set_formation_scale = 2 - set_fleet_stance = aggressive - set_aggro_range_measure_from = self - set_aggro_range = 250 - set_location = { - target = event_target:graygoo_factory - distance = 0 - angle = 0 - } - } - } - create_fleet = { - name = "NAME_Tempest_Fleet" - effect = { - set_owner = event_target:graygoo_country - rg_create_graygoo_roamers_5 = yes - set_formation_scale = 2 - set_fleet_stance = aggressive - set_aggro_range_measure_from = self - set_aggro_range = 250 - set_location = { - target = event_target:graygoo_factory - distance = 0 - angle = 0 - } - } - } - create_fleet = { - name = "NAME_Tempest_Fleet" - effect = { - set_owner = event_target:graygoo_country - rg_create_graygoo_roamers_6 = yes - set_formation_scale = 2 - set_fleet_stance = aggressive - set_aggro_range_measure_from = self - set_aggro_range = 250 - set_location = { - target = event_target:graygoo_factory - distance = 0 - angle = 0 - } - } - } - create_fleet = { - name = "NAME_Tempest_Fleet" - effect = { - set_owner = event_target:graygoo_country - rg_create_graygoo_roamers_7 = yes - set_formation_scale = 2 - set_fleet_stance = aggressive - set_aggro_range_measure_from = self - set_aggro_range = 250 - set_location = { - target = event_target:graygoo_factory - distance = 0 - angle = 0 - } - } - } - country_event = { id = graygoo.3 days = 3600 } - } -} - -# Factory Destroyed -country_event = { - id = graygoo.6 - hide_window = yes - - is_triggered_only = yes - - trigger = { - is_country_type = gray_goo - fromfrom = { is_ship_size = graygoo_factory } - } - - immediate = { - remove_global_flag = active_gray_goo - remove_global_flag = gray_goo_crisis_active - fromfromfrom = { save_event_target_as = goo_slayer_ship } - from = { - save_event_target_as = goo_slayer - country_event = { id = graygoo.15 } - country_event = { id = rg.200 days = 80 random = 120} - } - every_playable_country = { - limit = { - is_ai = no - NOT = { is_same_value = event_target:goo_slayer } - } - country_event = { id = graygoo.16 } - } - observer_event = { id = observer.65 } - every_galaxy_planet = { - limit = { is_planet_class = pc_gray_goo } - add_modifier = { - modifier = "terraforming_candidate" - days = -1 - } - } - every_owned_fleet = { destroy_fleet = this } - destroy_country = yes - } -} - -# Factory Destroyed (Dessanu) -country_event = { - id = graygoo.180 - hide_window = yes - - is_triggered_only = yes - - trigger = { - is_country_type = gate_builders - fromfrom = { is_ship_size = graygoo_factory } - } - - immediate = { - fromfromfrom = { save_event_target_as = goo_slayer_ship } - from = { - save_event_target_as = goo_slayer - country_event = { id = graygoo.181 } - country_event = { id = rg.200 days = 80 random = 120} - } - every_playable_country = { - limit = { - is_ai = no - NOT = { is_same_value = event_target:goo_slayer } - } - country_event = { id = graygoo.182 } - } - observer_event = { id = observer.67 } - every_owned_planet = { - limit = { is_planet_class = pc_gaia } - change_pc = pc_gray_goo - reroll_planet = yes - destroy_colony = yes - add_modifier = { - modifier = "terraforming_candidate" - days = -1 - } - } - every_owned_fleet = { destroy_fleet = this } - destroy_country = yes - } -} - # Encountered Gray ship_event = { id = graygoo.400 @@ -1077,33 +353,8 @@ country_event = { # Main Menu (Initial) country_event = { id = graygoo.500 - title = "graygoo.500.title" - desc = "graygoo.500.a.desc" - desc = "graygoo.500.b.desc" - desc = "graygoo.500.c.desc" - desc = "graygoo.500.d.desc" - - diplomatic = yes - - picture_event_data = { - portrait = event_target:gray_governor - planet_background = root.capital_scope - room = "ethic_spaceship_room" - } - + hide_window = yes is_triggered_only = yes - - immediate = { - set_country_flag = gray_diplomacy_engaged - } - - after = { - hidden_effect = { - remove_country_flag = gray_diplomacy_engaged - #初始化衣柜 - reset_gray_cloth = yes - } - } trigger = { NOR = { @@ -1121,83 +372,35 @@ country_event = { has_country_flag = gray_warship_active has_country_flag = gray_army_active has_country_flag = gray_reforming - has_country_flag = gray_diplomacy_engaged } } - option = { # Governor - name = graygoo.500.a - response_text = graygoo.500.a.response - trigger = { - NOT = { has_country_flag = gray_governor_active } - } - hidden_effect = { - rg_create_gray_governor = yes - } - } - option = { # Warship - name = graygoo.500.b - response_text = graygoo.500.b.response - trigger = { - NOT = { has_country_flag = gray_warship_active } - } - hidden_effect = { - rg_create_gray_warship = yes - } - } - option = { # Army - name = graygoo.500.c - response_text = graygoo.500.c.response - trigger = { - NOT = { has_country_flag = gray_army_active } - } - hidden_effect = { - rg_create_gray_army = yes - } - } - option = { # const - name = rg_const - response_text = rg_const.500.response - trigger = { - NOT = { has_country_flag = gray_const_active } - } - hidden_effect = { - rg_create_gray_const = yes - } - } - option = { # help - name = rg_help - hidden_effect = { - country_event = { - id = rg.4 + immediate = { + if = { # 检查是否存在任何形式的小灰 + limit = { + any_owned_leader = { + NOR = { + has_leader_flag = rg_gray_leader + OR = { + has_leader_flag = gray_governor + has_leader_flag = gray_admiral + has_leader_flag = gray_general + has_leader_flag = gray_scientist + } + } + } } + rg_gray_govener_init = yes #创建一个衣架子 } - } - - option = { - name = graygoo.500.d - default_hide_option = yes + country_event = { id = rg_grayleader.500 } #放行。 } } # Main Menu (Governor) country_event = { id = graygoo.501 - title = "graygoo.500.title" - desc = "graygoo.501.a.desc" - desc = "graygoo.501.b.desc" - desc = "graygoo.501.c.desc" - desc = "graygoo.501.d.desc" - - diplomatic = yes - - picture_event_data = { - portrait = event_target:gray_governor - planet_background = event_target:gray_governor_planet - room = root - } - + hide_window = yes is_triggered_only = yes trigger = { @@ -1219,95 +422,30 @@ country_event = { } immediate = { - set_country_flag = gray_diplomacy_engaged - if = { + if = { # 检查是否存在任何形式的小灰 limit = { - any_owned_planet = { - exists = sector.leader - sector.leader = { is_same_value = event_target:gray_governor } + any_owned_leader = { + NOR = { + has_leader_flag = rg_gray_leader + OR = { + has_leader_flag = gray_governor + has_leader_flag = gray_admiral + has_leader_flag = gray_general + has_leader_flag = gray_scientist + } + } } } - random_owned_planet = { - limit = { - exists = sector.leader - sector.leader = { is_same_value = event_target:gray_governor } - } - save_event_target_as = gray_governor_planet - } + rg_gray_govener_init = yes #创建一个衣架子 } - else = { - capital_scope = { save_event_target_as = gray_governor_planet } - } - } - - after = { - hidden_effect = { - remove_country_flag = gray_diplomacy_engaged - reset_gray_cloth = yes - } - } - - option = { # Warship - name = graygoo.500.b - response_text = graygoo.501.b.response - allow = { - hidden_trigger = { exists = event_target:gray_governor } # To prevent exploit - } - hidden_effect = { - rg_create_gray_warship = yes - } - } - option = { # const - name = rg_const - response_text = rg_const.501.response - allow = { - hidden_trigger = { exists = event_target:gray_governor } - } - hidden_effect = { - rg_create_gray_const = yes - } - } - option = { # Army - name = graygoo.500.c - response_text = graygoo.501.c.response - allow = { - hidden_trigger = { exists = event_target:gray_governor } - } - hidden_effect = { - rg_create_gray_army = yes - } - } - option = { # help - name = rg_help - hidden_effect = { - country_event = { - id = rg.4 - } - } - } - - option = { - name = graygoo.500.d - default_hide_option = yes + country_event = { id = rg_grayleader.501 } #放行。 } } # Main Menu (Warship) country_event = { id = graygoo.502 - title = "graygoo.500.title" - desc = "graygoo.502.a.desc" - desc = "graygoo.502.b.desc" - desc = "graygoo.502.c.desc" - desc = "graygoo.502.d.desc" - - diplomatic = yes - - picture_event_data = { - portrait = event_target:gray_leader_admiral - room = "ethic_spaceship_room" - } - + hide_window = yes is_triggered_only = yes trigger = { @@ -1331,322 +469,30 @@ country_event = { } immediate = { - set_country_flag = gray_diplomacy_engaged - capital_scope = { solar_system = { starbase = { save_event_target_as = gray_owner_capital_starbase }}} - } - - after = { - hidden_effect = { - remove_country_flag = gray_diplomacy_engaged - reset_gray_cloth = yes - } - } - - option = { # Governor - name = graygoo.500.a - response_text = graygoo.502.a.response - allow = { - hidden_trigger = { # To prevent exploit - event_target:gray_warship = { num_ships > 0 } - } - custom_tooltip = { - fail_text = graygoo.500.allow.a - event_target:gray_warship = { is_in_combat = no } - } - custom_tooltip = { - fail_text = graygoo.500.allow.b - event_target:gray_warship = { NOT = { has_hp_percentage < 0.97 } } - } - } - hidden_effect = { - rg_create_gray_governor = yes - } - } - option = { # const - name = rg_const - response_text = rg_const.502.response - allow = { - hidden_trigger = { - event_target:gray_warship = { num_ships > 0 } - } - custom_tooltip = { - fail_text = graygoo.500.allow.a - event_target:gray_warship = { is_in_combat = no } - } - custom_tooltip = { - fail_text = graygoo.500.allow.b - event_target:gray_warship = { NOT = { has_hp_percentage < 0.97 } } - } - } - hidden_effect = { - rg_create_gray_const = yes - } - } - option = { # Army - name = graygoo.500.c - response_text = graygoo.502.c.response - allow = { - hidden_trigger = { - event_target:gray_warship = { num_ships > 0 } - } - custom_tooltip = { - fail_text = graygoo.500.allow.a - event_target:gray_warship = { is_in_combat = no } - } - custom_tooltip = { - fail_text = graygoo.500.allow.b - event_target:gray_warship = { NOT = { has_hp_percentage < 0.97 } } - } - } - hidden_effect = { - rg_create_gray_army = yes - } - } - - option = { # Juggernaut - name = RG_graygoo.500.d - response_text = RG_graygoo.502.d.response - trigger = { - has_country_flag = rg_juggernaut_fired - NOT = { has_country_flag = gray_warship_is_juggernaut } - } - allow = { - hidden_trigger = { - event_target:gray_warship = { num_ships > 0 } - } - custom_tooltip = { - fail_text = graygoo.500.allow.a - event_target:gray_warship = { is_in_combat = no } - } - custom_tooltip = { - fail_text = graygoo.500.allow.b - event_target:gray_warship = { NOT = { has_hp_percentage < 0.97 } } - } - } - custom_tooltip = rg_need_manual_toggle - hidden_effect = { - set_country_flag = gray_warship_is_juggernaut - } - } - - option = { # Warship - name = RG_graygoo.500.e - response_text = RG_graygoo.502.e.response - trigger = { - has_country_flag = rg_juggernaut_fired - has_country_flag = gray_warship_is_juggernaut - } - allow = { - hidden_trigger = { - event_target:gray_warship = { num_ships > 0 } - } - custom_tooltip = { - fail_text = graygoo.500.allow.a - event_target:gray_warship = { is_in_combat = no } - } - custom_tooltip = { - fail_text = graygoo.500.allow.b - event_target:gray_warship = { NOT = { has_hp_percentage < 0.97 } } - } - } - custom_tooltip = rg_need_manual_toggle - hidden_effect = { - remove_country_flag = gray_warship_is_juggernaut - } - } - - option = { #升级-2 - name = rg_levelup_2 - trigger = { - event_target:gray_leader_admiral = { has_skill >= 10 } - NOR = { - has_country_flag = rg_gray_level_2 - has_country_flag = rg_gray_level_3 - has_special_project = RG_GRAY_MOD1 - } - } - allow = { - hidden_trigger = { - event_target:gray_warship = { num_ships > 0 } - } - custom_tooltip = { - fail_text = graygoo.500.allow.a - event_target:gray_warship = { is_in_combat = no } - } - custom_tooltip = { - fail_text = graygoo.500.allow.b - event_target:gray_warship = { NOT = { has_hp_percentage < 0.97 } } - } - - custom_tooltip = { - fail_text = requires_rg_graylevel_higherthan_25 - event_target:gray_leader_admiral = { has_skill >= 10 } - } - resource_stockpile_compare = { resource = energy value >= 40000 } - resource_stockpile_compare = { resource = alloys value >= 40000 } - } - custom_tooltip = rg_levelup_2.tooltip - enable_special_project = { - name = RG_GRAY_MOD1 - location = event_target:gray_owner_capital_starbase - owner = root - } - add_resource = { - energy = -40000 - alloys = -40000 - } - } - - option = { #升级-3 - name = rg_levelup_3 - trigger = { - AND = { - event_target:gray_leader_admiral = { has_skill >= 10 } - has_country_flag = rg_gray_level_2 - } - NOR = { - has_country_flag = rg_gray_level_3 - has_special_project = RG_GRAY_MOD2 - } - } - allow = { - hidden_trigger = { # To prevent exploit - event_target:gray_warship = { num_ships > 0 } - } - custom_tooltip = { - fail_text = graygoo.500.allow.a - event_target:gray_warship = { is_in_combat = no } - } - custom_tooltip = { - fail_text = graygoo.500.allow.b - event_target:gray_warship = { NOT = { has_hp_percentage < 0.97 } } - } - - custom_tooltip = { - fail_text = requires_rg_graylevel_higherthan_50 - has_technology = tech_juggernaut - } - resource_stockpile_compare = { resource = energy value >= 150000 } - resource_stockpile_compare = { resource = alloys value >= 150000 } - } - custom_tooltip = rg_levelup_2.tooltip - enable_special_project = { - name = RG_GRAY_MOD2 - location = event_target:gray_owner_capital_starbase - owner = root - } - add_resource = { - energy = -150000 - alloys = -150000 - } - } - - option = { # 购买主宰 - name = rg.4.d - trigger = { - NOR = { - has_country_flag = gray_reforming - has_country_flag = rg_juggernaut_fired - } - has_country_flag = rg_gray_level_3 - } - - allow = { - resource_stockpile_compare = { resource = energy value >= 150000 } - resource_stockpile_compare = { resource = alloys value >= 150000 } - has_technology = tech_juggernaut - } - custom_tooltip = rg_levelup_2.tooltip - enable_special_project = { - name = RG_GRAY_MOD3 - location = event_target:gray_owner_capital_starbase - owner = root - } - add_resource = { - energy = -150000 - alloys = -150000 - } - } - - option = { # 开启隐形 - name = rg.4.e - trigger = { - any_owned_fleet = { - AND = { - is_ship_size = RG_gray_juggernaut - is_cloaked = no - } - } - } - - hidden_effect = { - every_owned_fleet = { - limit = { - any_owned_ship = { - is_ship_size = RG_gray_juggernaut + if = { # 检查是否存在任何形式的小灰 + limit = { + any_owned_leader = { + NOR = { + has_leader_flag = rg_gray_leader + OR = { + has_leader_flag = gray_governor + has_leader_flag = gray_admiral + has_leader_flag = gray_general + has_leader_flag = gray_scientist + } } } - set_cloaking_active = yes } + rg_gray_admiral_init = yes #创建一个衣架子 } - - } - - option = { # 关闭隐形 - name = rg.4.f - trigger = { - any_owned_fleet = { - AND = { - is_ship_size = RG_gray_juggernaut - is_cloaked = yes - } - } - } - - hidden_effect = { - every_owned_fleet = { - limit = { - any_owned_ship = { - is_ship_size = RG_gray_juggernaut - } - } - set_cloaking_active = no - } - } - - } - - option = { # help - name = rg_help - hidden_effect = { - country_event = { - id = rg.4 - } - } - } - - option = { - name = graygoo.500.d - default_hide_option = yes + country_event = { id = rg_grayleader.502 } #放行。 } } # Main Menu (Army) country_event = { id = graygoo.503 - title = "graygoo.500.title" - desc = "graygoo.503.a.desc" - desc = "graygoo.503.b.desc" - desc = "graygoo.503.c.desc" - desc = "graygoo.503.d.desc" - - diplomatic = yes - - picture_event_data = { - portrait = event_target:gray_leader_general - room = "ethic_spaceship_room" - } - + hide_window = yes is_triggered_only = yes trigger = { @@ -1678,242 +524,23 @@ country_event = { } immediate = { - set_country_flag = gray_diplomacy_engaged - } - - after = { - hidden_effect = { - remove_country_flag = gray_diplomacy_engaged - reset_gray_cloth = yes - } - } - - option = { # Governor - name = graygoo.500.a - response_text = graygoo.503.a.response - allow = { - hidden_trigger = { # To prevent exploit - any_owned_army = { - army_type = gray_army - OR = { - exists = planet - AND = { - exists = fleet - fleet = { num_ships > 0 } + if = { # 检查是否存在任何形式的小灰 + limit = { + any_owned_leader = { + NOR = { + has_leader_flag = rg_gray_leader + OR = { + has_leader_flag = gray_governor + has_leader_flag = gray_admiral + has_leader_flag = gray_general + has_leader_flag = gray_scientist } } } } - custom_tooltip = { - fail_text = graygoo.500.allow.a - any_owned_army = { - army_type = gray_army - if = { - limit = { exists = planet } - planet = { has_ground_combat = no } - } - } - } + rg_gray_general_init = yes #创建一个衣架子 } - allow = { - hidden_trigger = { - any_owned_army = { - army_type = gray_army - OR = { - exists = planet - AND = { - exists = fleet - fleet = { num_ships > 0 } - } - } - } - } - custom_tooltip = { - fail_text = graygoo.500.allow.a - any_owned_army = { - army_type = gray_army - if = { - limit = { exists = fleet } - fleet = { is_in_combat = no } - } - } - } - } - hidden_effect = { - rg_create_gray_governor = yes - } - } - option = { # Warship - name = graygoo.500.b - response_text = graygoo.503.b.response - allow = { - hidden_trigger = { - any_owned_army = { - army_type = gray_army - OR = { - exists = planet - AND = { - exists = fleet - fleet = { num_ships > 0 } - } - } - } - } - custom_tooltip = { - fail_text = graygoo.500.allow.a - any_owned_army = { - army_type = gray_army - if = { - limit = { exists = planet } - planet = { has_ground_combat = no } - } - } - } - } - allow = { - hidden_trigger = { - any_owned_army = { - army_type = gray_army - OR = { - exists = planet - AND = { - exists = fleet - fleet = { num_ships > 0 } - } - } - } - } - custom_tooltip = { - fail_text = graygoo.500.allow.a - any_owned_army = { - army_type = gray_army - if = { - limit = { exists = fleet } - fleet = { is_in_combat = no } - } - } - } - } - hidden_effect = { - rg_create_gray_warship = yes - } - } - option = { # const - name = rg_const - response_text = rg_const.503.response - allow = { - hidden_trigger = { - any_owned_army = { - army_type = gray_army - OR = { - exists = planet - AND = { - exists = fleet - fleet = { num_ships > 0 } - } - } - } - } - custom_tooltip = { - fail_text = graygoo.500.allow.a - any_owned_army = { - army_type = gray_army - if = { - limit = { exists = planet } - planet = { has_ground_combat = no } - } - } - } - } - allow = { - hidden_trigger = { - any_owned_army = { - army_type = gray_army - OR = { - exists = planet - AND = { - exists = fleet - fleet = { num_ships > 0 } - } - } - } - } - custom_tooltip = { - fail_text = graygoo.500.allow.a - any_owned_army = { - army_type = gray_army - if = { - limit = { exists = fleet } - fleet = { is_in_combat = no } - } - } - } - } - hidden_effect = { - rg_create_gray_const = yes - } - } - - option = { # 开启隐形 - name = rg.4.e - trigger = { - any_owned_fleet = { - AND = { - is_ship_size = RG_armed_transport_ship - is_cloaked = no - } - } - } - - hidden_effect = { - every_owned_fleet = { - limit = { - any_owned_ship = { - is_ship_size = RG_armed_transport_ship - } - } - set_cloaking_active = yes - } - } - - } - - option = { # 关闭隐形 - name = rg.4.f - trigger = { - any_owned_fleet = { - AND = { - is_ship_size = RG_armed_transport_ship - is_cloaked = yes - } - } - } - - hidden_effect = { - every_owned_fleet = { - limit = { - any_owned_ship = { - is_ship_size = RG_armed_transport_ship - } - } - set_cloaking_active = no - } - } - - } - - option = { # help - name = rg_help - hidden_effect = { - country_event = { - id = rg.4 - } - } - } - - option = { - name = graygoo.500.d - default_hide_option = yes + country_event = { id = rg_grayleader.503 } #放行。 } } @@ -1963,19 +590,7 @@ country_event = { # Main Menu (const) country_event = { id = graygoo.505 - title = "graygoo.500.title" - desc = "graygoo.505.a.desc" - desc = "graygoo.505.b.desc" - desc = "graygoo.505.c.desc" - desc = "graygoo.505.d.desc" - - diplomatic = yes - - picture_event_data = { - portrait = event_target:gray_leader_scientist - room = "ethic_spaceship_room" - } - + hide_window = yes is_triggered_only = yes trigger = { @@ -2000,119 +615,23 @@ country_event = { } immediate = { - set_country_flag = gray_diplomacy_engaged - } - - after = { - hidden_effect = { - remove_country_flag = gray_diplomacy_engaged + if = { # 检查是否存在任何形式的小灰 + limit = { + any_owned_leader = { + NOR = { + has_leader_flag = rg_gray_leader + OR = { + has_leader_flag = gray_governor + has_leader_flag = gray_admiral + has_leader_flag = gray_general + has_leader_flag = gray_scientist + } + } + } + } + rg_gray_scientist_init = yes #创建一个衣架子 } - } - - option = { # Governor - name = graygoo.500.a - response_text = graygoo.505.a.response - allow = { - hidden_trigger = { # To prevent exploit - event_target:global_gray_constship = { num_ships > 0 } - } - custom_tooltip = { - fail_text = graygoo.500.allow.a - event_target:global_gray_constship = { is_in_combat = no } - } - custom_tooltip = { - fail_text = graygoo.500.allow.b - event_target:global_gray_constship = { NOT = { has_hp_percentage < 0.97 } } - } - custom_tooltip = { - fail_text = gray_become_ruler - NOT = { ruler = { has_leader_flag = "gray_leader" }} - } - } - hidden_effect = { - rg_create_gray_governor = yes - } - } - option = { # Warship - name = graygoo.500.b - response_text = graygoo.505.b.response - allow = { - hidden_trigger = { # To prevent exploit - event_target:global_gray_constship = { num_ships > 0 } - } - custom_tooltip = { - fail_text = graygoo.500.allow.a - event_target:global_gray_constship = { is_in_combat = no } - } - custom_tooltip = { - fail_text = graygoo.500.allow.b - event_target:global_gray_constship = { NOT = { has_hp_percentage < 0.97 } } - } - } - hidden_effect = { - rg_create_gray_warship = yes - } - } - option = { # Army - name = graygoo.500.c - response_text = graygoo.505.c.response - allow = { - hidden_trigger = { # To prevent exploit - event_target:global_gray_constship = { num_ships > 0 } - } - custom_tooltip = { - fail_text = graygoo.500.allow.a - event_target:global_gray_constship = { is_in_combat = no } - } - custom_tooltip = { - fail_text = graygoo.500.allow.b - event_target:global_gray_constship = { NOT = { has_hp_percentage < 0.97 } } - } - } - hidden_effect = { - rg_create_gray_army = yes - } - } - option = { # help - name = rg_help - hidden_effect = { - country_event = { - id = rg.4 - } - } - } - -# option = { # 开启建造中继器 -# name = rg.5.e -# trigger = { -# has_country_flag = rg_can_const_hyper_relay -# } -# -# hidden_effect = { -# remove_country_flag = rg_can_const_hyper_relay -# } -# -# } -# -# option = { # 关闭建造中继器 -# name = rg.5.f -# trigger = { -# NOT = { -# has_country_flag = rg_can_const_hyper_relay -# } -# } -# -# hidden_effect = { -# hidden_effect = { -# set_country_flag = rg_can_const_hyper_relay -# } -# } -# -# } - - option = { - name = graygoo.500.d - default_hide_option = yes + country_event = { id = rg_grayleader.505 } #放行。 } } diff --git a/events/RG_events.txt b/events/RG_events.txt index c919aa5..42f53c9 100644 --- a/events/RG_events.txt +++ b/events/RG_events.txt @@ -28,7 +28,7 @@ country_event = { text = "rg.2.desc" } - diplomatic = yes + hide_window = yes picture_event_data = { portrait = root.species @@ -41,16 +41,28 @@ country_event = { hidden_effect = { rg_create_gray_species = yes rg_gray_govener_init = yes + country_event = { id = graygoo.499 } + create_message = { + type = MESSAGE_RECRUITED_LEADER + localization = "rg.2.desc" + days = @toast_message_days + target = root + variable = { + type = name + localization = LEADER + scope = event_target:gray_governor + } + } } } - option = { - name = rg.2.a - hidden_effect = { - country_event = { id = graygoo.499 } - } - default_hide_option = yes - } + # option = { + # name = rg.2.a + # hidden_effect = { + # country_event = { id = graygoo.499 } + # } + # default_hide_option = yes + # } } country_event = { @@ -324,196 +336,6 @@ country_event = { } } -# help Menu (Initial) -country_event = { - id = rg.4 - title = "graygoo.500.title" - desc = "rg.4.a.desc" - - diplomatic = yes - - picture_event_data = { - portrait = event_target:gray_species - 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 = rg.4.a - trigger = { - NOT = { has_country_flag = gray_reforming } - } - - allow = { - NOR = { - has_country_flag = rg_gray_level_1 - } - resource_stockpile_compare = { resource = energy value >= 40000 } - resource_stockpile_compare = { resource = alloys value >= 40000 } - } - - if = { - limit = { - has_country_flag = gray_begging - } - remove_country_flag = gray_begging - } - else = { - add_resource = { - energy = -40000 - alloys = -40000 - } - } - - hidden_effect = { - rg_create_gray_warship_1 = yes - } - } - option = { # 购买工程船 - name = rg.4.b - trigger = { - NOT = { has_country_flag = gray_reforming } - } - - allow = { - resource_stockpile_compare = { resource = energy value >= 2000 } - resource_stockpile_compare = { resource = alloys value >= 2000 } - } - - add_resource = { - energy = -2000 - alloys = -2000 - } - - hidden_effect = { - rg_create_gray_constship_1 = yes - } - - } - - option = { # 没钱了,救救 - name = rg.4.c - trigger = { - NOT = { has_country_flag = gray_reforming } - } - - hidden_effect = { - if = { - limit = { - has_country_flag = gray_alreadybegged - } - country_event = { - id = rg.6 - } - } - else = { - country_event = { - id = rg.5 - } - } - } - } - - option = { - name = graygoo.500.d - default_hide_option = yes - } -} - -country_event = { - id = rg.5 - title = "graygoo.500.title" - desc = "rg.5.a.desc" - desc = "rg.5.b.desc" - desc = "rg.5.c.desc" - - diplomatic = yes - - picture_event_data = { - portrait = event_target:gray_species - 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 = rg.5.a - hidden_effect = { - set_country_flag = gray_begging - set_timed_country_flag = { flag = gray_alreadybegged days = 3600 } - tooltip = { - add_resource = { - energy = 200 - alloys = 200 - consumer_goods = 200 - mult = value:years_passed - } - } - } - } - - option = { - name = graygoo.500.d - default_hide_option = yes - } -} - -country_event = { - id = rg.6 - title = "graygoo.500.title" - desc = "rg.6.a.desc" - desc = "rg.6.b.desc" - - diplomatic = yes - - picture_event_data = { - portrait = event_target:gray_species - 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 = rg.6.a - default_hide_option = yes - } - -} - country_event = { id = rg.7 hide_window = yes diff --git a/events/RG_gray_leader_event.txt b/events/RG_gray_leader_event.txt new file mode 100644 index 0000000..5f9cf08 --- /dev/null +++ b/events/RG_gray_leader_event.txt @@ -0,0 +1,1415 @@ +namespace = rg_grayleader + +# Check list (Initial) +country_event = { + id = rg_grayleader.1 + 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 + }} + 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 + } + from = { 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 = graygoo.500 } + } + else_if = { #501.governor + limit = { + 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_governor_active + exists = event_target:gray_governor + NOR = { + has_country_flag = gray_reforming + has_country_flag = gray_diplomacy_engaged + } + } + country_event = { id = graygoo.501 } + } + else_if = { #502.warship + limit = { + 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_warship_active + 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 + has_country_flag = gray_diplomacy_engaged + } + } + country_event = { id = graygoo.502 } + } + else_if = { #503.army + limit = { + NOR = { + has_global_flag = has_wsg_mod + has_global_flag = kdc_event_mod_active + } + from = { OR = { + is_country_type = gray + is_same_value = ROOT + }} + has_country_flag = gray_army_active + is_same_value = event_target:gray_owner + any_owned_army = { + army_type = gray_army + OR = { + exists = planet + AND = { + exists = fleet + fleet = { num_ships > 0 } + } + } + } + NOR = { + has_country_flag = gray_reforming + has_country_flag = gray_diplomacy_engaged + } + } + country_event = { id = graygoo.503 } + } + else_if = { #505.scienceship + limit = { + 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_constship_active + 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 + has_country_flag = gray_diplomacy_engaged + } + } + country_event = { id = graygoo.505 } + } + } + +} + +# Main Menu (Initial) +country_event = { + id = rg_grayleader.500 + title = "graygoo.500.title" + desc = "graygoo.500.a.desc" + desc = "graygoo.500.b.desc" + desc = "graygoo.500.c.desc" + desc = "graygoo.500.d.desc" + + diplomatic = yes + event_window_type = leader_recruit + + picture_event_data = { + portrait = event_target:gray_governor + planet_background = root.capital_scope + room = "ethic_spaceship_room" + } + + is_triggered_only = yes + + immediate = { + set_country_flag = gray_diplomacy_engaged + } + + after = { + hidden_effect = { + remove_country_flag = gray_diplomacy_engaged + #初始化衣柜 + reset_gray_cloth = 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 + 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 + } + } + + option = { # Governor + name = graygoo.500.a + response_text = graygoo.500.a.response + trigger = { + NOT = { has_country_flag = gray_governor_active } + } + hidden_effect = { + rg_create_gray_governor = yes + } + } + option = { # Warship + name = graygoo.500.b + response_text = graygoo.500.b.response + trigger = { + NOT = { has_country_flag = gray_warship_active } + } + hidden_effect = { + rg_create_gray_warship = yes + } + } + option = { # Army + name = graygoo.500.c + response_text = graygoo.500.c.response + trigger = { + NOT = { has_country_flag = gray_army_active } + } + hidden_effect = { + rg_create_gray_army = yes + } + } + option = { # const + name = rg_const + response_text = rg_const.500.response + trigger = { + NOT = { has_country_flag = gray_const_active } + } + hidden_effect = { + rg_create_gray_const = yes + } + } + option = { # help + name = rg_help + hidden_effect = { + country_event = { + id = rg.4 + } + } + } + + 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 + } + } + } +} + +# Main Menu (Governor) +country_event = { + id = rg_grayleader.501 + title = "graygoo.500.title" + desc = "graygoo.501.a.desc" + desc = "graygoo.501.b.desc" + desc = "graygoo.501.c.desc" + desc = "graygoo.501.d.desc" + + diplomatic = yes + event_window_type = leader_recruit + + picture_event_data = { + portrait = event_target:gray_governor + planet_background = event_target:gray_governor_planet + room = root + } + + 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_governor_active + NOR = { + has_country_flag = gray_reforming + has_country_flag = gray_diplomacy_engaged + } + exists = event_target:gray_governor + } + + immediate = { + set_country_flag = gray_diplomacy_engaged + if = { + limit = { + any_owned_planet = { + exists = sector.leader + sector.leader = { is_same_value = event_target:gray_governor } + } + } + random_owned_planet = { + limit = { + exists = sector.leader + sector.leader = { is_same_value = event_target:gray_governor } + } + save_event_target_as = gray_governor_planet + } + } + else = { + capital_scope = { save_event_target_as = gray_governor_planet } + } + } + + after = { + hidden_effect = { + remove_country_flag = gray_diplomacy_engaged + reset_gray_cloth = yes + } + } + + option = { # Warship + name = graygoo.500.b + response_text = graygoo.501.b.response + allow = { + hidden_trigger = { exists = event_target:gray_governor } # To prevent exploit + } + hidden_effect = { + rg_create_gray_warship = yes + } + } + option = { # const + name = rg_const + response_text = rg_const.501.response + allow = { + hidden_trigger = { exists = event_target:gray_governor } + } + hidden_effect = { + rg_create_gray_const = yes + } + } + option = { # Army + name = graygoo.500.c + response_text = graygoo.501.c.response + allow = { + hidden_trigger = { exists = event_target:gray_governor } + } + hidden_effect = { + rg_create_gray_army = yes + } + } + option = { # help + name = rg_help + hidden_effect = { + country_event = { + id = rg.4 + } + } + } + + 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 + } + } + } +} + +# Main Menu (Warship) +country_event = { + id = rg_grayleader.502 + title = "graygoo.500.title" + desc = "graygoo.502.a.desc" + desc = "graygoo.502.b.desc" + desc = "graygoo.502.c.desc" + desc = "graygoo.502.d.desc" + + diplomatic = yes + event_window_type = leader_recruit + + picture_event_data = { + portrait = event_target:gray_leader_admiral + room = "ethic_spaceship_room" + } + + 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_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 } + } + + immediate = { + set_country_flag = gray_diplomacy_engaged + capital_scope = { solar_system = { starbase = { save_event_target_as = gray_owner_capital_starbase }}} + } + + after = { + hidden_effect = { + remove_country_flag = gray_diplomacy_engaged + reset_gray_cloth = yes + } + } + + option = { # Governor + name = graygoo.500.a + response_text = graygoo.502.a.response + allow = { + hidden_trigger = { # To prevent exploit + event_target:gray_warship = { num_ships > 0 } + } + custom_tooltip = { + fail_text = graygoo.500.allow.a + event_target:gray_warship = { is_in_combat = no } + } + custom_tooltip = { + fail_text = graygoo.500.allow.b + event_target:gray_warship = { NOT = { has_hp_percentage < 0.97 } } + } + } + hidden_effect = { + rg_create_gray_governor = yes + } + } + option = { # const + name = rg_const + response_text = rg_const.502.response + allow = { + hidden_trigger = { + event_target:gray_warship = { num_ships > 0 } + } + custom_tooltip = { + fail_text = graygoo.500.allow.a + event_target:gray_warship = { is_in_combat = no } + } + custom_tooltip = { + fail_text = graygoo.500.allow.b + event_target:gray_warship = { NOT = { has_hp_percentage < 0.97 } } + } + } + hidden_effect = { + rg_create_gray_const = yes + } + } + option = { # Army + name = graygoo.500.c + response_text = graygoo.502.c.response + allow = { + hidden_trigger = { + event_target:gray_warship = { num_ships > 0 } + } + custom_tooltip = { + fail_text = graygoo.500.allow.a + event_target:gray_warship = { is_in_combat = no } + } + custom_tooltip = { + fail_text = graygoo.500.allow.b + event_target:gray_warship = { NOT = { has_hp_percentage < 0.97 } } + } + } + hidden_effect = { + rg_create_gray_army = yes + } + } + + option = { # Juggernaut + name = RG_graygoo.500.d + response_text = RG_graygoo.502.d.response + trigger = { + has_country_flag = rg_juggernaut_fired + NOT = { has_country_flag = gray_warship_is_juggernaut } + } + allow = { + hidden_trigger = { + event_target:gray_warship = { num_ships > 0 } + } + custom_tooltip = { + fail_text = graygoo.500.allow.a + event_target:gray_warship = { is_in_combat = no } + } + custom_tooltip = { + fail_text = graygoo.500.allow.b + event_target:gray_warship = { NOT = { has_hp_percentage < 0.97 } } + } + } + custom_tooltip = rg_need_manual_toggle + hidden_effect = { + set_country_flag = gray_warship_is_juggernaut + } + } + + option = { # Warship + name = RG_graygoo.500.e + response_text = RG_graygoo.502.e.response + trigger = { + has_country_flag = rg_juggernaut_fired + has_country_flag = gray_warship_is_juggernaut + } + allow = { + hidden_trigger = { + event_target:gray_warship = { num_ships > 0 } + } + custom_tooltip = { + fail_text = graygoo.500.allow.a + event_target:gray_warship = { is_in_combat = no } + } + custom_tooltip = { + fail_text = graygoo.500.allow.b + event_target:gray_warship = { NOT = { has_hp_percentage < 0.97 } } + } + } + custom_tooltip = rg_need_manual_toggle + hidden_effect = { + remove_country_flag = gray_warship_is_juggernaut + } + } + + option = { #升级-2 + name = rg_levelup_2 + trigger = { + event_target:gray_leader_admiral = { has_skill >= 10 } + NOR = { + has_country_flag = rg_gray_level_2 + has_country_flag = rg_gray_level_3 + has_special_project = RG_GRAY_MOD1 + } + } + allow = { + hidden_trigger = { + event_target:gray_warship = { num_ships > 0 } + } + custom_tooltip = { + fail_text = graygoo.500.allow.a + event_target:gray_warship = { is_in_combat = no } + } + custom_tooltip = { + fail_text = graygoo.500.allow.b + event_target:gray_warship = { NOT = { has_hp_percentage < 0.97 } } + } + + custom_tooltip = { + fail_text = requires_rg_graylevel_higherthan_25 + event_target:gray_leader_admiral = { has_skill >= 10 } + } + resource_stockpile_compare = { resource = energy value >= 40000 } + resource_stockpile_compare = { resource = alloys value >= 40000 } + } + custom_tooltip = rg_levelup_2.tooltip + enable_special_project = { + name = RG_GRAY_MOD1 + location = event_target:gray_owner_capital_starbase + owner = root + } + add_resource = { + energy = -40000 + alloys = -40000 + } + } + + option = { #升级-3 + name = rg_levelup_3 + trigger = { + AND = { + event_target:gray_leader_admiral = { has_skill >= 10 } + has_country_flag = rg_gray_level_2 + } + NOR = { + has_country_flag = rg_gray_level_3 + has_special_project = RG_GRAY_MOD2 + } + } + allow = { + hidden_trigger = { # To prevent exploit + event_target:gray_warship = { num_ships > 0 } + } + custom_tooltip = { + fail_text = graygoo.500.allow.a + event_target:gray_warship = { is_in_combat = no } + } + custom_tooltip = { + fail_text = graygoo.500.allow.b + event_target:gray_warship = { NOT = { has_hp_percentage < 0.97 } } + } + + custom_tooltip = { + fail_text = requires_rg_graylevel_higherthan_50 + has_technology = tech_juggernaut + } + resource_stockpile_compare = { resource = energy value >= 150000 } + resource_stockpile_compare = { resource = alloys value >= 150000 } + } + custom_tooltip = rg_levelup_2.tooltip + enable_special_project = { + name = RG_GRAY_MOD2 + location = event_target:gray_owner_capital_starbase + owner = root + } + add_resource = { + energy = -150000 + alloys = -150000 + } + } + + option = { # 购买主宰 + name = rg.4.d + trigger = { + NOR = { + has_country_flag = gray_reforming + has_country_flag = rg_juggernaut_fired + } + has_country_flag = rg_gray_level_3 + } + + allow = { + resource_stockpile_compare = { resource = energy value >= 150000 } + resource_stockpile_compare = { resource = alloys value >= 150000 } + has_technology = tech_juggernaut + } + custom_tooltip = rg_levelup_2.tooltip + enable_special_project = { + name = RG_GRAY_MOD3 + location = event_target:gray_owner_capital_starbase + owner = root + } + add_resource = { + energy = -150000 + alloys = -150000 + } + } + + option = { # 开启隐形 + name = rg.4.e + trigger = { + any_owned_fleet = { + AND = { + is_ship_size = RG_gray_juggernaut + is_cloaked = no + } + } + } + + hidden_effect = { + every_owned_fleet = { + limit = { + any_owned_ship = { + is_ship_size = RG_gray_juggernaut + } + } + set_cloaking_active = yes + } + } + + } + + option = { # 关闭隐形 + name = rg.4.f + trigger = { + any_owned_fleet = { + AND = { + is_ship_size = RG_gray_juggernaut + is_cloaked = yes + } + } + } + + hidden_effect = { + every_owned_fleet = { + limit = { + any_owned_ship = { + is_ship_size = RG_gray_juggernaut + } + } + set_cloaking_active = no + } + } + + } + + option = { # help + name = rg_help + hidden_effect = { + country_event = { + id = rg.4 + } + } + } + + 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 + } + } + } +} + +# Main Menu (Army) +country_event = { + id = rg_grayleader.503 + title = "graygoo.500.title" + desc = "graygoo.503.a.desc" + desc = "graygoo.503.b.desc" + desc = "graygoo.503.c.desc" + desc = "graygoo.503.d.desc" + + diplomatic = yes + event_window_type = leader_recruit + + picture_event_data = { + portrait = event_target:gray_leader_general + room = "ethic_spaceship_room" + } + + 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 + }} + 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 + OR = { + exists = planet + AND = { + exists = fleet + fleet = { num_ships > 0 } + } + } + } + } + + immediate = { + set_country_flag = gray_diplomacy_engaged + } + + after = { + hidden_effect = { + remove_country_flag = gray_diplomacy_engaged + reset_gray_cloth = yes + } + } + + option = { # Governor + name = graygoo.500.a + response_text = graygoo.503.a.response + allow = { + hidden_trigger = { # To prevent exploit + any_owned_army = { + army_type = gray_army + OR = { + exists = planet + AND = { + exists = fleet + fleet = { num_ships > 0 } + } + } + } + } + custom_tooltip = { + fail_text = graygoo.500.allow.a + any_owned_army = { + army_type = gray_army + if = { + limit = { exists = planet } + planet = { has_ground_combat = no } + } + } + } + } + allow = { + hidden_trigger = { + any_owned_army = { + army_type = gray_army + OR = { + exists = planet + AND = { + exists = fleet + fleet = { num_ships > 0 } + } + } + } + } + custom_tooltip = { + fail_text = graygoo.500.allow.a + any_owned_army = { + army_type = gray_army + if = { + limit = { exists = fleet } + fleet = { is_in_combat = no } + } + } + } + } + hidden_effect = { + rg_create_gray_governor = yes + } + } + option = { # Warship + name = graygoo.500.b + response_text = graygoo.503.b.response + allow = { + hidden_trigger = { + any_owned_army = { + army_type = gray_army + OR = { + exists = planet + AND = { + exists = fleet + fleet = { num_ships > 0 } + } + } + } + } + custom_tooltip = { + fail_text = graygoo.500.allow.a + any_owned_army = { + army_type = gray_army + if = { + limit = { exists = planet } + planet = { has_ground_combat = no } + } + } + } + } + allow = { + hidden_trigger = { + any_owned_army = { + army_type = gray_army + OR = { + exists = planet + AND = { + exists = fleet + fleet = { num_ships > 0 } + } + } + } + } + custom_tooltip = { + fail_text = graygoo.500.allow.a + any_owned_army = { + army_type = gray_army + if = { + limit = { exists = fleet } + fleet = { is_in_combat = no } + } + } + } + } + hidden_effect = { + rg_create_gray_warship = yes + } + } + option = { # const + name = rg_const + response_text = rg_const.503.response + allow = { + hidden_trigger = { + any_owned_army = { + army_type = gray_army + OR = { + exists = planet + AND = { + exists = fleet + fleet = { num_ships > 0 } + } + } + } + } + custom_tooltip = { + fail_text = graygoo.500.allow.a + any_owned_army = { + army_type = gray_army + if = { + limit = { exists = planet } + planet = { has_ground_combat = no } + } + } + } + } + allow = { + hidden_trigger = { + any_owned_army = { + army_type = gray_army + OR = { + exists = planet + AND = { + exists = fleet + fleet = { num_ships > 0 } + } + } + } + } + custom_tooltip = { + fail_text = graygoo.500.allow.a + any_owned_army = { + army_type = gray_army + if = { + limit = { exists = fleet } + fleet = { is_in_combat = no } + } + } + } + } + hidden_effect = { + rg_create_gray_const = yes + } + } + + option = { # 开启隐形 + name = rg.4.e + trigger = { + any_owned_fleet = { + AND = { + is_ship_size = RG_armed_transport_ship + is_cloaked = no + } + } + } + + hidden_effect = { + every_owned_fleet = { + limit = { + any_owned_ship = { + is_ship_size = RG_armed_transport_ship + } + } + set_cloaking_active = yes + } + } + + } + + option = { # 关闭隐形 + name = rg.4.f + trigger = { + any_owned_fleet = { + AND = { + is_ship_size = RG_armed_transport_ship + is_cloaked = yes + } + } + } + + hidden_effect = { + every_owned_fleet = { + limit = { + any_owned_ship = { + is_ship_size = RG_armed_transport_ship + } + } + set_cloaking_active = no + } + } + + } + + option = { # help + name = rg_help + hidden_effect = { + country_event = { + id = rg.4 + } + } + } + + 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 + } + } + } +} + +# Main Menu (const) +country_event = { + id = rg_grayleader.505 + title = "graygoo.500.title" + desc = "graygoo.505.a.desc" + desc = "graygoo.505.b.desc" + desc = "graygoo.505.c.desc" + desc = "graygoo.505.d.desc" + + diplomatic = yes + event_window_type = leader_recruit + + picture_event_data = { + portrait = event_target:gray_leader_scientist + room = "ethic_spaceship_room" + } + + 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_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 } + } + + immediate = { + set_country_flag = gray_diplomacy_engaged + } + + after = { + hidden_effect = { + remove_country_flag = gray_diplomacy_engaged + } + } + + option = { # Governor + name = graygoo.500.a + response_text = graygoo.505.a.response + allow = { + hidden_trigger = { # To prevent exploit + event_target:global_gray_constship = { num_ships > 0 } + } + custom_tooltip = { + fail_text = graygoo.500.allow.a + event_target:global_gray_constship = { is_in_combat = no } + } + custom_tooltip = { + fail_text = graygoo.500.allow.b + event_target:global_gray_constship = { NOT = { has_hp_percentage < 0.97 } } + } + custom_tooltip = { + fail_text = gray_become_ruler + NOT = { ruler = { has_leader_flag = "gray_leader" }} + } + } + hidden_effect = { + rg_create_gray_governor = yes + } + } + option = { # Warship + name = graygoo.500.b + response_text = graygoo.505.b.response + allow = { + hidden_trigger = { # To prevent exploit + event_target:global_gray_constship = { num_ships > 0 } + } + custom_tooltip = { + fail_text = graygoo.500.allow.a + event_target:global_gray_constship = { is_in_combat = no } + } + custom_tooltip = { + fail_text = graygoo.500.allow.b + event_target:global_gray_constship = { NOT = { has_hp_percentage < 0.97 } } + } + } + hidden_effect = { + rg_create_gray_warship = yes + } + } + option = { # Army + name = graygoo.500.c + response_text = graygoo.505.c.response + allow = { + hidden_trigger = { # To prevent exploit + event_target:global_gray_constship = { num_ships > 0 } + } + custom_tooltip = { + fail_text = graygoo.500.allow.a + event_target:global_gray_constship = { is_in_combat = no } + } + custom_tooltip = { + fail_text = graygoo.500.allow.b + event_target:global_gray_constship = { NOT = { has_hp_percentage < 0.97 } } + } + } + hidden_effect = { + rg_create_gray_army = yes + } + } + option = { # help + name = rg_help + hidden_effect = { + country_event = { + id = rg.4 + } + } + } + +# option = { # 开启建造中继器 +# name = rg.5.e +# trigger = { +# has_country_flag = rg_can_const_hyper_relay +# } +# +# hidden_effect = { +# remove_country_flag = rg_can_const_hyper_relay +# } +# +# } +# +# option = { # 关闭建造中继器 +# name = rg.5.f +# trigger = { +# NOT = { +# has_country_flag = rg_can_const_hyper_relay +# } +# } +# +# hidden_effect = { +# hidden_effect = { +# set_country_flag = rg_can_const_hyper_relay +# } +# } +# +# } + + 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 + } + } + } +} + +namespace = rg + +# help Menu (Initial) +country_event = { + id = rg.4 + title = "graygoo.500.title" + desc = "rg.4.a.desc" + + diplomatic = yes + event_window_type = leader_recruit + + picture_event_data = { + portrait = event_target:gray_species + 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 = rg.4.a + trigger = { + NOT = { has_country_flag = gray_reforming } + } + + allow = { + NOR = { + has_country_flag = rg_gray_level_1 + } + resource_stockpile_compare = { resource = energy value >= 40000 } + resource_stockpile_compare = { resource = alloys value >= 40000 } + } + + if = { + limit = { + has_country_flag = gray_begging + } + remove_country_flag = gray_begging + } + else = { + add_resource = { + energy = -40000 + alloys = -40000 + } + } + + hidden_effect = { + rg_create_gray_warship_1 = yes + } + } + option = { # 购买工程船 + name = rg.4.b + trigger = { + NOT = { has_country_flag = gray_reforming } + } + + allow = { + resource_stockpile_compare = { resource = energy value >= 2000 } + resource_stockpile_compare = { resource = alloys value >= 2000 } + } + + add_resource = { + energy = -2000 + alloys = -2000 + } + + hidden_effect = { + rg_create_gray_constship_1 = yes + } + + } + + option = { # 没钱了,救救 + name = rg.4.c + trigger = { + NOT = { has_country_flag = gray_reforming } + } + + hidden_effect = { + if = { + limit = { + has_country_flag = gray_alreadybegged + } + country_event = { + id = rg.6 + } + } + else = { + country_event = { + id = rg.5 + } + } + } + } + + 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.5 + title = "graygoo.500.title" + desc = "rg.5.a.desc" + desc = "rg.5.b.desc" + desc = "rg.5.c.desc" + + diplomatic = yes + event_window_type = leader_recruit + + picture_event_data = { + portrait = event_target:gray_species + 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 = rg.5.a + hidden_effect = { + set_country_flag = gray_begging + set_timed_country_flag = { flag = gray_alreadybegged days = 3600 } + tooltip = { + add_resource = { + energy = 200 + alloys = 200 + consumer_goods = 200 + mult = value:years_passed + } + } + } + } + + 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.6 + title = "graygoo.500.title" + desc = "rg.6.a.desc" + desc = "rg.6.b.desc" + + diplomatic = yes + event_window_type = leader_story + + picture_event_data = { + portrait = event_target:gray_species + 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 = rg.6.a + default_hide_option = 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 9351d84..ab49545 100644 --- a/localisation/simp_chinese/RG_event_l_simp_chinese.yml +++ b/localisation/simp_chinese/RG_event_l_simp_chinese.yml @@ -40,6 +40,8 @@ #rg_const.502.response:0 "让我们制造一些悲惨的种子,这些水雷会炸到自己吗?" #rg_const.503.response:0 "开始一次完美的善后工程,交给我吧。" + graygoo.500.prepage:0 "不说这个了" + graygoo.505.a.desc:0 "单位65-D-R5-9-2报告,这里一切正常。(远处的声音)机器人又坏了?快干活!" graygoo.505.b.desc:0 "开工啦!开工啦!劳动最光荣!" graygoo.505.c.desc:0 "科学家小灰向您报到!下一个目标是什么?"