Wiki

trigger · has_war_support

Definition

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

Description

check value of war_support 0-1: Example has_war_support < 0.6

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_support is commonly used in national focuses, decisions, or events to dynamically unlock or restrict options based on a country's war support level. For example, it can require sufficient war support before allowing aggressive strategies, or trigger domestic crisis events when war support drops too low. It frequently appears in available blocks to prevent players from pursuing military paths when domestic anti-war sentiment is high.

# Focus availability condition: requires war support above 60% to select
focus = {
    id = GER_mobilize_nation
    available = {
        has_war_support > 0.6
    }
    ...
}

# Decision limit: triggers home front crisis only when war support is below 30%
decision = {
    id = GER_home_front_crisis
    available = {
        has_war_support < 0.3
    }
    ...
}

Synergy

  • [add_war_support](/wiki/effect/add_war_support): The most direct partner—first use has_war_support to check the current value, then apply add_war_support to compensate or penalize, creating a closed loop of "below threshold → trigger effect → raise/lower".
  • [has_stability](/wiki/trigger/has_stability): War support and stability are often checked together; both jointly determine a country's "domestic health". They frequently appear side-by-side in conditional blocks.
  • [has_defensive_war](/wiki/trigger/has_defensive_war): Defensive wars typically automatically increase war support. Combined with this trigger, you can distinguish between "proactive preparation" and "forced response" scenarios, branching the script accordingly.
  • [add_stability](/wiki/effect/add_stability): When war support is critically low, stability is often checked simultaneously and penalized together. Both effects work in tandem to simulate the consequences of "morale collapse".

Common Pitfalls

  1. Reversed comparison operators: The official format is has_war_support < 0.6. Beginners often mistakenly write has_war_support = 0.6 (exact equality), but war support is a floating-point number—exact equality almost never occurs. You must use < or > for range comparisons instead.
  2. Called outside COUNTRY scope: has_war_support only works in country scope. If used directly within sub-scopes like owned_state or division without switching back to country scope, the script will silently fail or error. Use explicit scope targets like OWNER or ROOT to redirect to the correct scope.