Wiki

trigger · divisions_in_border_state

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

checks for amount of divisions in specified state owned by current country.

实战 · 配合 · 坑

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

实战用法

divisions_in_border_state 常用于判断某国是否在边境州郡囤积了足够的兵力,从而触发外交事件、决议或 AI 战略调整。例如在边境紧张类 mod 中,可用于检测防守方是否部署了足够师团来解锁外交抗议选项,或在任务链中要求玩家在边境部署一定数量的部队才能推进。

# 在一个 focus 的 available 条件中,要求在某边境州有足够师团
available = {
    divisions_in_border_state = {
        state = 42        # 目标边境州 ID
        size > 3          # 至少 4 个师团
    }
}

配合关系

  • [divisions_in_state](/wiki/trigger/divisions_in_state):两者功能相近,divisions_in_state 检查任意州郡的师团数量,常与 divisions_in_border_state 对比使用,区分"内陆集结"与"边境前线部署"两种不同的战略判断场景。
  • [controls_state](/wiki/trigger/controls_state):在确认边境师团数量之前,先用此 trigger 验证己方是否实际控制目标州郡,避免逻辑上对无法控制的州进行无意义的数量检查。
  • [has_border_war_with](/wiki/trigger/has_border_war_with):边境战争场景下,常先用此 trigger 检查是否存在边境战争,再结合 divisions_in_border_state 判断该战线的兵力是否充足,构成完整的边境冲突条件链。
  • [add_political_power](/wiki/effect/add_political_power):作为上述 trigger 条件满足后的奖励 effect,例如玩家成功在边境部署足够师团时给予政治点数奖励,形成"部署 → 检测 → 奖励"的完整决议逻辑。

常见坑

  1. state 填写的是"被检测的州 ID"而非邻国 ID:新手常误以为参数是"边境对面的国家",实际上需要填写具体的州郡 ID,且该州必须与当前国家存在边境接壤关系,否则 trigger 始终不会返回预期结果。
  2. scope 必须是 COUNTRY 而非 STATE:此 trigger 统计的是"当前国家"在指定州内的师团数,如果误放在 STATE scope 的条件块(如 limit 嵌套在 every_owned_state 内部)中使用,会因 scope 不匹配导致判断失效或报错。

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

divisions_in_border_state is commonly used to check whether a country has concentrated sufficient military forces in a border state, thereby triggering diplomatic events, decisions, or AI strategy adjustments. For example, in border tension mods, it can be used to detect whether the defending side has deployed enough divisions to unlock diplomatic protest options, or in decision chains to require players to deploy a certain number of troops on the border before progressing.

# In a focus's available condition, require sufficient divisions in a border state
available = {
    divisions_in_border_state = {
        state = 42        # Target border state ID
        size > 3          # At least 4 divisions
    }
}

Synergy

  • [divisions_in_state](/wiki/trigger/divisions_in_state): Similar functionality; divisions_in_state checks the division count in any state and is often contrasted with divisions_in_border_state to differentiate between "inland concentration" and "border front deployment" in strategic assessment scenarios.
  • [controls_state](/wiki/trigger/controls_state): Before confirming border division counts, use this trigger first to verify that your country actually controls the target state, avoiding meaningless quantity checks on states you cannot control.
  • [has_border_war_with](/wiki/trigger/has_border_war_with): In border war scenarios, typically check for the existence of a border war using this trigger first, then combine with divisions_in_border_state to assess whether the front line has sufficient forces, forming a complete condition chain for border conflicts.
  • [add_political_power](/wiki/effect/add_political_power): Serves as a reward effect after the above trigger conditions are met; for example, grant political power when the player successfully deploys sufficient divisions on the border, forming a complete decision logic of "deploy → detect → reward".

Common Pitfalls

  1. The state parameter is the "ID of the state being checked" not the neighboring country's ID: Beginners often mistakenly believe the parameter refers to "the country across the border", but you actually need to specify the exact state ID, and that state must share a border with your current country, otherwise the trigger will never return the expected result.
  2. The scope must be COUNTRY not STATE: This trigger counts the divisions of the "current country" in the specified state; if mistakenly placed in a STATE scope condition block (such as limit nested within every_owned_state), it will fail to evaluate or error due to scope mismatch.