命令百科

effect · add_mio_task_capacity

Definition

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

Description

Add to the maximum task capacity in the military industrial organization in scope.
This changes the base value. Modifiers will still apply over it.
Value can be negative to reduce capacity, but final capacity cannot be negative (capped at 0, no error raised)
If the capacity is reduced and the MIO becomes over-assigned, the current tasks will be allowed.
It's only later that the player will feel the new restrictions.
ex:
mio:my_mio = {
  add_mio_task_capacity = 1
  add_mio_task_capacity = -1
  add_mio_task_capacity = var:my_number_var
}

实战 · 配合 · 坑

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

实战用法

在 MIO(军事工业组织)相关 mod 中,当你希望通过完成某个特性或触发事件来奖励玩家解锁更多任务槽时,add_mio_task_capacity 非常实用。例如设计一个"扩编研发部门"的组织特性,解锁后令该 MIO 额外获得一个任务容量。

# 在某个事件的 option 中,针对指定 MIO 增加任务容量
mio:my_custom_mio = {
    add_mio_task_capacity = 1
}

配合关系

  • [set_mio_task_capacity](/wiki/effect/set_mio_task_capacity):当需要直接指定最终基础容量而非增量调整时使用;两者组合可先 set 一个基准值,再用 add 做动态叠加,逻辑更清晰。
  • [add_mio_size](/wiki/effect/add_mio_size):组织规模(size)往往与可承接的任务数量在设计上相关联,扩大组织规模时同步增加任务容量,可保持数值平衡。
  • [has_mio_size](/wiki/trigger/has_mio_size):在执行增减容量前先判断 MIO 当前规模是否达到门槛,避免过早或不合理地扩充容量。
  • [complete_mio_trait](/wiki/effect/complete_mio_trait):完成特性与调整任务容量常绑定在同一执行块中,形成"解锁特性 → 获得更多任务槽"的完整奖励链。

常见坑

  1. 忘记切换到 INDUSTRIAL_ORG scope:此 effect 只能在 MIO scope 内执行,直接写在国家 scope 的 immediate 块中会报错或被忽略;必须通过 mio:xxx = { ... } 先进入对应组织的 scope。
  2. 误以为负值会报错或截断到基础值以下:将容量减为负数时游戏会静默地将最终容量钳制到 0 而不会抛出错误,导致调试时难以发现"容量被意外清零"的问题;减量操作前建议先用 [has_mio_size](/wiki/trigger/has_mio_size) 等条件做保护性判断。