trigger · min_planning
Definition
- Supported scope:
COMBATANT - Supported target:
none
Description
check if side has maximal planning bonus
min_planningCOMBATANTnonecheck if side has maximal planning bonus
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
min_planning 常用于战斗事件或决策树中,判断某一战斗方是否已达到最低规划加成阈值,从而触发特定的战术奖励或惩罚逻辑。例如在自定义战斗 modifier 的 mod 中,可以根据规划状态动态调整战场表现:
# 在战斗相关的 on_action 中使用
combatant_event = {
trigger = {
is_attacker = yes
min_planning = yes
}
# 攻方已获得最低规划加成时触发
}
min_planning 形成"下限/上限"组合,可区分规划处于"刚达到最低"与"完全满格"两种状态,实现精细化的战斗分支逻辑。min_planning 只在 COMBATANT scope 下有效,新手常在 country 或 unit_leader scope 里直接调用,导致脚本报错或条件永远不触发,必须确保在 combatant_event 或战斗相关的 on_action 回调中使用。has_max_planning 语义混淆:min_planning 检查的是"最低"规划加成,而非最高,初学者容易误以为两者等价或方向相反,建议结合官方日志输出实际测试,明确两个 trigger 各自的判断边界后再写分支逻辑。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.
min_planning is commonly used in combat events or decision trees to check whether a combatant has reached the minimum planning bonus threshold, thereby triggering specific tactical rewards or penalty logic. For example, in a custom combat modifier mod, you can dynamically adjust battlefield performance based on planning status:
# Usage in combat-related on_action
combatant_event = {
trigger = {
is_attacker = yes
min_planning = yes
}
# Triggers when the attacker has achieved minimum planning bonus
}
min_planning, allowing you to distinguish between "just reached minimum" and "completely maxed out" states, enabling fine-grained combat branch logic.min_planning only works in the COMBATANT scope. Beginners often call it directly within country or unit_leader scopes, causing script errors or triggers that never fire. Always ensure usage within combatant_event or combat-related on_action callbacks.has_max_planning: min_planning checks for the "minimum" planning bonus, not the maximum. Beginners often mistakenly think the two are equivalent or opposite. It's recommended to test with official logging output to clearly understand each trigger's judgment boundary before writing branch logic.