trigger · temperature
Definition
- Supported scope:
COMBATANT - Supported target:
none
Description
check combat province temperature
temperatureCOMBATANTnonecheck combat province temperature
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
temperature 常用于气候/天气相关的 mod 场景,例如为极寒或酷热地区的战斗添加特殊修正,或在冬季战役中判断作战部队是否处于严苛温度环境下从而触发特定战斗惩罚事件。它让 mod 作者能够在 COMBATANT 作用域内(即战斗双方某一方)精确过滤温度条件,从而区分不同地形气候下的战斗表现。
# 示例:极寒条件下,攻击方若无冬季战斗特质则承受额外惩罚
COMBATANT = {
is_attacker = yes
temperature < -10
NOT = { has_trait = winter_specialist }
}
temperature 搭配可避免条件过于宽泛。temperature 组合实现"有特质豁免、无特质受罚"的逻辑。temperature 只在 COMBATANT 作用域内有效,新手常误将其写在普通的 division 或 country 作用域下,导致脚本静默失效或报错,务必确认已进入战斗触发器的 COMBATANT 块。temperature > -10,实际上应使用 temperature < -10;建议在测试时配合 is_fighting_in_terrain 缩小范围来验证条件是否真正被触发。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.
temperature is commonly used in climate and weather-related mod scenarios, such as adding special modifiers to combat in extreme cold or hot regions, or determining whether combat forces are operating in harsh temperature conditions during winter campaigns to trigger specific combat penalty events. It enables mod authors to precisely filter temperature conditions within the COMBATANT scope (i.e., one side of the combatants) to distinguish combat performance across different terrain and climate types.
# Example: Under extreme cold conditions, the attacker suffers additional penalties if lacking winter combat traits
COMBATANT = {
is_attacker = yes
temperature < -10
NOT = { has_trait = winter_specialist }
}
temperature prevents conditions from being overly broad.temperature implements the logic of "traits grant exemption, lack of traits incurs penalty."temperature is only valid within the COMBATANT scope; beginners often mistakenly place it in regular division or country scopes, causing the script to silently fail or throw errors. Always confirm you are within the COMBATANT block of a combat trigger.temperature > -10 when trying to filter for "extreme cold" when temperature < -10 should be used instead. It is recommended to pair testing with is_fighting_in_terrain to narrow the range and verify whether the condition is truly being triggered.