Wiki

trigger · casualties_inflicted_by

Definition

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

Description

Checks the casualties infliced by the speficied country to the scopped country.
E.g. true if Germany has been inflicted more than 200k casualties by Poland:
GER = {
  casualties_inflicted_by = {
    opponent = POL
    thousands > 200
  }
}

实战 · 配合 · 坑

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

实战用法

casualties_inflicted_by 常用于制作"战役成就"或"剧本触发"类 mod,例如判断某国是否在历史战役中对宿敌造成了足够伤亡,从而解锁特殊决议或国策奖励。也可用于 AI 战略逻辑中,评估某场战争中双方实际战损比,以决定是否触发停战或求和事件。

# 示例:波兰对德国造成超过 20 万伤亡时,波兰解锁特殊决议
GER = {
    casualties_inflicted_by = {
        opponent = POL
        thousands > 200
    }
}

配合关系

  • [casualties](/wiki/trigger/casualties) / [casualties_k](/wiki/trigger/casualties_k):与本 trigger 联用,可同时检查"己方总伤亡"与"对敌造成伤亡",从而计算双向战损比,构建更完整的战局判断条件。
  • [has_defensive_war_with](/wiki/trigger/has_defensive_war_with):常作为前置条件,确认当前处于防御战状态后,再用 casualties_inflicted_by 判断防守方是否对入侵国造成了足够代价,用于触发"顽强抵抗"类事件。
  • [any_enemy_country](/wiki/trigger/any_enemy_country):与本 trigger 嵌套使用,可遍历所有敌国,检查是否存在至少一个敌国曾被己方造成大量伤亡,适合多线战争场景。
  • [country_event](/wiki/effect/country_event):在满足伤亡条件后作为 effect 触发专属事件,是最常见的"战损里程碑 → 事件奖励"搭配链路。

常见坑

  1. scope 与 opponent 方向混淆casualties_inflicted_by 的 scope 是承受方(伤亡的国家),opponent施加方(造成伤亡的国家)。新手容易写反,误以为 scope 是"打出伤亡的一方",导致判断结果始终为假。
  2. thousands 单位忽略:字段使用的是"千人"单位,填写 thousands > 200 表示 20 万人,直接填写 200000 会导致语法错误或逻辑错误,务必注意单位换算。

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

casualties_inflicted_by is commonly used in campaign achievement or scenario-trigger mods, such as determining whether a nation inflicted sufficient casualties on a rival during a historical campaign to unlock special decisions or national focus rewards. It can also be applied in AI strategic logic to evaluate actual casualty ratios in a given war, determining whether to trigger armistice or surrender events.

# Example: Poland unlocks a special decision when it inflicts over 200k casualties on Germany
GER = {
    casualties_inflicted_by = {
        opponent = POL
        thousands > 200
    }
}

Synergy

  • [casualties](/wiki/trigger/casualties) / [casualties_k](/wiki/trigger/casualties_k): Using these triggers together with casualties_inflicted_by allows you to check both "total own casualties" and "casualties inflicted on enemies" simultaneously, enabling calculation of bidirectional casualty ratios and constructing more comprehensive battle assessment conditions.
  • [has_defensive_war_with](/wiki/trigger/has_defensive_war_with): Commonly used as a precondition to confirm current defensive war status before using casualties_inflicted_by to determine whether the defending side inflicted sufficient cost on the invading nation, ideal for triggering "stubborn resistance" type events.
  • [any_enemy_country](/wiki/trigger/any_enemy_country): When nested with this trigger, allows iteration through all enemy nations to check whether at least one enemy nation suffered heavy casualties from your forces, suitable for multi-front war scenarios.
  • [country_event](/wiki/effect/country_event): After casualty conditions are met, triggers exclusive events as an effect—the most common "casualty milestone → event reward" chain pathway.

Common Pitfalls

  1. Confusion between scope and opponent direction: The scope of casualties_inflicted_by is the receiving side (the nation sustaining casualties), while opponent is the inflicting side (the nation causing casualties). Beginners often reverse this, mistakenly assuming scope refers to "the side dealing casualties," resulting in the condition always evaluating to false.
  2. Overlooking the thousands unit: The field uses the "thousands" unit; writing thousands > 200 represents 200,000 personnel. Directly entering 200000 will cause syntax or logic errors—unit conversion is essential.