Wiki

trigger · num_of_civilian_factories

Definition

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

Description

check amount of civilian factories

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_civilian_factories is commonly used to determine whether a country possesses sufficient industrial capacity to trigger certain decisions, unlock specific national focus rewards, or restrict AI behavior. For example, in custom decisions, you can require the player's civilian factory count to reach a certain threshold before activation:

available = {
    num_of_civilian_factories > 20
}

It can also be used in limit blocks to restrict event options, allowing high-investment construction plans only when the country has adequate civilian factories.

Synergy

  • [building_count_trigger](/wiki/trigger/building_count_trigger) — Often paired together; the former checks total civilian factory count while the latter checks building count within specific states, creating multi-layer industrial threshold validation.
  • [add_cic](/wiki/effect/add_cic) — Serves as a reward effect upon condition fulfillment; use the trigger to verify factory scale first, then grant construction bonuses for complete logic flow.
  • [has_country_flag](/wiki/trigger/has_country_flag) — Combine with flags to prevent repeated triggering, avoiding the same country repeatedly receiving rewards from identical factory count checks.
  • [add_ideas](/wiki/effect/add_ideas) — Upon reaching factory thresholds, grant national ideas (such as industrialization concepts) to a country, forming a "condition → reward" structure with this trigger.

Common Pitfalls

  1. Confusing military and civilian factories: Beginners often mix up num_of_civilian_factories with military factory-related conditions. This trigger counts civilian factory quantities only and does not include military factories or naval dockyards. Do not substitute arbitrarily.
  2. Overlooking factory inclusion rules for occupied territory: Whether factories in occupied states count depends on the game's current control and ownership status. When testing and values don't match, verify whether occupied or borrowed factories are affecting the actual count.