effect · declare_war_on
Definition
- Supported scope:
COUNTRY - Supported target:
none
Description
declares war on specified country
declare_war_onCOUNTRYnonedeclares war on specified country
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.
declare_war_on is commonly used in event chains or focus trees to trigger script-controlled warfare. For example, you can force a country to declare war on a target after completing a specific national focus, bypassing the normal war justification process. It's also ideal for controlling AI-driven warfare timing between nations in AI behavior scripts or hidden events, enabling narrative-driven war scenarios.
# After completing a national focus, have the current country declare war on the target
complete_national_focus = SOV_push_west
country_event = {
id = sov.42
}
# Trigger war declaration from an event option
country_event = {
id = sov.42
option = {
name = sov.42.a
declare_war_on = {
target = POL
type = annex_everything # War goal type; typically used with create_wargoal or specified directly
}
}
}
[can_declare_war_on](/wiki/trigger/can_declare_war_on): Check if war declaration conditions are met before executing (e.g., whether already at war, whether allies) to prevent script errors or logical conflicts.[create_wargoal](/wiki/effect/create_wargoal): Typically create a legitimate war goal for the conflict before declaring war, giving the declaration a concrete justification rather than unconditional aggression.[add_to_war](/wiki/effect/add_to_war): After declaring war, bring other nations into an existing conflict, combining with declare_war_on to construct multi-faction warfare.[country_event](/wiki/effect/country_event): Trigger follow-up events after war declaration (such as ally reactions, opinion shifts) to build a complete narrative chain for the war trigger.declare_war_on again on a nation already in the same conflict causes script errors or unexpected behavior. Always use [can_declare_war_on](/wiki/trigger/can_declare_war_on) for validation first.every_owned_state block), the game won't throw an obvious error but silently ignores the command, making it difficult to debug.