Hands-On Usage
any_country_of is commonly used in scenarios that require an overall check against a specific set of countries — such as Nordic union events, Axis/Allies-exclusive events, or checking whether any member of a given group is currently fighting a defensive war in order to unlock an aid resolution. Unlike any_allied_country, it lets developers explicitly specify a hard-coded country list or a scripted constant, with no dependency on runtime faction state.
# Usable when any one of the Soviet Union, the United States, or the United Kingdom has declared war
available = {
any_country_of = {
target = { SOV USA ENG }
has_offensive_war = yes
}
}
Synergy
- has_defensive_war — The most typical pairing: checks whether any country in the specified group is currently on the receiving end of an offensive war. Commonly used as an unlock condition for aid or alliance decisions.
- has_war_with — Combined with
any_country_of, this lets you precisely check whether any country in the specified group is at war with another particular country, rather than broadly checking for the existence of any war.
- is_in_faction — Often used outside or inside
any_country_of to filter down to the subset of listed countries that have joined a particular faction.
- has_government — Checks whether at least one country in the listed set holds a specific ideology. Frequently used in triggers for ideology spread or faction formation.
Common Pitfalls
target must be a brace-enclosed list or a constant: reference — a bare single tag is not valid. A common beginner mistake is writing target = GER instead of target = { GER }, which causes a script parse error or a silent failure.
- The condition block inside evaluates against the scope of each country in the
target list, not the current scope. Beginners often assume the inner triggers still execute under the original country scope and write conditions about their own country inside the block — in reality, those conditions are evaluated one by one against each target country, producing entirely different logic.