Wiki

trigger · num_of_available_civilian_factories

Definition

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

Description

check amount of available civilian factories

实战 · 配合 · 坑

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

实战用法

常用于判断某国是否有足够的空闲民用工厂来触发决策、完成协议或解锁特定专注树效果,例如要求玩家先积累一定产能才能开展某项工业合作计划。在 focus 的 available 块或 decision 的 available / visible 块中最为常见。

# 决策:只有当国家拥有足够空闲民用工厂时才可执行
available = {
    num_of_available_civilian_factories > 5
}

配合关系

  • [building_count_trigger](/wiki/trigger/building_count_trigger):常与之搭配,先检查总建筑数量(民厂上限),再用本 trigger 确认实际空闲量,两者共同描述工业余力。
  • [add_cic](/wiki/effect/add_cic):在 effect 块中奖励建造产能时,往往先用本 trigger 做门槛判断,防止玩家尚无空闲工厂却触发工业加速类效果。
  • [has_completed_focus](/wiki/trigger/has_completed_focus):通常在专注解锁工业扩张后,配合本 trigger 验证玩家是否已将专注效果转化为实际可用产能,再开放后续决策链。
  • [amount_research_slots](/wiki/trigger/amount_research_slots):同为"数量型"资源 trigger,常并列出现在 available 块中,共同限制需要国家达到一定发展阶段才可进行的高端选项。

常见坑

  1. 混淆"可用"与"总量":本 trigger 统计的是空闲(未被分配到生产线)的民用工厂数,不是国家拥有的民厂总数。若工厂全部在建造队列中,即使总数很高,条件也可能不满足,导致触发逻辑与预期不符。
  2. 忽略贸易占用:出口贸易会占用民用工厂,新手往往在单机测试时条件通过,但 AI 或多人局中因贸易协定消耗了大量民厂而导致该 trigger 失败,难以排查原因。

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

Commonly used to determine whether a nation has sufficient idle civilian factories to trigger decisions, complete agreements, or unlock specific focus tree effects—for example, requiring the player to accumulate a certain production capacity before launching an industrial cooperation plan. Most frequently found in the available block of a focus or the available / visible block of a decision.

# Decision: can only be executed when the nation has enough idle civilian factories
available = {
    num_of_available_civilian_factories > 5
}

Synergy

  • [building_count_trigger](/wiki/trigger/building_count_trigger): Commonly paired together—first check the total building count (civilian factory cap), then use this trigger to confirm actual idle capacity; both jointly describe industrial slack.
  • [add_cic](/wiki/effect/add_cic): When rewarding production capacity in an effect block, this trigger typically serves as a threshold check to prevent players from triggering industrial acceleration effects when they lack idle factories.
  • [has_completed_focus](/wiki/trigger/has_completed_focus): Usually after a focus unlocks industrial expansion, this trigger is combined to verify whether the player has converted the focus effect into actual usable capacity before opening subsequent decision chains.
  • [amount_research_slots](/wiki/trigger/amount_research_slots): As a fellow "quantity-type" resource trigger, it commonly appears in parallel within the available block, jointly restricting high-tier options that require the nation to reach a certain development stage.

Common Pitfalls

  1. Confusing "available" with "total": This trigger counts idle (unassigned to production lines) civilian factories, not the total number of civilian factories the nation owns. If all factories are in the construction queue, even with high total numbers, the condition may fail, causing the trigger logic to diverge from expectations.
  2. Overlooking trade occupation: Export trade consumes civilian factories. Newcomers often pass the condition in single-player testing, but in AI or multiplayer games, trade agreements can consume a large number of civilian factories, causing this trigger to fail—and the cause is difficult to diagnose.