Wiki

effect · set_mio_funds

Definition

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

Description

Set the amount of funds for the military industrial organization in scope.
Input value cannot be negative.
If the new total funds go over the Size Up limit, the MIO will gain size(s).
ex:
var:my_mio_var = {
  set_mio_funds = 100
  set_mio_funds = var:my_number_var
}

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

set_mio_funds is well-suited for resetting a military industrial organization's funds to a fixed value in scripted events or upon focus completion—for example, setting initial startup capital for a newly unlocked MIO, or zeroing funds as a penalty mechanism under specific conditions. Unlike add_mio_funds, this performs absolute assignment rather than incremental addition, making it ideal for "ensure funds are exactly this value" scenarios.

# Upon focus completion, set the specified MIO's funds to exactly 150
complete_national_focus = {
    var:my_arms_corp = {
        set_mio_funds = 150
    }
}

Synergy

  • [add_mio_funds](/wiki/effect/add_mio_funds) — Use set_mio_funds first to reset funds to a baseline, then apply add_mio_funds for dynamic adjustments; combining both enables precise fund range control.
  • [has_mio_size](/wiki/trigger/has_mio_size) — Check the MIO's current size before assignment to avoid unintended cascading upgrades triggered by excessive funds, acting as a conditional gatekeeper.
  • [add_mio_size](/wiki/effect/add_mio_size) — When controlling both funds and size within the same event, use them together to maintain consistent logic between fund and size states.
  • [set_mio_funds_gain_factor](/wiki/effect/set_mio_funds_gain_factor) — Adjust the income multiplier while setting total funds, allowing complete configuration of the MIO's economic state from both "current value" and "growth rate" dimensions.

Common Pitfalls

  1. Passing negative numbers silently fails or throws an error: The official documentation explicitly states input values cannot be negative. If a variable passed in happens to be negative, the assignment won't execute as expected. It's recommended to validate the value before assignment using condition blocks like [has_mio_size](/wiki/trigger/has_mio_size) or variable checks to ensure legality.
  2. Mistakenly using set as add to stack funds: set_mio_funds performs overwrite assignment; multiple calls retain only the last value and do not accumulate. If you intend to stack rewards, use [add_mio_funds](/wiki/effect/add_mio_funds) instead. Confusing the two can cause funds to be unexpectedly zeroed or reset.