Skip to content

Commit

Permalink
添加逆向坍塌星门
Browse files Browse the repository at this point in the history
  • Loading branch information
Elivicti committed Mar 19, 2023
1 parent fa72678 commit 13cca93
Show file tree
Hide file tree
Showing 7 changed files with 260 additions and 0 deletions.
82 changes: 82 additions & 0 deletions common/bypass/GFEXT_bypasses.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
#
# These define the type of bypasses that exist in game. This is only the logical connection between systems.
# These can be added to megastructures.
#
# bypass_type = {
# name = GATEWAY_GALACTIC # the localization key used in triggers and effects for the type
# is_pathfind = yes # whether this type can be automatically used by the pathfinding (otherwise you'll have to right click the object containing it)
# requires_exploration = no # whether this bypass type needs to be 'seen' before it can be used
# uses_action = no # whether this type needs an action or can be used automagically
# always_active = no # whether bypasses of these types are automatically active on creation, or if they need to be researched/upgraded to be activated
# windup_time = 0.0 # days preparing before travel, translated into ticks on load.
# winddown_time = 0.0 # days preparing after travel, translated into ticks on load.
# ftl_multiplier = 0 # 0 is supposed to mean instant, WARNING: not implemented correctly.
# extends_sensors = yes # whether you can "see through" the bypass and extends your sensor range to the other side
# icon_frame = 25
# remember_instances = no # whether countries remember meeting a specific instance of that type, or if they just remember seeing the type in general
# galactic_map_tooltip_header=GATEWAY_GALACTIC
# galactic_map_tooltip_desc=GATEWAY_GALACTIC_DESC
# connection_type = any_other
# ftl_ship_effect = "gateway_ftl_ship_effect_entity" # what effect to spawn on the ship when they jump through the bypass
# ftl_bypass_effect = "gateway_ftl_bypass_effect_entity" # what effect to spawn on the bypass when a ship jumps through
# bypass_effect = ""
# animation_time = 3 # number of days to wait for the jump animation to be played
# prerequisites = {
# tech_gateway_activation
# }
# on_pre_explore = { # an effect that is called just before the jump of a right click "explore" action of a fleet
#
# }
# country_can_use = { # trigger to evaluate if a country can use bypasses of this type. this: country, from: (optional) system owner; default: { always = yes }
# }
# on_action = "on_entering_bypass" # The name of the on-action event that will be fired upon entering FTL (if set)
# # THIS = Fleet
# # FROM = System jumping to
# # FROMFROM = System jumped from
# }

GFEXT_reverse_collapse_bypass = {
name = GFEXT_REVERSE_COLLAPSE_GATEWAY_NAME
is_pathfind = yes
uses_action = no
requires_exploration = no
always_active = no
windup_time = 0
winddown_time = 0
ftl_multiplier = 0 # 0 means instant
icon_frame = 25
remember_instances = no # whether countries remember meeting a specific instance of that type, or if they just remember seeing the type in general
galactic_map_tooltip_header = GFEXT_REVERSE_COLLAPSE_GATEWAY_NAME
galactic_map_tooltip_desc = GFEXT_REVERSE_COLLAPSE_GATEWAY_DESC
connection_type = any_other
extends_sensors = yes
animation_time = 1
ftl_ship_effect = "gateway_ftl_ship_effect_entity"
ftl_bypass_effect = "gateway_ftl_bypass_effect_entity"
prerequisites = {
GF_tech_collapse_jump_drive
}
# on_pre_explore = {
# activate_gateway = fromfrom
# if = {
# limit = { num_active_gateways = 1 }
# random_megastructure = {
# limit = { is_megastructure_type = gateway_ruined }
# upgrade_megastructure_to = gateway_restored
# finish_upgrade = yes
# }
# }
# }

respect_closed_borders = yes
block_access_if_hostile = no

on_action = "on_entering_gateway"

country_can_use = {
has_technology = GF_tech_collapse_jump_drive
is_fallen_empire = no
is_crisis_faction = no
}

}
54 changes: 54 additions & 0 deletions common/megastructures/GFEXT_gateways.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# see README.txt for example

