Wiki

trigger · has_army_experience

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Compares current country's army experience with right side value.
 has_army_experience < <value>

实战 · 配合 · 坑

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

实战用法

has_army_experience 常用于判断国家当前陆军经验值是否满足某个阈值,典型场景包括:限制某些需要消耗大量陆军经验的决议或国策只在经验储备充足时才可用,或在 AI 策略中判断是否有能力研究新学说。例如,在一个决议的 available 块中限制经验门槛:

available = {
    has_army_experience > 50
}

配合关系

  • [has_air_experience](/wiki/trigger/has_air_experience):与空军经验判断并列使用,当一个决议同时消耗多种经验时,可在同一 available 块内同时检查两种经验储备是否达标。
  • [army_experience](/wiki/effect/army_experience):在 effect 块中消耗或增加陆军经验的命令,通常与本 trigger 配合——先用 trigger 确认有足够经验,再用 effect 执行扣除操作,避免经验进入负值。
  • [has_doctrine](/wiki/trigger/has_doctrine):判断国家已研究的学说,与 has_army_experience 联合使用可构建"既有足够经验储备、又满足学说前提"的复合解锁条件。
  • [command_power](/wiki/trigger/command_power):类似的数值比较型 trigger,常与 has_army_experience 一起出现在同一 available 块,对多种指挥资源同时设置门槛。

常见坑

  1. 忘记比较运算符:新手容易直接写 has_army_experience = 50 而不加 < / > / >= 等运算符,这会导致脚本解析错误或结果不符合预期;该 trigger 的语义是"比较",必须明确写出比较符号。
  2. 将 trigger 误放进 effect 块has_army_experience 是纯条件判断,不能放在 effect 块内直接当作扣除命令使用,实际扣除经验需要使用 army_experience effect;混淆两者会导致经验既未被正确判断也未被正确消耗。

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

has_army_experience is commonly used to check whether a country's current army experience meets a certain threshold. Typical scenarios include restricting certain decisions or national focuses that consume large amounts of army experience to only be available when experience reserves are sufficient, or determining in AI strategies whether there is capacity to research new doctrines. For example, to enforce an experience threshold in a decision's available block:

available = {
    has_army_experience > 50
}

Synergy

  • [has_air_experience](/wiki/trigger/has_air_experience): Used in parallel with air experience checks. When a decision consumes multiple types of experience, both experience reserves can be validated simultaneously within the same available block.
  • [army_experience](/wiki/effect/army_experience): The command to consume or add army experience within an effect block. Typically paired with this trigger—first use the trigger to confirm sufficient experience exists, then execute the effect to deduct it, preventing experience from going negative.
  • [has_doctrine](/wiki/trigger/has_doctrine): Checks which doctrines a country has researched. Combined with has_army_experience, it enables building composite unlock conditions such as "has sufficient experience reserves AND meets doctrine prerequisites."
  • [command_power](/wiki/trigger/command_power): A similar value-comparison trigger that frequently appears alongside has_army_experience in the same available block, setting thresholds for multiple command resources simultaneously.

Common Pitfalls

  1. Forgetting comparison operators: Beginners often write has_army_experience = 50 without including comparison operators like < / > / >=, causing script parsing errors or unexpected results. This trigger's semantics require comparison, so the operator must be explicitly stated.
  2. Placing the trigger in an effect block: has_army_experience is a pure condition check and cannot be placed directly in an effect block as a deduction command. Actual experience consumption requires the army_experience effect. Confusing the two results in experience being neither properly validated nor properly consumed.