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
- 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.
- 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.