Bypass modding

本頁面部分全部內容上次核對於3.0版本


This page is about modding Bypasses, namely Wormholes and Gateways only as traveling methods.

Before reading, you must understand that:

  • Bypasses are traveling methods, not Natural Wormholes or Gateways.
  • Natural Wormholes and Gateways are containers of bypasses, not bypasses themselves.
  • In this article, words that refer to bypasses are marked blue and words that refer to bypass-containers are marked yellow.

They are defined at "common/bypass/xxx.txt".

Data Structure[編輯 | 編輯原始碼]

Property Paired Bypass Type One-to-All Bypass Type
name = <localisation key> The name of this type of bypass.
is_pathfind = <yes/no> If yes, this bypass allows the pathfinder to use it. Vanilla always have "yes".
uses_action = <yes/no> Actual functionality is unclear. Vanilla always have "no".
windup_time = <int>
winddown_time = <int>
Time spent to prepare / cooldown for fleets when using this bypass. Vanilla always have "0" for both.
ftl_multiplier = <float> Multiplies the time spent in FTL travel. If 0, the travel is finished in an instant. Vanilla always have "0".
icon_frame = <int>
galactic_map_tooltip_header = <localisation key>
galactic_map_tooltip_desc = <localisation key>
Determines the icon and tooltip of the icon of this bypass type in the galaxy view.
ftl_ship_effect = <entity key>
ftl_bypass_effect = <entity key>
Determines the animation effect to be displayed for this bypass type.
animation_time = <int> Days to wait for the jump animation to be played.
always_active = <yes/no> If yes, this bypass type can't be used without activating or upgrading something. In addition, an inactive instance of this bypass type triggers a red icon in the galaxy view.
remember_instances = <yes/no>
requires_exploration = <yes/no>
Wormhole Properties requires_exploration
yes no
remember_instances yes Each pair must be explored
no No need to explore
Gateway Properties requires_exploration
yes no
remember_instances yes Each instance must be explored
no No need to explore
As we can see, the requires_exploration property actually does nothing.
extends_sensors = <yes/no> Determines should ship sensors see through this bypass.
prerequisites = { tech_xxx } Technologies to be researched before this bypass can be used for an Empire.
connection_type
  • one_to_one
  • any_other (Gateway)
  • scripted_connection (L-Gate)
scripted_connection No.png Vanilla use this for the L-Gate bypass type.
scripted_connection = {
	node = {
		has_star_flag = lgate
	}
	nexus = {
		has_star_flag = lcluster1
	}
}

Vanilla comments claim that:

  • Yes.png node to nexus
  • Yes.png nexus to node
  • No.png node to node
  • No.png nexus to nexus
on_action An On-Action to be fired when a fleet uses this bypass. See Event modding for details.
on_pre_explore Vanilla comments claim that this is a block of Effects to be executed after this bypass have been explored. The only usage of this property is the gateway bypass type, bu it actually doesn't need to be explored, making this property irrelevant.
potential Vanilla comments unmentioned. Presumably some sort of Conditions to be checked. The only usage of this property is the wormhole bypass type, but it has always = yes, making this property irrelevant. Actual functionality is unclear.
country_can_use A block of Conditions to check can an Empire use this bypass. (Country scope, FROM = owner of target system)

How to install a bypass in the galaxy[編輯 | 編輯原始碼]

Natural Wormholes[編輯 | 編輯原始碼]

Use the Effect spawn_natural_wormhole to spawn a natural wormhole.

spawn_natural_wormhole = {
	bypass_type = <bypass type key, e.g. wormhole / gateway>
	orbit_distance = <int>
	orbit_angle = <int, 0-360>
	random_pos = <yes/no>
}

Use the Effect link_wormholes under the solar system scope to link it to another. The effect takes another solar system scope as a parameter.

  • The bypass type can be one-to-all. In this case, this wormhole doesn't need to be linked, but the bypass type must have remember_instances = no, or each instance must be explored and only explored instances can be used to travel between each other.
  • The bypass type must have always_active = yes, or this natural wormhole can't be used by any mean, because there are no Effects to activate a natural wormhole.

Megastructures[編輯 | 編輯原始碼]

Megastructures have a property called bypass_type to specify a bypass type. See Megastructure modding for details.

Use the effect activate_gateway = yes under Megastructure scope to activate it.

  • The bypass type must NOT be paired, because there are no Effects to link a megastructure to another.
  • The bypass type must have remember_instances = no, or each instance must be explored and only explored instances can be used to travel between each other, including those you built. By the way, there are no Effects to mark an instance of a bypass type as explored by a country.
  • The bypass type should have always_active = no.
    • If it had always_active = yes, Dormant Gateways will become usable before it to be reactivated. Gateway Construction Sites still can't be used, because it doesn't have any associated bypass type. This is also why don't Gateway Construction Sites trigger the red galaxy view icon.


帝國 帝國思潮政府 • 國民理念 • 起源承諾議程傳統 • 飛升天賦法令政策遺珍科技自定義帝國
人口 崗位派系
領袖 領袖領袖特質
物種 物種物種特質
行星 行星行星特徵 • 軌道礦藏建築 • 區劃行星決議
星系 星系恆星基地巨型結構蟲洞 • 星門地圖
艦隊 艦隊艦船 • 部件
地面戰 陸軍轟炸姿態
外交 外交 • 聯邦 • 星海共同體評價修正宣戰理由 • 戰爭目標
事件 事件異常現象特殊項目考古遺址
遊玩 遊玩定義研究 • 經濟遊戲開局
動態修改 動態指令效果觸發條件作用域修正變量AI
媒體/本地化 Maya 導出器圖形肖像旗幟事件圖片界面圖標音樂本地化
Other 控制台命令存檔編輯Steam 創意工坊模組製作教程