Wiki

trigger · num_of_factories

Definition

  • Supported scope:COUNTRY
  • Supported target:THIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITAL

Description

Check amount of available factories (excluding temporary sources like trade and lend-lease)
Example:
GER = { num_of_factories < 50 }

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

num_of_factories is commonly used in country decisions or technology acceleration unlock conditions to assess whether a nation's industrial capacity meets the threshold, such as restricting certain military industrial expansion plans to only those countries with a minimum factory count. Note that it only counts "available" factories (military factories + dockyards) and excludes temporary production capacity from trade agreements or lend-lease imports, thus providing a more accurate reflection of a country's inherent industrial strength.

# Only allow decision trigger when country's factory count reaches a certain scale
available = {
    num_of_factories > 30
}

Synergy

  • [has_completed_focus](/wiki/trigger/has_completed_focus): First check whether a specific industrial expansion focus has been completed, then use num_of_factories to confirm the factory count has actually grown; combining both creates a dual threshold of "focus completed + production capacity in place."
  • [building_count_trigger](/wiki/trigger/building_count_trigger): num_of_factories reflects total available factories globally, while building_count_trigger can precisely query the quantity of specific buildings in a state; pairing both allows simultaneous constraint of global production capacity and local construction progress.
  • [add_research_slot](/wiki/effect/add_research_slot): Commonly added as a reward after factory count conditions are met, embodying the design logic of "industrial powers receive research bonuses."
  • [add_tech_bonus](/wiki/effect/add_tech_bonus): Paired with factory count triggers to provide equipment or production technology research acceleration to nations reaching industrial scale thresholds, reinforcing positive feedback in industrial-focused strategies.

Common Pitfalls

  1. Mistakenly assuming it includes trade/lend-lease factories: Newcomers often assume this value equals the "current total production capacity" shown in the production interface; in reality, factories borrowed through trade agreements are not counted, leading to overly strict condition settings or logic misaligned with expectations. Verification without trade agreements is necessary during debugging.
  2. Using outside COUNTRY scope: This trigger only applies to country scope; if placed in state or unit leader condition blocks, it will silently fail or throw errors. Ensure the outer scope is a country, or explicitly convert scope using OWNER = { num_of_factories > X }.