Wiki

trigger · num_battalions_in_states

Definition

  • Supported scope:COUNTRY
  • Supported target:any

Description

Checks number of battalions in states (optionally filtering on battalion types). Using a custom tooltip is highly recommended since the default tooltip leaves out some information for the sake of readability.
Example:
num_battalions_in_states = {
	count > 5 (or <, =)
	states = { 550 559 }
	types = { infantry cavalry } [optional - will count all except excluded if not specified]
	exclude = { light_armor } [optional - will count all (included) if not specified]
}

Hands-On Notes

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.

Hands-On Usage

num_battalions_in_states is commonly used to determine whether the player or AI has assembled sufficient forces in specific states, thereby triggering decisions, missions, or events—for example, as a prerequisite for "launching a special operation only after concentrating infantry battalions on a certain border state," or for performing dynamic checks on logistics and defense line density.

# Example: Requires the player to deploy more than 10 infantry or cavalry battalions in specified states to activate a decision
available = {
    custom_trigger_tooltip = {
        tooltip = tt_need_battalions_on_border
        num_battalions_in_states = {
            count > 10
            states = { 9 10 11 }
            types = { infantry cavalry }
        }
    }
}

Synergy

  • [divisions_in_state](/wiki/trigger/divisions_in_state): Both are used to check troop deployment, with the former operating at battalion level and the latter at division level; typically used together to simultaneously limit the number of divisions and the composition of battalions.
  • [controls_state](/wiki/trigger/controls_state): Confirms actual control of the target state before counting battalions, avoiding counting states that are occupied and cannot be reinforced.
  • [has_army_size](/wiki/trigger/has_army_size): Assesses overall national military size at the macro level, forming a "global + local" dual condition with num_battalions_in_states' local force check, making trigger logic more rigorous.
  • [activate_targeted_decision](/wiki/effect/activate_targeted_decision): Once battalion conditions are met, use this effect to activate the corresponding targeted decision, which is the most common follow-up action.

Common Pitfalls

  1. Forgetting to add custom_tooltip: The default tooltip omits certain information (such as contents filtered by exclude), causing the tooltip players see to diverge from the actual judgment logic; it is strongly recommended to always wrap it with custom_trigger_tooltip.
  2. Confusion when types and exclude are specified simultaneously: types is a whitelist (count only these), while exclude is a blacklist (exclude these); if the same battalion type is specified in both, conflicts arise. If you only want to exclude certain battalion types, use exclude alone rather than mixing it with types.