Hands-On Usage
power_balance_daily_change is commonly used in mod scenarios requiring dynamic responses to fluctuations in power balance change rates. For example, it can trigger warning events when one faction's daily influence acceleration becomes too rapid, or restrict players in decision available blocks to only execute certain diplomatic actions when the balance trend stabilizes.
# Example: Condition check that triggers an event when the daily positive change of power balance exceeds a threshold
available = {
power_balance_daily_change = {
id = my_ideological_balance
value > 0.2
}
}
Synergy
[is_power_balance_in_range](/wiki/trigger/is_power_balance_in_range): Typically paired with this trigger—first check which range the balance currently occupies, then use power_balance_daily_change to determine the direction of movement. Together, they precisely describe the state "balance has shifted to one side and is still accelerating."
[power_balance_weekly_change](/wiki/trigger/power_balance_weekly_change): Forms dual short-term/medium-term verification with this trigger. Daily changes capture sudden fluctuations, while weekly changes confirm whether the trend persists. They are commonly used side-by-side in the same and block.
[has_power_balance_modifier](/wiki/trigger/has_power_balance_modifier): Checks whether a modifier is currently being applied. Helps identify which modifier caused the daily change. Often used jointly with this trigger inside if blocks for branching logic.
[add_power_balance_modifier](/wiki/effect/add_power_balance_modifier): Once trigger conditions are met, use this command in the corresponding effect block to stack or remove modifiers, forming a complete closed loop of "detect change rate → dynamically adjust balance source."
Common Pitfalls
- Confusing
id with a faction key: The id field must reference the unique identifier of the power balance itself as defined in common/power_balance/, not the key of one side. Incorrect entries will not produce errors but the condition will never fire, making debugging difficult.
- Overlooking operator restrictions and using only
>= or <=: This trigger supports only >, <, and = operators; >= and <= are not supported. To achieve a "greater than or equal to" effect, wrap > and = in an or block to simulate it.