Wiki

trigger · less_combat_width_than_opponent

Definition

  • Supported scope:COMBATANT
  • Supported target:none

Description

check if side has more combat width than their opponent

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

This trigger is commonly used in combat events or decisions to determine whether your side is at a disadvantage in combat width, thereby triggering corresponding penalty or compensation logic—for example, applying morale penalties to the side with insufficient width or recommending retreat. It can also be combined with AI strategy scripts to allow the AI to prioritize committing reserves or change the pace of attack when at a width disadvantage.

# Combat event example: trigger special dialogue when your side has less width than opponent
combat_event = {
    id = my_mod.001
    trigger = {
        less_combat_width_than_opponent = yes
        is_attacker = yes
    }
    # Event content...
}

Synergy

  • [is_attacker](/wiki/trigger/is_attacker) — Attackers are often more prone to combat width shortage issues. Combining this trigger allows you to differentiate between attack and defense width disadvantage scenarios for more precise logic.
  • [frontage_full](/wiki/trigger/frontage_full) — Checks whether a front is fully engaged. Used together with width disadvantage, this can confirm whether the issue is "insufficient width" or "width already filled," avoiding logic overlap.
  • [has_reserves](/wiki/trigger/has_reserves) — Width disadvantage typically means reserve deployment is constrained. Pairing with this trigger lets you check if reserves are still available, further refining battlefield assessment.
  • [is_winning](/wiki/trigger/is_winning) — Width disadvantage does not necessarily mean an unfavorable battle outcome. Combining with whether you're winning allows for more nuanced branching logic (e.g., "despite width disadvantage, still suppressing opponent").

Common Pitfalls

  1. Scope Confusion: This trigger only works in the COMBATANT (battle participant) scope. Beginners often call it directly in regular country scope or unit scope, causing script errors or always returning false. Always verify you are in a combat-related event or trigger environment.
  2. Reversed Semantic Understanding: The trigger name is less_combat_width_than_opponent (your side has less than opponent), but the official description reads "check if side has more combat width than their opponent"—these are literally contradictory. In practice, follow the literal meaning of the trigger name (condition is true when your width is inferior to opponent), not the description, to avoid inverting the condition.