群星
ParaWikis
Notice
: Undefined index: HTTP_ACCEPT_LANGUAGE in
/data/wwwroot/www.parawikis.com/skins/Liberty/LibertyTemplate.php
on line
185
最新百科
都市天际线2百科
英雄无敌3百科
维多利亚3百科
奇妙探险队2百科
罪恶帝国百科
英白拉多:罗马百科
热门百科
群星百科
欧陆风云4百科
十字军之王2百科
十字军之王3百科
钢铁雄心4百科
维多利亚2百科
ParaWikis
申请建站
ParaWikis
ParaCommons
最近更改
随机页面
加入QQ群
工具
链入页面
相关更改
特殊页面
页面信息
页面值
阅读
编辑
编辑源代码
查看历史
讨论
编辑“
Ship modding
”
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
{{Version|2.8}} This page is about modding of [[Ships]], [[Ship designer|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 === {| class="wikitable mw-collapsible" |- ! width="20%"| Property ! width="16%"| Military Ships ! width="16%"| Civilian Ships ! width="16%"| Starbases ! width="16%"| Defense Platforms ! width="16%"| Civilian Stations |- | '''graphical_culture = { mammalian_01 … }''' |colspan="5"| A list of [[Species modding|Graphical Cultures]] this ship size is valid to have. Can also specify as <code>graphical_culture = no</code> to indicate that this Ship Size doesn't need Graphical Cultures. |- | '''entity = some_entity''' |colspan="5"| Defines the graphical entity used, replacing the default SHIPSIZE_entity lookup. |- | '''max_hitpoints = <int>''' |colspan="5"| Defines the base Hull Points of this ship size. |- | '''combat_disengage_chance = <float>''' |colspan="2"| This property multiplies the chance this Ship disengages in battle. |colspan="3"| Vanilla always have 0 or leave this property undefined. |- | '''max_speed = <int>''' | colspan=2 rowspan=3 | Defines the base speed, acceleration and rotation speed of this ship size. |rowspan="3"| Vanilla Starbases usually have 0 for these properties, except for the Juggernaut. |rowspan="3"| Defense Platforms also need these properties because they need to move from the Starbase to their defense position. |rowspan="3"| 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. | style="text-align: center;" rowspan=2 colspan=4 | {{icon|no}} |- | '''collision_radius = <int>''' | The radius other ships will try to avoid colliding with. |- | '''modifier''' |colspan="5"| 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. * ship_evasion_(add/mult) * ship_speed_mult & ship_base_speed_mult * ship_(hull/armor/shield)_(add/mult) & ship_(hull/armor/shield)_regen_add_(static/perc) * ship_weapon_damage & <weapon slot size>_weapon_damage_mult * ships_upkeep_mult & ships_<resource type>_upkeep_mult * ship_piracy_suppression_add Starbases can also use the following modifiers here. * starbase_(module/building/defense_platform/shipyard)_capacity_add * starbase_(trade_collection_range/protection_range/protection)_add |- | '''ship_modifier''' |colspan="5"| Another block of [[Modifiers]] to be added to the ships of this size. Modifiers like <code>ship_fire_rate_mult</code> and <code>ship_weapon_range_mult</code> go here. |- |rowspan="2"| '''size_multiplier''' |colspan="5"| 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''' |colspan="5"| How large should the fleet battle AI consider this ship of, overwriting the <code>size_multiplier</code>. |- | '''fleet_slot_size''' | This determines the order this ship size appears in a fleet, with Corvettes having 1 up to Titans having 8. | colspan=4 style="text-align: center;" | {{icon|no}} |- | '''num_target_locators''' | colspan=5 | ?? |- | '''is_civilian = <yes/no>''' | style="text-align: center;" | {{icon|no}} | Vanilla always have <code>is_civilian = yes</code>. Other Ship Sizes have either <code>is_civilian = no</code> or just have this property undefined, except for the Observation Station being <code>yes</code>. | colspan=3 style="text-align: center;" | {{icon|no}} |- | '''valid_target_aggressive_stance = <yes/no>''' |colspan="5"| Determines should this Ship be ignored by a Military Fleet in aggressive stance.<br>Among vanilla Ship Sizes, only Civilian Ships and Civilian Stations have <code>valid_target_aggressive_stance = no</code>. |- | '''build_block_radius = <int>''' | colspan=3 style="text-align: center;" | {{icon|no}} | Since Military Stations have been reworked, it's still unclear what's the use of this property for now. | style="text-align: center;" | {{icon|no}} |- | '''is_space_station = <yes/no>''' | colspan=3 style="text-align: center;" | {{icon|no}} |colspan="2"| Vanilla always have <code>is_space_station = yes</code>. Other Ship Sizes have either <code>is_space_station = no</code> or just have this property undefined. |- | '''is_space_object = <yes/no>''' |colspan="5"| Determines should this Ship Size have trailers when the Ships move in the Space. Space monsters usually have <code>is_space_object = yes</code>. |- | '''can_be_inspected = <yes/no>''' |colspan="5"| Determines should Designs of this Ship Size can be inspected by the player. Some space monsters have <code>can_be_inspected = no</code>. |- | '''icon_frame = <int>''' | Determines the index of the icon of this Ship Size in a shared icon file. | colspan=4 style="text-align: center;" | {{icon|no}} |- | '''is_designable = <yes/no>''' |colspan="5"| Determines should this Ship Size be designable in the Ship Designer.<br>Among vanilla Ship Sizes, buildable Military Ships, the Juggernaut and buildable Defense Platforms have <code>is_designable = yes</code>. |- | '''enable_default_design = <yes/no>''' |colspan="5"| Determines should an Empire start with an auto-generated design of this Ship Size.<br>All buildable Ship Sizes have <code>enable_default_design = yes</code>, regardless of they are designable or not, or the AI will not be able to build this. |- | '''can_have_federation_design = <yes/no>''' |colspan="5"| Determines if this Ship can have a federation design.<br>Among vanilla Ship Sizes, only buildable Military Ships and the Juggernaut have <code>can_have_federation_design = yes</code>, except for the Colossus being without it. |- | '''components_add_to_cost = <yes/no>''' |colspan="5"| Determines should the Ship Construction Cost and the Ship Upkeep take Ship Components and Ship Sections into account.<br>Among vanilla Ship Sizes, only undesignable but buildable Ship Sizes have <code>components_add_to_cost = no</code>. |- | '''auto_upgrade = <yes/no>''' | colspan="2" | Determines should the design of this Ship Size automatically upgrade based on the recent technologies. Existing ships will also be upgraded. <br>Among vanilla Ship Sizes, only Civilian Ships and Civilian Stations have <code>auto_upgrade = yes</code>, except for the Observation Station being without it. !{{icon|no}} | colspan="2" |Determines should the design of this Ship Size automatically upgrade based on the recent technologies. Existing ships will also be upgraded. <br>Among vanilla Ship Sizes, only Civilian Ships and Civilian Stations have <code>auto_upgrade = yes</code>, except for the Observation Station being without it. |- | '''can_disable = <yes/no>''' |colspan="5"| Determines should this Ship be disabled rather than be destroyed if at low health.<br>Among vanilla Ship Sizes, only buildable Starbases except for the Juggernaut have <code>can_disable = yes</code>. |- | '''flip_control_on_disable = <yes/no>''' |colspan="5"| Determines can this Ship be captured after it's disabled.<br>Among vanilla Ship Sizes, only buildable Starbases except for the Juggernaut have <code>flip_control_on_disable = yes</code>. |- | '''default_behavior = <ship behavior>''' | Determines the default ship behavior the auto generated designs should try to pick when choosing the combat computer component. | colspan=4 style="text-align: center;" | {{icon|no}} |- | '''section_slots = { <section slot name> = { locator = <locator name> } }''' |colspan="5"| Determines the [[Ship modding#Ship Sections|Sections]] needed for this Ship Size. The locators are pointers on the Ship entity, see [[Graphics modding]] for details. |- | '''base_buildtime = <int>''' |colspan="4"| Days it takes to build this ship / station or upgrade into this starbase. | Vanilla civilian stations have this property undefined. |- | '''prerequisites = { tech_xxx }''' |colspan="5"| A list of Technologies required to design and build this Ship Size or upgrade existing Starbases into this level. |- | '''class''' | * <code>shipclass_military</code> * <code>shipclass_military_special</code> (the Colossus) | * <code>shipclass_constructor</code> * <code>shipclass_colonizer</code> * <code>shipclass_science_ship</code> * <code>shipclass_transport</code> | * <code>shipclass_starbase</code> | * <code>shipclass_military_station</code> | * <code>shipclass_mining_station</code> * <code>shipclass_research_station</code> * <code>shipclass_observation_station</code> |- | '''construction_type''' |colspan="2"| <code>starbase_shipyard</code> | Starbases usually have this field undefined, except the Juggernaut has <code>starbase_shipyard</code>. | <code>starbase_defenses</code> | style="text-align: center;" | {{icon|no}} |- | '''potential_construction''' |colspan="2"| 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 <code>is_scope_type</code> to check scope type; FROM is the builder empire) |rowspan="2"| Starbases usually have this field undefined, except for the Juggernaut. | The same. Vanilla Defense Platforms only allow Starbases to build them. | style="text-align: center;" | {{icon|no}} |- | '''possible_construction''' |colspan="2"| 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 <code>is_scope_type</code> 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. | style="text-align: center;" | {{icon|no}} |- | '''resources''' |colspan="5"| An [[Economy modding#Economy Units|Economy Unit]] to determine the construction cost and upkeep of this Ship. This is the final cost if this Ship Size has <code>components_add_to_cost = no</code>. 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. | colspan=2 style="text-align: center;" | {{icon|no}} | The same. | style="text-align: center;" | {{icon|no}} |- | '''empire_limit = { base = <int> (max = <int> naval_cap_div = <int>) }''' |colspan="5"| Determines the max number of Ships of this Size an empire can have at the same time. The number is <code>base</code> plus empire naval capacity divided by <code>naval_cap_div</code>, rounded down, at most <code>max</code>. |- | '''required_component_set = <component set key>" |colspan="5"| Requires a core component with a [[Ship modding#Component Sets|Component Set]]. Multiple allowed. While designing by the Ship Designer, these will be displayed on the right. |} === Examples === ==== Corvette ==== {{Collapse list | type= | body= <pre> corvette = { formation_priority = @corvette_formation_priority max_speed = @speed_very_fast acceleration = 0.35 rotation_speed = 0.1 collision_radius = @corvette_collision_radius max_hitpoints = @corvette_hp modifier = { ship_evasion_add = @corvette_evasion ship_piracy_suppression_add = 10 } size_multiplier = 1 fleet_slot_size = 1 section_slots = { "mid" = { locator = "part1" } } num_target_locators = 2 is_space_station = no icon_frame = 2 base_buildtime = @corvette_build_time can_have_federation_design = yes enable_default_design = yes #if yes, countries will have an auto-generated design at start default_behavior = swarm prerequisites = { "tech_corvettes" } combat_disengage_chance = 1.00 class = shipclass_military construction_type = starbase_shipyard required_component_set = "power_core" required_component_set = "ftl_components" required_component_set = "thruster_components" required_component_set = "sensor_components" required_component_set = "combat_computers" resources = { category = ships upkeep = { energy = @corvette_upkeep_energy alloys = @corvette_upkeep_alloys } } min_upgrade_cost = { alloys = 1 } } </pre> }} ==== Colossus ==== {{Collapse list | type= | body= <pre> colossus = { formation_priority = @colossus_formation_priority max_speed = @speed_very_slow acceleration = 0.2 rotation_speed = 0.15 collision_radius = @colossus_collision_radius max_hitpoints = @colossus_hp modifier = { ship_evasion_add = @colossus_evasion } size_multiplier = 32 fleet_slot_size = 32 section_slots = { "ship" = { locator = "frame_ship" } } num_target_locators = 4 is_space_station = no icon_frame = 7 base_buildtime = @colossus_build_time can_have_federation_design = no enable_default_design = yes #if yes, countries will have an auto-generated design at start prerequisites = { "tech_colossus" } class = shipclass_military_special construction_type = starbase_shipyard required_component_set = "power_core" required_component_set = "ftl_components" required_component_set = "thruster_components" required_component_set = "combat_computers" potential_construction = { OR = { is_scope_type = starbase AND = { is_scope_type = megastructure OR = { is_megastructure_type = mega_shipyard_3 is_megastructure_type = mega_shipyard_restored } } } } possible_construction = { custom_tooltip = { fail_text = starbase_citadel_trigger OR = { AND = { is_scope_type = megastructure OR = { is_megastructure_type = mega_shipyard_3 is_megastructure_type = mega_shipyard_restored } } AND = { is_scope_type = starbase has_starbase_size >= starbase_citadel } } } custom_tooltip = { fail_text = starbase_colossal_yards_trigger OR = { AND = { is_scope_type = megastructure OR = { is_megastructure_type = mega_shipyard_3 is_megastructure_type = mega_shipyard_restored } } AND = { is_scope_type = starbase has_starbase_building = colossus_yards } } } } empire_limit = { base = 1 } resources = { category = ships cost = { alloys = 10000 } upkeep = { energy = @colossus_upkeep_energy alloys = @colossus_upkeep_alloys } } min_upgrade_cost = { alloys = 10 } } </pre> }} ==== Juggernaut ==== {{Collapse list | type= | body= <pre> juggernaut = { formation_priority = @juggernaut_formation_priority max_speed = @speed_very_slow acceleration = 0.2 rotation_speed = 0.15 collision_radius = @juggernaut_collision_radius max_hitpoints = @juggernaut_hp modifier = { ship_evasion_add = @juggernaut_evasion starbase_shipyard_capacity_add = 2 } base_buildtime = @juggernaut_build_time resources = { category = ships upkeep = { energy = @juggernaut_upkeep_energy alloys = @juggernaut_upkeep_alloys } } combat_size_multiplier = 5 size_multiplier = 32 fleet_slot_size = 32 section_slots = { "core" = { locator = "part1" } } potential_construction = { OR = { AND = { is_scope_type = starbase NOT = { has_starbase_size = juggernaut } } AND = { is_scope_type = megastructure OR = { is_megastructure_type = mega_shipyard_3 is_megastructure_type = mega_shipyard_restored } } } } possible_construction = { custom_tooltip = { fail_text = starbase_citadel_trigger OR = { AND = { is_scope_type = megastructure OR = { is_megastructure_type = mega_shipyard_3 is_megastructure_type = mega_shipyard_restored } } AND = { is_scope_type = starbase has_starbase_size >= starbase_citadel } } } custom_tooltip = { fail_text = starbase_colossal_yards_trigger OR = { AND = { is_scope_type = megastructure OR = { is_megastructure_type = mega_shipyard_3 is_megastructure_type = mega_shipyard_restored } } AND = { is_scope_type = starbase has_starbase_building = colossus_yards } } } } empire_limit = { base = 1 } num_target_locators = 0 can_have_federation_design = yes enable_default_design = yes #if yes, countries will have an auto-generated design at start can_disable = no icon_frame = 7 ship_class_icon_frame = 35 default_behavior = carrier prerequisites = { "tech_juggernaut" } class = shipclass_starbase construction_type = starbase_shipyard required_component_set = "power_core" required_component_set = "sensor_components" required_component_set = "combat_computers" required_component_set = "ftl_components" required_component_set = "thruster_components" required_component_set = "ship_aura_components" min_upgrade_cost = { alloys = 50 } } </pre> }} == Ship Sections == Ships consist of Ship Sections. They are defined at "common/section_templates/xxx.txt". === Data Structure === {| class="wikitable mw-collapsible" |- ! width="20%"| Property ! width="80%"| Description |- | '''key = <localisation key>''' | Identification key of this section. |- | '''ship_size = <ship size key>''' | Specifies the compatible [[Ship modding#Ship Sizes|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. |- | * '''name = <something>''' | Identification of this weapon slot. No duplications allowed. |- | * '''template = <component slot template>''' | The [[Ship modding#Component Slot Templates|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. |- | * '''locatorname = <locator name>''' | 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>'''<br>'''medium_utility_slots = <int>'''<br>'''large_utility_slots = <int>'''<br>'''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 modding#Economy Units|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 ==== {{Collapse list | type= | body= <pre> ship_section_template = { key = "BATTLESHIP_BOW_M2S4" ship_size = battleship fits_on_slot = bow should_draw_components = yes entity = "battleship_bow_XL1_entity" icon = "GFX_ship_part_core_bow" prerequisites = { tech_energy_lance_1 tech_energy_lance_2 tech_arc_emitter_1 tech_arc_emitter_2 tech_mass_accelerator_1 tech_mass_accelerator_2 } ai_weight = { modifier = { factor = 10.0 NOT = { is_preferred_weapons = weapon_type_explosive } } modifier = { factor = 0.1 is_preferred_weapons = weapon_type_explosive } } component_slot = { name = "EXTRA_LARGE_01" template = "invisible_extra_large_fixed" locatorname = "xl_gun_01" } large_utility_slots = 3 resources = { category = ship_sections cost = { alloys = @section_cost } } } </pre> }} ==== Starbase Missile Defense Module ==== {{Collapse list | type= | body= <pre> ship_section_template = { key = "MISSILE_STARBASE_SECTION" entity = "starbase_turret_section_entity" icon = "GFX_ship_part_core_mid" ship_size = starbase_outpost ship_size = starbase_starport ship_size = starbase_starhold ship_size = starbase_starfortress ship_size = starbase_citadel fits_on_slot = "1" fits_on_slot = "2" fits_on_slot = "3" fits_on_slot = "4" fits_on_slot = "5" fits_on_slot = "6" should_draw_components = yes component_slot = { name = "TORPEDO_01" template = "medium_missile_turret" locatorname = "medium_gun_01" } component_slot = { name = "TORPEDO_02" template = "medium_missile_turret" locatorname = "medium_gun_02" } } </pre> }} == 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 === {| class="wikitable mw-collapsible" |- ! width="20%"| Property ! width="40%"| Weapon Component Slots ! width="40%"| Strike Craft Slots |- | '''component''' | Only one is allowed. * <code>component = weapon</code> | Only one is allowed. * <code>component = strike_craft</code> |- | '''size''' | One of the following is allowed. * {{icon|slot pd}}: <code>size = point_defence</code> * {{icon|slot s}}: <code>size = small</code> * {{icon|slot m}}: <code>size = medium</code> * {{icon|slot l}}: <code>size = large</code> * {{icon|slot g}}: <code>size = torpedo</code> * {{icon|slot xl}}: <code>size = extra_large</code> * {{icon|slot t}}: <code>size = titanic</code> * {{icon|slot wd}}: <code>size = planet_killer</code> | Only one is allowed. * {{icon|slot h}}: <code>size = large</code> |- | '''entities''' | Determines the Turret Entities of this Component Slot Template. Define with pairs of [[Ship modding#Component Tags|component tags]] and entities. | style="text-align: center;" | {{icon|no}} |- | '''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. | style="text-align: center;" | {{icon|no}} |} === Examples === ==== Point Defense Turret ==== {{Collapse list | type= | body= <pre> point_defence_turret = { size = point_defence component = weapon entities = { weapon_type_kinetic = "small_kinetic_gun_entity" weapon_type_energy = "turret_point_defence_entity" } } </pre> }} ==== Invisible Extra Large "Turret" ==== {{Collapse list | type= | body= <pre> invisible_extra_large_fixed = { size = extra_large component = weapon is_fixed = yes } </pre> }} == 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 {{icon|slot c}} 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 === {| class="wikitable mw-collapsible" |- ! width="20%"| Property ! width="40%"| Designer Component Sets ! width="40%"| Core Component Sets |- | '''key = <localisation key>''' |colspan="2"| Identification key of this Component Set. |- | '''required_component_set = <yes/no>''' | Must be <code>required_component_set = no</code> or leave this undefined. | Must be <code>required_component_set = yes</code>. 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. |rowspan="2"| Vanilla always define these but these is always overwritten by individual Core Components. |- | '''icon_frame = <int>''' | Vanilla always have <code>icon_frame = 1</code>. Actual usage is unclear. |} === Examples === ==== Core Component Set: "Combat Computers" ==== {{Collapse list | type= | body= <pre> component_set = { key = "combat_computers" required_component_set = yes icon = "GFX_ship_part_computer" icon_frame = 1 } </pre> }} ==== Designer Component Set: "Red Lasers" ==== {{Collapse list | type= | body= <pre> component_set = { key = "RED_LASER" icon = "GFX_ship_part_laser_1" icon_frame = 1 } </pre> }} == Components == Components are attachments to ships for a weapon or a functional extension. They are defined at "common/component_templates/xxx.txt". === Data Structure === {| class="wikitable mw-collapsible" |- ! width="20%"| Property ! width="27%"| Weapon Components ! width="27%"| Strike Craft Components ! width="26%"| Utility Components |- | '''key = <localisation key>''' |colspan="3"| Identification key of this Component. |- | '''icon = <GFX entry>''' |colspan="3"| Determines the icon of this Component, overwriting that of the Component Set. |- | '''icon_frame = <int>''' |colspan="3"| Vanilla always have <code>icon_frame = 1</code>. For sprite sheet icons. |- | '''size''' | One of the following is allowed. * {{icon|slot pd}}: <code>size = point_defence</code> * {{icon|slot s}}: <code>size = small</code> * {{icon|slot m}}: <code>size = medium</code> * {{icon|slot l}}: <code>size = large</code> * {{icon|slot g}}: <code>size = torpedo</code> * {{icon|slot xl}}: <code>size = extra_large</code> * {{icon|slot t}}: <code>size = titanic</code> * {{icon|slot wd}}: <code>size = planet_killer</code> Without the {{iconify|Apocalypse}} DLC, ship designs with a Titanic or Planet Killer weapon cannot be saved as well as the weapons cannot be picked by a generated design. | Only one is allowed. * {{icon|slot h}}: <code>size = large</code> | One of the following is allowed. * {{icon|slot s}}: <code>size = small</code> * {{icon|slot m}}: <code>size = medium</code> * {{icon|slot l}}: <code>size = large</code> * {{icon|slot a}}: <code>size = aux</code> |- | '''type''' | One of the following is allowed. * <code>type = instant</code> * <code>type = point_defence</code> * <code>type = missile</code> * <code>type = planet_killer</code> 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 {{iconify|Apocalypse}} DLC, the fleet command to invoke the Planet Killer weapon can't be used. | colspan=2 style="text-align: center;" | {{icon|no}} |- | '''weapon_type''' | rowspan=2 style="text-align: center;" | {{icon|no}} | One of the following is allowed. * <code>type = instant</code> * <code>type = point_defence</code> | rowspan=6 style="text-align: center;" | {{icon|no}} |- | '''entity = <entity key>''' | Determines what should the Strike Crafts be look like. |- | '''projectile_gfx = <projectile graphic key>''' |colspan="2"| 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. | rowspan=2 style="text-align: center;" | {{icon|no}} |- | '''planet_destruction_gfx = <GFX entry>''' | Only relevant to Planet Killer weapons. Specifies the projectile graphic. |- | '''tags = { component_tags … }''' |colspan="2"| 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. | colspan=2 rowspan=2 style="text-align: center;" | {{icon|no}} |- | '''ai_tag_weight = <float>''' | Multiplies the AI weight gained through the <code>ai_tags</code>. Vanilla use this for Missile components for unknown reason. |- | '''prerequisites = { tech_xxx }''' |colspan="3"| Technology prerequisites of this Component. |- | '''power = <int>''' |colspan="3"| 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''' |colspan="3"| An [[Economy modding#Economy Units|Economy Unit]] to determine the construction cost and upkeep of this Component. |- | '''modifier''' |colspan="3"| 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. * ship_evasion_(add/mult) * ship_speed_mult & ship_base_speed_mult * ship_(hull/armor/shield)_(add/mult) & ship_(hull/armor/shield)_regen_add_(static/perc) * ship_weapon_damage & <weapon slot size>_weapon_damage_mult * ships_upkeep_mult & ships_<resource type>_upkeep_mult * ship_piracy_suppression_add Starbases can also use the following modifiers here. * starbase_(module/building/defense_platform/shipyard)_capacity_add * starbase_(trade_collection_range/protection_range/protection)_add It's not recommended to give Weapon Components and Strike Craft Components with modifiers, because the tooltips might go wild and confusing. |- | '''ship_modifier''' |colspan="3"| Another block of [[Modifiers]] to be added to the Ship. Modifiers like <code>ship_fire_rate_mult</code> and <code>ship_weapon_range_mult</code> 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>''' | style="text-align: center;" | {{icon|no}} | Determines the behavior pattern of the Strike Crafts. | Determines the behavior pattern of this Ship. |- | '''component_set = <component set key>''' |colspan="3"| Specifies the [[Ship modding#Component Sets|Component Set]] of this Component. |- | '''upgrades_to = <component key>''' |colspan="3"| 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 <code>auto_upgrade = yes</code>, existing Ships will instantly be upgraded for free. Starbases will redesign themselves and might pick different kind of Weapons. |- | '''class_restriction = { shipclass_military … }''' |colspan="3"| Only Ships of Ship Classes listed here can equip this Component. Note that Colossi is <code>shipclass_military_special</code> and the Juggernaut and Starbases are <code>shipclass_starbase</code>. |- | '''size_restriction = { <ship size keys> }''' |colspan="3"| Only Ships of Ship Sizes listed here can equip this Component. |- | '''slot_restriction = { <slot template keys> }''' |colspan="2"| Implemented since Stellaris v2.7.1. Only Slot Templates listed here can hold this Component. | style="text-align: center;" | {{icon|no}} |- | '''hidden = <yes/no>''' |colspan="3"| 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''' |colspan="3"| Define it like this. <pre> valid_for_country = { modifier = { factor = 0 … (Conditions, Country scope) … } } </pre> If the "factor" is evaluated into 0, this Component is hidden from the Ship Designer. {{red|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'''<br>'''hostile_aura''' | colspan=2 style="text-align: center;" | {{icon|no}} | Aura definitions. Head to the examples for details. With <code>system_wide = yes</code>, the aura affects all friendly or enemy ships in the same system. With <code>system_wide = no</code> or undefined, the aura affects all friendly ships in the same fleet or all enemy ships that are in battle with the aura bearer. The aura range property does nothing. The aura graphic property seemingly does nothing as well. |- | '''should_ai_use = <yes/no>''' |colspan="3"| If no, AI cannot use this. Among vanilla Components, only empty FTL driver use this. |- | '''ftl = <yes/no>''' | colspan=2 rowspan=3 style="text-align: center;" | {{icon|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> }''' |colspan="2"| Determines the damage. | rowspan=11 style="text-align: center;" | {{icon|no}} |- | '''windup = { min = <int> max = <int> }''' |colspan="2"| 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) | style="text-align: center;" | {{icon|no}} |- | '''cooldown = <int>''' | style="text-align: center;" | {{icon|no}} | The ticks it takes for this Weapon to cooldown before it's next fire. (1 day = 10 ticks) |- | '''hull_damage = <float>'''<br>'''shield_damage = <float>'''<br>'''shield_penetration = <float>'''<br>'''armor_damage = <float>'''<br>'''armor_penetration = <float>''' |colspan="2"| Determines the damage efficiencies and penetration rates. |- | '''range = <int>'''<br>'''accuracy = <float>'''<br>'''tracking = <float>''' |colspan="2"| Determines the range, accuracy and tracking. |- | '''missile_speed = <int>'''<br>'''missile_evasion = <float>'''<br>'''missile_shield = <int>'''<br>'''missile_armor = <int>'''<br>'''missile_health = <int>'''<br>'''missile_retarget_range = <int>''' | Missile stats. | rowspan=4 style="text-align: center;" | {{icon|no}} |- | '''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>'''<br>'''regeneration_per_day = <float>'''<br>'''launch_time = <int>'''<br>'''speed = <int>'''<br>'''rotation_speed = <float>'''<br>'''acceleration = <float>'''<br>'''evasion = <float>'''<br>'''shield = <int>'''<br>'''armor = <int>'''<br>'''health = <int>''' | style="text-align: center;" | {{icon|no}} | 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. {| class="wikitable mw-collapsible mw-collapsed" |- ! width="20%"| Key ! width="60%"| Regular Weapons ! width="20%"| Planet Killers |- | key |colspan="2"| The identification of the Weapon Component. |- | cost |colspan="2"| The {{iconify|Minerals}} cost of this Weapon Component. This field is deprecated after the economy rework. |- | power |colspan="2"| The power impact of this Weapon Component. |- | min_damage<br>max_damage | Determines the damage.<br>The equivalent Weapon Component Property is <code>damage = { min = <float> max = <float> }</code>. | rowspan=2 style="text-align: center;" | {{icon|no}} |- | hull_damage<br>shield_damage<br>shield_penetration<br>armor_damage<br>armor_penetration | Determines the damage efficiencies and penetration rates. |- | min_windup<br>max_windup | The ticks it takes for this Weapon to get ready to fire. (1 day = 10 ticks)<br>The equivalent Weapon Component Property is <code>windup = { min = <int> max = <int> }</code>. | World Destroyer weapons have 90 min windup and 0 max windup. |- | cooldown | The ticks it takes for this Weapon to cooldown before it's next fire. (1 day = 10 ticks)<br>The equivalent Weapon Component Property is <code>total_fire_time = <int></code>. | World Destroyer weapons have 30 cooldown. |- | range<br>accuracy<br>tracking | Determines the range, accuracy and tracking. | World Destroyer weapons have 1 accuracy, 0 range and 0 tracking. |- | missile_speed<br>missile_evasion<br>missile_shield<br>missile_armor<br>missile_health<br>missile_retarget_range | Missile stats. | style="text-align: center;" | {{icon|no}} |} === Component Tags === {{Collapse list | type= Component Tags can be given to Components to make them affected by certain modifiers. Most of the vanilla Component Tags are hard-codely required. They are defined at "common/component_tags/xxx.txt". | body= <pre> weapon_type_energy weapon_type_kinetic weapon_type_explosive weapon_type_strike_craft weapon_type_point_defense weapon_role_anti_armor weapon_role_anti_shield weapon_role_artillery weapon_role_anti_hull weapon_role_point_defense </pre> }} === Examples === ==== Small Red Laser ==== {{Collapse list | type= | body= <pre> weapon_component_template = { key = "SMALL_RED_LASER" size = small type = instant icon = "GFX_ship_part_laser_1" icon_frame = 1 prerequisites = { "tech_lasers_1" } component_set = "RED_LASER" projectile_gfx = "infrared_laser_s" tags = { weapon_type_energy } upgrades_to = "SMALL_BLUE_LASER" ai_tags = { weapon_role_anti_armor } #tags must be pre-registered in common/weapon_tags resources = { category = ship_components cost = { alloys = @s_t1_cost } upkeep = { energy = @s_t1_upkeep_energy alloys = @s_t1_upkeep_alloys } } } </pre> }} ==== Tier 3 Strike Crafts ==== {{Collapse list | type= | body= <pre> strike_craft_component_template = { key = "STRIKE_CRAFT_HANGAR_3" size = LARGE entity = "bomber_entity" weapon_type = point_defence projectile_gfx = "strike_craft_laser_3" power = @power4 resources = { category = ship_components cost = { alloys = @l_t5_cost } upkeep = { energy = @l_t5_upkeep_energy alloys = @l_t5_upkeep_alloys } } count = @count regeneration_per_day = @regen launch_time = @launch_time damage = { min = 6 max = 17 } cooldown = 2.3 range = @attack_range engagement_range = @engagement_range accuracy = 1.00 tracking = 1.00 health = 45 armor = 0 shield = 30 evasion = 0.80 speed = @speed4 rotation_speed = 0.8 acceleration = 1 shield_penetration = 1.0 armor_damage = 1.5 ship_behavior = "fighters_behavior" icon = "GFX_ship_part_strike_craft_fighter_3" icon_frame = 1 component_set = "STRIKE_CRAFT_HANGAR_3" prerequisites = { "tech_strike_craft_3" } tags = { weapon_type_strike_craft } ai_tags = { weapon_role_point_defense } } </pre> }} ==== Small Tier 3 Shield ==== {{Collapse list | type= | body= <pre> utility_component_template = { key = "SMALL_SHIELD_3" size = small icon = "GFX_ship_part_shield_3" icon_frame = 1 power = @power_S3 resources = { category = ship_components cost = { alloys = @shield_s_t3_cost } upkeep = { energy = @shield_s_t3_upkeep_energy alloys = @shield_s_t3_upkeep_alloys } } modifier = { ship_shield_add = @shield_S3 ship_shield_regen_add_static = @regen_S3 #Regeneration per day } prerequisites = { "tech_shields_3" } component_set = "SHIELD_3" upgrades_to = "SMALL_SHIELD_4" } </pre> }} ==== PD Nullification Juggernaut Aura ==== {{Collapse list | type= | body= <pre> utility_component_template = { key = "SHIP_AURA_PD_PENETRATION" size = medium icon = "GFX_ship_part_aura_pd_penetration" icon_frame = 1 power = 0 size_restriction = { juggernaut } component_set = "ship_aura_components" hostile_aura = { name = "aura_pd_penetration" system_wide = yes stack_info = { #A ship can only be affected by one aura of a certain id. If multiple auras have the same ID the one with the highest priority will be applied. id = hostile_pd_penetration priority = 1 } modifier = { weapon_type_point_defense_weapon_damage_mult = -0.3 weapon_type_point_defense_weapon_fire_rate_mult = -0.3 } graphics = { area_effect = { entity = "circle_area_entity" dynamic_scale = yes } ship_effect = { entity = "ship_aura_negative_entity" dynamic_scale = no } } } ai_weight = { weight = 10 modifier = { factor = 2 is_ai = yes is_preferred_weapons = weapon_type_energy } } } </pre> }} ==== Bombardment Juggernaut Aura ==== {{Collapse list | type= | body= <pre> utility_component_template = { key = "SHIP_AURA_BOMBARDMENT" size = medium icon = "GFX_ship_part_aura_bombardment" icon_frame = 1 power = 0 size_restriction = { juggernaut } component_set = "ship_aura_components" friendly_aura = { name = "aura_bombardment" system_wide = yes stack_info = { #A ship can only be affected by one aura of a certain id. If multiple auras have the same ID the one with the highest priority will be applied. id = friendly_bombardment priority = 1 } modifier = { ship_orbital_bombardment_mult = 0.3 } graphics = { area_effect = { entity = "circle_area_entity" dynamic_scale = yes } ship_effect = { entity = "ship_aura_negative_entity" dynamic_scale = no } } } ai_weight = { weight = 10 modifier = { factor = 2 is_ai = yes is_preferred_weapons = weapon_type_energy } } } </pre> }} === How does Colossus Weapons Work? === {{Collapse list | type=Colossus Weapons are invoked through a fleet command of the Colossus. | body= Before you can fire, a scripted-trigger called <code>can_destroy_planet_with_<colossus weapon component key></code> is checked. Read the vanilla file "common/scripted_triggers/01_scripted_triggers_planet_killers.txt" and [[Dynamic modding]] for details. When the weapon is fired, an on-action called <code>on_destroy_planet_with_<colossus weapon component key></code> is fired. Read the vanilla file "common/on_actions/01_planet_destruction.txt" and [[Event modding]] for details. There are also relevant localisation keys to the Colossus Weapons, more than just the component name and description. <pre> FLEETORDER_DESTROY_PLANET_WITH_<component key>:0 "Preparing to crack $PLANET|Y$" MESSAGE_DESC_FOR_<component key>:0 "was utterly destroyed by" <component key>_ACTION:0 "Crack World" </pre> }} == 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 === {| class="wikitable mw-collapsible" |- ! width="20%"| Property ! width="80%"| 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'''<br>'''passive_move_pattern''' | Each can be one of the following. * charge * orbit * stay_at_range * flee * follow * stationary * none |- | '''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 <code>create_ship</code>. They are defined at "common/global_ship_designs/xxx.txt". === Data Structure === {| class="wikitable mw-collapsible" |- ! width="20%"| Property ! width="80%"| 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''' * '''template = <ship section key>''' * '''slot = <section slot name>''' | Specifies the Sections. Multiple allowed. Each of them can also specify components. |- | * '''component''' ** '''slot = <component slot name>''' ** '''template = <component key>''' | 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 <code>(SMALL|MEDIUM|LARGE|AUX)_UTILITY_<int></code>. The index starts from 1. |} {{ModdingNavbox}} [[Category:模组制作]]
摘要:
请注意您对群星百科的所有贡献都被认为是在知识共享署名-非商业性使用-相同方式共享下发布,请查看在
群星百科:版权
的细节。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源。
未经许可,请勿提交受版权保护的作品!
为防止机器编辑,请完成下方验证
取消
编辑帮助
(在新窗口中打开)
本页使用的模板:
Template:0
(
编辑
)
Template:Clear
(
编辑
)
Template:Collapse list
(
编辑
)
Template:Color
(
编辑
)
Template:Icon
(
编辑
)
Template:Icon/a
(
编辑
)
Template:Icon/m
(
编辑
)
Template:Icon/n
(
编辑
)
Template:Icon/s
(
编辑
)
Template:Iconify
(
编辑
)
Template:ModdingNavbox
(
编辑
)
Template:Navbox
(
编辑
)
Template:Navboxgroup
(
编辑
)
Template:Planet modifier
(
编辑
)
Template:Red
(
编辑
)
Template:Ruby
(
编辑
)
Template:Version
(
编辑
)
×
登录
密码
记住登录
加入群星百科
忘记密码?
其他方式登录