Hands-On Usage
any_occupied_country is commonly used to check whether the current country occupies territory belonging to specific enemies — for example, inside an available block of an event or decision, to detect whether any occupied country meets certain conditions (such as a specific tag, government type, etc.), thereby unlocking occupation policy options or special diplomatic choices.
# Example: the decision becomes available if any country occupied by the current country has a democratic government
available = {
any_occupied_country = {
has_government = democratic
}
}
It can also be used inside a trigger block to check whether any occupied country has not yet surrendered:
trigger = {
any_occupied_country = {
has_war = yes
has_capitulated = no
}
}
Synergy
- has_government — The most common pairing; filters occupied countries by ideology to determine whether to trigger occupation or puppetization logic.
- is_puppet_of — Used to exclude countries that are already your puppets, preventing redundant checks on subjects already handled.
- has_capitulated — Combined with
any_occupied_country to distinguish between "territory occupied but still resisting" and "fully capitulated" states.
- tag — Pinpoints a specific target country inside the loop body, narrowing the scope of
any_occupied_country to a concrete country tag.
Common Pitfalls
-
Scope confusion: any_occupied_country must be called from a COUNTRY scope. Beginners often call it from a state or division scope, causing script errors or silent failures. An occupied country refers to any foreign country that has at least one state occupied by the current country — not merely province control. Be careful to distinguish this from logic like controls_state.
-
Assuming it iterates over all occupied countries: any_occupied_country returns true as soon as any single country satisfies the condition. It cannot be used to "perform an action on every occupied country" — that is the responsibility of every_country on the effect side with appropriate filters. Mixing up the two will cause your logic to behave in completely unintended ways.