Wiki

effect · set_mio_policy_cost

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Set the base cost (in PP) for attaching a policy in the MIO policy, found in country in scope with input policy
token. This changes the base value. Modifiers will still apply over it. 
Input value cannot be negative.
ex: 
SOV = { 
  set_mio_policy_cost = { 
	policy = my_policy_token
	value = 3
  }
  set_mio_policy_cost = {
	policy = my_policy_token
	value = var:my_number_var
  }
}

实战 · 配合 · 坑

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

实战用法

set_mio_policy_cost 常用于 MIO(军事工业组织)相关 mod 场景,例如当某国完成特定国策或科技后,动态降低特定 MIO 政策的政治点数消耗,以体现该国工业效率或政治影响力的提升。也可结合变量使用,让消耗值随游戏进程动态变化(例如随某项资源储量或科技等级动态调整)。

# 苏联完成某国策后,降低特定 MIO 政策的 PP 消耗
focus = {
    id = SOV_streamline_mio_policy
    ...
    completion_reward = {
        SOV = {
            set_mio_policy_cost = {
                policy = sov_heavy_industry_focus_policy
                value = 2
            }
        }
    }
}

# 用变量动态设置消耗
SOV = {
    set_mio_policy_cost = {
        policy = sov_heavy_industry_focus_policy
        value = var:sov_policy_cost_var
    }
}

配合关系

  • [add_mio_policy_cost](/wiki/effect/add_mio_policy_cost) — 与 set_mio_policy_cost 搭配使用,前者是在基础值上叠加增减量,后者是直接设定基础值;组合使用可实现"先重置再微调"的精确费用控制。
  • [add_mio_policy_cooldown](/wiki/effect/add_mio_policy_cooldown) — MIO 政策管理的另一维度,用于控制政策的冷却时间,配合费用设置可全面调节玩家切换 MIO 政策的节奏与成本。
  • [add_political_power](/wiki/effect/add_political_power) — 当调整了政策费用后,常需要同步给予或扣除一定政治点数作为叙事补偿或惩罚,使数值设计更连贯。
  • [has_completed_focus](/wiki/trigger/has_completed_focus) — 常作为前置条件判断,确认国策完成后再触发费用设置,避免在错误的游戏阶段意外修改政策成本。

常见坑

  1. value 填写负数导致脚本报错:官方明确规定输入值不能为负数,若试图通过此指令"增加费用惩罚"而填入负值,脚本将无法正常执行。需要增加费用时应改用 add_mio_policy_cost 配合正数来叠加。
  2. 作用域写错导致静默失效:此 effect 必须在 COUNTRY scope 下执行,若误写在 STATE 或 CHARACTER scope 内,游戏通常不会报错提示但效果完全不生效,调试时需仔细核查外层 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

set_mio_policy_cost is commonly used in MIO (Military Industrial Organization) related mod scenarios. For example, when a country completes a specific focus or technology, you can dynamically reduce the political power cost of a specific MIO policy to reflect an increase in that nation's industrial efficiency or political influence. You can also combine it with variables to make the cost change dynamically as the game progresses (for example, adjusting dynamically based on resource reserves or technology level).

# After the Soviet Union completes a certain focus, reduce the PP cost of a specific MIO policy
focus = {
    id = SOV_streamline_mio_policy
    ...
    completion_reward = {
        SOV = {
            set_mio_policy_cost = {
                policy = sov_heavy_industry_focus_policy
                value = 2
            }
        }
    }
}

# Use a variable to set the cost dynamically
SOV = {
    set_mio_policy_cost = {
        policy = sov_heavy_industry_focus_policy
        value = var:sov_policy_cost_var
    }
}

Synergy

  • [add_mio_policy_cost](/wiki/effect/add_mio_policy_cost) — Used in combination with set_mio_policy_cost. The former adds or subtracts from the base value, while the latter sets the base value directly. Using both together enables precise cost control with a "reset then fine-tune" approach.
  • [add_mio_policy_cooldown](/wiki/effect/add_mio_policy_cooldown) — Another dimension of MIO policy management that controls the cooldown time of policies. Combined with cost settings, it allows comprehensive adjustment of the player's pace and cost of switching MIO policies.
  • [add_political_power](/wiki/effect/add_political_power) — After adjusting policy costs, you often need to grant or deduct a certain amount of political power as narrative compensation or penalty, making the numerical design more cohesive.
  • [has_completed_focus](/wiki/trigger/has_completed_focus) — Often used as a prerequisite condition to confirm that a focus is completed before triggering the cost setting, avoiding unexpected changes to policy costs at the wrong stage of the game.

Common Pitfalls

  1. Entering negative values for value causes script errors: The official specification clearly states that input values cannot be negative. If you attempt to "increase the cost as a penalty" by entering a negative value, the script will fail to execute. To increase costs, use add_mio_policy_cost instead with a positive number to stack the addition.
  2. Incorrect scope results in silent failure: This effect must be executed within COUNTRY scope. If accidentally written within STATE or CHARACTER scope, the game typically will not report an error but the effect will not work at all. When debugging, carefully verify that the outer scope is the target country.