Wiki

trigger · num_of_controlled_factories

Definition

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

Description

check the number of factories in controlled states excluding any gained or lost through trade, relations, modifiers etc.

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_controlled_factories is commonly used to determine whether a nation's industrial strength meets a threshold, thereby unlocking specific decisions, focus tree branches, or AI strategies—for example, stipulating that only major powers with sufficient factory counts can activate a certain military expansion route. Note that it counts only actually controlled factories, excluding fluctuations from trade, relations, or modifiers, making it a more reliable indicator of "hard power" compared to other factory-related checks.

# Only countries controlling enough factories can activate this decision
available = {
    num_of_controlled_factories > 50
}

Synergy

  • [controls_state](/wiki/trigger/controls_state) — Verifies whether a nation simultaneously controls key states; combined with factory count checks, it can precisely define "industrial core control" scenarios.
  • [has_army_size](/wiki/trigger/has_army_size) — Factory counts are often correlated with army size; using both together measures a nation's comprehensive war potential.
  • [add_political_power](/wiki/effect/add_political_power) — Serves as a reward effect upon meeting conditions, commonly seen in "industrial milestone" type tasks: grant political power after meeting factory thresholds.
  • [building_count_trigger](/wiki/trigger/building_count_trigger) — Used to further refine checks on specific building types (military factories/dockyards); complements this trigger when used together.

Common Pitfalls

  1. Mistaking it for including trade income: Newcomers often confuse this with "total factory count"—factories gained through trade agreements, puppet relations, or modifiers are not counted in this trigger; if you need "total production capacity" judgments, consider using alternative approaches.
  2. Wrong scope usage: This trigger only works in COUNTRY scope; calling it directly in STATE scope (such as limit nested inside every_owned_state) causes script errors or silent failures; use OWNER to switch back to country scope before the check.