Hands-On Usage
set_power_balance is commonly used in mods featuring power struggle mechanics. It dynamically switches the active power balance for a nation after completing a focus or triggering an event, or forces the balance value to a specific side to reflect narrative progression. Typical scenarios include pushing the balance toward a faction upon civil war outbreak, or rebinding left and right faction IDs after completing a coalition government focus chain.
# After a nation completes a focus, activate a new power balance and set the initial value to lean left
complete_national_focus = POL_grand_coalition
immediate = {
set_power_balance = {
id = pol_coalition_balance
left_side = reformist_bloc
right_side = conservative_bloc
set_default = yes
set_value = -0.3
}
}
Synergy
[has_any_power_balance](/wiki/trigger/has_any_power_balance) — Use this trigger before executing set_power_balance to check whether the balance is already active for the nation, avoiding logic errors from writing parameters to an inactive balance.
[add_dynamic_modifier](/wiki/effect/add_dynamic_modifier) — Power balances typically work in tandem with dynamic modifiers to drive numerical effects. Mount the corresponding dynamic_modifier in the same block as the balance activation to ensure visual and logical consistency.
[add_ideas](/wiki/effect/add_ideas) — After activating a balance, it is usually necessary to grant an idea representing the initial ideological stance simultaneously, with both combining to describe the starting state of factional power distribution.
[country_event](/wiki/effect/country_event) — After the balance value is forcibly shifted, an event often needs to be triggered immediately to explain the background to the player, using country_event to bridge the narrative.
Common Pitfalls
- Forgetting to declare the id in the
power_balance definition file first: set_power_balance can only operate on balances already defined in common/power_balance/. If the id spelling does not match the definition file, the game will not produce an obvious error, but the balance will silently fail—a trap that newcomers frequently overlook.
- Setting
set_value directly on a nation where the balance is not yet active: If a nation has never activated this balance through any means, writing set_value alone will not automatically activate it. You must first ensure the balance is activated (or initialize it with set_default = yes in the same block), then write the value; otherwise the setting will be discarded.