Wiki

trigger · is_border_conflict

Definition

  • Supported scope:STATE
  • Supported target:any

Description

checks if a state is in border conflict

Hands-On Notes

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.

Hands-On Usage

is_border_conflict is commonly used in decisions or events related to the border conflict system to determine whether a specific state is currently in a state of border war, thereby deciding whether to allow players to trigger certain intervention decisions or prevent other construction actions. For example, in custom border conflict mods, you can use it to restrict construction actions in states engaged in conflict:

# In the available block of a decision, prevent initiating new construction in states under border conflict
available = {
    NOT = {
        any_neighbor_state = {
            is_border_conflict = yes
        }
    }
}

Synergy

  • [has_border_war](/wiki/trigger/has_border_war): Both detect border war status, but has_border_war focuses on the country-level existence of border wars, while is_border_conflict under STATE scope pinpoints specific states more precisely. They are commonly used together for multi-layer filtering.
  • [any_neighbor_state](/wiki/trigger/any_neighbor_state): As shown in the example above, used to iterate through neighboring states and check whether any of them have border conflicts. This is the most typical combination pattern.
  • [set_border_war](/wiki/effect/set_border_war): Used in effect blocks to enable or disable border wars. It is typically paired with is_border_conflict—use triggers to check status first, then decide whether to call the effect, avoiding duplicate settings.
  • [is_controlled_by](/wiki/trigger/is_controlled_by): Control ownership is complex during border conflicts. Frequently used together with this trigger to confirm the current controller of a state before proceeding with further logic.

Common Pitfalls

  1. Incorrect Scope Placement: is_border_conflict must be called under STATE scope. If written directly in a country scope's trigger block without switching scope via any_neighbor_state or similar, the script will error or fail silently. Beginners often forget to switch to state-level scope first.
  2. Confusion with has_border_war: Some beginners mistakenly treat them as equivalent and swap them carelessly—has_border_war is a country scope trigger, while is_border_conflict is a state scope trigger. Using one in the wrong scope will cause the condition to never evaluate true.