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
- 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.
- 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.