Wiki

trigger · any_military_industrial_organization

Definition

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

Description

Checks if at least one Military Industrial Organisation of the Country in scope matches 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 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。

实战用法

常用于检测某国是否拥有满足特定条件的军事工业组织,例如判断其是否已有完成某科研特性的 MIO、或者已有某类装备类型的 MIO,从而决定是否触发焦点/决策。

# 在 focus 的 available 中,检查德国是否有至少一个已完成某 trait 的 MIO
GER = {
    available = {
        any_military_industrial_organization = {
            is_mio_trait_completed = mio_advanced_manufacturing
        }
    }
}

另一个例子,配合 include_invisible 检测隐藏 MIO:

any_military_industrial_organization = {
    tooltip = check_mio_size_tt
    include_invisible = yes
    has_mio_size = {
        size > 2
    }
}

配合关系

  • is_mio_trait_completed:最常见的内层判断,用于确认 MIO 是否已解锁某项特性,与 any_military_industrial_organization 组合检测研究进度。
  • has_mio_equipment_type:检测 MIO 是否覆盖特定装备类型,常用于限定焦点或决策仅在拥有相应生产线的 MIO 存在时可用。
  • has_mio_flag:检测 MIO 上是否设置了自定义标记,配合 set_mio_flag 实现跨事件的 MIO 状态追踪。
  • has_mio_size:验证 MIO 规模是否达到门槛,与 any_military_industrial_organization 搭配用于解锁高级国策的前置条件。

常见坑

  1. scope 混用any_military_industrial_organization 只能用在 COUNTRY scope 下,若写在 STATE 或 UNIT LEADER scope 内会静默失败或报错,新手容易在事件的 trigger 块中忘记先切换到正确国家 scope。
  2. 内层写了 COUNTRY scope trigger 而非 MIO scope trigger:进入 any_military_industrial_organization = { ... } 后,scope 已切换为 MIO,此时直接写 has_war = yes 等国家级 trigger 是无效的,必须使用 MIO scope 下的 trigger(如 has_mio_traithas_mio_size 等白名单命令),否则条件永远不会按预期求值。

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 check whether a country has a military industrial organization that meets specific conditions — for example, whether it already has an MIO that has completed a certain research trait, or an MIO covering a particular equipment type — in order to determine whether a focus or decision should trigger.

# In a focus's available block, check whether Germany has at least one MIO with a completed trait
GER = {
    available = {
        any_military_industrial_organization = {
            is_mio_trait_completed = mio_advanced_manufacturing
        }
    }
}

Another example, using include_invisible to detect hidden MIOs:

any_military_industrial_organization = {
    tooltip = check_mio_size_tt
    include_invisible = yes
    has_mio_size = {
        size > 2
    }
}

Synergy

  • is_mio_trait_completed: The most common inner condition. Used to confirm whether an MIO has unlocked a specific trait; combine with any_military_industrial_organization to check research progress.
  • has_mio_equipment_type: Checks whether an MIO covers a specific equipment type. Often used to restrict a focus or decision so it is only available when an MIO with the relevant production line exists.
  • has_mio_flag: Checks whether a custom flag has been set on an MIO. Pair with set_mio_flag to track MIO state across events.
  • has_mio_size: Validates whether an MIO has reached a size threshold. Combine with any_military_industrial_organization as a prerequisite condition for unlocking advanced national focuses.

Common Pitfalls

  1. Scope mismatch: any_military_industrial_organization can only be used inside a COUNTRY scope. Writing it inside a STATE or UNIT LEADER scope will cause it to fail silently or throw an error. Beginners often forget to switch to the correct country scope first when working inside an event's trigger block.
  2. Using COUNTRY scope triggers inside the MIO scope: Once you are inside any_military_industrial_organization = { ... }, the scope has switched to MIO. Writing country-level triggers such as has_war = yes at this point has no effect. You must use triggers that are valid in MIO scope (such as has_mio_trait, has_mio_size, and other whitelisted commands); otherwise the condition will never evaluate as expected.