Wiki

effect · add_equipment_production

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Creates a new production line for the input equipment.
ex:
GER = {
	add_equipment_production = {
			equipment = {
					type = ship_hull_cruiser_submarine
					creator = "ITA"
					version_name = "Cagni Class"
			}
			name = "Ammiraglio Millo"
			requested_factories = 1 #Optional
			progress = 0.35 # Optional
			efficiency = 0.1 # Optional
			amount = 2 # Optional, accepts value or variable
			industrial_manufacturer = mio:generic_mio_organization_ship_submarine # Optional, accepts mio:token, variable or keyword
	}
}
}

实战 · 配合 · 坑

实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。

实战用法

add_equipment_production 常用于历史事件触发时为玩家或 AI 国家"凭空"补充一条生产线,例如剧本开局时为某国初始化特定舰艇或装甲车辆的生产,或在专注树完成后奖励性地开启一条新装备线,无需玩家手动设置工厂。

# 玩家选择某国事件选项后,立即为德国开启一条潜艇生产线
GER = {
    add_equipment_production = {
        equipment = {
            type = ship_hull_cruiser_submarine
            creator = "GER"
        }
        requested_factories = 3
        progress = 0.5
        efficiency = 0.5
        amount = 5
    }
}

配合关系

  • [create_equipment_variant](/wiki/effect/create_equipment_variant):先用此命令定义一个自定义装备变种,再通过 add_equipment_productionversion_name 引用该变种名称开启生产,两者配合才能让生产线指向特定设计方案。
  • [add_equipment_to_stockpile](/wiki/effect/add_equipment_to_stockpile):当需要"立即有货 + 持续生产"双重效果时,前者用于一次性填充库存,后者负责建立长期产能,常同时出现在开局初始化脚本中。
  • [has_completed_focus](/wiki/trigger/has_completed_focus):作为前置条件检查,确保只有在完成特定国策后才触发生产线创建,防止事件在错误时间点执行。
  • [add_ideas](/wiki/effect/add_ideas):搭配赋予工业加成 idea,使刚建立的生产线能立刻受益于效率或工厂数量的 buff,常见于国策奖励链式写法中。

常见坑

  1. creator 字段填写错误creator 必须是双引号括起来的国家 TAG 字符串(如 "GER"),若省略或写成变量引用,游戏无法正确识别装备的设计国归属,导致生产线静默失败或变种匹配不上,尤其是引用带 version_name 的舰船变种时必须保证 creator 与变种的创建者一致。
  2. 在非 COUNTRY scope 下调用:此 effect 仅在国家 scope 内有效,若误写在 STATE 或 UNIT_LEADER scope 的执行块中,游戏不会报错但效果不会生效,调试时极难察觉,务必确认外层 scope 是正确的国家标签或 THIS/ROOT 指向国家。

Hands-On Notes

Hands-on notes are AI-generated and checked against the vanilla command vocabulary — treat them as a starting point, not authoritative reference. The definition above is the game's own documentation.

Hands-On Usage

add_equipment_production is commonly used to spawn production lines out of thin air for player or AI nations when triggered by historical events. Typical use cases include initializing specific ship or armor production for a nation at scenario start, or rewarding the completion of a focus tree by unlocking a new equipment line without requiring manual factory setup.

# After the player selects an event option for a nation, immediately open a submarine production line for Germany
GER = {
    add_equipment_production = {
        equipment = {
            type = ship_hull_cruiser_submarine
            creator = "GER"
        }
        requested_factories = 3
        progress = 0.5
        efficiency = 0.5
        amount = 5
    }
}

Synergy

  • [create_equipment_variant](/wiki/effect/create_equipment_variant): First use this effect to define a custom equipment variant, then reference the variant name via version_name in add_equipment_production to start production. Both must be used together to make the production line point to a specific design.
  • [add_equipment_to_stockpile](/wiki/effect/add_equipment_to_stockpile): When you need both "instant supply + continuous production," use the former for one-time stockpile filling and the latter for establishing long-term capacity. They commonly appear together in scenario initialization scripts.
  • [has_completed_focus](/wiki/trigger/has_completed_focus): Acts as a prerequisite check to ensure production lines are only created after completing a specific focus, preventing events from firing at the wrong time.
  • [add_ideas](/wiki/effect/add_ideas): Pair with ideas that grant industrial bonuses so newly established production lines immediately benefit from efficiency or factory count buffs. Common in focus tree reward chains.

Common Pitfalls

  1. Incorrect creator field: creator must be a country TAG string enclosed in double quotes (e.g., "GER"). Omitting it or writing it as a variable reference prevents the game from correctly identifying equipment ownership, causing the production line to silently fail or variant matching to break. This is especially critical when referencing ship variants with version_name—the creator must match the variant's original creator.
  2. Calling outside COUNTRY scope: This effect only works within country scope. If mistakenly placed in a STATE or UNIT_LEADER scope block, the game will not error but the effect will not apply. This is extremely difficult to debug, so always verify that the outer scope is a valid country tag or that THIS/ROOT points to a country.