Wiki

trigger · armor

Definition

  • Supported scope:COMBATANT
  • Supported target:none

Description

Check that average armor level of combatant is over a certain level

实战 · 配合 · 坑

实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。

实战用法

armor 常用于自定义战斗特质或决策中,判断参战部队是否以重装甲单位为主,从而触发特定的战斗加成或解锁特殊选项。例如在装甲战术类 mod 里,可以据此给高装甲值的突击集群提供专属的战斗修正器。

# 在战斗相关 trait 的 allowed 块中使用
allowed = {
    armor > 50
    is_attacker = yes
}

配合关系

  • [hardness](/wiki/trigger/hardness):装甲值高的部队往往硬度也高,两者配合可更精确地识别纯装甲突击力量,避免误判混编部队。
  • [has_unit_type](/wiki/trigger/has_unit_type):配合检测具体单位类型(如重型坦克),双重过滤确保 trigger 只在真正的装甲部队参战时生效。
  • [is_attacker](/wiki/trigger/is_attacker):装甲部队发挥最大效能通常在进攻阶段,与 armor 联用可限定仅在主动进攻的重甲战斗中触发效果。
  • [is_fighting_in_terrain](/wiki/trigger/is_fighting_in_terrain):装甲在平原与沙漠效果差异显著,配合地形判断可为不同地形下的重甲部队设置差异化条件。

常见坑

  1. 误以为比较的是单件装备装甲值armor 检测的是参战部队的平均装甲水平,而非某支师或某件装备的数值,因此混编了大量步兵的集群即便有重坦参战,平均值也可能远低于预期阈值,导致 trigger 不触发。
  2. 在非 COMBATANT scope 下使用:此 trigger 仅在战斗 scope 内有效,若误写在国家或省份 scope 的条件块中,游戏会报错或静默失败,新手调试时容易忽略 scope 上下文。

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

armor is commonly used in custom combat traits or decisions to determine whether participating units are predominantly heavily armored, thereby triggering specific combat bonuses or unlocking special options. For example, in armor-focused mods, you can use it to provide exclusive combat modifiers to high-armor assault groups.

# Using armor within the allowed block of combat-related traits
allowed = {
    armor > 50
    is_attacker = yes
}

Synergy

  • [hardness](/wiki/trigger/hardness): Units with high armor values typically have high hardness as well. Combining these triggers allows more precise identification of pure armor assault forces and avoids misclassifying mixed unit compositions.
  • [has_unit_type](/wiki/trigger/has_unit_type): When paired with specific unit type detection (such as heavy tanks), this dual filtering ensures the trigger only activates when genuine armored units are in combat.
  • [is_attacker](/wiki/trigger/is_attacker): Armored forces achieve maximum effectiveness during offensive phases. Using armor in conjunction with this trigger restricts effects to active offensive engagements with heavy armor.
  • [is_fighting_in_terrain](/wiki/trigger/is_fighting_in_terrain): Armor effectiveness varies significantly between plains and deserts. Combined with terrain checks, you can apply differentiated conditions for heavy armor units across various terrain types.

Common Pitfalls

  1. Confusing individual equipment armor values with fleet average: armor measures the average armor level of participating units, not the value of a single division or piece of equipment. Therefore, an assault group with mixed infantry may fail to trigger even if it includes heavy tanks, since the average value could fall well below the intended threshold.
  2. Using the trigger outside COMBATANT scope: This trigger only functions within combat scope. If mistakenly placed in conditions within country or state scope blocks, the game will error or silently fail. New modders often overlook scope context during debugging.