Wiki

effect · set_mio_design_team_change_cost

Definition

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

Description

Set the XP cost to change MIO in equipment designer for 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_design_team_change_cost = 3
  set_mio_design_team_change_cost = var:my_number_var
}

实战 · 配合 · 坑

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

实战用法

当你的 mod 希望通过某个事件或国策奖励/惩罚玩家更换装备设计团队的代价时,可在 MIO 的 scope 内调用此 effect 直接覆盖基础费用值。例如,某科技突破事件触发后将更换设计团队的 XP 消耗重置为一个更低的固定值:

mio:my_advanced_mio = {
    set_mio_design_team_change_cost = 2
}

也可以结合变量动态赋值,实现随游戏进程变化的弹性费用:

mio:my_advanced_mio = {
    set_mio_design_team_change_cost = var:design_team_cost_var
}

配合关系

  • [add_mio_design_team_change_cost](/wiki/effect/add_mio_design_team_change_cost):此命令在现有基础值上做增减,而本命令是直接覆盖基础值;二者配合可先用 set_ 确立基准,再用 add_ 做后续微调。
  • [set_mio_design_team_assign_cost](/wiki/effect/set_mio_design_team_assign_cost):同为 MIO 费用管理类命令,通常在同一事件或效果块中一并调整分配与更换两项费用,保持游戏内体验的一致性。
  • [has_mio_size](/wiki/trigger/has_mio_size):常作为前置条件判断 MIO 规模,决定是否触发费用覆盖,例如只有规模达到阈值的 MIO 才享受更低的更换费用。
  • [is_mio_available](/wiki/trigger/is_mio_available):执行费用修改前检查 MIO 当前是否可用,避免对非激活状态的 MIO 执行无效操作。

常见坑

  1. 传入负值会报错:官方明确规定输入值不能为负数,新手容易尝试用负值来"免费"更换设计团队,这会导致脚本错误或被引擎拒绝执行;若想降低费用应将其设置为 0 而非负数。
  2. 混淆 set 与 add 的语义set_mio_design_team_change_cost 会直接覆盖基础值,后续修饰符(modifier)仍会叠加在新基础值之上。若误用为"在当前值基础上减少",应改用 add_mio_design_team_change_cost 并传入负数(前提是结果不为负)。

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

When your mod needs to reward or penalize players for changing equipment design teams through an event or national focus, you can invoke this effect within the MIO scope to directly override the base cost value. For example, after a technology breakthrough event triggers, reset the XP cost for changing design teams to a lower fixed value:

mio:my_advanced_mio = {
    set_mio_design_team_change_cost = 2
}

You can also combine it with variable assignment to implement elastic costs that scale with game progression:

mio:my_advanced_mio = {
    set_mio_design_team_change_cost = var:design_team_cost_var
}

Synergy

  • [add_mio_design_team_change_cost](/wiki/effect/add_mio_design_team_change_cost): This command performs addition/subtraction on the existing base value, whereas this command directly overwrites it; use them together by first establishing a baseline with set_, then making fine adjustments with add_.
  • [set_mio_design_team_assign_cost](/wiki/effect/set_mio_design_team_assign_cost): Also an MIO cost management command; typically both assignment and change costs are adjusted together in the same event or effect block to maintain consistency in game experience.
  • [has_mio_size](/wiki/trigger/has_mio_size): Commonly used as a prerequisite condition to check MIO scale and determine whether to apply cost overrides, such as only MIOs meeting a certain threshold receive the lower change cost.
  • [is_mio_available](/wiki/trigger/is_mio_available): Check if the MIO is currently available before executing cost modifications to avoid performing invalid operations on inactive MIOs.

Common Pitfalls

  1. Passing negative values causes errors: The official specification explicitly prohibits negative input values. Newcomers often attempt to use negative values to make design team changes "free", which results in script errors or engine rejection; to reduce costs, set the value to 0 rather than a negative number.
  2. Confusing the semantics of set and add: set_mio_design_team_change_cost directly overwrites the base value, and subsequent modifiers will still stack on top of the new base value. If mistakenly used as "reduce from the current value", use add_mio_design_team_change_cost instead and pass a negative number (provided the result is non-negative).