Wiki

trigger · civilwar_target

Definition

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

Description

civilwar target is ( for civil wars checks )

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

civilwar_target is commonly used in focus/decision conditions related to civil wars to identify the target faction of the current civil war (the opposing faction country in the conflict). This allows for targeted judgments against it. For example, when designing civil war storylines in a mod, you can check in a trigger block whether a certain country is the opposing party in this civil war, and then decide whether to trigger specific events or unlock options.

# Using civilwar_target in the available block of civil war-related decisions
available = {
    civilwar_target = {
        tag = FROM
    }
}

Synergy

  • [has_civil_war](/wiki/trigger/has_civil_war): Typically use this trigger first to confirm that the current country is indeed in a state of civil war, then use civilwar_target to further determine who the civil war opponent is. These two form the standard combination of "first confirm civil war exists, then locate the target."
  • [add_civil_war_target](/wiki/effect/add_civil_war_target): Responsible for adding a civil war target to a country on the effect side. It forms a complete "write-read" loop with civilwar_target reading the civil war target on the trigger side.
  • [declare_war_on](/wiki/effect/declare_war_on): After confirming the civil war target, you can formally declare war on it in the effect block. The target scope provided by civilwar_target directly serves as the declaration of war target, avoiding hardcoded tags.
  • [any_enemy_country](/wiki/trigger/any_enemy_country): When there are multiple civil war targets or when you need to broadly enumerate enemies, you can use this trigger in conjunction for broader enemy retrieval, complementing civilwar_target.

Common Pitfalls

  1. Calling outside of civil war scope: civilwar_target only has meaning under the scope of a country that is in a state of civil war. If the host country does not have an ongoing civil war, this trigger will directly return false without error, causing the condition to fail silently. Newcomers often mistakenly believe the problem lies elsewhere in the logic.
  2. Misusing the target keyword with hardcoded tags: The target in civilwar_target should be filled with dynamic scope pointers like THIS/ROOT/FROM, not hardcoded country tags directly (such as GER). Civil war targets are dynamically generated faction countries, so hardcoded tags will almost certainly fail to match.