Wiki

trigger · has_manpower_for_recruit_change_to

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

check if manpower is enough to switch recruitment laws not to be negative

实战 · 配合 · 坑

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

实战用法

在设计征兵法案相关的决策或国策时,常用此 trigger 来保证玩家切换到更高征兵要求的法案前,当前人力储量不会因扣除而变为负数,避免出现人力"欠债"的异常状态。例如在一个允许手动切换征兵法的决策中:

available = {
    has_manpower_for_recruit_change_to = yes
}

配合关系

  • [current_conscription_amount](/wiki/trigger/current_conscription_amount):先检查当前实际征兵率,再配合本 trigger 共同构成"目标法案是否可安全切换"的双重验证逻辑。
  • [conscription_ratio](/wiki/trigger/conscription_ratio):用于对比当前人力消耗占比,与本 trigger 组合可给 AI 或玩家提供更精确的法案切换时机判断。
  • [add_ideas](/wiki/effect/add_ideas):通过 trigger 验证通过后,用此 effect 实际应用新的征兵法 idea,是最典型的"先判断后执行"配合链。
  • [has_manpower_for_recruit_change_to](/wiki/trigger/has_manpower_for_recruit_change_to)(自身嵌套于 limit):在 every_allied_country 等循环 scope 内用 limit 块限定只对人力充足的盟友执行征兵相关操作。

常见坑

  1. 误以为可以传入目标法案参数:该 trigger 不接受任何字段值,直接写 = yes 即可;新手容易尝试写成 = { idea = xxx } 形式,导致脚本报错或判断失效。
  2. 在非 COUNTRY scope 下使用:此 trigger 仅在国家 scope 下有效,若误写在 STATE 或 CHARACTER scope 内(例如放在 any_owned_state 的子块里),游戏会静默忽略或报错,逻辑不会按预期触发。

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

When designing decisions or national focuses related to conscription laws, this trigger is commonly used to ensure that before the player switches to a higher conscription requirement law, the current manpower reserves will not become negative due to deduction, avoiding the anomalous state of manpower "debt". For example, in a decision that allows manual switching of conscription laws:

available = {
    has_manpower_for_recruit_change_to = yes
}

Synergy

  • [current_conscription_amount](/wiki/trigger/current_conscription_amount): First check the current actual conscription rate, then combine with this trigger to form a dual-verification logic for "whether the target law can be safely switched".
  • [conscription_ratio](/wiki/trigger/conscription_ratio): Used to compare the current manpower consumption ratio; combining with this trigger can provide AI or players with more precise timing judgments for law switching.
  • [add_ideas](/wiki/effect/add_ideas): After the trigger verification passes, use this effect to actually apply the new conscription law idea; this is the most typical "verify then execute" synergy chain.
  • [has_manpower_for_recruit_change_to](/wiki/trigger/has_manpower_for_recruit_change_to) (nested within limit): Within looping scopes like every_allied_country, use the limit block to restrict conscription-related operations only to allies with sufficient manpower.

Common Pitfalls

  1. Mistakenly assuming you can pass target law parameters: This trigger accepts no field values; simply write = yes; beginners often try to write it in the form = { idea = xxx }, causing script errors or judgment failure.
  2. Using outside COUNTRY scope: This trigger is only valid within country scope; if mistakenly written within STATE or CHARACTER scope (for example, placed in a sub-block of any_owned_state), the game will silently ignore it or report an error, and the logic will not trigger as expected.