Wiki

trigger · frontage_full

Definition

  • Supported scope:COMBATANT
  • Supported target:none

Description

check if sides front is full or can get more reinforcements

实战 · 配合 · 坑

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

实战用法

frontage_full 常用于战斗事件或 AI 决策脚本中,判断当前战斗方的正面宽度是否已经饱和,从而决定是否调整增援策略或触发特定战术事件。例如可以在自定义战斗事件中,当正面已满时给予不同的战斗修正,模拟"兵力过剩无法展开"的现实感。

# 示例:战斗事件触发条件,正面已满且己方处于进攻方时
combat_event = {
    id = my_mod.1
    trigger = {
        is_attacker = yes
        frontage_full = yes
    }
    # 事件内容...
}

配合关系

  • is_attacker — 进攻方正面更容易被填满,两者组合可精准区分进攻/防御时正面饱和的不同处理逻辑。
  • has_reserves — 正面已满时往往意味着部队只能待在预备队,配合此 trigger 可判断"有后备但无法投入"的僵局状态。
  • reserves — 用于进一步量化预备队数量,与 frontage_full 搭配可区分"正面满但预备队充裕"与"正面满且预备队耗尽"两种战况。
  • is_winning — 正面饱和且正在获胜时触发奖励,或正面饱和却处于劣势时触发撤退相关逻辑,常见于战斗动态事件设计。

常见坑

  1. 误将其用于非战斗 scopefrontage_full 仅在 COMBATANT scope(即战斗内的某一方)下有效,若放在国家或省份 scope 下脚本会静默报错或始终返回假,新手常忘记通过 any_combat_unit 等方式进入正确 scope。
  2. 混淆"正面满"与"兵力强":正面宽度饱和并不代表战力占优,新手容易将 frontage_full = yes 当作"我方兵力充足"的判断来使用,实际应配合 is_winningskill_advantage 等 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

frontage_full is commonly used in combat events or AI decision scripts to determine whether the current combatant's frontage width has reached saturation, thereby deciding whether to adjust reinforcement strategies or trigger specific tactical events. For example, in custom combat events, you can apply different combat modifiers when the frontage is full, simulating the realistic effect of "excess troops unable to deploy."

# Example: Combat event trigger condition, frontage full and own side is attacker
combat_event = {
    id = my_mod.1
    trigger = {
        is_attacker = yes
        frontage_full = yes
    }
    # Event content...
}

Synergy

  • is_attacker — The attacker's frontage tends to fill more easily; combining these two allows precise differentiation between saturation handling logic during offense versus defense.
  • has_reserves — A full frontage often means units can only remain in reserve; pairing with this trigger helps identify the "has reserves but cannot deploy" stalemate state.
  • reserves — Used to further quantify reserve unit counts; combined with frontage_full, it can distinguish between "frontage full but reserves abundant" and "frontage full and reserves depleted" combat scenarios.
  • is_winning — Trigger rewards when frontage is saturated and winning, or trigger retreat-related logic when saturated but at a disadvantage; commonly seen in dynamic combat event design.

Common Pitfalls

  1. Using it in non-combat scopes: frontage_full is only valid in COMBATANT scope (a side within a combat); placing it in a country or state scope will cause silent errors or always return false. Beginners often forget to enter the correct scope via methods like any_combat_unit.
  2. Confusing "frontage saturation" with "superior strength": A saturated frontage width does not indicate combat superiority. Beginners often mistakenly use frontage_full = yes to judge "our side has sufficient forces," when in fact it should be paired with triggers like is_winning or skill_advantage to comprehensively assess battlefield advantage.