Wiki

trigger · garrison_manpower_need

Definition

  • Supported scope:COUNTRY
  • Supported target:THIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITAL

Description

check the amount of manpower needed by garrisons

实战 · 配合 · 坑

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

实战用法

garrison_manpower_need 常用于检测某国当前驻军所需的兵力缺口,典型场景是在决策或国策中判断玩家/AI 是否面临驻军压力过大的问题,从而触发补充兵员或调整占领政策的事件。例如,当驻军人力需求超过某个阈值时,自动激活一个应急征兵决策:

available = {
    garrison_manpower_need > 50000
    has_manpower > 0
}

配合关系

  • [has_army_manpower](/wiki/trigger/has_army_manpower):常与 garrison_manpower_need 一同使用,对比总可用兵力与驻军需求,判断是否存在实际缺口而非单纯需求量高。
  • [add_manpower](/wiki/effect/add_manpower):在 garrison_manpower_need 判断为真后,通过该 effect 向国家补充人力,直接响应驻军短缺问题。
  • [controls_state](/wiki/trigger/controls_state):占领地越多驻军需求越高,配合此 trigger 可以精确限定触发范围,避免对尚未大规模占领的国家误触。
  • [conscription_ratio](/wiki/trigger/conscription_ratio):驻军人力不足时往往同步检查征兵率是否有提升空间,两者组合可构成完整的人力管理条件链。

常见坑

  1. 误将其用于 STATE scope:该 trigger 仅在 COUNTRY scope 下有效,初学者容易在 any_owned_stateany_controlled_state 的子块内直接写它,导致脚本报错或静默失效,需确保始终处于国家 scope 层级。
  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

garrison_manpower_need is commonly used to detect the current manpower shortage for garrison forces in a country. Typical scenarios include using it in decisions or national focuses to determine whether the player or AI is facing excessive garrison pressure, thereby triggering events to replenish troops or adjust occupation policies. For example, automatically activate an emergency conscription decision when garrison manpower demand exceeds a certain threshold:

available = {
    garrison_manpower_need > 50000
    has_manpower > 0
}

Synergy

  • [has_army_manpower](/wiki/trigger/has_army_manpower): Commonly used alongside garrison_manpower_need to compare total available manpower against garrison requirements, determining whether an actual shortage exists rather than just high demand figures.
  • [add_manpower](/wiki/effect/add_manpower): After garrison_manpower_need evaluates to true, use this effect to replenish manpower to the country, directly addressing garrison shortages.
  • [controls_state](/wiki/trigger/controls_state): The more states occupied, the higher the garrison demand. Combined with this trigger, you can precisely limit the scope to avoid accidentally triggering on countries that haven't undergone large-scale occupation.
  • [conscription_ratio](/wiki/trigger/conscription_ratio): When garrison manpower is insufficient, it's often necessary to simultaneously check whether conscription rate has room for increase. Using both together creates a complete manpower management condition chain.

Common Pitfalls

  1. Mistakenly using it in STATE scope: This trigger only functions in COUNTRY scope. Beginners often write it directly within sub-blocks of any_owned_state or any_controlled_state, causing script errors or silent failures. Always ensure you remain at the nation scope level.
  2. Overlooking dynamic changes in garrison demand as occupied territories fluctuate: Novices often set the threshold to a fixed value and never adjust it afterward. However, as the war progresses and occupied territories increase or decrease, the demand figures constantly change. It's recommended to dynamically update thresholds in combination with ratio-based triggers or events, rather than hard-coding an absolute number for long-term judgment.