trigger · less_combat_width_than_opponent
Definition
- Supported scope:
COMBATANT - Supported target:
none
Description
check if side has more combat width than their opponent
less_combat_width_than_opponentCOMBATANTnonecheck if side has more combat width than their opponent
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
此 trigger 常用于战斗事件或决策中,判断己方是否处于战线宽度劣势,从而触发对应的惩罚或补偿逻辑,例如为宽度不足的一方附加士气修正或撤退建议。也可以结合 AI 策略脚本,让 AI 在宽度吃亏时优先调用预备队或改变进攻节奏。
# 战斗事件示例:当己方宽度劣于对手时触发特殊对话
combat_event = {
id = my_mod.001
trigger = {
less_combat_width_than_opponent = yes
is_attacker = yes
}
# 事件内容...
}
[is_attacker](/wiki/trigger/is_attacker) — 进攻方往往更容易遭遇宽度不足的问题,结合此 trigger 可以区分进攻/防守两种宽度劣势场景,逻辑更精准。[frontage_full](/wiki/trigger/frontage_full) — 判断前线是否已经打满,与宽度劣势结合使用可以确认是"宽度不足还是宽度已满",避免逻辑重叠。[has_reserves](/wiki/trigger/has_reserves) — 宽度劣势时通常意味着预备队的投入受限,搭配此 trigger 可检查是否还有可用预备队,进一步细化战场判断。[is_winning](/wiki/trigger/is_winning) — 宽度劣势并不一定意味着战局不利,与是否正在获胜组合可以做出更有层次的分支判断(如"虽然宽度吃亏但仍在压制对方")。COMBATANT(战斗参与方)scope 下,新手容易在普通国家 scope 或单位 scope 中直接调用,导致脚本报错或永远返回 false,务必确认已进入战斗相关的事件或触发器环境。less_combat_width_than_opponent(比对手更少),但官方描述写的是"check if side has more combat width than their opponent",两者字面相悖,实际以 trigger 名的字面含义(己方宽度劣于对手时为真)为准,切勿被描述误导而将条件写反。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.
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...
}
[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").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.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.