Hands-On Usage
Commonly used in diplomatic or decision scenarios to detect whether a nation is accumulating a war justification against a specific target, thereby triggering warning events, enabling counter-decisions, or adjusting AI diplomatic strategy. For example, in a "diplomatic early warning" mod, you can issue a prompt when the player's ally begins preparations for war declaration against you:
# In a country event's trigger block, check whether Germany is justifying a war goal against France
trigger = {
tag = FRA
is_justifying_wargoal_against = GER # Check if France is preparing to declare war on Germany (reverse example)
}
# More common: in FRA's decision available, check if anyone is targeting you
available = {
any_enemy_country = {
is_justifying_wargoal_against = ROOT
}
}
Synergy
[any_enemy_country](/wiki/trigger/any_enemy_country): Iterates through all hostile or potentially threatening nations; combined with this trigger to filter out "nations accumulating war justifications." Commonly used for defensive reaction logic.
[has_defensive_war_with](/wiki/trigger/has_defensive_war_with): Once a war justification materializes into actual warfare, this can be used in succession to detect status chains from "pre-war → mid-war" scenarios.
[create_wargoal](/wiki/effect/create_wargoal): When detecting that the opponent is already accumulating justifications, trigger your own counter war goal creation, forming equivalent diplomatic pressure logic.
[add_opinion_modifier](/wiki/effect/add_opinion_modifier): After detecting war justification accumulation behavior, apply opinion penalties to third parties, simulating international condemnation of aggressive preparations.
Common Pitfalls
- Reversed scope direction: This trigger, written under which nation's scope, checks whether that nation is accumulating justification against the target, not whether "the target is accumulating justification against that nation." Newcomers often flip the active and passive parties; you must use a structure like
any_enemy_country = { is_justifying_wargoal_against = ROOT } to detect "someone targeting yourself."
- Trigger fails immediately after justification completion: Once a war justification is completed (i.e., ready to declare war) or war is declared directly, this trigger returns
false and cannot be used to detect "holding a completed war justification." In such cases, use [has_annex_war_goal](/wiki/trigger/has_annex_war_goal) or related conditions instead.