Wiki

trigger · all_military_industrial_organization

Definition

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

Description

Checks if all Military Industrial Organisations of the Country in scope match the triggers.
tooltip=key can be defined to override title.
ex: GER = {
  any_military_industrial_organization = {
	tooltip = my_loc_key # Optional
	include_invisible = yes # Optional - default = no
    ... MIO scope triggers ...
  }
}

实战 · 配合 · 坑

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

实战用法

all_military_industrial_organization 常用于需要对一个国家所有军工组织同时满足某条件时才触发的场景,例如检查该国所有 MIO 是否都已解锁特定特性、达到某个规模,或都处于可见/可用状态,从而决定是否开放某个决策或国策分支。

# 仅当德国所有军工组织都已完成"大规模生产"特性时,才允许触发某个决策
GER = {
    all_military_industrial_organization = {
        has_mio_trait = mass_production_focus
    }
}

配合关系

  • any_of_scopes — 与 all_military_industrial_organization 互补,前者要求"至少一个"满足,后者要求"全部"满足,两者常并列用于同一 trigger 块中构建复合条件。
  • has_mio_trait — 在 all_military_industrial_organization 的子块内使用,检查每个 MIO 是否拥有指定特性,是最典型的内部判断条件。
  • has_mio_size — 同样在子块内使用,用于检查所有 MIO 是否都达到了某一规模等级,常配合国策解锁条件。
  • is_mio_available — 在子块内检查所有 MIO 是否均处于可用状态,常用于限制某些全局 AI 或玩家行为的前提条件。

常见坑

  1. 忘记 include_invisible 导致隐藏 MIO 被排除在外:默认情况下 include_invisible = no,不可见的 MIO 不会参与判断,若你的 mod 中存在通过条件控制可见性的 MIO,"全部满足"的结论可能是基于不完整的集合得出的,需显式写 include_invisible = yes 才能涵盖所有组织。

  2. 将其误用于非 COUNTRY scopeall_military_industrial_organization 只能在国家 scope 下使用,若在 state scope 或 unit leader scope 中调用会导致脚本报错或静默失败,务必确认外层 scope 是国家。

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

all_military_industrial_organization is commonly used in scenarios where a condition must be met by all military industrial organizations of a country simultaneously — for example, checking whether every MIO has unlocked a specific trait, reached a certain size, or is in a visible/available state, in order to gate a decision or focus branch.

# Only allow a decision to fire when all of Germany's MIOs have completed the "mass production" trait
GER = {
    all_military_industrial_organization = {
        has_mio_trait = mass_production_focus
    }
}

Synergy

  • any_of_scopes — Complements all_military_industrial_organization; the former requires "at least one" match while the latter requires "all" to match. The two are often used side by side within the same trigger block to build compound conditions.
  • has_mio_trait — Used inside the sub-block of all_military_industrial_organization to check whether each MIO possesses a specified trait; this is the most typical inner condition.
  • has_mio_size — Also used inside the sub-block to verify that every MIO has reached a certain size tier; frequently paired with focus unlock conditions.
  • is_mio_available — Checks inside the sub-block whether all MIOs are in an available state; commonly used as a prerequisite to restrict certain global AI or player actions.

Common Pitfalls

  1. Forgetting include_invisible, causing hidden MIOs to be excluded: By default include_invisible = no, meaning invisible MIOs are not evaluated. If your mod contains MIOs whose visibility is controlled by conditions, the "all satisfied" conclusion may be drawn from an incomplete set. You must explicitly write include_invisible = yes to cover every organization.

  2. Using it outside a COUNTRY scope: all_military_industrial_organization can only be used under a country scope. Calling it inside a state scope or unit leader scope will cause a script error or silent failure. Always confirm that the enclosing scope is a country.