Hands-On Usage
divisions_in_state is commonly used to check whether a country has concentrated sufficient forces in a critical state (such as capital states, resource states, or border states), thereby triggering events, unlocking decisions, or advancing AI strategic logic. For example, in a "defensive lines" mod, you can check within the available block of a decision whether your country has deployed the required number of infantry divisions in a designated state before allowing the player to execute subsequent decisions:
available = {
divisions_in_state = {
state = 42
size > 5
type = infantry
}
}
Synergy
[divisions_in_border_state](/wiki/trigger/divisions_in_border_state) — Similar troop detection for border directions; combining both allows you to form a "internal state + border state" dual deployment verification logic.
[controls_state](/wiki/trigger/controls_state) — First confirm that the state is under your control, then check garrison numbers, avoiding meaningless checks on enemy-occupied states.
[has_army_size](/wiki/trigger/has_army_size) — Evaluate military preparedness from both global and local state troop dimensions; commonly paired for AI offensive conditions.
[activate_targeted_decision](/wiki/effect/activate_targeted_decision) — Immediately activate subsequent decisions targeting the state once garrison conditions are met, forming a complete "deployment → unlock" workflow.
Common Pitfalls
- Comparison operators must be
> / < / =; many beginners mistakenly write size >= 5 or size == 5, which are invalid in HOI4 script syntax and will cause the condition block to fail parsing without obvious error messages.
- The
state field takes a state ID (integer), not a province ID; these are different concepts, and filling in a province ID will cause the condition to never match, making it extremely difficult to troubleshoot.