Wiki

effect · add_mio_size

Definition

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

Description

Add size levels to the military industrial organization in scope.
Input value cannot be negative.
The MIO will keep the same amount of funds it had before the effect.
ex:
var:my_mio_var = {
  add_mio_size = 2
  add_mio_size = var:my_number_var
}

实战 · 配合 · 坑

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

实战用法

add_mio_size 常用于剧本事件或国策完成时奖励特定军事工业组织快速成长,例如给某国的航空 MIO 在战争爆发后直接"跳级",模拟战时紧急扩编。它同样适合 DLC 风格的科技树 mod,在解锁特定研究节点后自动提升对应 MIO 规模。

# 在国策完成后提升特定 MIO 的规模
complete_national_focus = {
    ...
    effect = {
        var:my_aircraft_mio = {
            add_mio_size = 2
        }
    }
}

配合关系

  • [add_mio_funds](/wiki/effect/add_mio_funds):升级 MIO 规模后往往需要同步补充资金,抵消因规模扩大带来的后续维护压力,两者常在同一执行块中成对使用。
  • [complete_mio_trait](/wiki/effect/complete_mio_trait):规模提升后解锁对应特质,体现"规模越大、能力越强"的成长逻辑,让 MIO 立即获得匹配新规模的专属能力。
  • [has_mio_size](/wiki/trigger/has_mio_size):在事件或国策的 trigger 块中先检查当前 MIO 规模是否达到某门槛,再决定是否执行 add_mio_size,防止无限叠加。
  • [set_mio_size_up_requirement_factor](/wiki/effect/set_mio_size_up_requirement_factor):若担心后续升级过于容易,可在提升规模的同时调高下一级的需求系数,维持游戏平衡。

常见坑

  1. 负值崩溃:官方明确要求输入值不能为负数。若你试图用 add_mio_size = -1 来"降级"MIO,游戏不会报错提示而是直接产生非预期结果或崩溃,降低规模请改用 set_mio_funds 等间接手段或重新设计逻辑。
  2. 作用域错误add_mio_size 只在 INDUSTRIAL_ORG scope 内有效,直接写在 countrystate scope 里会静默失效,务必先通过 var:xxx_mio_var = { } 或专用 MIO 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

add_mio_size is commonly used in scripted events or national focus completions to reward specific military industrial organizations with rapid growth. For example, you can grant a nation's aviation MIO an immediate "tier jump" after war breaks out, simulating emergency wartime expansion. It also works well in DLC-style technology tree mods, automatically scaling up corresponding MIO sizes after unlocking specific research nodes.

# Increase the size of a specific MIO upon focus completion
complete_national_focus = {
    ...
    effect = {
        var:my_aircraft_mio = {
            add_mio_size = 2
        }
    }
}

Synergy

  • [add_mio_funds](/wiki/effect/add_mio_funds): After scaling up an MIO, you typically need to replenish its funds simultaneously to offset the maintenance burden from the increased size. These two effects are commonly paired in the same execution block.
  • [complete_mio_trait](/wiki/effect/complete_mio_trait): Unlocking corresponding traits after size increases embodies the "larger scale, greater capability" growth logic, allowing the MIO to immediately gain exclusive abilities matching its new size.
  • [has_mio_size](/wiki/trigger/has_mio_size): Check whether the current MIO size meets a certain threshold in the trigger block of events or national focuses before deciding whether to execute add_mio_size, preventing unlimited stacking.
  • [set_mio_size_up_requirement_factor](/wiki/effect/set_mio_size_up_requirement_factor): If you worry that subsequent upgrades become too easy, you can increase the requirement factor for the next tier while raising the size, maintaining game balance.

Common Pitfalls

  1. Negative Value Crash: The official specification explicitly prohibits negative input values. If you attempt to "downgrade" an MIO using add_mio_size = -1, the game will not provide an error message but will instead produce unexpected results or crash. To reduce size, use indirect means such as set_mio_funds or redesign your logic entirely.
  2. Scope Error: add_mio_size only works within the INDUSTRIAL_ORG scope. Using it directly in country or state scopes will silently fail. You must first switch to the proper MIO scope via var:xxx_mio_var = { } or a dedicated MIO scope switcher before invoking the effect.