Hands-On Usage
any_country_division is commonly used to check whether a country has any divisions meeting specific conditions — for example, determining whether an enemy has deployed armored divisions, whether any division has fallen below a certain strength threshold, or verifying that the AI has already recruited units matching a target template. Typical use cases include event trigger conditions, the available block of decisions, and available checks inside focuses.
# Check whether Germany has any division with organization below 30
GER = {
any_country_division = {
unit_organization < 30
}
}
# Inside a focus available block: check whether the country has any fully-equipped armored division
focus = {
available = {
any_country_division = {
division_has_majority_template = {
template = "Light Armor Division"
}
}
}
}
Synergy
- unit_strength: Frequently nested inside
any_country_division to filter divisions whose combat strength is above or below a given threshold.
- unit_organization: Also used in the inner scope to evaluate a division's current organization level; combined with
any_country_division, this enables logic such as "trigger as soon as any single unit collapses."
- division_has_majority_template: Checks division type in the inner scope; paired with
any_country_division, it lets you verify whether a country has already built units matching a specific template.
- custom_trigger_tooltip: When the condition logic becomes complex, wrapping
any_country_division with this provides a clean localized tooltip, preventing players from seeing the verbose auto-generated tooltip text.
Common Pitfalls
- Wrong scope level:
any_country_division can only be used under a COUNTRY scope. If the current scope is already a STATE or DIVISION, it will throw an error or silently fail. A common beginner mistake is calling it directly inside a geographic scope such as any_state; you must first switch back to a country scope using keywords like OWNER or CONTROLLER before calling it.
- Confusing
any_country_division with division iteration inside any_state: any_country_division iterates over all divisions belonging to the country, regardless of which state they are located in. If you only want to check units within a specific state, you need to filter by location conditions in the inner scope — do not simply replace it with any_state. The two are not equivalent; swapping one for the other changes both the iteration range and the scope type.