Wiki

trigger · army_manpower_in_state

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Checks for amount manpower currently the target state with option to specify a type.
Example:
army_manpower_in_state = {
	state = <id> (variables supported)
	amount < <int> (variables supported)
	type > <equipment_type> (armor, infantry, etc.)

实战 · 配合 · 坑

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

实战用法

army_manpower_in_state 常用于判断某州是否驻扎了足够的兵力,例如制作防线巩固决议时检查守备兵力是否达标,或在事件/任务中验证玩家是否在关键州部署了充足兵员。以下示例检查某州的步兵兵力是否低于阈值,用于触发增援警告:

# 在某决议/事件的 trigger 块中
army_manpower_in_state = {
    state = 11
    amount < 5000
    type = infantry
}

配合关系

  • [divisions_in_state](/wiki/trigger/divisions_in_state):两者常搭配使用——先用 divisions_in_state 确认该州有无师级单位部署,再用本 trigger 精确判断兵力数量,避免仅凭数量误判空师占位的情况。
  • [controls_state](/wiki/trigger/controls_state):通常先确认己方实际控制目标州,再检查其中的兵力,防止对敌占区的兵力做出错误判断。
  • [add_manpower](/wiki/effect/add_manpower):当检测到某州兵力不足时,在 effect 块中配合使用以补充人力资源,形成"检测→补给"的完整逻辑链。
  • [has_army_manpower](/wiki/trigger/has_army_manpower)has_army_manpower 检查的是全国人力库存,与本 trigger 的州级驻军兵力形成互补,两者一起使用可以同时把控宏观储备与局部部署。

常见坑

  1. type 字段填写错误type 接受的是装备大类关键字(如 infantryarmor),而非具体装备科技名称或师模板名称,填写不存在的类型会导致条件静默失效(始终为假),难以排查。
  2. amount 比较运算符方向混淆:字段语法中比较符号写在 amount 关键字之后、数值之前(如 amount < 5000),新手容易照搬普通赋值写法漏掉运算符或将方向写反,导致条件判断逻辑完全相反。

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

army_manpower_in_state is commonly used to determine whether a state has sufficient troop strength stationed in it. For example, it can validate garrison strength when creating a fortification consolidation decision, or verify in events/missions whether the player has deployed adequate manpower in critical states. The following example checks whether infantry manpower in a state falls below a threshold, triggering a reinforcement warning:

# In a trigger block of a decision/event
army_manpower_in_state = {
    state = 11
    amount < 5000
    type = infantry
}

Synergy

  • [divisions_in_state](/wiki/trigger/divisions_in_state): These two are frequently used together—first use divisions_in_state to confirm whether the state has any divisions deployed, then use this trigger to precisely assess manpower quantity, avoiding misinterpretation caused by relying solely on unit count (which could indicate empty divisions occupying the space).
  • [controls_state](/wiki/trigger/controls_state): Typically first confirm that your side actually controls the target state, then check the manpower within it, preventing incorrect judgments about manpower in enemy-occupied territories.
  • [add_manpower](/wiki/effect/add_manpower): When insufficient manpower is detected in a state, use this in conjunction in the effect block to replenish human resources, forming a complete "detection→resupply" logic chain.
  • [has_army_manpower](/wiki/trigger/has_army_manpower): has_army_manpower checks the national manpower pool, which complements this trigger's state-level garrison manpower. Using both together allows you to simultaneously control both macro reserves and local deployments.

Common Pitfalls

  1. Incorrect type field entry: The type field accepts equipment category keywords (such as infantry, armor), not specific equipment technology names or division template names. Entering a non-existent type causes the condition to silently fail (always evaluates to false), making it difficult to debug.
  2. Confusion over amount comparison operator direction: The syntax places the comparison operator after the amount keyword and before the value (e.g., amount < 5000). Beginners often mistakenly omit the operator by copying standard assignment syntax or reverse the direction, resulting in completely inverted condition logic.