Hands-On Usage
any_other_country is commonly used to check whether at least one other country meets a specific set of conditions — for example, determining whether another major power is already at war, or whether an ally exists — in order to drive event triggers or the available condition on decisions. It is also useful in diplomacy-focused mods for excluding the current country from war declaration or alliance logic.
# Check whether any other major country is at war and already in a faction
available = {
any_other_country = {
is_major = yes
has_war = yes
is_in_faction = yes
}
}
Synergy
- has_war — The most common inner condition; used to filter for countries currently at war. Paired with
any_other_country, it lets you check whether the global war situation has reached a trigger threshold.
- is_in_faction — Filters for countries that have already joined a faction. Combined with
any_other_country, this lets you determine whether a potential ally or hostile bloc member exists.
- has_government — Checks the government type of other countries in the inner scope; frequently used in ideology-spread mods to determine whether a particular doctrine has already taken hold elsewhere.
- is_neighbor_of — Paired with
any_other_country to restrict the scope to neighboring countries, preventing unintended hits on distant nations from a full global iteration.
Common Pitfalls
- Forgetting that it excludes the current country:
any_other_country does not include the country that owns the current scope. If your logic needs to cover "including self," this trigger cannot substitute for any_allied_country or similar iteration triggers — they behave differently, and mixing them up will cause conditions to never fire or produce logical errors.
- Unnarrowed inner scope causing performance issues:
any_other_country iterates over every country that exists in the game. If the inner conditions are overly complex — especially when they nest multiple additional iteration triggers — this can produce noticeable performance overhead in large mods. Cheap filter conditions such as exists = yes or is_major = yes should be placed first to cut down the iteration as early as possible.