Wiki

effect · set_mio_size_up_requirement_factor

Definition

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

Description

Set to the factor applied to funds required to size up in the military industrial organization in scope.
This changes the base value. Modifiers will still apply over it.
Input value cannot be negative.
ex:
mio:my_mio = {
  set_mio_size_up_requirement_factor = 0.9
  set_mio_size_up_requirement_factor = var:my_number_var
}

实战 · 配合 · 坑

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

实战用法

在军事工业组织(MIO)规模升级系统的 mod 中,此 effect 常用于通过事件或国策为特定 MIO 提供"折扣"——降低其规模升级所需的资金门槛,从而激励玩家投入特定工业方向。例如,当玩家完成某项科研后,奖励该 MIO 更低的规模扩张成本:

# 在一个国策完成 on_completion 效果块中
mio:my_armor_manufacturer = {
    set_mio_size_up_requirement_factor = 0.75
}

配合关系

  • [add_mio_size_up_requirement_factor](/wiki/effect/add_mio_size_up_requirement_factor):若需要在基础值之上做相对增减(而非直接覆写),应优先考虑 add 版本;两者配合可实现"先设定基准再叠加修正"的精细控制。
  • [add_mio_funds](/wiki/effect/add_mio_funds):升级规模需要资金,降低系数的同时补充当前资金,可确保效果立竿见影。
  • [has_mio_size](/wiki/trigger/has_mio_size):在执行前用此触发器判断 MIO 当前规模,避免对尚未达到升级条件的组织浪费折扣。
  • [set_mio_funds_gain_factor](/wiki/effect/set_mio_funds_gain_factor):与资金获取速率一起调整,构成完整的"成本-收入"平衡设计,常见于长期 buff 型事件链。

常见坑

  1. 传入负值会导致脚本错误:官方明确指出输入值不能为负数,新手容易误用负值试图"反向惩罚"某个 MIO,实际上这会触发脚本异常或被引擎静默拒绝,应改用大于 1 的值(如 1.5)来表达成本增加。
  2. 误以为 modifier 也会被覆盖:此命令只改变基础值(base value),国策、特征等来源的 modifier 仍会在新基础值之上继续叠加,直接用 set_ 替代所有 add_mio_size_up_requirement_factor 调用会导致 modifier 效果被忽视的误判。

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 mods featuring the Military Industrial Organization (MIO) size upgrade system, this effect is commonly used to provide "discounts" for specific MIOs through events or national focuses—lowering the financial threshold required for size upgrades and incentivizing players to invest in particular industrial directions. For example, when a player completes certain research, the MIO receives reduced expansion costs as a reward:

# In a national focus on_completion effect block
mio:my_armor_manufacturer = {
    set_mio_size_up_requirement_factor = 0.75
}

Synergy

  • [add_mio_size_up_requirement_factor](/wiki/effect/add_mio_size_up_requirement_factor): When relative adjustments are needed on top of a base value (rather than direct overwrite), the add version should be prioritized. Using both together enables fine-tuned control through "set baseline then stack modifications."
  • [add_mio_funds](/wiki/effect/add_mio_funds): Since size upgrades require funds, supplementing current funds while lowering the cost factor ensures the effect takes immediate impact.
  • [has_mio_size](/wiki/trigger/has_mio_size): Use this trigger before execution to check the MIO's current size, avoiding wasted discounts on organizations that haven't yet met upgrade conditions.
  • [set_mio_funds_gain_factor](/wiki/effect/set_mio_funds_gain_factor): Adjust alongside fund acquisition rates to construct complete "cost-income" balance design, commonly seen in long-term buff event chains.

Common Pitfalls

  1. Passing negative values causes script errors: The official documentation explicitly states that input values cannot be negative. Newcomers often mistakenly attempt to use negative values to "reverse-penalize" an MIO, but this actually triggers script exceptions or silent engine rejection. Instead, use values greater than 1 (such as 1.5) to express cost increases.
  2. Mistakenly assuming modifiers are also overwritten: This command only changes the base value; modifiers from national focuses, traits, and other sources continue to stack on top of the new base value. Directly replacing all add_mio_size_up_requirement_factor calls with set_ leads to the false belief that modifier effects are being ignored.