Hands-On Usage
all_country is commonly used in global events or decisions that should only fire when every country meets a given condition — for example, verifying that all major countries have signed a ceasefire, or that all faction members are at war. Inside an available or trigger block it acts as a global gate, preventing players or the AI from triggering critical story nodes before the conditions are truly met.
# Example: the decision is only available when no country in the world is at war
available = {
all_country = {
NOT = { has_war = yes }
}
}
# Example: fire an event only when every country holds a specific idea (e.g. world_peace_accord)
trigger = {
all_country = {
has_idea = world_peace_accord
}
}
Synergy
- any_enemy_country:
all_country checks whether all countries satisfy a condition, while any_enemy_country checks whether at least one enemy country does. The two are semantically complementary and are often combined to build "all / at least one" logic.
- has_war: One of the most common inner checks used with
all_country. It determines whether every country is in — or out of — a war, making it the go-to pairing for global peace/war condition checks.
- has_government: In alliance or ideology-spread scenarios, pair this with
all_country to verify that every country has unified under a single government type. Frequently seen when scripting ideology-victory conditions.
- is_in_faction: Used for faction-related checks. Combined with
all_country, it can verify that every country has joined a particular faction — a common requirement for faction-hegemony achievement triggers.
Common Pitfalls
- Scope confusion: Inside
all_country the scope shifts to each country being iterated. Beginners often assume ROOT still refers to the "current" country in the usual sense, but ROOT actually points to the original scripting country, while unqualified commands refer to the country currently being iterated. Failing to keep this distinction straight causes condition logic to silently evaluate the wrong target.
- Performance and scope over-reach:
all_country iterates over every country that exists in the game, including minor nations and puppets. Calling it frequently inside complex triggers introduces unnecessary performance overhead. If you only need to check a specific subset of countries (such as faction members), prefer a more targeted iteration trigger rather than using all_country with heavy limit filtering.