Hands-On Usage
is_ally_with is commonly used in the available/trigger blocks of diplomatic events or decisions to check whether the current nation and target nation are in an allied relationship, thereby restricting specific options to allies only—for example, military aid decisions or joint operation events. This trigger simultaneously recognizes faction members, subject-overlord relationships (suzerain/vassal), and identical nations, providing broader coverage than checking faction membership alone.
# Decision: Joint military exercise available only to ally Italy
available = {
is_ally_with = ITA
has_war = no
}
Synergy
[any_allied_country](/wiki/trigger/any_allied_country): When you need to check "whether a relationship exists with any ally meeting certain conditions," it can be paired with is_ally_with for double filtering—the former iterates through all allies, the latter pinpoints a specific nation.
[has_defensive_war_with](/wiki/trigger/has_defensive_war_with): Often used in parallel with is_ally_with to determine the compound condition "in defensive war alongside an ally," triggering aid or joint defense events.
[add_to_faction](/wiki/effect/add_to_faction): In an effect block, the operation to invite a nation into a faction is only executed when is_ally_with returns false, preventing duplicate additions of nations already allied.
[exists](/wiki/trigger/exists): Before using, confirm the target nation tag exists in the current game session to prevent unexpected trigger behavior caused by the nation being annexed.
Common Pitfalls
- Mistaking it as only checking faction membership: Beginners often assume
is_ally_with is equivalent to checking "same faction member," but it also returns true for subject-overlord relationships. If your scenario requires strict distinction between "faction allies" and "subject-overlord relationships," you must use additional conditions to exclude vassals.
- Using outside COUNTRY scope: This trigger only supports COUNTRY scope. If mistakenly used within STATE or UNIT LEADER scopes, it will cause script errors or silent failure. Ensure the outer scope is nation-level.