Hands-On Usage
set_mio_funds_gain_factor directly overwrites a military industrial organization's funds gain factor, making it ideal for setting a new baseline efficiency value for an MIO after events, decisions, or national focus completion—for example, granting the player a premium manufacturer with accelerated fund accumulation, or penalizing an MIO by reducing its factor. Note that this command sets the base value; subsequent bonuses from modifiers still stack on top of it.
# After completing a national focus, set the funds gain factor for a specific MIO
complete_national_focus = {
mio:my_tank_manufacturer = {
set_mio_funds_gain_factor = 1.2
}
}
Synergy
[add_mio_funds_gain_factor](/wiki/effect/add_mio_funds_gain_factor): set_ forcibly overwrites the base value, while add_ stacks increments on the existing value. Use them in tandem—set_ to establish a baseline, then add_ for fine adjustments.
[set_mio_funds](/wiki/effect/set_mio_funds): Directly sets current fund reserves. Use alongside this command during MIO initialization to simultaneously define both "starting capital" and "growth factor," preventing the awkward scenario of high factor but zero starting funds.
[has_mio_size](/wiki/trigger/has_mio_size): Before adjusting the factor, use this trigger to check the MIO's current size, enabling conditional logic such as "larger MIOs receive higher fund gain factors."
[has_mio_flag](/wiki/trigger/has_mio_flag): Pair with [set_mio_flag](/wiki/effect/set_mio_flag) for idempotent protection, ensuring the same factor setting doesn't get repeatedly overwritten if an event fires multiple times (defensive flagging is a good habit even for set semantics).
Common Pitfalls
- Passing negative values causes script errors: The official documentation explicitly states input values cannot be negative. Beginners sometimes attempt to use negative factors to represent "penalties," which directly breaks the script. For penalty effects, set the value to a positive number less than 1 (such as
0.5) rather than a negative number.
- Confusing with
add_mio_funds_gain_factor leads to unexpected values: set_ completely replaces the base value rather than stacking on it. If you accumulate multiple bonuses using add_ in the same event and then call set_, all previous add_ effects are erased. Always choose the correct command based on your design intent.