Hands-On Usage
all_subject_countries is commonly used to check whether a overlord meets a prerequisite requiring that all subjects/puppets satisfy a given condition — for example, verifying that every subject has completed industrialization, or confirming that all subjects have joined a war before declaring one. It is also useful in achievement-style mods to determine whether the player has brought all subjects into the same faction.
# Only allow activating a decision when all subject countries are at war and have the war_economy idea
available = {
all_subject_countries = {
has_war = yes
has_idea = war_economy
}
}
Synergy
- is_subject — use alongside
all_subject_countries to further confirm the subject relationship type within the subject's own scope, preventing allies from being mistakenly matched.
- has_government — frequently nested inside
all_subject_countries to verify that every subject shares the same government type, serving as a completion condition for ideology-spread mods.
- num_subjects — use this trigger first to confirm the subject count is greater than 0 before calling
all_subject_countries, preventing the logical loophole where an all-type trigger returns true by default when the subject list is empty.
- set_autonomy — use in tandem: once the
all_subject_countries condition is satisfied, batch-adjust subject autonomy levels inside an effect block.
Common Pitfalls
all-type triggers return true when there are zero subjects: When a country has no subjects at all, all_subject_countries evaluates to true (a universal proposition over an empty set is vacuously true). Beginners often assume it would return false in this case — always guard against this with a num_subjects > 0 precondition.
- Scope mixing causes target resolution to fail:
all_subject_countries can only be used inside a COUNTRY scope; placing it inside a STATE or CHARACTER scope will cause it to fail silently. Additionally, THIS/ROOT inside the block refers to the subject country itself, not the overlord — use PREV or FROM to trace back to the overlord's data.