trigger · state_population
Definition
- Supported scope:
STATE - Supported target:
none
Description
check the population in the state
state_populationSTATEnonecheck the population in the state
Hands-on notes are AI-generated and checked against the vanilla command vocabulary — treat them as a starting point, not authoritative reference. The definition above is the game's own documentation.
state_population is commonly used in population threshold-based decisions or events, such as restricting "colonial/construction decisions can only trigger in states with sufficient population" or determining the scale of occupied populations in resistance movement scripts. When combined with occupation laws and compliance mechanics, it allows certain policy options to take effect only in large-population states, avoiding logical inconsistencies.
# Only states with population exceeding a certain threshold can trigger this decision
available = {
state_population > 500000
}
[has_state_category](/wiki/trigger/has_state_category): State categories (urban/rural, etc.) are often strongly correlated with population scale. Using both together enables precise filtering for "large city state" scenarios, avoiding false matches when relying solely on population values in non-urban large states.[compliance](/wiki/trigger/compliance): In occupation-focused mods, compliance of high-population states has a more significant impact. Using both together allows designing condition chains like "high population and low compliance" to trigger suppression events.[state_population_k](/wiki/trigger/state_population_k): When needing concise comparisons using thousands as the unit, it can serve as an alternative or dual verification against this trigger, ensuring numerical logic consistency.[add_manpower](/wiki/effect/add_manpower): After population checks pass, manpower effects typically follow immediately. States with larger populations yield manpower values more proportionately, and coordinated use maintains narrative coherence in numerical design.state_population can only be called within STATE scope. Writing it inside a trigger block in COUNTRY scope will silently fail or error. Always ensure the outer scope has been switched to state-level via iterators like any_state/every_state.500000), while the similar trigger state_population_k uses thousands as the unit (e.g., 500). Mixing the two easily leads to threshold errors, causing conditions to always be true or always false.