Hands-On Usage
any_subject_country is commonly used to check whether an overlord has at least one subject that meets specific conditions — for example, whether a subject has researched a particular technology, holds a certain government type, or has reached a given autonomy level — in order to trigger diplomatic events or decisions. Typical use cases include: checking in an imperial-style mod whether a particular party is dominant in one of the overlord's colonies, or whether a subject has fallen into civil war.
# Check whether any subject country is at war and has a fascist government
any_subject_country = {
has_war = yes
has_government = fascism
}
Synergy
- is_subject_of: Often paired with
any_subject_country to verify the overlord–subject relationship from the subject's own perspective, enabling two-way condition checks.
- has_government: Used inside an
any_subject_country block to filter subjects by ideology — the single most common inner filter condition.
- has_war: Used inside the block to check whether a given subject is currently at war; frequently used to trigger the overlord's aid or intervention decisions.
- set_autonomy: Once the
any_subject_country condition is satisfied, this effect is applied in the effect block to adjust a subject's autonomy level — one of the most direct follow-up actions.
Common Pitfalls
- Scope direction confusion:
any_subject_country must be called from the overlord's (COUNTRY) scope. If you want to check "am I a subject of a certain country?" from within the subject's own scope, use is_subject_of instead — calling any_subject_country there will produce completely inverted logic and will typically return false.
- The inner scope has already switched: Once inside an
any_subject_country = { } block, the scope has switched to the subject country being iterated. You cannot directly reference the overlord's flags or conditions inside the block; use the ROOT / PREV prefix to refer back to the overlord, otherwise your checks will target the wrong country entirely.