trigger · has_power_balance
Definition
- Supported scope:
COUNTRY - Supported target:
none
Description
checks if power balance is active for country
Example:
has_power_balance = {
id = power_balance_id
}
has_power_balanceCOUNTRYnonechecks if power balance is active for country
Example:
has_power_balance = {
id = power_balance_id
}
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.
has_power_balance is commonly used in mod scenarios where decisions, focuses, or events need to be dynamically controlled based on whether a specific power balance mechanism has been activated. For example, in an ideological conflict system, it determines whether a particular power balance is currently active before deciding whether to display related options.
# Example: This decision is only available when the specified power balance is activated
available = {
has_power_balance = {
id = my_mod_faction_balance
}
}
[has_any_power_balance](/wiki/trigger/has_any_power_balance): Use this trigger first to quickly check if the country has any power balance, then use has_power_balance to pinpoint a specific id, creating a two-tier coarse-to-fine filtering logic.[add_faction_influence_score](/wiki/effect/add_faction_influence_score): After confirming the power balance is active, pair it with this effect to add influence score to the corresponding faction, ensuring numerical operations are only triggered during the mechanism's runtime.[faction_influence_ratio](/wiki/trigger/faction_influence_ratio): Use in conjunction with has_power_balance to first confirm the balance exists, then check the current influence distribution among parties, enabling more granular conditional logic.id field must exactly match the id defined in the power_balance file (case-sensitive). Misspelling the id will not produce an error but will always return false, causing related logic to silently fail, making it extremely difficult to debug.