Wiki

trigger · is_border_war

Definition

  • Supported scope:CHARACTER, COMBATANT
  • Supported target:any

Description

Checks if a the combatant or leader has a border war

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_war is commonly used in border war event chains or decisions to check whether a specific leader or combatant is currently engaged in a border conflict, thereby triggering exclusive dialogue, trait rewards, or campaign options. For example, in a custom war event, you can restrict a decision to only be available to commanders actively involved in border warfare:

# Decision: Inspire border front commanders
available = {
    is_border_war = yes
    is_corps_commander = yes
}

Synergy

  • [is_corps_commander](/wiki/trigger/is_corps_commander) / [is_field_marshal](/wiki/trigger/is_field_marshal): Border wars are typically led by commanders of specific ranks. Combining them with unit type/rank checks allows you to precisely target the intended characters and avoid overly broad conditions.
  • [has_trait](/wiki/trigger/has_trait): Used to check whether a leader engaged in border warfare already possesses a certain trait, helping determine whether to stack additional war-related trait rewards.
  • [add_unit_leader_trait](/wiki/effect/add_unit_leader_trait): After confirming a character is in border warfare, use this effect to grant them exclusive border combat traits, establishing a standard "check → grant" workflow.
  • [unit_leader_event](/wiki/effect/unit_leader_event): Trigger exclusive leader events when is_border_war = yes is true, allowing you to construct narrative event chains during border conflicts.

Common Pitfalls

  1. Incorrect scope placement: is_border_war must be used under CHARACTER or COMBATANT scope. Beginners often mistakenly place it at the country scope level (such as the top-level trigger block in country_event), causing script errors or conditions that never evaluate to true. You must iterate into the correct scope using any_army_leader / any_character or similar constructs before performing the check.
  2. Confusing border war with regular warfare: This trigger specifically refers to conflicts under the border war mechanism, not the warfare status created by normal declarations of war. If you use it to detect leaders in conventional wars, it will always return no. Use other war-state-related conditions instead.