Wiki

trigger · has_military_industrial_organization

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Checks if the Country in scope has a  Military Industrial Organisation matching the input token.
Can use variable as input.
ex: 
GER = { 
  has_military_industrial_organization = infantry_mio_token
  has_military_industrial_organization = var:my_mio_var
}

实战 · 配合 · 坑

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

实战用法

has_military_industrial_organization 常用于在国策、决策或事件中检测某国是否已解锁特定军工联合体,例如只有拥有步兵军工联合体才能触发特定科研加成事件,或在 available 块中限制决策的可用条件。配合动态 MIO 分配系统时,也可通过 var: 语法检测变量引用的军工联合体是否存在于该国。

# 只有当德国拥有特定装甲 MIO 时,决策才可用
GER = {
    available = {
        has_military_industrial_organization = panzer_mio_token
    }
}

# 使用变量动态检测
some_country = {
    trigger = {
        has_military_industrial_organization = var:selected_mio_var
    }
}

配合关系

  • [any_military_industrial_organization](/wiki/trigger/any_military_industrial_organization):当需要检测该国"是否有任何满足某条件的 MIO"时搭配使用,而 has_military_industrial_organization 检测的是具体 token,两者形成精确与泛化的互补。
  • [every_military_industrial_organization](/wiki/effect/every_military_industrial_organization):确认某 MIO 存在后,用此 effect 对其执行批量操作(如添加加成),形成"先验证再操作"的安全模式。
  • [has_completed_focus](/wiki/trigger/has_completed_focus):MIO 通常通过国策解锁,二者常一起出现在 trigger 块中,确保国策完成且 MIO 已激活两个条件同时满足。
  • [has_dynamic_modifier](/wiki/trigger/has_dynamic_modifier):部分 mod 将 MIO 激活与动态修正器绑定,两者并列使用以验证某国的完整工业状态。

常见坑

  1. token 拼写与注册名不一致has_military_industrial_organization 使用的是 MIO 定义文件中的 token 字段值,而非 MIO 的 name 本地化键,新手常把本地化名称直接填入导致条件永远为假且不报错。
  2. 忽略 scope 要求:此 trigger 只能在 COUNTRY scope 下使用,若在 STATE 或 CHARACTER scope 内直接调用(例如写在 any_owned_state 的子块里而忘记切回国家 scope),会静默失败或报 scope 错误,需用 owner = { has_military_industrial_organization = ... } 显式切换。

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

has_military_industrial_organization is commonly used in national focuses, decisions, or events to check whether a country has unlocked a specific military industrial organization. For example, it can restrict a decision's availability to countries with an infantry MIO, or trigger special research bonuses only when a particular MIO is present. When combined with dynamic MIO allocation systems, you can also use the var: syntax to check whether a MIO referenced by a variable exists in that country.

# Decision is only available if Germany has a specific armor MIO
GER = {
    available = {
        has_military_industrial_organization = panzer_mio_token
    }
}

# Dynamic detection using variables
some_country = {
    trigger = {
        has_military_industrial_organization = var:selected_mio_var
    }
}

Synergy

  • [any_military_industrial_organization](/wiki/trigger/any_military_industrial_organization): Use this when you need to check whether a country "has any MIO that meets certain conditions." While has_military_industrial_organization checks for a specific token, these two triggers form complementary pairs for precise versus generalized matching.
  • [every_military_industrial_organization](/wiki/effect/every_military_industrial_organization): After confirming that an MIO exists, use this effect to perform batch operations on it (such as adding modifiers), establishing a safe "verify-then-operate" pattern.
  • [has_completed_focus](/wiki/trigger/has_completed_focus): MIOs are typically unlocked through national focuses, so these two commonly appear together in trigger blocks to ensure both the focus is completed and the MIO is activated.
  • [has_dynamic_modifier](/wiki/trigger/has_dynamic_modifier): Some mods bind MIO activation to dynamic modifiers; use both in parallel to verify a country's complete industrial state.

Common Pitfalls

  1. Token spelling mismatched with registration name: has_military_industrial_organization uses the token field value from the MIO definition file, not the MIO's localization key name. Beginners often directly input the localized name, causing the condition to silently fail without error messages.
  2. Ignoring scope requirements: This trigger only works in COUNTRY scope. If called directly within STATE or CHARACTER scope (for example, inside an any_owned_state sub-block without switching back to country scope), it will silently fail or throw a scope error. Use owner = { has_military_industrial_organization = ... } to explicitly switch scopes.