Wiki

effect · cancel_border_war

Definition

  • Supported scope:any
  • Supported target:none

Description

cancel border war between two states

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

cancel_border_war is commonly used in event-driven diplomatic mods to terminate border wars when players trigger scripted options involving negotiation, armistice agreements, or third-party intervention. For example, it can be called within an option block when a nation accepts mediation, causing the border war between both sides to end immediately without normal victory/defeat resolution:

option = {
    name = border_war_ceasefire.opt_a
    cancel_border_war = yes
    add_political_power = -50
}

Synergy

  • [has_border_war_between](/wiki/trigger/has_border_war_between): Check whether a border war actually exists between two states before executing the cancellation, preventing invalid logic from firing on non-existent conflicts.
  • [start_border_war](/wiki/effect/start_border_war): Works with cancel_border_war to form a complete border war lifecycle management system; opening and closing typically appear as paired operations within the same event chain.
  • [finalize_border_war](/wiki/effect/finalize_border_war): When formal victory/defeat resolution is required instead of direct cancellation, use either one conditionally in a branching structure to clearly distinguish between "forced termination" and "normal resolution" design intentions.
  • [custom_effect_tooltip](/wiki/effect/custom_effect_tooltip): Since cancel_border_war does not automatically display feedback text to the player, pairing it with this command allows readable tooltip descriptions to appear in the UI.

Common Pitfalls

  1. Overlooking scope context: This effect's scope is any, but execution must ensure the script context can properly locate the correct two states; writing it directly under a country scope without specifying particular states may cause silent command failure with no error reporting.
  2. Mixing with finalize_border_war: Beginners often confuse "cancellation" with "resolution"; cancel_border_war produces no territorial or victory/defeat changes. Misusing it in scenarios where resolution should occur leaves the border war unresolved and causes abnormal residual state data for both sides.