Hands-On Usage
is_fighting_in_weather is commonly used in mods that implement weather-related traits or combat events, such as triggering special combat bonuses for certain elite units in extreme weather conditions, or designing dedicated event chains for blizzard/desert heat battles. Note that this trigger operates in COMBATANT scope (i.e., the combatant side), so it typically appears in combat-related on_action or combat modifier condition blocks.
# Example: Elite mountain divisions gain special modifier when fighting in winter storms or arctic waters
combat_modifier = {
allowed = {
has_trait = mountaineer
is_fighting_in_weather = { artic_water snow }
}
attack = 0.10
defense = 0.15
}
Synergy
- is_fighting_in_terrain: Weather and terrain often jointly determine the battle environment; these are frequently combined to precisely filter for compound extreme conditions like "heavy snow + mountains."
- is_attacker / is_defender: When combined with attacker/defender status checks, you can distinguish between two vastly different tactical scenarios: "forcing an advance through blizzards" versus "holding ground using terrain advantages."
- has_trait: Weather bonuses typically only apply to units with specific traits (such as winter_specialist); using these two together prevents indiscriminate benefits for all units.
- night: Night combat and severe weather often occur together; combining these checks allows you to simulate extreme battle scenarios with severely reduced visibility.
Common Pitfalls
- Scope Errors: This trigger is only valid in COMBATANT scope. If placed in a country scope or division scope condition block, it will silently fail (always returning false). Beginners often mistakenly place it in division_trigger or national event trigger blocks.
- Weather Identifier Spelling: Official weather keys (such as
artic_water—note it is not arctic_water) come from game internal definitions. Spelling errors will not generate warnings but the condition will never be satisfied. It is recommended to copy directly from vanilla files rather than relying on memory.