Wiki

trigger · num_divisions

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Will compare towards the amount of divisions a country has control over, if strength matters use has_army_size.

实战 · 配合 · 坑

实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。

实战用法

num_divisions 常用于限制某国触发特定决议或事件的前提条件,例如只有当国家拥有足够数量的师团时才能发动某项军事扩张计划,或在 AI 策略中判断敌国兵力规模以决定是否宣战。注意该 trigger 统计的是师团数量而非战斗力,适合做"是否已完成动员"的门槛检查。

# 只有当本国拥有至少 24 个师团时,该决议才可用
available = {
    num_divisions > 23
}

配合关系

  • [has_army_size](/wiki/trigger/has_army_size):当需要同时检查师团数量实际兵力强度(装备/人员)时两者配合使用,num_divisions 把关数量,has_army_size 把关质量。
  • [divisions_in_state](/wiki/trigger/divisions_in_state):用于进一步确认某国的师团是否部署在特定州省,配合 num_divisions 可区分"总师团够不够"与"前线够不够"。
  • [has_army_manpower](/wiki/trigger/has_army_manpower):在判断一国军队规模时,常与 num_divisions 并列,前者反映在训人力储备,两者共同描绘出军备全貌。
  • [ai_wants_divisions](/wiki/trigger/ai_wants_divisions):在 AI 决策脚本中,num_divisions 常作为前提条件,配合 ai_wants_divisions 判断 AI 是否还需要继续扩充师团。

常见坑

  1. 把数量当强度:新手容易用 num_divisions 来判断某国"军事是否强大",但一个空架子师和一个满编精锐师在该 trigger 眼中毫无区别——凡是涉及战斗力比较,务必改用 [has_army_size](/wiki/trigger/has_army_size)
  2. 忽略控制权语义:该 trigger 统计的是该国控制的师团(含指派给盟友作战的部队),而非仅限于本土驻军,在多线战争或借调部队的场景下可能得到意料之外的结果,设计条件时需留意此差异。

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_divisions is commonly used to gate access to specific decisions or events based on minimum unit requirements. For example, you might restrict a military expansion plan to only trigger when a nation has enough divisions, or use it in AI scripts to evaluate enemy force size before deciding whether to declare war. Note that this trigger counts division quantity, not combat strength—it's ideal for threshold checks like "has mobilization been completed."

# This decision is only available if the country has at least 24 divisions
available = {
    num_divisions > 23
}

Synergy

  • [has_army_size](/wiki/trigger/has_army_size): When you need to check both division count and actual combat strength (equipment/manpower), use both together. num_divisions gates quantity; has_army_size gates quality.
  • [divisions_in_state](/wiki/trigger/divisions_in_state): Use this to verify whether a country's divisions are deployed in a specific state. Combined with num_divisions, you can distinguish between "enough total divisions" and "enough divisions on the frontline."
  • [has_army_manpower](/wiki/trigger/has_army_manpower): When assessing a nation's military scale, commonly paired with num_divisions. The former reflects personnel reserves; both together paint the full military picture.
  • [ai_wants_divisions](/wiki/trigger/ai_wants_divisions): In AI decision scripts, num_divisions often serves as a prerequisite condition, working alongside ai_wants_divisions to determine if the AI should continue expanding its division count.

Common Pitfalls

  1. Confusing quantity with strength: Beginners often use num_divisions to judge whether a nation is "militarily powerful," but an understrength skeleton division and a full-strength elite division look identical to this trigger—whenever combat power comparison matters, switch to [has_army_size](/wiki/trigger/has_army_size) instead.
  2. Overlooking ownership semantics: This trigger counts divisions controlled by the nation (including units assigned to allies for combat), not just domestically stationed troops. In multi-front wars or unit-lending scenarios, you may get unexpected results. Pay attention to this distinction when designing conditions.