Hands-On Usage
add_power_balance_value is commonly found in mod scenarios involving custom ideology tug-of-wars, factional influence contests, or diplomatic event outcomes—for instance, pushing the balance of power toward your faction when a nation completes a specific focus. The example below demonstrates how to tilt the scale to one side upon focus completion:
focus = {
id = my_focus_push_balance
...
completion_reward = {
add_power_balance_value = {
id = east_west_balance
value = 0.15
tooltip_side = western_side
}
}
}
Synergy
[add_power_balance_modifier](/wiki/effect/add_power_balance_modifier): Adds a persistent daily/weekly offset modifier alongside the instant value adjustment, combining both for a "one-time push + long-term maintenance" dual effect.
[is_power_balance_in_range](/wiki/trigger/is_power_balance_in_range): Check whether the current balance is within a specific range before executing the value adjustment, preventing numerical overflow or unintended faction state triggers.
[is_power_balance_side_active](/wiki/trigger/is_power_balance_side_active): Confirm that the target faction is currently active before writing values, preventing logic errors from operations executed before the balance is initialized.
[remove_all_power_balance_modifiers](/wiki/effect/remove_all_power_balance_modifiers): When resetting a scenario or transitioning phases, clear all modifiers first before re-applying this effect with baseline values to ensure a clean state.
Common Pitfalls
- Forgetting that
id must exactly match the actual power balance definition name: The id must match the id declared in the corresponding definition file within the common/power_balance/ folder character-for-character. Spelling errors will not produce warnings but the effect will fail silently, making it difficult to catch during debugging.
tooltip_side is optional but easily causes display confusion: Omitting this field causes the game to use a default tooltip, but if you specify a side id that doesn't exist in the power balance definition, the tooltip will display blank or corrupted text. Newcomers often mistake this for the value not taking effect and waste troubleshooting time.