diff --git a/common/on_actions/RG_on_actions.txt b/common/on_actions/RG_on_actions.txt index 8fb5b31..10306a6 100644 --- a/common/on_actions/RG_on_actions.txt +++ b/common/on_actions/RG_on_actions.txt @@ -40,7 +40,7 @@ on_army_killed_in_combat = { on_game_start_country = { events = { rg_cluster.8 - rg.1 + # rg.1 } } diff --git a/common/scripted_effects/!_RG_gray_goo_effects_overwrite.txt b/common/scripted_effects/!_RG_gray_goo_effects_overwrite.txt index 4ccd5d1..67937e3 100644 --- a/common/scripted_effects/!_RG_gray_goo_effects_overwrite.txt +++ b/common/scripted_effects/!_RG_gray_goo_effects_overwrite.txt @@ -13,4 +13,26 @@ create_gray_army = { #创造灰风科学舰 create_gray_const = { rg_create_gray_const = yes +} + +start_lcluster_chain = { + if = { + limit = { + NOR = { + is_same_value = origin_rg_gray_country + has_country_flag = origin_rg_gray_1st + } + } + hidden_effect = { + custom_tooltip = begin_lcluster_chain + begin_event_chain = { + event_chain = l_cluster_chain + target = this + } + set_variable = { + which = num_lcluster_clues + value = 0 + } + } + } } \ No newline at end of file diff --git a/common/scripted_effects/RG_scripted_effects.txt b/common/scripted_effects/RG_scripted_effects.txt index 9ca9552..959947c 100644 --- a/common/scripted_effects/RG_scripted_effects.txt +++ b/common/scripted_effects/RG_scripted_effects.txt @@ -2150,4 +2150,180 @@ RG_const_auto_build_effect_event = { } } } +} + +rg_lcluster_spawn_effect = { + set_global_flag = rg_origin_l_cluster + set_spawn_system_batch = begin + no_scope = { + # makes system positions originate from galactic core + spawn_system = { + min_distance >= 550 + max_distance <= 560 + min_orientation_angle = 44 + max_orientation_angle = 46 + initializer = rg_cluster_init_01 + hyperlane = no + } + random_system = { + limit = { has_star_flag = lcluster1 } + save_global_event_target_as = lcluster1 + spawn_system = { + min_distance >= 29 + max_distance <= 31 + min_orientation_angle = 24 + max_orientation_angle = 66 + initializer = rg_cluster_init_02 + } + spawn_system = { + min_distance >= 29 + max_distance <= 31 + min_orientation_angle = 114 + max_orientation_angle = 156 + initializer = rg_cluster_init_03 + } + spawn_system = { + min_distance >= 30 + max_distance <= 60 + min_orientation_angle = 340 + max_orientation_angle = 20 + initializer = rg_cluster_init_01b + } + } + random_system = { + limit = { has_star_flag = lcluster2 } + save_global_event_target_as = lcluster2 + spawn_system = { + min_distance >= 30 + max_distance <= 60 + min_orientation_angle = 0 + max_orientation_angle = 40 + initializer = rg_cluster_init_02b + } + } + random_system = { + limit = { has_star_flag = lcluster3 } + save_global_event_target_as = lcluster3 + spawn_system = { + min_distance >= 20 + max_distance <= 30 + min_orientation_angle = 24 + max_orientation_angle = 66 + initializer = rg_cluster_init_04 + } + spawn_system = { + min_distance >= 10 + max_distance <= 50 + min_orientation_angle = 250 + max_orientation_angle = 290 + initializer = rg_cluster_init_03b + } + } + random_system = { + limit = { has_star_flag = lcluster4 } + save_global_event_target_as = lcluster4 + spawn_system = { + min_distance >= 5 + max_distance <= 10 + min_orientation_angle = 250 + max_orientation_angle = 290 + initializer = rg_cluster_init_05 + } + spawn_system = { + min_distance >= 30 + max_distance <= 60 + min_orientation_angle = 20 + max_orientation_angle = 160 + initializer = rg_cluster_init_04b + } + } + } + + random_system = { + limit = { has_star_flag = lcluster5 } + save_global_event_target_as = lcluster5 + } + random_system = { + limit = { has_star_flag = lcluster1b } + save_global_event_target_as = lcluster1b + } + random_system = { + limit = { has_star_flag = lcluster2b } + save_global_event_target_as = lcluster2b + } + random_system = { + limit = { has_star_flag = lcluster3b } + save_global_event_target_as = lcluster3b + } + random_system = { + limit = { has_star_flag = lcluster4b } + save_global_event_target_as = lcluster4b + } + + # clear all hyperlanes to and within the cluster + every_system = { + limit = { has_star_flag = lcluster } + isolate_system = yes + } + + # add hyperlanes + event_target:lcluster5 = { + add_hyperlane = { + from = event_target:lcluster5 + to = event_target:lcluster4 + } + } + event_target:lcluster4 = { + add_hyperlane = { + from = event_target:lcluster4 + to = event_target:lcluster3 + } + add_hyperlane = { + from = event_target:lcluster4 + to = event_target:lcluster2 + } + add_hyperlane = { + from = event_target:lcluster4 + to = event_target:lcluster4b + } + } + event_target:lcluster3 = { + add_hyperlane = { + from = event_target:lcluster3 + to = event_target:lcluster1 + } + add_hyperlane = { + from = event_target:lcluster3 + to = event_target:lcluster3b + } + } + event_target:lcluster2 = { + add_hyperlane = { + from = event_target:lcluster2 + to = event_target:lcluster1 + } + add_hyperlane = { + from = event_target:lcluster2 + to = event_target:lcluster3 + } + add_hyperlane = { + from = event_target:lcluster2 + to = event_target:lcluster2b + } + } + + event_target:lcluster1 = { + add_hyperlane = { + from = event_target:lcluster1 + to = event_target:lcluster1b + } + } + event_target:lcluster1b = { + add_hyperlane = { + from = event_target:lcluster1b + to = event_target:lcluster2b + } + } + set_spawn_system_batch = end + country_event = { id = rg_cluster.9 days = -1 } } \ No newline at end of file diff --git a/events/RG_cluster_events.txt b/events/RG_cluster_events.txt index cf9cf24..78e3aaa 100644 --- a/events/RG_cluster_events.txt +++ b/events/RG_cluster_events.txt @@ -90,186 +90,46 @@ country_event = { trigger = { AND = { - has_country_flag = origin_rg_gray_1st - #has_origin = origin_rg_gray + has_origin = origin_rg_gray NOT = { has_global_flag = rg_origin_l_cluster } } } immediate = { - set_global_flag = rg_origin_l_cluster - set_spawn_system_batch = begin - no_scope = { - # makes system positions originate from galactic core - spawn_system = { - min_distance >= 550 - max_distance <= 560 - min_orientation_angle = 44 - max_orientation_angle = 46 - initializer = rg_cluster_init_01 - hyperlane = no - } - random_system = { - limit = { has_star_flag = lcluster1 } - save_global_event_target_as = lcluster1 - spawn_system = { - min_distance >= 29 - max_distance <= 31 - min_orientation_angle = 24 - max_orientation_angle = 66 - initializer = rg_cluster_init_02 - } - spawn_system = { - min_distance >= 29 - max_distance <= 31 - min_orientation_angle = 114 - max_orientation_angle = 156 - initializer = rg_cluster_init_03 - } - spawn_system = { - min_distance >= 30 - max_distance <= 60 - min_orientation_angle = 340 - max_orientation_angle = 20 - initializer = rg_cluster_init_01b + if = { + limit = { + NOT = { + has_global_flag = origin_rg_gray_1st } } - random_system = { - limit = { has_star_flag = lcluster2 } - save_global_event_target_as = lcluster2 - spawn_system = { - min_distance >= 30 - max_distance <= 60 - min_orientation_angle = 0 - max_orientation_angle = 40 - initializer = rg_cluster_init_02b - } + set_global_flag = origin_rg_gray_1st_global + set_country_flag = origin_rg_gray_1st + set_country_flag = rg_gray_level_1 + country_event = { id = rg.3 days = 30 } + add_modifier = { + modifier = rg_distant_stars_modifier } - random_system = { - limit = { has_star_flag = lcluster3 } - save_global_event_target_as = lcluster3 - spawn_system = { - min_distance >= 20 - max_distance <= 30 - min_orientation_angle = 24 - max_orientation_angle = 66 - initializer = rg_cluster_init_04 - } - spawn_system = { - min_distance >= 10 - max_distance <= 50 - min_orientation_angle = 250 - max_orientation_angle = 290 - initializer = rg_cluster_init_03b - } + save_global_event_target_as = origin_rg_gray_country + rg_lcluster_spawn_effect = yes + } + else_if = { + limit = { + has_global_flag = origin_rg_gray_1st_global } - random_system = { - limit = { has_star_flag = lcluster4 } - save_global_event_target_as = lcluster4 - spawn_system = { - min_distance >= 5 - max_distance <= 10 - min_orientation_angle = 250 - max_orientation_angle = 290 - initializer = rg_cluster_init_05 - } - spawn_system = { - min_distance >= 30 - max_distance <= 60 - min_orientation_angle = 20 - max_orientation_angle = 160 - initializer = rg_cluster_init_04b - } + set_country_flag = origin_gray_dragon_country + rg_create_fake_dragon = yes + start_lcluster_chain = yes + add_event_chain_counter = { + event_chain = l_cluster_chain + counter = clues + amount = 7 + } + # increment variable + change_variable = { + which = num_lcluster_clues + value = 7 } } - - random_system = { - limit = { has_star_flag = lcluster5 } - save_global_event_target_as = lcluster5 - } - random_system = { - limit = { has_star_flag = lcluster1b } - save_global_event_target_as = lcluster1b - } - random_system = { - limit = { has_star_flag = lcluster2b } - save_global_event_target_as = lcluster2b - } - random_system = { - limit = { has_star_flag = lcluster3b } - save_global_event_target_as = lcluster3b - } - random_system = { - limit = { has_star_flag = lcluster4b } - save_global_event_target_as = lcluster4b - } - - # clear all hyperlanes to and within the cluster - every_system = { - limit = { has_star_flag = lcluster } - isolate_system = yes - } - - # add hyperlanes - event_target:lcluster5 = { - add_hyperlane = { - from = event_target:lcluster5 - to = event_target:lcluster4 - } - } - event_target:lcluster4 = { - add_hyperlane = { - from = event_target:lcluster4 - to = event_target:lcluster3 - } - add_hyperlane = { - from = event_target:lcluster4 - to = event_target:lcluster2 - } - add_hyperlane = { - from = event_target:lcluster4 - to = event_target:lcluster4b - } - } - event_target:lcluster3 = { - add_hyperlane = { - from = event_target:lcluster3 - to = event_target:lcluster1 - } - add_hyperlane = { - from = event_target:lcluster3 - to = event_target:lcluster3b - } - } - event_target:lcluster2 = { - add_hyperlane = { - from = event_target:lcluster2 - to = event_target:lcluster1 - } - add_hyperlane = { - from = event_target:lcluster2 - to = event_target:lcluster3 - } - add_hyperlane = { - from = event_target:lcluster2 - to = event_target:lcluster2b - } - } - - event_target:lcluster1 = { - add_hyperlane = { - from = event_target:lcluster1 - to = event_target:lcluster1b - } - } - event_target:lcluster1b = { - add_hyperlane = { - from = event_target:lcluster1b - to = event_target:lcluster2b - } - } - set_spawn_system_batch = end - country_event = { id = rg_cluster.9 days = -1 } } } diff --git a/events/RG_events.txt b/events/RG_events.txt index 8b959ec..dc502b9 100644 --- a/events/RG_events.txt +++ b/events/RG_events.txt @@ -1,50 +1,50 @@ namespace = rg -#灰风起源创建灰风事件 -country_event = { - id = rg.1 - hide_window = yes - - is_triggered_only = yes - - trigger = { - has_country_flag = origin_rg_gray - } - - immediate = { - if = { - NOT = { - has_global_flag = origin_rg_gray_1st - } - set_global_flag = origin_rg_gray_1st_global - set_country_flag = origin_rg_gray_1st - set_country_flag = rg_gray_level_1 - country_event = { id = rg.3 days = 30 } - add_modifier = { - modifier = rg_distant_stars_modifier - } - save_global_event_target_as = origin_rg_gray_country - } - else_if = { - limit = { - has_global_flag = origin_rg_gray_1st_global - } - set_country_flag = origin_gray_dragon_country - rg_create_fake_dragon = yes - start_lcluster_chain = yes - add_event_chain_counter = { - event_chain = l_cluster_chain - counter = clues - amount = 7 - } - # increment variable - change_variable = { - which = num_lcluster_clues - value = 7 - } - } - } -} +# 灰风起源创建灰风事件 +# country_event = { +# id = rg.1 +# hide_window = yes +# +# is_triggered_only = yes +# +# trigger = { +# has_country_flag = origin_rg_gray +# } +# +# immediate = { +# if = { +# NOT = { +# has_global_flag = origin_rg_gray_1st +# } +# set_global_flag = origin_rg_gray_1st_global +# set_country_flag = origin_rg_gray_1st +# set_country_flag = rg_gray_level_1 +# country_event = { id = rg.3 days = 30 } +# add_modifier = { +# modifier = rg_distant_stars_modifier +# } +# save_global_event_target_as = origin_rg_gray_country +# } +# else_if = { +# limit = { +# has_global_flag = origin_rg_gray_1st_global +# } +# set_country_flag = origin_gray_dragon_country +# rg_create_fake_dragon = yes +# start_lcluster_chain = yes +# add_event_chain_counter = { +# event_chain = l_cluster_chain +# counter = clues +# amount = 7 +# } +# # increment variable +# change_variable = { +# which = num_lcluster_clues +# value = 7 +# } +# } +# } +# } country_event = { id = rg.2 @@ -914,6 +914,7 @@ country_event = { is_triggered_only = yes trigger = { + is_multiplayer = yes is_same_value = event_target:origin_rg_gray_country has_country_flag = origin_rg_gray }