Wiki

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) 等条件做保护性判断。

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

In Military Industrial Organization (MIO) related mods, add_mio_task_capacity is particularly useful when you want to reward players with additional task slots by completing certain traits or triggering events. For example, you can design an organizational trait called "Expand R&D Department" that grants the MIO one extra task capacity when unlocked.

# In an event option, add task capacity to a specific MIO
mio:my_custom_mio = {
    add_mio_task_capacity = 1
}

Synergy

  • [set_mio_task_capacity](/wiki/effect/set_mio_task_capacity): Use when you need to directly specify the final base capacity rather than apply an increment. Combining both allows you to set a baseline value first, then stack adjustments with add for clearer logic.
  • [add_mio_size](/wiki/effect/add_mio_size): Organization size (size) is often conceptually linked to the number of tasks that can be handled. Increasing organization size alongside task capacity ensures numerical balance in your design.
  • [has_mio_size](/wiki/trigger/has_mio_size): Check whether the MIO's current size meets the threshold before executing capacity adjustments, preventing premature or unreasonable capacity expansion.
  • [complete_mio_trait](/wiki/effect/complete_mio_trait): Completing traits and adjusting task capacity are often bound in the same execution block, forming a complete reward chain of "unlock trait → gain more task slots".

Common Pitfalls

  1. Forgetting to switch to INDUSTRIAL_ORG scope: This effect can only be executed within an MIO scope. Writing it directly in a country scope's immediate block will cause errors or be ignored. You must enter the corresponding organization's scope first via mio:xxx = { ... }.
  2. Assuming negative values cause errors or cap at the base value: When reducing capacity to a negative number, the game silently clamps the final capacity to 0 without throwing an error, making it difficult to debug "capacity unexpectedly zeroed out" issues during development. It's recommended to use protective conditional checks like [has_mio_size](/wiki/trigger/has_mio_size) before reduction operations.