Hands-On Usage
Commonly used in the prerequisite conditions of diplomatic events or national focuses to determine whether a non-aggression pact exists between two nations, thereby deciding whether to trigger specific diplomatic options or unlock subsequent decisions. For example, in Cold War mods, it can be used to prevent players from declaring war on nations that have signed non-aggression pacts, or to trigger narrative events for "treaty violation."
# In a national focus available block, require a non-aggression pact with the target nation to execute
available = {
has_non_aggression_pact_with = FROM
}
# In an event trigger, check if the current nation has a non-aggression pact with the Soviet Union
trigger = {
tag = GER
has_non_aggression_pact_with = SOV
}
Synergy
[has_defensive_war_with](/wiki/trigger/has_defensive_war_with): The presence or absence of a non-aggression pact often needs to be combined with defensive war detection; both are used together to determine whether the current hostile relationship conflicts with the agreement.
[can_declare_war_on](/wiki/trigger/can_declare_war_on): Works in conjunction with this trigger in war declaration restriction conditions to ensure that war can only be declared when no non-aggression pact exists.
[has_country_flag](/wiki/trigger/has_country_flag): Frequently paired with country flags to record whether a treaty has been unilaterally violated, providing status tracking for subsequent events.
[any_allied_country](/wiki/trigger/any_allied_country): When iterating through allies, combined with this trigger to filter out nations that are both allies and have non-aggression pacts with a third party, assisting in complex diplomatic logic judgment.
Common Pitfalls
- Reversing the scope direction: The scope of this trigger is the nation initiating the check, and the target is the treaty counterparty. Beginners often swap the two sides, causing the judgment to execute under the wrong nation scope, always returning false without realizing it.
- Assuming it accepts notation beyond standard country tags: The target only supports pronouns from the whitelist (
THIS, FROM, etc.) or concrete country tags; it cannot directly reference state/province scopes or other non-nation objects, otherwise the script will silently fail without error reporting.