This page is about modding of Ships, Sections and Components.
Ship Sizes[编辑 | 编辑源代码]
By ship sizes the game classifies all Ships and Stations. Ship Sizes are defined at "common/ship_sizes/xxx.txt".
Data Structure[编辑 | 编辑源代码]
Property | Military Ships | Civilian Ships | Starbases | Defense Platforms | 折叠Civilian Stations |
---|---|---|---|---|---|
graphical_culture = { mammalian_01 … } | A list of Graphical Cultures this ship size is valid to have. Can also specify as graphical_culture = no to indicate that this Ship Size doesn't need Graphical Cultures.
| ||||
entity = some_entity | Defines the graphical entity used, replacing the default SHIPSIZE_entity lookup. | ||||
max_hitpoints = <int> | Defines the base Hull Points of this ship size. | ||||
combat_disengage_chance = <float> | This property multiplies the chance this Ship disengages in battle. | Vanilla always have 0 or leave this property undefined. | |||
max_speed = <int> | Defines the base speed, acceleration and rotation speed of this ship size. | Vanilla Starbases usually have 0 for these properties, except for the Juggernaut. | Defense Platforms also need these properties because they need to move from the Starbase to their defense position. | Vanilla Civilian Stations always have 0 for these properties. | |
acceleration = <float> | |||||
rotation_speed = <float> | |||||
formation_priority = <int> | Ships with higher formation priority trends to go ahead of the rest of the fleet. | ![]() | |||
collision_radius = <int> | The radius other ships will try to avoid colliding with. | ||||
modifier | A block of Modifiers to be added to the ships of this size. These modifiers will come to effect even before the actual ships are built, you can see these in the Ship Designer. Only the following modifiers are allowed here.
Starbases can also use the following modifiers here.
| ||||
ship_modifier | Another block of Modifiers to be added to the ships of this size. Modifiers like ship_fire_rate_mult and ship_weapon_range_mult go here.
| ||||
size_multiplier | How large should the fleet battle AI consider this ship of. | ||||
This also determines the number of Command Points needed to add this Ship Design to a Fleet. | Vanilla Civilian Ships always have 1 for this property. | Vanilla Starbases always have 4 for this property. | This also determines the number of Defense Platform Capacities this Defense Platform will take up from a Starbase. | Vanilla Civilian Stations always have 1 for this property. | |
combat_size_multiplier | How large should the fleet battle AI consider this ship of, overwriting the size_multiplier .
| ||||
fleet_slot_size | This determines the order this ship size appears in a fleet, with Corvettes having 1 up to Titans having 8. | ![]() | |||
num_target_locators | ?? | ||||
is_civilian = <yes/no> | ![]() |
Vanilla always have is_civilian = yes . Other Ship Sizes have either is_civilian = no or just have this property undefined, except for the Observation Station being yes .
|
![]() | ||
valid_target_aggressive_stance = <yes/no> | Determines should this Ship be ignored by a Military Fleet in aggressive stance. Among vanilla Ship Sizes, only Civilian Ships and Civilian Stations have valid_target_aggressive_stance = no .
| ||||
build_block_radius = <int> | ![]() |
Since Military Stations have been reworked, it's still unclear what's the use of this property for now. | ![]() | ||
is_space_station = <yes/no> | ![]() |
Vanilla always have is_space_station = yes . Other Ship Sizes have either is_space_station = no or just have this property undefined.
| |||
is_space_object = <yes/no> | Determines should this Ship Size have trailers when the Ships move in the Space. Space monsters usually have is_space_object = yes .
| ||||
can_be_inspected = <yes/no> | Determines should Designs of this Ship Size can be inspected by the player. Some space monsters have can_be_inspected = no .
| ||||
icon_frame = <int> | Determines the index of the icon of this Ship Size in a shared icon file. | ![]() | |||
is_designable = <yes/no> | Determines should this Ship Size be designable in the Ship Designer. Among vanilla Ship Sizes, buildable Military Ships, the Juggernaut and buildable Defense Platforms have is_designable = yes .
| ||||
enable_default_design = <yes/no> | Determines should an Empire start with an auto-generated design of this Ship Size. All buildable Ship Sizes have enable_default_design = yes , regardless of they are designable or not, or the AI will not be able to build this.
| ||||
can_have_federation_design = <yes/no> | Determines if this Ship can have a federation design. Among vanilla Ship Sizes, only buildable Military Ships and the Juggernaut have can_have_federation_design = yes , except for the Colossus being without it.
| ||||
components_add_to_cost = <yes/no> | Determines should the Ship Construction Cost and the Ship Upkeep take Ship Components and Ship Sections into account. Among vanilla Ship Sizes, only undesignable but buildable Ship Sizes have components_add_to_cost = no .
| ||||
auto_upgrade = <yes/no> | Determines should the design of this Ship Size automatically upgrade based on the recent technologies. Existing ships will also be upgraded.
|
![]() |
Determines should the design of this Ship Size automatically upgrade based on the recent technologies. Existing ships will also be upgraded.
| ||
can_disable = <yes/no> | Determines should this Ship be disabled rather than be destroyed if at low health. Among vanilla Ship Sizes, only buildable Starbases except for the Juggernaut have can_disable = yes .
| ||||
flip_control_on_disable = <yes/no> | Determines can this Ship be captured after it's disabled. Among vanilla Ship Sizes, only buildable Starbases except for the Juggernaut have flip_control_on_disable = yes .
| ||||
default_behavior = <ship behavior> | Determines the default ship behavior the auto generated designs should try to pick when choosing the combat computer component. | ![]() | |||
section_slots = { <section slot name> = { locator = <locator name> } } | Determines the Sections needed for this Ship Size. The locators are pointers on the Ship entity, see Graphics modding for details. | ||||
base_buildtime = <int> | Days it takes to build this ship / station or upgrade into this starbase. | Vanilla civilian stations have this property undefined. | |||
prerequisites = { tech_xxx } | A list of Technologies required to design and build this Ship Size or upgrade existing Starbases into this level. | ||||
class |
|
|
|
|
|
construction_type | starbase_shipyard
|
Starbases usually have this field undefined, except the Juggernaut has starbase_shipyard .
|
starbase_defenses
|
![]() | |
potential_construction | A block of Conditions to check should this Ship Size appear in the construction list of a Starbase or Megastructure. (Starbase or Megastructure scope, use is_scope_type to check scope type; FROM is the builder empire)
|
Starbases usually have this field undefined, except for the Juggernaut. | The same. Vanilla Defense Platforms only allow Starbases to build them. | ![]() | |
possible_construction | A block of Conditions to check can this Ship Size be built by a Starbase or Megastructure. If evaluated false, the construction option is still visible but grayed out with a tooltip. (Starbase or Megastructure scope, use is_scope_type to check scope type; FROM is the builder empire)
|
The same. Among vanilla Defense Platforms, the Ion Cannon can only be built by Citadel-level Starbases. | ![]() | ||
resources | An Economy Unit to determine the construction cost and upkeep of this Ship. This is the final cost if this Ship Size has components_add_to_cost = no . Although vanilla unused, resource productions is also allowed here.
| ||||
min_upgrade_cost = { <resource key> = <int> } | The minimal cost required to upgrade this Ship. Used to prevent zero-cost upgrades by shifting from a Component to another of exactly same cost. | ![]() |
The same. | ![]() | |
empire_limit = { base = <int> (max = <int> naval_cap_div = <int>) } | Determines the max number of Ships of this Size an empire can have at the same time. The number is base plus empire naval capacity divided by naval_cap_div , rounded down, at most max .
| ||||
required_component_set = <component set key>" | Requires a core component with a Component Set. Multiple allowed. While designing by the Ship Designer, these will be displayed on the right. |
Examples[编辑 | 编辑源代码]
Corvette[编辑 | 编辑源代码]
Colossus[编辑 | 编辑源代码]
Juggernaut[编辑 | 编辑源代码]
Ship Sections[编辑 | 编辑源代码]
Ships consist of Ship Sections. They are defined at "common/section_templates/xxx.txt".
Data Structure[编辑 | 编辑源代码]
Property | 折叠Description |
---|---|
key = <localisation key> | Identification key of this section. |
ship_size = <ship size key> | Specifies the compatible Ship Size. Multiple allowed. |
fits_on_slot = <section slot name> | Specifies the compatible section slot name. Multiple allowed. |
should_draw_components = <yes/no> | If no, weapon components on this Ship Section will not have entities (turrets). |
entity = <entity key> | Specifies the entity of this section. |
icon = <GFX entry> | Although most of the vanilla sections specified this as "GFX_ship_part_core_mid", there is no where for this to be seen. |
component_slot | A weapon slot. Multiple allowed. They appear in the Ship Designer in the order they are defined here. |
|
Identification of this weapon slot. No duplications allowed. |
|
The Component Slot Template used for this weapon slot. This determines the weapon type (regular weapon or strike craft), weapon size (small, medium or large), and turret entity. |
|
The locators are pointers on the Ship Section entity and indicates where should the turret be, see Graphics modding for details. |
small_utility_slots = <int> medium_utility_slots = <int> large_utility_slots = <int> aux_utility_slots = <int> |
The number of utility slots of each size of this Ship Section. Multiple allowed. They appear in the Ship Designer in the reversed order they are defined here. |
resources | An Economy Unit to determine the construction cost and upkeep of this Ship Section. |
ai_weight | Determines how likely the AI and auto-designer will choose this Ship Section. (Country scope) |
prerequisites = { tech_xxx } | A list of Technologies. Unlike other game objects, Ship Sections only require ONE of the prerequisites, not all. |
Examples[编辑 | 编辑源代码]
Battleship XL Bow[编辑 | 编辑源代码]
Starbase Missile Defense Module[编辑 | 编辑源代码]
Component Slot Templates[编辑 | 编辑源代码]
Component Slot Templates are containers of actual Weapon Components attached to Section Templates, or to say "turrets". They are defined at "common/component_slot_templates/xxx.txt".
Data Structure[编辑 | 编辑源代码]
Property | Weapon Component Slots | 折叠Strike Craft Slots |
---|---|---|
component | Only one is allowed.
|
Only one is allowed.
|
size | One of the following is allowed. | Only one is allowed. |
entities | Determines the Turret Entities of this Component Slot Template. Define with pairs of component tags and entities. | ![]() |
is_fixed = <yes/no> | Default no. If yes, this "turret" cannot rotate and the entire ship will rotate to have this "turret" face the target. | ![]() |
Examples[编辑 | 编辑源代码]
Point Defense Turret[编辑 | 编辑源代码]
Invisible Extra Large "Turret"[编辑 | 编辑源代码]
Component Sets[编辑 | 编辑源代码]
Component Sets are groups of Components. They are defined at "common/component_sets/xxx.txt".
There are two type of Component Sets.
- One is used to group weapon and utility components together to be used by Ship Designers that are usually the same type of Components of different sizes unlocked by a same Technology;
- Another is used to group all components that fix a
Core Component Slot which can be unlocked by different technologies.
Core Components can be weapons and strike crafts, but such a weapon cannot fire and it doesn't have a turret entity. If it was a Planet Killer weapon, it can still be used but has no graphics.
Data Structure[编辑 | 编辑源代码]
Property | Designer Component Sets | 折叠Core Component Sets |
---|---|---|
key = <localisation key> | Identification key of this Component Set. | |
required_component_set = <yes/no> | Must be required_component_set = no or leave this undefined.
|
Must be required_component_set = yes . ship_size must have atleast 1 thing from component_templates can be use , or this ship are unable to be build and break auto-generated.
|
icon = <GFX entry> | Determines the icon of this component slot. | Vanilla always define these but these is always overwritten by individual Core Components. |
icon_frame = <int> | Vanilla always have icon_frame = 1 . Actual usage is unclear.
|
Examples[编辑 | 编辑源代码]
Core Component Set: "Combat Computers"[编辑 | 编辑源代码]
Designer Component Set: "Red Lasers"[编辑 | 编辑源代码]
Components[编辑 | 编辑源代码]
Components are attachments to ships for a weapon or a functional extension. They are defined at "common/component_templates/xxx.txt".
Data Structure[编辑 | 编辑源代码]
Property | Weapon Components | Strike Craft Components | 折叠Utility Components |
---|---|---|---|
key = <localisation key> | Identification key of this Component. | ||
icon = <GFX entry> | Determines the icon of this Component, overwriting that of the Component Set. | ||
icon_frame = <int> | Vanilla always have icon_frame = 1 . For sprite sheet icons.
| ||
size | One of the following is allowed.
Without the |
Only one is allowed. | One of the following is allowed. |
type | One of the following is allowed.
Kinetic and Energy weapons are "instant". Though their graphics might look like that their projectiles need time to reach the target, the actual damage is done in an instant. Point defenses is a stronger variant that it can target missiles and strike crafts. Missiles have additional properties to specify missile stats, like speed, retarget range, missile hitpoints, and missile evasion. Planet killers are no regular weapons. They can't be used in fleet battles, but can be used on planets by Colossi to trigger events. Without the |
![]() | |
weapon_type | ![]() |
One of the following is allowed.
|
![]() |
entity = <entity key> | Determines what should the Strike Crafts be look like. | ||
projectile_gfx = <projectile graphic key> | Specifies the projectile graphic of this Component. | ||
prio_projectile = <yes/no> | If yes, the projectile graphic of this Component will be preferentially displayed if there are too many graphics to be displayed and some of them must be ignored. | ![]() | |
planet_destruction_gfx = <GFX entry> | Only relevant to Planet Killer weapons. Specifies the projectile graphic. | ||
tags = { component_tags … } | Specifies the list of Component Tags. This determines what kind of modifiers can affect this weapon. For example, if a weapon has both the kinetic tag and the energy tag, repeatable technologies that affect either will both affect this weapon. | ||
ai_tags = { component_tags … } | What role should the AI consider this weapon to be playing. | ![]() | |
ai_tag_weight = <float> | Multiplies the AI weight gained through the ai_tags . Vanilla use this for Missile components for unknown reason.
| ||
prerequisites = { tech_xxx } | Technology prerequisites of this Component. | ||
power = <int> | If this value is positive, this Component will generate that much power. If this value is negative, this Component will consume that much power. | ||
resources | An Economy Unit to determine the construction cost and upkeep of this Component. | ||
modifier | A block of Modifiers to be added to the Ship. These modifiers will come to effect even before the actual ships are built, you can see these in the Ship Designer. Only the following modifiers are allowed here.
Starbases can also use the following modifiers here.
It's not recommended to give Weapon Components and Strike Craft Components with modifiers, because the tooltips might go wild and confusing. | ||
ship_modifier | Another block of Modifiers to be added to the Ship. Modifiers like ship_fire_rate_mult and ship_weapon_range_mult go here.
It's not recommended to give Weapon Components and Strike Craft Components with modifiers, because the tooltips might go wild and confusing. | ||
ship_behavior = <ship behavior> | ![]() |
Determines the behavior pattern of the Strike Crafts. | Determines the behavior pattern of this Ship. |
component_set = <component set key> | Specifies the Component Set of this Component. | ||
upgrades_to = <component key> | Specifies the direct upgrade of this Component. When the direct upgrade has been unlocked, this Component will be considered obsolete and will be hidden from Ship Designer unless manually toggled off the "Hide Obsolete" option, and will be automatically replaced by the advanced variant for all existing Ship Designs that is set to auto-upgrade components.
For Ship Sizes that are set to | ||
class_restriction = { shipclass_military … } | Only Ships of Ship Classes listed here can equip this Component.
Note that Colossi is | ||
size_restriction = { <ship size keys> } | Only Ships of Ship Sizes listed here can equip this Component. | ||
slot_restriction = { <slot template keys> } | Implemented since Stellaris v2.7.1. Only Slot Templates listed here can hold this Component. | ![]() | |
hidden = <yes/no> | Optional, default no. If yes, this Component is hidden from the Ship Designer and Generated designs and the AI will also be unable to pick this. Only global ship designs can have this component. | ||
valid_for_country | Define it like this.
valid_for_country = { modifier = { factor = 0 … (Conditions, Country scope) … } } If the "factor" is evaluated into 0, this Component is hidden from the Ship Designer. Generated designs and the AI don't respect this. It's used for Stellaris v1.8 to prevent the Player from using Sapient Combat Computer, while setting the AI policy to outlawed. It's unused for now but still functional. | ||
friendly_aura hostile_aura |
![]() |
Aura definitions. Head to the examples for details.
With With The aura range property does nothing. The aura graphic property seemingly does nothing as well. | |
should_ai_use = <yes/no> | If no, AI cannot use this. Among vanilla Components, only empty FTL driver use this. | ||
ftl = <yes/no> | ![]() |
If yes, this Ship can use the hyperlane and go FTL. | |
jumpdrive = <yes/no> | If yes, this Ship can use the jumpdrive command. | ||
ftl_inhibitor = <yes/no> | If yes, this Ship can be FTL inhibitor. | ||
damage = { min = <float> max = <float> } | Determines the damage. | ![]() | |
windup = { min = <int> max = <int> } | The ticks it takes for this Weapon to get ready to fire. (1 day = 10 ticks) | ||
total_fire_time = <int> | The ticks it takes for this Weapon to cooldown before it's next fire. (1 day = 10 ticks) | ![]() | |
cooldown = <int> | ![]() |
The ticks it takes for this Weapon to cooldown before it's next fire. (1 day = 10 ticks) | |
hull_damage = <float> shield_damage = <float> shield_penetration = <float> armor_damage = <float> armor_penetration = <float> |
Determines the damage efficiencies and penetration rates. | ||
range = <int> accuracy = <float> tracking = <float> |
Determines the range, accuracy and tracking. | ||
missile_speed = <int> missile_evasion = <float> missile_shield = <int> missile_armor = <int> missile_health = <int> missile_retarget_range = <int> |
Missile stats. | ![]() | |
firing_arc = <float> | Limits the arc this Weapon can fire in. | ||
min_range = <float> | Limits the minimal range this Weapon can fire. | ||
use_ship_kill_target = <yes/no> | Unclear. | ||
count = <int> regeneration_per_day = <float> launch_time = <int> speed = <int> rotation_speed = <float> acceleration = <float> evasion = <float> shield = <int> armor = <int> health = <int> |
![]() |
Strike Craft stats. |
Weapon Stats CSV[编辑 | 编辑源代码]
Most stats of vanilla Weapon Components are defined at "common/component_templates/weapon_components.csv". This file has higher priority than individual Weapon Components.
Key | Regular Weapons | 展开Planet Killers |
---|
Component Tags[编辑 | 编辑源代码]
Examples[编辑 | 编辑源代码]
Small Red Laser[编辑 | 编辑源代码]
Tier 3 Strike Crafts[编辑 | 编辑源代码]
Small Tier 3 Shield[编辑 | 编辑源代码]
PD Nullification Juggernaut Aura[编辑 | 编辑源代码]
Bombardment Juggernaut Aura[编辑 | 编辑源代码]
How does Colossus Weapons Work?[编辑 | 编辑源代码]
Ship Behavior[编辑 | 编辑源代码]
Ship Behaviors are patterns ships follow during battle. They are called by Combat Computer Components and Strike Craft Components. They are defined at "common/ship_behaviors/xxx.txt".
Data Structure[编辑 | 编辑源代码]
Property | 折叠Description |
---|---|
name = <localisation key> | Identification key of this Ship Behavior. |
preferred_attack_range = <min/median/max/int> | The distance from target the ship wants to keep when using 'attack_movement_pattern'. |
formation_distance = <min/median/max/int> | The ship will switch to 'attack_movement_pattern' when it crosses inside this distance from a target. The ship will also try to stay at this distance while using 'passive_movement_pattern'. |
return_to_formation_distance = <min/median/max/int> | The ship will switch to 'passive_move_pattern' when it crosses outside this distance from a target. |
attack_move_pattern passive_move_pattern |
Each can be one of the following.
|
ignore_combat_movement = <yes/no> | If yes, this ship will totally ignore auto movement patterns. If it is the fleet's leader, you retain control to move to any point you direct while the rest of the fleet follows their movement patterns. If the ship goes through a hyperlane, the whole fleet will warp out. |
Global Ship Designs[编辑 | 编辑源代码]
Global Ship Designs are pre-scripted designs to be used by events with Effects such as create_ship
. They are defined at "common/global_ship_designs/xxx.txt".
Data Structure[编辑 | 编辑源代码]
Property | 折叠Description |
---|---|
name = <localisation key> | Identification key of this Global Ship Design. |
ship_size = <ship size key> | Marks the Ship Size of this Ship. |
is_event_design = <yes/no> | Marks this design an Event Design that should be blocked by the Fleet Manager. |
hide_size = <yes/no> | Hide the Ship Size of this Ship, so you won't see something like "Amoeba-class Amoeba". |
section
|
Specifies the Sections. Multiple allowed. Each of them can also specify components. |
|
Specifies the Component. Multiple allowed.
The component slot name of Weapon Component Slots are the slot names defined there. The names of Utility Component Slots are |
帝国 | 帝国 • 思潮 • 政府 • 国民理念 • 起源 • 承诺 • 议程 • 传统 • 飞升天赋 • 法令 • 政策 • 遗珍 • 科技 • 自定义帝国 |
人口 | 岗位 • 派系 |
领袖 | 领袖 • 领袖特质 |
物种 | 物种 • 物种特质 |
行星 | 行星 • 行星特征 • 轨道矿藏 • 建筑 • 区划 • 行星决议 |
星系 | 星系 • 恒星基地 • 巨型结构 • 虫洞 • 星门 • 地图 |
舰队 | 舰队 • 舰船 • 部件 |
地面战 | 陆军 • 轰炸姿态 |
外交 | 外交 • 联邦 • 星海共同体 • 评价修正 • 宣战理由 • 战争目标 |
事件 | 事件 • 异常现象 • 特殊项目 • 考古遗址 |
游玩 | 游玩 • 定义 • 研究 • 经济 • 游戏开局 |
动态修改 | 动态 • 指令效果 • 触发条件 • 作用域 • 修正 • 变量 • AI |
媒体/本地化 | Maya 导出器 • 图形 • 肖像 • 旗帜 • 事件图片 • 界面 • 图标 • 音乐 • 本地化 |
Other | 控制台命令 • 存档编辑 • Steam 创意工坊 • 模组制作教程 |