GFEXT_reverse_collapse_gateway_final = {
entity = "gatebuilder_01_gateway_entity"
construction_entity = "gateway_entity"
portrait = "GFX_megastructure_construction_background"
place_entity_on_planet_plane = no
# build_outside_gravity_well = yes # indicates this will use "free" placement between the system's inner and outer ring
# if this option is active, the placement_rules will be completely ignored
show_galactic_map_icon = no
show_in_outliner = no
potential = {
has_technology = GFEXT_tech_reverse_collapse_gateway
}
prerequisites = {
"GFEXT_tech_reverse_collapse_gateway"
}
possible = {
custom_tooltip = {
fail_text = "requires_technology_gateway_construction"
from = { has_technology = tech_gateway_construction }
}
custom_tooltip = {
fail_text = "GFEXT_requires_no_existing_reverse_collapse_gateway"
NOT = { has_star_flag = flag_s_GFEXT_reverse_collapse_gateway_node }
}
}
upgrade_from = {
gateway_final
gateway_restored
}
build_time = 360
resources = {
category = megastructures
cost = {
alloys = 1200
energy = 4000
}
}
construction_blocks_and_blocked_by = self_type

bypass_type = GFEXT_reverse_collapse_bypass

# this = galatic_object
# from = country
# fromfome = megasture
on_build_complete = {
activate_gateway = fromfrom
set_star_flag = flag_s_GFEXT_reverse_collapse_gateway_node
from = {
country_event = { id = GFEXT_megastructures.100 }
}
}
}
10 changes: 10 additions & 0 deletions common/on_actions/99_GFEXT_on_actions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,14 @@ on_single_player_save_game_load = {
GFEXT_start.100
GFEXT_doll_leader.9991
}
}

# A Megastructure has been upgraded
# Root = Country
# From = Megastructure
# FromFrom = System
on_megastructure_upgraded = {
events = {
GFEXT_megastructures.110
}
}
49 changes: 49 additions & 0 deletions common/technology/GFEXT_phy_tech.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@


GFEXT_tech_reverse_collapse_gateway = {
area = physics
tier = 5
cost = 50000
category = { particles }
ai_update_type = military
is_rare = yes

potential = {
has_technology = GF_tech_collapse_slingshot_protocal
}

prerequisites = {
"GF_tech_collapse_slingshot_protocal"
"tech_gateway_construction"
}

weight = @tier5weight3
weight_modifier = {
modifier = {
factor = 1.25
has_tradition = tr_discovery_adopt
}
modifier = {
factor = value:tech_weight_likelihood
research_leader = {
area = physics
has_trait = "leader_trait_expertise_particles"
}
}
modifier = {
factor = @ap_grasp_the_void_travel_tech
has_ascension_perk = ap_grasp_the_void
}
modifier = {
factor = @ap_technological_ascendancy_rare_tech
has_ascension_perk = ap_technological_ascendancy
}
}

prereqfor_desc = {
custom = {
title = GFEXT_tech_reverse_collapse_gateway_feature_title
desc = GFEXT_tech_reverse_collapse_gateway_feature_desc
}
}
}
54 changes: 54 additions & 0 deletions events/GFEXT_evt_megastructures.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
namespace = GFEXT_megastructures

country_event = {
id = GFEXT_megastructures.100
title = GFEXT_megastructures.100.name
desc = GFEXT_megastructures.100.desc
show_sound = event_radio_chatter
location = from

picture = GFX_evt_drifting_gateway

is_triggered_only = yes
trigger = {
is_GF_authority = yes
}
immediate = {
from = { save_event_target_as = gateway_system }
}

option = {
name = EXCELLENT
}
}

# A Megastructure has been upgraded
# Root = Country
# From = Megastructure
# FromFrom = System
country_event = {
id = GFEXT_megastructures.110
hide_window = yes
is_triggered_only = yes

trigger = {
from = {
OR = {
is_megastructure_type = gateway_final
is_megastructure_type = gateway_restored
}
}
fromfrom = {
has_star_flag = flag_s_GFEXT_reverse_collapse_gateway_node
NOT = {
any_system_megastructure = { is_megastructure_type = GFEXT_reverse_collapse_gateway_final }
}
}
}

immediate = {
fromfrom = {
remove_star_flag = flag_s_GFEXT_reverse_collapse_gateway_node
}
}
}
Binary file not shown.
11 changes: 11 additions & 0 deletions localisation/simp_chinese/GFEXT_megastructures_l_simp_chinese.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
l_simp_chinese:
GFEXT_REVERSE_COLLAPSE_GATEWAY_NAME:0 "逆向坍塌星门"
GFEXT_REVERSE_COLLAPSE_GATEWAY_DESC:0 "该星系包含一个§Y逆向坍塌星门§!"

GFEXT_reverse_collapse_gateway_final:0 "逆向坍塌$gateway_final$"
GFEXT_reverse_collapse_gateway_final_DESC:0 "利用逆向坍塌原理穿梭于亚空间的星门,通过其能够快速到达其他星门。"

GFEXT_requires_no_existing_reverse_collapse_gateway:0 "$TRIGGER_FAIL$星系中已有一个$GFEXT_reverse_collapse_gateway_final$。"

GFEXT_megastructures.100.name:0 "逆向坍塌星门建设完成"
GFEXT_megastructures.100.desc:0 "位于§H[gateway_system.GetName]§!星系内的逆向坍塌星门已经建造完毕。它已与其余传送门网络建立稳定的亚空间连接,并且正常运转。"

0 comments on commit 13cca93

Please sign in to comment.