diff --git a/common/global_ship_designs/RG_ship_designs_starbase.txt b/common/global_ship_designs/RG_ship_designs_starbase.txt index 5488015..66ce3de 100644 --- a/common/global_ship_designs/RG_ship_designs_starbase.txt +++ b/common/global_ship_designs/RG_ship_designs_starbase.txt @@ -1,6 +1,6 @@ # 星环基地 1 ship_design = { - name = "RG_RG_ORBITAL_RING_TIER_1_STARBASE" + name = "RG_ORBITAL_RING_TIER_1_STARBASE" ship_size = RG_orbital_ring_tier_1 section = { template = "RG_ORBITAL_RING_TIER_1_STARBASE_SECTION" diff --git a/common/on_actions/RG_on_actions.txt b/common/on_actions/RG_on_actions.txt index 57752b6..8b281f7 100644 --- a/common/on_actions/RG_on_actions.txt +++ b/common/on_actions/RG_on_actions.txt @@ -61,11 +61,6 @@ on_yearly_pulse_country = { events = { rg_event.17 rg_event.20 - } -} - -on_yearly_pulse = { - events = { rg_story.20 } } diff --git a/common/planet_classes/RG_gray_planet_classes.txt b/common/planet_classes/RG_gray_planet_classes.txt index 9b0eeeb..aaada9d 100644 --- a/common/planet_classes/RG_gray_planet_classes.txt +++ b/common/planet_classes/RG_gray_planet_classes.txt @@ -1,6 +1,6 @@ pc_rg_grayhabitat = { habitat = yes - entity = "gray_goo_planet" + entity = "grey_tempesttw_orbital_habitat_entity" entity_scale = @planet_standard_scale icon = GFX_planet_type_habitat enable_tilt = no @@ -29,10 +29,12 @@ pc_rg_grayhabitat = { modifier = { planet_colony_development_speed_mult = 2.0 # Habitats should be fast to colonize - pop_environment_tolerance = 0.40 - planet_structures_cost_mult = -10 - planet_buildings_cost_mult = -10 + pop_environment_tolerance = 1 + planet_structures_cost_mult = -2 + planet_buildings_cost_mult = -2 planet_building_build_speed_mult = 10 + planet_crime_add = -1000 + pop_resettlement_cost_mult = 10 } carry_cap_per_free_district = @carry_cap_low diff --git a/common/scripted_effects/RG_gray_goo_effects.txt b/common/scripted_effects/RG_gray_goo_effects.txt index 863a383..9103cb6 100644 --- a/common/scripted_effects/RG_gray_goo_effects.txt +++ b/common/scripted_effects/RG_gray_goo_effects.txt @@ -126,6 +126,18 @@ rg_global_gray_location_check = { } } } + else_if = { + limit = { + has_country_flag = rg_habitat_enabled + } + if = { + limit = {exists = event_target:rg_gray_habitat_target} + event_target:rg_gray_habitat_target = { + save_global_event_target_as = global_gray_location + } + } + + } else = { capital_scope = { save_global_event_target_as = global_gray_location @@ -134,7 +146,7 @@ rg_global_gray_location_check = { } #创造灰风总督 -rg_create_gray_governor_leader = { +rg_create_gray_governor = { if = { limit = { OR = { @@ -181,9 +193,7 @@ rg_create_gray_governor_leader = { } remove_army = yes } - event_target:rg_gray_habitat_target = { - remove_planet = yes - } + #存储当前领袖等级 every_owned_leader = { if = { @@ -252,133 +262,6 @@ rg_create_gray_governor_leader = { } } -rg_create_gray_governor = { - if = { - limit = { - #has_country_flag = gray_warship_is_juggernaut - has_country_flag = rg_habitat_enabled - } - rg_create_gray_governor_habitat = yes - } - else = { - rg_create_gray_governor_leader = yes - } -} - -#创造灰风总督 -rg_create_gray_governor_habitat = { - if = { - limit = { - has_country_flag = gray_habitat_active - } - } - else = { - #延迟执行 - optimize_memory - #删除战舰 - every_owned_fleet = { - limit = { - has_fleet_flag = gray_fleet - } - delete_fleet = { - target = this - kill_leader = no - destroy_template = yes - } - } - #删除科学舰 - every_owned_fleet = { - limit = { - has_fleet_flag = gray_constship - } - delete_fleet = { - target = this - kill_leader = no - destroy_template = yes - } - } - #删除陆军 - every_owned_army = { - limit = { - army_type = gray_army - } - if = { - limit = { - exists = leader - } - unassign_leader = leader - } - remove_army = yes - } - #存储当前领袖等级 - every_owned_leader = { - if = { - ###等级检测 - limit = { - has_leader_flag = rg_gray_leader - NOT = { - has_leader_flag = rg_gray_leader_temp - } - } - #导出等级到暂存 - export_trigger_value_to_variable = { - trigger = has_skill - variable = rg_gray_level_temp - } - #导入变量 - owner = { - set_variable = { - which = rg_gray_level - value = prev.rg_gray_level_temp - } - } - #清理暂存区 - clear_variable = rg_gray_level_temp - } - } - #把所有种类的小灰领袖都送回娘家 - every_owned_leader = { - limit = { - has_leader_flag = rg_gray_leader - } - set_owner = event_target:rg_gray_country - set_leader_flag = rg_gray_leader_temp - # kill_leader = { show_notification = no } - } - #把娘家的总督领袖接回来 - if = { - limit = { - exists = event_target:gray_governor - } - event_target:gray_governor = { - set_owner = event_target:gray_owner - remove_leader_flag = rg_gray_leader_temp - } - } - #如果不存在总督备份,现场变一个 - else = { - rg_gray_govener_init = yes - } - rg_juggernaut_habitat_init = yes - #设置总督已启用标识 - set_country_flag = gray_official_active #新版flag - set_country_flag = gray_governor_active #旧版flag - set_country_flag = gray_habitat_active - #更新灰风形态 - remove_country_flag = gray_warship_active - remove_country_flag = rg_kac_grayfleet_active - remove_country_flag = gray_constship_active - remove_country_flag = gray_army_active - #等级导入,把存储的领袖等级赋予到领袖身上 - random_owned_leader = { - limit = { - has_leader_flag = gray_governor - } - set_skill = owner.rg_gray_level - } - } -} - #创造灰风战舰 rg_create_gray_warship = { if = { @@ -480,9 +363,7 @@ rg_create_gray_warship = { destroy_template = yes } } - event_target:rg_gray_habitat_target = { - remove_planet = yes - } + remove_country_flag = gray_constship_active remove_country_flag = gray_governor_active #旧版flag remove_country_flag = gray_official_active @@ -596,9 +477,7 @@ rg_create_gray_army = { destroy_template = yes } } - event_target:rg_gray_habitat_target = { - remove_planet = yes - } + remove_country_flag = gray_warship_active remove_country_flag = rg_kac_grayfleet_active remove_country_flag = gray_governor_active #旧版flag @@ -721,9 +600,7 @@ rg_create_gray_const = { } remove_army = yes } - event_target:rg_gray_habitat_target = { - remove_planet = yes - } + remove_country_flag = gray_army_active remove_country_flag = gray_warship_active remove_country_flag = rg_kac_grayfleet_active @@ -737,4 +614,89 @@ rg_create_gray_const = { set_skill = owner.rg_gray_level } } +} + + +rg_juggernaut_habitat_init = { + if = { + limit = { + has_country_flag = rg_habitat_enabled + } + } + else = { + optimize_memory + rg_global_gray_location_check = yes + set_country_flag = rg_habitat_enabled + event_target:global_gray_location = { + solar_system = { + spawn_planet = { + class = pc_rg_grayhabitat + location = event_target:global_gray_location + orbit_location = yes + orbit_angle = 225 + orbit_distance = 360 + orbit_angle_offset = 45 + orbit_distance_offset = 9.899 + size = 30 + has_ring = no + + init_effect = { + set_planet_entity = { + entity = "grey_tempesttw_orbital_habitat_entity" + } + set_surveyed = { + surveyed = yes + surveyor = FROM + } + set_all_comms_surveyed = yes + clear_blockers = yes + + set_owner = root + set_controller = root + create_colony = { + owner = root + species = owner_main_species + ethos = owner + } + set_name = "NAME_rg_gray_habitat_base" + + if = { + OR = { + has_country_flag = gray_official_active + has_country_flag = gray_governor_active #旧版flag + } + assign_leader = event_target:gray_governor + } + + add_building = building_ancient_control_center + add_building = building_nourishment_center + add_building = building_ancient_palace + add_building = building_affluence_center + add_building = building_dimensional_fabricator + + while = { + count = 5 + create_pop = { + species = owner_main_species + } + } + + set_planet_flag = megastructure + set_planet_flag = habitat + set_planet_flag = advanced_habitat + set_planet_flag = advanced_habitat_2 + set_planet_flag = rg_gray_habitat + save_global_event_target_as = rg_gray_habitat_target + } + } + } + } + } +} + +rg_clear_harbitat = { + remove_country_flag = rg_habitat_enabled + event_target:rg_gray_habitat_target = { + remove_planet = yes + } } \ No newline at end of file diff --git a/common/scripted_effects/RG_special_effects.txt b/common/scripted_effects/RG_special_effects.txt index 9671a58..6c586b6 100644 --- a/common/scripted_effects/RG_special_effects.txt +++ b/common/scripted_effects/RG_special_effects.txt @@ -1,20 +1,14 @@ rg_storyline_trigger = { # 初始化故事事件触发 - random_list = { - 50 = { - country_event = { - id = rg_story.2 - days = 3600 - random = 12800 - } - } - 50 = { - country_event = { - id = rg_story.8 - days = 3600 - random = 12800 - } - } + country_event = { + id = rg_story.2 + days = 3600 + random = 12800 + } + country_event = { + id = rg_story.8 + days = 3600 + random = 12800 } if = { limit = { diff --git a/common/scripted_effects/rg_gray_warship_init_effects.txt b/common/scripted_effects/rg_gray_warship_init_effects.txt index 0403b93..04325a7 100644 --- a/common/scripted_effects/rg_gray_warship_init_effects.txt +++ b/common/scripted_effects/rg_gray_warship_init_effects.txt @@ -174,91 +174,4 @@ rg_warship_init_mod0 = { } } } -} - -rg_create_gray_maid_species_effect = { - create_species = { - name = 纳米构造体 - class = RG_MACHINE - portrait = "rg_machine_maid" - traits = { - trait = trait_machine_unit - trait = trait_robot_domestic_protocols - trait = rg_machine_maid_trait - trait = trait_auto_mod_robotic - trait = trait_robot_streamlined_protocols - trait = trait_robot_luxurious - trait = ramdom_trait - } - extra_trait_points = 3 - allow_negative_traits = no - namelist = MACHINE3 - effect = { - save_event_target_as = rg_gray_maid_species - } - } -} - -rg_juggernaut_habitat_init = { - event_target:global_gray_location = { - solar_system = { - spawn_planet = { - class = pc_rg_grayhabitat - spawn_beyond_gravity_well = yes - orbit_location = yes - orbit_angle_offset = 45 - orbit_distance_offset = 9.899 - size = 20 - has_ring = no - - init_effect = { - set_surveyed = { - surveyed = yes - surveyor = FROM - } - set_all_comms_surveyed = yes - clear_blockers = yes - - set_owner = root - set_controller = root - create_colony = { - owner = root - species = rg_gray_maid_species - ethos = owner - } - set_name = "NAME_rg_gray_habitat_base" - assign_leader = event_target:gray_governor - - add_building = building_ancient_control_center - add_building = building_nourishment_center - add_building = building_ancient_palace - add_building = building_affluence_center - add_building = building_dimensional_fabricator - - if = { - limit = { - NOT = { - exists = event_target:rg_gray_maid_species - } - } - rg_create_fallen_empire_species_effect = yes - } - - while = { - count = 5 - create_pop = { - species = rg_gray_maid_species - } - } - - set_planet_flag = megastructure - set_planet_flag = habitat - set_planet_flag = advanced_habitat - set_planet_flag = advanced_habitat_2 - set_planet_flag = rg_gray_habitat - save_global_event_target_as = rg_gray_habitat_target - } - } - } - } -} +} \ No newline at end of file diff --git a/events/RG_events.txt b/events/RG_events.txt index 3b36265..1b97a1f 100644 --- a/events/RG_events.txt +++ b/events/RG_events.txt @@ -31,8 +31,9 @@ country_event = { save_global_event_target_as = origin_rg_gray_country rg_lcluster_spawn_effect = yes country_event = { - id = rg_cluster - years = 10 + id = rg_event.18 + days = 3600 + random = 12800 } } else = { @@ -919,6 +920,9 @@ country_event = { } } } + option = { + name = OK + } } diff --git a/events/RG_gray_leader_event.txt b/events/RG_gray_leader_event.txt index 16f63b1..9574002 100644 --- a/events/RG_gray_leader_event.txt +++ b/events/RG_gray_leader_event.txt @@ -309,6 +309,54 @@ country_event = { } } } + option = { + # 空间站 + name = RG_graygoo.500.f + response_text = RG_graygoo.502.f.response + trigger = { + has_country_flag = rg_juggernaut_fired + NOT = { + has_country_flag = rg_habitat_enabled + } + } + allow = { + has_country_flag = rg_juggernaut_fired # To prevent exploit + } + custom_tooltip = rg_need_manual_toggle + hidden_effect = { + if = { + limit = { + has_country_flag = rg_habitat_enabled + } + rg_clear_harbitat = yes + } + else = { + rg_juggernaut_habitat_init = yes + } + country_event = { + id = rg_grayleader_dialog.5026 + } + } + } + option = { + # 空间站 + name = RG_graygoo.500.g + response_text = RG_graygoo.502.g.response + trigger = { + has_country_flag = rg_juggernaut_fired + has_country_flag = rg_habitat_enabled + } + allow = { + has_country_flag = rg_juggernaut_fired # To prevent exploit + } + custom_tooltip = rg_need_manual_toggle + hidden_effect = { + rg_clear_harbitat = yes + country_event = { + id = rg_grayleader_dialog.5027 + } + } + } option = { # help name = rg_help @@ -437,50 +485,6 @@ country_event = { } } } - option = { - # Juggernaut - name = RG_graygoo.500.f - response_text = RG_graygoo.502.f.response - trigger = { - has_country_flag = rg_juggernaut_fired - NOT = { - has_country_flag = rg_habitat_enabled - } - } - allow = { - hidden_trigger = { - exists = event_target:gray_governor - } # To prevent exploit - } - custom_tooltip = rg_need_manual_toggle - hidden_effect = { - set_country_flag = rg_habitat_enabled - country_event = { - id = rg_grayleader_dialog.5026 - } - } - } - option = { - # Warship - name = RG_graygoo.500.g - response_text = RG_graygoo.502.g.response - trigger = { - has_country_flag = rg_juggernaut_fired - has_country_flag = rg_habitat_enabled - } - allow = { - hidden_trigger = { - exists = event_target:gray_governor - } # To prevent exploit - } - custom_tooltip = rg_need_manual_toggle - hidden_effect = { - remove_country_flag = rg_habitat_enabled - country_event = { - id = rg_grayleader_dialog.5027 - } - } - } option = { # const name = rg_const @@ -497,6 +501,46 @@ country_event = { } } } + option = { + # 空间站 + name = RG_graygoo.500.f + response_text = RG_graygoo.502.f.response + trigger = { + has_country_flag = rg_juggernaut_fired + NOT = { + has_country_flag = rg_habitat_enabled + } + } + allow = { + has_country_flag = rg_juggernaut_fired # To prevent exploit + } + custom_tooltip = rg_need_manual_toggle + hidden_effect = { + rg_juggernaut_habitat_init = yes + country_event = { + id = rg_grayleader_dialog.5026 + } + } + } + option = { + # 空间站 + name = RG_graygoo.500.g + response_text = RG_graygoo.502.g.response + trigger = { + has_country_flag = rg_juggernaut_fired + has_country_flag = rg_habitat_enabled + } + allow = { + has_country_flag = rg_juggernaut_fired # To prevent exploit + } + custom_tooltip = rg_need_manual_toggle + hidden_effect = { + rg_clear_harbitat = yes + country_event = { + id = rg_grayleader_dialog.5027 + } + } + } option = { # help name = rg_help @@ -751,6 +795,54 @@ country_event = { } } } + option = { + # 空间站 + name = RG_graygoo.500.f + response_text = RG_graygoo.502.f.response + trigger = { + has_country_flag = rg_juggernaut_fired + NOT = { + has_country_flag = rg_habitat_enabled + } + } + allow = { + has_country_flag = rg_juggernaut_fired # To prevent exploit + } + custom_tooltip = rg_need_manual_toggle + hidden_effect = { + if = { + limit = { + has_country_flag = rg_habitat_enabled + } + rg_clear_harbitat = yes + } + else = { + rg_juggernaut_habitat_init = yes + } + country_event = { + id = rg_grayleader_dialog.5026 + } + } + } + option = { + # 空间站 + name = RG_graygoo.500.g + response_text = RG_graygoo.502.g.response + trigger = { + has_country_flag = rg_juggernaut_fired + has_country_flag = rg_habitat_enabled + } + allow = { + has_country_flag = rg_juggernaut_fired # To prevent exploit + } + custom_tooltip = rg_need_manual_toggle + hidden_effect = { + rg_clear_harbitat = yes + country_event = { + id = rg_grayleader_dialog.5027 + } + } + } option = { #升级-2 name = rg_levelup_2 @@ -1114,6 +1206,54 @@ country_event = { } } } + option = { + # 空间站 + name = RG_graygoo.500.f + response_text = RG_graygoo.502.f.response + trigger = { + has_country_flag = rg_juggernaut_fired + NOT = { + has_country_flag = rg_habitat_enabled + } + } + allow = { + has_country_flag = rg_juggernaut_fired # To prevent exploit + } + custom_tooltip = rg_need_manual_toggle + hidden_effect = { + if = { + limit = { + has_country_flag = rg_habitat_enabled + } + rg_clear_harbitat = yes + } + else = { + rg_juggernaut_habitat_init = yes + } + country_event = { + id = rg_grayleader_dialog.5026 + } + } + } + option = { + # 空间站 + name = RG_graygoo.500.g + response_text = RG_graygoo.502.g.response + trigger = { + has_country_flag = rg_juggernaut_fired + has_country_flag = rg_habitat_enabled + } + allow = { + has_country_flag = rg_juggernaut_fired # To prevent exploit + } + custom_tooltip = rg_need_manual_toggle + hidden_effect = { + rg_clear_harbitat = yes + country_event = { + id = rg_grayleader_dialog.5027 + } + } + } option = { # 开启隐形 name = rg_event.4.e @@ -1379,6 +1519,54 @@ country_event = { } } } + option = { + # 空间站 + name = RG_graygoo.500.f + response_text = RG_graygoo.502.f.response + trigger = { + has_country_flag = rg_juggernaut_fired + NOT = { + has_country_flag = rg_habitat_enabled + } + } + allow = { + has_country_flag = rg_juggernaut_fired # To prevent exploit + } + custom_tooltip = rg_need_manual_toggle + hidden_effect = { + if = { + limit = { + has_country_flag = rg_habitat_enabled + } + rg_clear_harbitat = yes + } + else = { + rg_juggernaut_habitat_init = yes + } + country_event = { + id = rg_grayleader_dialog.5026 + } + } + } + option = { + # 空间站 + name = RG_graygoo.500.g + response_text = RG_graygoo.502.g.response + trigger = { + has_country_flag = rg_juggernaut_fired + has_country_flag = rg_habitat_enabled + } + allow = { + has_country_flag = rg_juggernaut_fired # To prevent exploit + } + custom_tooltip = rg_need_manual_toggle + hidden_effect = { + rg_clear_harbitat = yes + country_event = { + id = rg_grayleader_dialog.5027 + } + } + } # option = { # 开启建造中继器 # name = rg_event.5.e # trigger = { @@ -1530,6 +1718,32 @@ country_event = { rg_create_gray_colony_1 = yes } } + option = { + # 购买巨像 + name = rg_event.4.h + trigger = { + NOT = { + has_country_flag = gray_reforming + } + } + allow = { + resource_stockpile_compare = { + resource = energy + value >= 8000 + } + resource_stockpile_compare = { + resource = alloys + value >= 8000 + } + } + add_resource = { + energy = -8000 + alloys = -8000 + } + hidden_effect = { + rg_create_gray_planetkiller_testship_1 = yes + } + } option = { # 没钱了,救救 name = rg_event.4.c diff --git a/events/RG_planet_event.txt b/events/RG_planet_event.txt index 6c47c08..7129672 100644 --- a/events/RG_planet_event.txt +++ b/events/RG_planet_event.txt @@ -94,7 +94,7 @@ planet_event = { while = { count = num_pops create_pop = { - species = rg_gray_maid_species + species = owner_main_species } } # Kill pops generated in excess (e.g. from forbidden jobs) diff --git a/gfx/interface/icons/planet_backgrounds/pc_rg_grayhabitat.dds b/gfx/interface/icons/planet_backgrounds/pc_rg_grayhabitat.dds new file mode 100644 index 0000000..7e99c87 Binary files /dev/null and b/gfx/interface/icons/planet_backgrounds/pc_rg_grayhabitat.dds differ diff --git a/gfx/portraits/environments/pc_rg_grayhabitat_sky.dds b/gfx/portraits/environments/pc_rg_grayhabitat_sky.dds new file mode 100644 index 0000000..ac3d809 Binary files /dev/null and b/gfx/portraits/environments/pc_rg_grayhabitat_sky.dds differ diff --git a/localisation/simp_chinese/RG_event_l_simp_chinese.yml b/localisation/simp_chinese/RG_event_l_simp_chinese.yml index c52651b..d959e3f 100644 --- a/localisation/simp_chinese/RG_event_l_simp_chinese.yml +++ b/localisation/simp_chinese/RG_event_l_simp_chinese.yml @@ -109,6 +109,7 @@ rg_event.4.b:0 "§H建造武装工程舰§!" rg_event.4.d:0 "§R建造纳米主宰舰§!" rg_event.4.g:0 "§H建造模拟殖民舰§!" + rg_event.4.h:0 "§H建造实验级巨像§!" rg_event.4.e:0 "§B开启隐形力场§!" rg_event.4.f:0 "§B关闭隐形力场§!" rg_event.4.c:0 "又没钱了,老婆救救" diff --git a/localisation/simp_chinese/RG_ships_l_simp_chinese.yml b/localisation/simp_chinese/RG_ships_l_simp_chinese.yml index da1c48e..86004ce 100644 --- a/localisation/simp_chinese/RG_ships_l_simp_chinese.yml +++ b/localisation/simp_chinese/RG_ships_l_simp_chinese.yml @@ -58,7 +58,7 @@ RG_icebreaker_interdictor:0 "纳米机器破冰单元" NAME_Nanite_Mothership_Carrier:0 "风暴中心" NAME_Nanite_Mothership_titan:0 "风暴缔造者" - RG_RG_ORBITAL_RING_TIER_1_STARBASE:0 "风暴之眼" + RG_ORBITAL_RING_TIER_1_STARBASE:0 "风暴之眼" NAME_RG_Nanite_Starbase:0 "灰色浪潮" NAME_RG_armed_transport_ship:0 "纳米机器压制单元" NAME_RG_armed_colony_ship:0 "纳米机器模拟单元" diff --git a/realgray-stellaris-mod.code-workspace b/realgray-stellaris-mod.code-workspace index abb78c1..d50a3f3 100644 --- a/realgray-stellaris-mod.code-workspace +++ b/realgray-stellaris-mod.code-workspace @@ -5,6 +5,15 @@ }, { "path": "D:/SteamLibrary/steamapps/common/Stellaris/common" + }, + { + "path": "D:/SteamLibrary/steamapps/common/Stellaris/events" + }, + { + "path": "D:/SteamLibrary/steamapps/common/Stellaris/gfx" + }, + { + "path": "D:/SteamLibrary/steamapps/common/Stellaris/localisation" } ] } \ No newline at end of file