Wiki

effect · every_military_industrial_organization

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Executes children effects on every Military Industrial Organisation (or \"random_select_amount\" of random MIOs if specified) of the country in scope, that fulfills the \"limit\" trigger.
tooltip=key can be added to override tooltip title.
By default the effects are only displayed once, you may display them for each matching MIO with display_individual_scopes.
ex: GER = {
  every_military_industrial_organization = {
	tooltip = my_loc_key # Optional
	random_select_amount = 3 # Optional
	include_invisible = yes # Optional - default = no
	display_individual_scopes = yes # Optional - default = no
    ... MIO scope effects ...
  }
}

实战 · 配合 · 坑

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

实战用法

every_military_industrial_organization 常用于活动/决议触发时批量给某国所有 MIO 增加资金、完成特定科研特性,或在 mod 里实现"工业大动员"类事件,对全部军工组织统一施加增益。它支持 random_select_amount 参数让效果只作用于随机几个 MIO,适合做随机奖励机制。

# 事件选项:德国所有 MIO 各获得一笔资金,并对满足条件的 MIO 完成特定特性
GER = {
    every_military_industrial_organization = {
        tooltip = mio_mobilization_tt
        limit = {
            has_mio_equipment_type = mio_equipment_type_armor
        }
        add_mio_funds = 50
        complete_mio_trait = mio_trait_assembly_line_production
    }
}

配合关系

  • has_mio_equipment_type — 在 limit 块内筛选特定装备类型的 MIO,确保效果只作用于目标类型的军工组织。
  • add_mio_funds — 最常见的子效果,用于直接向筛选出的每个 MIO 注入资金。
  • complete_mio_trait — 配合 limit + has_mio_trait 条件,可批量解锁尚未完成的研究特性。
  • has_mio_flag — 在 limit 中用于过滤已被标记的 MIO,避免重复触发同一效果。

常见坑

  1. 忘记 limit 导致效果作用于所有 MIO:子效果会无条件遍历该国全部军工组织,若不加 limit 筛选,可能意外改动不相关 MIO 的状态(如给敌对阵营风格的 MIO 完成特性),建议始终显式写出 limit = { ... },哪怕条件是 always = yes,以示意图清晰。
  2. 在非 COUNTRY scope 下调用:此 effect 仅在国家 scope 下有效,若写在 STATE、CHARACTER 等 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

every_military_industrial_organization is commonly used when events or decisions fire to bulk-apply funds to all MIOs of a country, complete specific research traits, or implement "industrial mobilization" style events in a mod that apply buffs uniformly across all military-industrial organizations. It supports the random_select_amount parameter to restrict the effect to only a random subset of MIOs, making it well-suited for random reward mechanics.

# Event option: every German MIO receives a fund injection; MIOs meeting the condition also complete a specific trait
GER = {
    every_military_industrial_organization = {
        tooltip = mio_mobilization_tt
        limit = {
            has_mio_equipment_type = mio_equipment_type_armor
        }
        add_mio_funds = 50
        complete_mio_trait = mio_trait_assembly_line_production
    }
}

Synergy

  • has_mio_equipment_type — Used inside a limit block to filter MIOs by equipment type, ensuring the effect only applies to the intended category of military-industrial organization.
  • add_mio_funds — The most common child effect; directly injects funds into each MIO that passes the filter.
  • complete_mio_trait — Combined with a limit + has_mio_trait condition, this allows bulk-unlocking of research traits that have not yet been completed.
  • has_mio_flag — Used inside limit to exclude MIOs that have already been flagged, preventing the same effect from triggering more than once.

Common Pitfalls

  1. Forgetting limit causes the effect to apply to every MIO: Without a limit filter, the child effect iterates unconditionally over all military-industrial organizations in the country, which can unintentionally alter the state of unrelated MIOs — for example, completing traits on MIOs aligned with an opposing faction. It is strongly recommended to always write an explicit limit = { ... } block, even if the condition is simply always = yes, to make intent clear.
  2. Calling this effect outside a COUNTRY scope: This effect is only valid within a country scope. If placed inside a STATE, CHARACTER, or other scope it will silently fail or produce an error. Be sure the current execution context has already been switched to the intended country scope before calling it.