Wiki

trigger · has_civil_war

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

check if participant in civil war as revolter or target

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_civil_war is commonly used in civil war mods to prevent players or AI from triggering certain diplomatic decisions, national focuses, or events during an ongoing civil war, avoiding logical conflicts. For example, you can exclude the civil war state in a decision's available block, or check for civil war status in event trigger conditions to branch the narrative accordingly.

# Diplomatic decision: only available when not involved in civil war
available = {
    NOT = { has_civil_war = yes }
    is_subject = no
}

Synergy

  • [civilwar_target](/wiki/trigger/civilwar_target): Used to further determine which country is the opposing side in the civil war. Combined with has_civil_war, it enables precise handling of the logic "confirm civil war exists, then filter the target."
  • [has_defensive_war](/wiki/trigger/has_defensive_war): A defensive war state typically accompanies a civil war. Using both together allows you to distinguish between "ordinary defensive war" and "civil war as a defensive war," avoiding condition mispredication.
  • [add_civil_war_target](/wiki/effect/add_civil_war_target): Before adding a civil war target on the effect side, first use has_civil_war to confirm whether you are already in a civil war, preventing duplicate triggering of civil war logic.
  • [has_capitulated](/wiki/trigger/has_capitulated): After one side surrenders during a civil war, has_civil_war turns to false. Using both allows you to handle edge-case events "just after civil war ends."

Common Pitfalls

  1. Mistakenly believing has_civil_war = no is equivalent to "never had a civil war": This trigger only reflects whether you are currently in a civil war state. After a civil war ends, it immediately returns false and cannot be used to judge whether a civil war occurred in history. Use country flags (has_country_flag) to record historical state instead.
  2. Overlooking that both sides return true: Both the initiating side and the target side of a civil war return true for this trigger. If you only want it to apply to one side, you must additionally use [civilwar_target](/wiki/trigger/civilwar_target) to distinguish between your own side and the opposing side, otherwise the logic will apply to both sides of the civil war simultaneously.