Wiki

trigger · has_truce_with

Definition

  • Supported scope:COUNTRY
  • Supported target:THIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITAL

Description

has_truce_with = yes/no - Checks if the country has truce with the specified country

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

has_truce_with is commonly used in diplomatic or decision-making mods to prevent players or AI from repeatedly declaring war or triggering aggressive decisions during a truce period. For example, it can be used as a precondition check in a decision to "break the truce":

available = {
    has_truce_with = FROM
}

This makes the decision available only when the country actually has an active truce agreement with the target nation (or conversely, wrap it with NOT to prohibit the action).

Synergy

  • [has_defensive_war_with](/wiki/trigger/has_defensive_war_with): Often checked in parallel to confirm the current state has neither an active truce nor a defensive war before allowing war declaration decisions to trigger.
  • [can_declare_war_on](/wiki/trigger/can_declare_war_on): When comprehensively validating war declaration legality, has_truce_with serves as a supplementary condition to exclude war windows during truce periods.
  • [declare_war_on](/wiki/effect/declare_war_on): Before executing a war declaration effect, typically use NOT = { has_truce_with = ... } in the available/limit block to prevent script errors or logical contradictions.
  • [has_war](/wiki/trigger/has_war): Combined with truce checks to fully cover both mutually exclusive states—whether the country is currently at war or under truce.

Common Pitfalls

  1. Forgetting to use NOT for negation: Beginners often intend to express "can only trigger when there is no truce" but accidentally write has_truce_with = yes, resulting in inverted logic—the condition becomes true only when a truce exists. The correct approach is NOT = { has_truce_with = <target> }.
  2. Incorrect scope targeting: This trigger must be used within a COUNTRY scope. If accidentally placed in a STATE scope (such as within a every_owned_state subblock), it will silently fail or produce a scope error. Always ensure the outer scope is at the country level.