Wiki

effect · add_mio_funds

Definition

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

Description

Add funds to the military industrial organization in scope.
Value can be negative to substract funds.
If the new total funds go over the Size Up limit, the MIO will gain size(s).
If the new total funds is negative, it will be capped at 0 without retracting size.
ex:
var:my_mio_var = {
  add_mio_funds = 200
  add_mio_funds = -100
}

实战 · 配合 · 坑

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

实战用法

add_mio_funds 常用于事件或决策中奖励/惩罚特定军工组织,例如完成某项研究任务后为其注入资金,加速升级;也可用于随机事件中模拟经营波动,扣除一定资金代表项目超支。下面示例展示在一个 on_action 事件中给特定 MIO 注入资金:

# 在 country_event 的 option 块中,通过变量引用 MIO scope
var:target_mio = {
    add_mio_funds = 150   # 奖励项目顺利推进
}

配合关系

  • [set_mio_funds](/wiki/effect/set_mio_funds):当需要将资金重置到精确数值(而非相对增减)时,两者配合可先归零再按需填充,避免数值不可控。
  • [add_mio_size](/wiki/effect/add_mio_size):若希望跳过资金积累过程、直接强制升级 MIO 规模,可与 add_mio_funds 搭配,分别处理"自然成长"和"脚本强制成长"两种路径。
  • [has_mio_size](/wiki/trigger/has_mio_size):在执行资金操作前用此触发器检查当前规模,可避免对已达上限的 MIO 无意义地灌入资金,或据此分支决定注入量。
  • [add_mio_funds_gain_factor](/wiki/effect/add_mio_funds_gain_factor):配合使用可先提升资金增益系数再触发一次性资金注入,在活动事件中制造"双重加成"效果。

常见坑

  1. 负值不会扣除规模:新手常以为传入足够大的负数能让 MIO 降级,但实际上资金下限被硬性封底至 0,规模不会因此缩小;若需降级应改用 [add_mio_size](/wiki/effect/add_mio_size) 传入负数。
  2. scope 必须是 INDUSTRIAL_ORG 而非国家:直接在国家 scope 下写 add_mio_funds 会被静默忽略或报错,必须先通过 var:my_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_funds is commonly used in events or decisions to reward or penalize specific military industrial organizations—for example, injecting capital into an MIO after completing a research milestone to accelerate upgrades, or simulating management fluctuations in random events by deducting funds to represent budget overruns. The example below demonstrates injecting funds into a specific MIO within an on_action event:

# Within an option block of a country_event, reference the MIO scope via a variable
var:target_mio = {
    add_mio_funds = 150   # Reward for successful project progression
}

Synergy

  • [set_mio_funds](/wiki/effect/set_mio_funds): When you need to reset funds to an exact value rather than relative adjustments, use both commands in sequence—zero out first, then fill to desired level—to maintain precise control over the value.
  • [add_mio_size](/wiki/effect/add_mio_size): If you want to skip the fund accumulation process and directly force an MIO to upgrade in size, combine this with add_mio_funds to handle both "organic growth" and "script-forced growth" paths separately.
  • [has_mio_size](/wiki/trigger/has_mio_size): Check current size with this trigger before executing fund operations to avoid meaninglessly injecting capital into MIOs that have already reached their size limit, or branch your decision on injection amount accordingly.
  • [add_mio_funds_gain_factor](/wiki/effect/add_mio_funds_gain_factor): Use together to first boost the fund gain coefficient, then trigger a one-time fund injection to create a "dual bonus" effect in active events.

Common Pitfalls

  1. Negative values do not reduce size: Newcomers often assume passing a sufficiently large negative number will downgrade an MIO, but funds have a hard floor at 0 and size will not shrink as a result; if you need to downgrade, use [add_mio_size](/wiki/effect/add_mio_size) with a negative value instead.
  2. Scope must be INDUSTRIAL_ORG, not a country: Calling add_mio_funds directly under a country scope will be silently ignored or throw an error; you must first enter the corresponding MIO's scope via var:my_mio_var = { } or similar before invoking this command.