Wiki

trigger · has_war_together_with

Definition

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

Description

Are the countries fighting on the same side of a 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

has_war_together_with is commonly used in country events or decisions related to ally cooperation, such as enabling joint military aid decisions only when two nations are fighting side by side, or determining in diplomatic AI strategies whether the current target nation is on the same front. Typical scenario: a faction member wants to launch an additional campaign against a common enemy, first confirming both sides are truly on the same side of a war before executing subsequent effects.

# Only allow joint offensive decision to trigger when this country is fighting alongside GER in the same war
available = {
    has_war_together_with = GER
}

Synergy

  • [has_defensive_war](/wiki/trigger/has_defensive_war) — First check if this country is in a defensive war, then combine with has_war_together_with to confirm an ally is also on the same side, useful for distinguishing between "joint defense" and "joint offense" aid logic.
  • [any_allied_country](/wiki/trigger/any_allied_country) — Iterate through all allies and nest has_war_together_with to precisely filter countries that are both allies and on the same side of a war, avoiding mistakenly counting allies that haven't entered combat.
  • [add_to_war](/wiki/effect/add_to_war) — After confirming the target country is already fighting alongside this nation, use this effect to bring other countries into the war, forming a complete logic chain of "verify existing war relationship → expand participants."
  • [add_opinion_modifier](/wiki/effect/add_opinion_modifier) — Grant bilateral opinion bonuses when fighting side by side conditions are met, simulating the narrative effect of deepened alliance bonds during wartime.

Common Pitfalls

  1. Confusing "alliance" with "fighting on the same side": Two nations belonging to the same faction or having guarantees for each other does not mean has_war_together_with returns true; it only triggers when both are in the same war and on the same side. If the target nation hasn't been added via add_to_war, this trigger silently returns false without error, easily causing conditions to never be satisfied.
  2. Incorrect scope targeting: This trigger must be used under COUNTRY scope; if mistakenly written in STATE or CHARACTER scope, the game won't warn you but the logic will simply fail. When checking, ensure the outer scope is indeed a country tag or corresponding scope block.