Wiki

trigger · faction_upgrade_level

Definition

  • Supported scope:COUNTRY
  • Supported target:THIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITAL

Description

Checks the active faction member upgrade against the specified upgrade. works with >, <, = 
### Examples

TAG = { faction_upgrade_level > upgrade_token }

实战 · 配合 · 坑

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

实战用法

faction_upgrade_level 常用于阵营系统 mod 中,根据某个成员的升级进度解锁特定决策或国策。例如,当某国的阵营升级达到特定等级后,才允许其他成员获得加成或进行联合行动:

# 仅当该国阵营升级达到目标等级时,决策才可用
available = {
    TAG = {
        faction_upgrade_level > upgrade_industrial_tier2
    }
}

配合关系

  • [has_completed_faction_goal](/wiki/trigger/has_completed_faction_goal) — 通常与升级等级检查配合,确认阵营目标已完成才允许进一步升级判断,避免逻辑跳跃。
  • [faction_goal_fulfillment](/wiki/trigger/faction_goal_fulfillment) — 同为阵营进度类 trigger,常并列使用以构建多阶段阵营成长条件链。
  • [add_faction_goal_slot](/wiki/effect/add_faction_goal_slot) — 当升级等级满足条件时作为 effect 奖励解锁新的阵营目标槽位,形成"达到等级 → 解锁新目标"的完整闭环。
  • [compare_ideology_with_faction](/wiki/trigger/compare_ideology_with_faction) — 检查发起判断的国家与阵营意识形态是否匹配,配合升级等级共同限制特定意识形态阵营才能触发的内容。

常见坑

  1. 比较符号与 token 之间漏空格:写成 faction_upgrade_level >upgrade_token 而非 faction_upgrade_level > upgrade_token 会导致解析错误,脚本静默失效,游戏日志中不一定给出明确报错,非常难排查。
  2. scope 指向错误:该 trigger 必须在 COUNTRY scope 下使用,新手容易在 STATE scope 的 limit 块中直接调用而不先切换到对应国家 scope,导致条件永远不触发或报 scope 错误。

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_upgrade_level is commonly used in faction system mods to unlock specific decisions or national focuses based on a member's upgrade progress. For example, only when a nation's faction upgrade reaches a specific tier does it allow other members to gain bonuses or conduct joint operations:

# Decision is only available when the nation's faction upgrade reaches the target tier
available = {
    TAG = {
        faction_upgrade_level > upgrade_industrial_tier2
    }
}

Synergy

  • [has_completed_faction_goal](/wiki/trigger/has_completed_faction_goal) — Usually paired with upgrade level checks to confirm that faction goals are completed before allowing further upgrade logic, preventing logical jumps.
  • [faction_goal_fulfillment](/wiki/trigger/faction_goal_fulfillment) — Also a faction progress trigger, commonly used in parallel to construct multi-stage faction growth condition chains.
  • [add_faction_goal_slot](/wiki/effect/add_faction_goal_slot) — When the upgrade tier condition is met, serves as an effect reward to unlock new faction goal slots, forming a complete feedback loop of "reach tier → unlock new goal".
  • [compare_ideology_with_faction](/wiki/trigger/compare_ideology_with_faction) — Checks whether the initiating nation's ideology matches the faction's ideology, combined with upgrade tier checks to restrict content that can only trigger for specific ideological factions.

Common Pitfalls

  1. Missing spaces between comparison operators and tokens: Writing faction_upgrade_level >upgrade_token instead of faction_upgrade_level > upgrade_token causes parsing errors and silent script failures; the game log may not provide clear error messages, making it extremely difficult to debug.
  2. Incorrect scope targeting: This trigger must be used within COUNTRY scope. Beginners often call it directly in a STATE scope limit block without first switching to the corresponding nation scope, causing the condition to never trigger or resulting in scope errors.