trigger · is_border_war
Definition
- Supported scope:
CHARACTER,COMBATANT - Supported target:
any
Description
Checks if a the combatant or leader has a border war
is_border_warCHARACTER, COMBATANTanyChecks if a the combatant or leader has a border war
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
is_border_war 常用于边境战争事件链或决策中,用来判断某位将领或战斗员当前是否正处于边境冲突状态,从而触发专属的对话、特性奖励或战役选项。例如在一个自定义战争事件中,限制某个决策只对正在边境战争中的指挥官可用:
# 决策:激励边境前线将领
available = {
is_border_war = yes
is_corps_commander = yes
}
[is_corps_commander](/wiki/trigger/is_corps_commander) / [is_field_marshal](/wiki/trigger/is_field_marshal):边境战争通常由特定级别的指挥官领导,配合兵种/级别判断可以精确锁定目标角色,避免条件过于宽泛。[has_trait](/wiki/trigger/has_trait):用于检查处于边境战争中的将领是否已持有某个特性,从而决定是否再叠加新的战争相关特性奖励。[add_unit_leader_trait](/wiki/effect/add_unit_leader_trait):在确认角色正处于边境战争后,通过此 effect 为其授予专属边境作战特性,形成"判断→授予"的标准流程。[unit_leader_event](/wiki/effect/unit_leader_event):当 is_border_war = yes 成立时触发专属将领事件,用于构建边境战争期间的叙事事件链。is_border_war 必须在 CHARACTER 或 COMBATANT scope 下使用,新手经常误将其写在国家 scope(如 country_event 的顶层 trigger 块)中,导致脚本报错或条件永远不满足,需要先用 any_army_leader / any_character 等迭代进入正确 scope 再做判断。no,应改用其他战争状态相关条件。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.
is_border_war is commonly used in border war event chains or decisions to check whether a specific leader or combatant is currently engaged in a border conflict, thereby triggering exclusive dialogue, trait rewards, or campaign options. For example, in a custom war event, you can restrict a decision to only be available to commanders actively involved in border warfare:
# Decision: Inspire border front commanders
available = {
is_border_war = yes
is_corps_commander = yes
}
[is_corps_commander](/wiki/trigger/is_corps_commander) / [is_field_marshal](/wiki/trigger/is_field_marshal): Border wars are typically led by commanders of specific ranks. Combining them with unit type/rank checks allows you to precisely target the intended characters and avoid overly broad conditions.[has_trait](/wiki/trigger/has_trait): Used to check whether a leader engaged in border warfare already possesses a certain trait, helping determine whether to stack additional war-related trait rewards.[add_unit_leader_trait](/wiki/effect/add_unit_leader_trait): After confirming a character is in border warfare, use this effect to grant them exclusive border combat traits, establishing a standard "check → grant" workflow.[unit_leader_event](/wiki/effect/unit_leader_event): Trigger exclusive leader events when is_border_war = yes is true, allowing you to construct narrative event chains during border conflicts.is_border_war must be used under CHARACTER or COMBATANT scope. Beginners often mistakenly place it at the country scope level (such as the top-level trigger block in country_event), causing script errors or conditions that never evaluate to true. You must iterate into the correct scope using any_army_leader / any_character or similar constructs before performing the check.no. Use other war-state-related conditions instead.