Wiki

effect · add_mio_design_team_assign_cost

Definition

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

Description

Add percentage to the daily PP cost to assign to research in the military industrial organization in scope.
This changes the base value. Modifiers will still apply over it.
Value can be negative to reduce assign cost but final value cannot be negative (capped at 0, no error raised)
ex:
mio:my_mio = {
  add_mio_design_team_assign_cost = 0.2 # increase by 20%
  add_mio_design_team_assign_cost = -0.1 # reduce by 10%
  add_mio_design_team_assign_cost = var:my_number_var
}

实战 · 配合 · 坑

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

实战用法

当 mod 设计某个军事工业组织在特定条件下变得"昂贵"或"廉价"时(例如触发了某项政策事件、完成了某个国策),可用此 effect 动态调整该 MIO 的设计团队每日 PP 分配消耗,模拟组织膨胀或改革带来的效率变化。注意它修改的是基础值,而非叠加修正,因此适合用于"重置式"的成本阶段调整。

# 某事件让特定 MIO 的设计团队分配成本上涨
mio:my_tank_manufacturer = {
    add_mio_design_team_assign_cost = 0.15  # 基础成本提高 15%
}

# 完成某国策后奖励降低成本
mio:my_tank_manufacturer = {
    add_mio_design_team_assign_cost = -0.1  # 基础成本降低 10%
}

配合关系

  • [set_mio_design_team_assign_cost](/wiki/effect/set_mio_design_team_assign_cost)add_ 是在当前基础值上累加,而 set_ 是直接覆盖;两者配合使用可先重置到已知基准值再做增量调整,避免多次叠加导致数值失控。
  • [has_mio_policy_active](/wiki/trigger/has_mio_policy_active):在执行成本调整前用此触发器判断 MIO 当前激活的政策,确保只在特定政策生效时才修改成本,实现条件化的动态定价逻辑。
  • [add_mio_design_team_change_cost](/wiki/effect/add_mio_design_team_change_cost):设计团队的"分配成本"与"切换成本"往往需要同步调整,两个命令配合可同时影响玩家将该 MIO 纳入/切换研究任务时的 PP 压力。
  • [has_mio_size](/wiki/trigger/has_mio_size):根据 MIO 当前规模判断是否需要调整成本,规模越大的组织可能合理地拥有更低的单位分配成本,用此触发器做门槛判断更贴合设计意图。

常见坑

  1. 误以为负值可以无限叠加降低成本:最终实际成本被下限锁死在 0,不会出现"负成本"给玩家返还 PP,但游戏不会报错,多余的负值调整会被静默忽略,导致你以为效果生效了实则超出部分无效,调试时需留意实际表现而非脚本数字。
  2. 在错误的 scope 下调用:此 effect 必须在 INDUSTRIAL_ORG scope 内执行,直接写在国家 scope 的 immediate 块中会导致命令无效甚至报错,必须通过 mio:mio_tag = { ... } 或类似方式先切换到对应 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

When a mod intends to make a specific military industrial organization "expensive" or "cheap" under certain conditions (such as triggering a policy event or completing a national focus), this effect can be used to dynamically adjust the daily PP consumption for that MIO's design team, simulating efficiency changes from organizational expansion or reform. Note that it modifies the base value rather than applying a multiplicative modifier, making it suitable for "reset-style" cost phase adjustments.

# A certain event increases the design team assignment cost for a specific MIO
mio:my_tank_manufacturer = {
    add_mio_design_team_assign_cost = 0.15  # Base cost increased by 15%
}

# Reward reduced cost upon completing a national focus
mio:my_tank_manufacturer = {
    add_mio_design_team_assign_cost = -0.1  # Base cost decreased by 10%
}

Synergy

  • [set_mio_design_team_assign_cost](/wiki/effect/set_mio_design_team_assign_cost): add_ accumulates on top of the current base value, while set_ directly overwrites it; using both together allows you to reset to a known baseline value and then make incremental adjustments, preventing numerical runaway from multiple stacking operations.
  • [has_mio_policy_active](/wiki/trigger/has_mio_policy_active): Use this trigger to check which policies the MIO currently has active before executing cost adjustments, ensuring that costs are modified only when specific policies are in effect, enabling conditional dynamic pricing logic.
  • [add_mio_design_team_change_cost](/wiki/effect/add_mio_design_team_change_cost): The "assignment cost" and "switch cost" of design teams often need to be adjusted in sync; using both commands together allows you to simultaneously impact the PP pressure players face when bringing that MIO into or switching research tasks.
  • [has_mio_size](/wiki/trigger/has_mio_size): Determine whether cost adjustment is necessary based on the MIO's current size; larger organizations may reasonably have lower per-unit assignment costs, and using this trigger as a threshold check aligns better with design intent.

Common Pitfalls

  1. Mistakenly believing negative values can infinitely reduce cost: The final actual cost is capped at a floor of 0 and will not generate "negative cost" to refund PP to the player. The game will not error, but excess negative adjustments are silently ignored, leading you to think the effect worked when in fact the excess portion is ineffective. Pay attention to actual in-game behavior rather than script numbers during debugging.
  2. Calling the effect in the wrong scope: This effect must be executed within the INDUSTRIAL_ORG scope; placing it directly in a country scope's immediate block will cause the command to be ineffective or even error. You must first switch to the corresponding MIO's scope via mio:mio_tag = { ... } or similar syntax before calling it.