Creates a new equipment variant.
Example:
create_equipment_variant = {
name = "Yorktown Class" # Optional.
name_group = USA_CV_HISTORICAL # Optional. If not set, parent's name group will be inherited.
type = ship_hull_carrier_1 # Must be a type and not an archetype.
allow_without_tech = yes # Optional. Default no. If yes, create the variant even if the type hasn't been unlocked yet. Otherwise created the variant once the type research completes.
parent_version = 3 # Default 0. If not found the default variant will be used (or created).
obsolete = yes # Optional. Default no.
mark_older_equipment_obsolete = yes # Optional. Default no. Marks all older (non-chassis) equipment variants as obsolete as long as the following matches: Archetype, niche, mission set (for planes).
role_icon_index = 3 # Optional. Default 'auto', leverage AI design logic.
upgrades = { # Optional. The level on each upgrade is inherited from the parent.
ship_deckspace_upgrade = 1
carrier_armor_upgrade = 2
}
modules = { # Optional. The module installed in each slot is inherit from the parent.
fixed_ship_engine_slot = carrier_ship_engine_2
fixed_ship_secondaries_slot = empty # Clears the slot if the parent has any module installed.
}
model = "GER_light_armor_2_entity" # Optional.
icon = "gfx/interface/technologies/ger_basic_light_tank.dds" # Optional. GFX names are also supported e.g. "GFX_GER_basic_light_tank_medium".
design_team = mio:my_mio_token # Optional. accepts mio:token, variable or keyword
}
实战 · 配合 · 坑
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
实战用法
create_equipment_variant 常用于国家焦点或事件触发时,为玩家/AI 国家自动生成带有预设模块和升级的装备变体,无需玩家手动设计——例如历史 mod 中让美国在特定年份自动获得"约克城级"航母设计方案。也可用于开局初始化脚本,批量为各国生成符合历史的坦克、飞机变体。
type 必须填具体型号而非 archetype:新手常误写 type = ship_hull_carrier(archetype),导致脚本报错或静默失败;必须写带数字后缀的具体型号如 ship_hull_carrier_1,可在 common/units/equipment/ 下查找真实 key。