trigger · hardness
Definition
- Supported scope:
COMBATANT - Supported target:
none
Description
check lowest/highest hardness level on combatant
hardnessCOMBATANTnonecheck lowest/highest hardness level on combatant
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
hardness 常用于判断交战方部队的机械化/装甲程度,从而触发特定事件或调整战斗修正——例如在"装甲突破"相关 mod 中,根据敌方硬度最低值来决定是否给予穿透加成事件,或在动态战术 mod 里让 AI 选择更合适的应对特质。
# 示例:若交战方中最低硬度极低,则判定为"软目标"战斗
limit = {
hardness < 0.2 # 最低硬度低于 20%,判定为纯步兵交战
is_attacker = yes
}
hardness 验证整体硬度是否达标,逻辑更严谨。hardness 取的是交战方中最低或最高硬度,而非平均值,新手常以为它等同于编队平均硬度,导致判断条件设置偏差——务必结合 average_stats 来对比区别。hardness 只在战斗 scope(COMBATANT)内有效,若写在国家或师团 scope 的 trigger 块中会静默失败(永远返回 false),调试时极难察觉。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.
hardness is commonly used to assess the mechanization and armor level of combatant forces, triggering specific events or adjusting combat modifiers accordingly—for example, in armor breakthrough-related mods, it can determine whether to grant penetration bonuses based on the enemy's minimum hardness value, or in dynamic doctrine mods, it can help the AI select more appropriate response traits.
# Example: If the minimum hardness among combatants is very low, classify as "soft target" engagement
limit = {
hardness < 0.2 # Minimum hardness below 20%, classified as pure infantry engagement
is_attacker = yes
}
hardness whether overall hardness meets the threshold for more rigorous logic.hardness takes the minimum or maximum hardness among combatants, not the average, and newcomers often mistakenly treat it as equivalent to composition average hardness, leading to misconfigured trigger conditions—always cross-reference with average_stats to clarify the distinction.hardness is only valid within combat scope (COMBATANT); if placed in triggers within country or division scope blocks, it silently fails (always returns false), making it extremely difficult to detect during debugging.