Wiki

trigger · has_faction_military_unlocked

Definition

  • Supported scope:COUNTRY
  • Supported target:any

Description

Whether the faction has unlocked the military operations

### Examples

TAG = { has_faction_military_unlocked = yes }

实战 · 配合 · 坑

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

实战用法

此 trigger 常见于派系 mod 或联盟机制相关的脚本中,用于判断某国所在派系是否已解锁军事行动权限,从而决定是否显示或激活相关决议、焦点分支。例如,可以在一个派系联合军事行动的 decision 的 available 块中作前置校验:

available = {
    is_faction_leader = yes
    has_faction_military_unlocked = yes
}

配合关系

  • [faction_upgrade_level](/wiki/trigger/faction_upgrade_level):常配合使用,用于进一步判断派系升级等级是否达到军事行动解锁的门槛,两者共同构成分层条件。
  • [has_completed_faction_goal](/wiki/trigger/has_completed_faction_goal):派系军事解锁通常与特定派系目标完成挂钩,配合用于检验完整的解锁前置链是否满足。
  • [faction_goal_fulfillment](/wiki/trigger/faction_goal_fulfillment):用于量化判断派系目标完成程度,与本 trigger 搭配可实现「达成一定进度才显示军事选项」的分级设计。
  • [add_faction_initiative](/wiki/effect/add_faction_initiative):当条件满足后,在 effect 块中调用此 effect 推进派系行动力,逻辑上形成「先判断军事已解锁,再增加主动权」的完整流程。

常见坑

  1. Scope 错误:此 trigger 必须在 COUNTRY scope 下使用,若误写在 STATE 或 CHARACTER scope 内将直接报错或静默返回假,新手调试时应优先检查当前 scope 是否为国家。
  2. 混淆「派系领袖」与「普通成员」:该 trigger 检查的是当前国家所属派系是否解锁,而非当前国家自身是否有权限;若派系领袖尚未推进对应升级,成员国调用此 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

This trigger is commonly found in faction mods or alliance system-related scripts, used to determine whether a nation's faction has unlocked military action permissions, thereby deciding whether to display or activate relevant decisions and focus branches. For example, it can serve as a prerequisite check in the available block of a decision for a faction's joint military operation:

available = {
    is_faction_leader = yes
    has_faction_military_unlocked = yes
}

Synergy

  • [faction_upgrade_level](/wiki/trigger/faction_upgrade_level): Commonly used in conjunction to further check whether the faction's upgrade level meets the threshold for unlocking military actions; both together form a layered condition.
  • [has_completed_faction_goal](/wiki/trigger/has_completed_faction_goal): Faction military unlock is typically tied to completion of specific faction objectives; used together to verify whether the complete unlock prerequisite chain is satisfied.
  • [faction_goal_fulfillment](/wiki/trigger/faction_goal_fulfillment): Used to quantitatively assess the completion progress of faction objectives; paired with this trigger enables tiered design such as "display military options only after reaching certain progress."
  • [add_faction_initiative](/wiki/effect/add_faction_initiative): Once conditions are met, invoke this effect within the effect block to advance faction initiative; logically forms a complete flow of "first verify military is unlocked, then increase authority."

Common Pitfalls

  1. Scope Error: This trigger must be used under COUNTRY scope; if mistakenly written within STATE or CHARACTER scope it will cause a direct error or silently return false. When debugging, beginners should prioritize checking whether the current scope is at the national level.
  2. Confusing "Faction Leader" with "Regular Members": This trigger checks whether the nation's current faction has unlocked the feature, not whether the nation itself has permission; if the faction leader has not yet advanced the corresponding upgrade, member nations calling this trigger will likewise return false. Do not mistake this for an error in script syntax.