trigger · has_war
Definition
- Supported scope:
COUNTRY - Supported target:
THIS,ROOT,PREV,FROM,OWNER,CONTROLLER,OCCUPIED,CAPITAL
Description
is country at war
has_warCOUNTRYTHIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITALis country at war
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.
has_war is commonly used to check whether a country is in a state of war, allowing you to control the availability of decisions, national focuses, or events. For example, you can restrict certain wartime decisions from triggering during peacetime, or unlock specific emergency measures when at war.
# This decision is only available when the country is not at war
available = {
NOT = { has_war = yes }
}
# Event trigger: only fires when the target country is actively at war
trigger = {
FROM = {
has_war = yes
}
}
[has_defensive_war](/wiki/trigger/has_defensive_war): Use in combination to distinguish between "offensive war" and "defensive war", allowing for finer-grained assessment of the current nature of conflict.[has_civil_war](/wiki/trigger/has_civil_war): When used together with has_war, you can exclude civil war scenarios and trigger logic only for external wars.[declare_war_on](/wiki/effect/declare_war_on): Before declaring war, it's standard practice to use has_war = no as a precondition check to avoid confused logic from duplicate war declarations.[can_declare_war_on](/wiki/trigger/can_declare_war_on): Combine both to validate complete prerequisites for war declaration—first confirm your own state, then verify your right to declare war.has_war is only valid in COUNTRY scope. Using it directly in a STATE scope limit block will cause errors or silent failure. Use scope conversion like OWNER = { has_war = yes } instead.has_war to return yes. If you need to exclude civil war scenarios, you must additionally filter with NOT = { has_civil_war = yes }.