Wiki

trigger · faction_goal_fulfillment

Definition

  • Supported scope:COUNTRY
  • Supported target:any

Description

Checks fulfillment of a faction goal for the current country's faction

### Examples

TAG = { faction_goal_fulfillment = { goal = goal_id value > X # supports > and <, can accept variables, can be repeated multiple times } }

实战 · 配合 · 坑

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

实战用法

faction_goal_fulfillment 常用于阵营系统类 mod 中,检测某个阵营目标的完成进度是否达到门槛,从而解锁奖励、触发事件或开放新决议。例如在合作胜利条件 mod 里,当阵营目标完成度超过某一阈值时才允许宣战或触发特殊聚焦:

available = {
    faction_goal_fulfillment = {
        goal = conquer_europe
        value > 0.75
    }
}

配合关系

  • [has_completed_faction_goal](/wiki/trigger/has_completed_faction_goal):两者常并列使用,先用 has_completed_faction_goal 判断目标是否完全完成,再用本 trigger 检测中间进度,形成多级条件门。
  • [add_faction_goal](/wiki/effect/add_faction_goal):在 effect 块中动态添加阵营目标后,随即在对应 trigger 块里用本 trigger 追踪其进度,形成"创建→检测"闭环。
  • [faction_manifest_fulfillment](/wiki/trigger/faction_manifest_fulfillment):两者语义相近,常一同出现在同一 limit 块中,分别检测阵营目标与阵营宣言的完成程度,确保条件判断更全面。
  • [add_faction_goal_slot](/wiki/effect/add_faction_goal_slot):扩展阵营目标槽位后,需配合本 trigger 对新槽目标进行进度监控,保证脚本逻辑完整。

常见坑

  1. 忽略 scope 必须是拥有阵营的国家:若当前国家不在任何阵营中,或所指定的 goal 不属于该国所在阵营,trigger 会静默返回 false 而不报错,容易导致条件永远不满足却难以排查。
  2. value 比较符写反或漏写:本 trigger 的 value 支持 >< 两种比较,新手常误写成 value = X(等号赋值语法),脚本不会报错但逻辑完全失效,务必确认使用 ><

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

faction_goal_fulfillment is commonly used in faction system mods to check whether the completion progress of a faction goal has reached a threshold, thereby unlocking rewards, triggering events, or opening new decisions. For example, in a cooperative victory condition mod, when faction goal completion exceeds a certain threshold, it allows declarations of war or triggers special focuses:

available = {
    faction_goal_fulfillment = {
        goal = conquer_europe
        value > 0.75
    }
}

Synergy

  • [has_completed_faction_goal](/wiki/trigger/has_completed_faction_goal): Often used in parallel with this trigger. First use has_completed_faction_goal to check if the goal is fully completed, then use this trigger to detect intermediate progress, forming a multi-tier conditional gate.
  • [add_faction_goal](/wiki/effect/add_faction_goal): After dynamically adding faction goals in an effect block, subsequently track their progress in the corresponding trigger block using this trigger, forming a "create → detect" feedback loop.
  • [faction_manifest_fulfillment](/wiki/trigger/faction_manifest_fulfillment): Semantically similar to this trigger and commonly appears together in the same limit block, respectively checking the completion of faction goals and faction manifestos to ensure more comprehensive condition evaluation.
  • [add_faction_goal_slot](/wiki/effect/add_faction_goal_slot): After expanding faction goal slots, use this trigger in conjunction to monitor progress on new slot goals and ensure script logic integrity.

Common Pitfalls

  1. Forgetting that scope must be a country that owns a faction: If the current country is not in any faction, or the specified goal does not belong to the faction the country is in, the trigger will silently return false without error, easily leading to unmet conditions that are difficult to debug.
  2. Incorrect or missing value comparison operator: This trigger's value supports > and < comparisons. Beginners often mistakenly write value = X (using assignment syntax with equals), which doesn't cause a script error but completely breaks the logic. Always ensure you use > or <.