Wiki

trigger · career_profile_check_value

Definition

  • Supported scope:any
  • Supported target:any

Description

Compares a career profile value to a number

实战 · 配合 · 坑

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

实战用法

career_profile_check_value 常用于职业生涯系统相关 mod 中,根据玩家积累的某项数值指标来解锁特殊事件、决议或奖励内容。例如在成就型 mod 里,可以检测玩家某个职业档案数值是否达到门槛,从而触发专属叙事事件。

# 示例:当职业档案中某项数值达到一定量级时,允许触发特殊决议
available = {
    career_profile_check_value = {
        id = my_career_stat
        value > 50
    }
}

配合关系

  • [career_profile_check_points](/wiki/trigger/career_profile_check_points):与本 trigger 配合可同时检测"总点数"与"特定数值"两个维度,构成更严格的解锁条件。
  • [career_profile_check_ratio](/wiki/trigger/career_profile_check_ratio):当需要同时判断"绝对数值"与"比例"时搭配使用,避免只靠单一指标判断造成逻辑漏洞。
  • [career_profile_check_medal](/wiki/trigger/career_profile_check_medal):在勋章/成就授予逻辑中,先用本 trigger 确认数值前提,再用该 trigger 确认勋章状态,形成完整的前置链。
  • [check_variable](/wiki/trigger/check_variable):当职业档案数值需要与临时变量做联合运算比较时,两者配合可先将数值存入临时变量再做复合判断。

常见坑

  1. id 字段填写错误id 必须与职业档案系统中实际定义的数值键名完全一致(包括大小写),填写不存在的键名不会报错但永远返回假,导致条件块静默失效,难以排查。
  2. 在非职业生涯游戏模式下误用:该 trigger 依赖职业生涯档案数据的存在,若在没有激活相关 DLC 或职业生涯功能的环境中使用,应先用 [is_ironman](/wiki/trigger/is_ironman) 或相关游戏规则 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

career_profile_check_value is commonly used in career system-related mods to unlock special events, decisions, or rewards based on numeric thresholds accumulated by the player across various metrics. For example, in achievement-oriented mods, you can check whether a player's career profile value has reached a certain threshold to trigger exclusive narrative events.

# Example: When a specific metric in the career profile reaches a certain magnitude, allow triggering a special decision
available = {
    career_profile_check_value = {
        id = my_career_stat
        value > 50
    }
}

Synergy

  • [career_profile_check_points](/wiki/trigger/career_profile_check_points): Combining with this trigger allows simultaneous evaluation of both "total points" and "specific values" across two dimensions, establishing stricter unlock conditions.
  • [career_profile_check_ratio](/wiki/trigger/career_profile_check_ratio): Use in tandem when you need to assess both "absolute value" and "ratio" simultaneously, preventing logic gaps caused by relying on a single metric alone.
  • [career_profile_check_medal](/wiki/trigger/career_profile_check_medal): In medal/achievement assignment logic, use this trigger first to confirm the numeric prerequisites, then use that trigger to verify medal status, forming a complete prerequisite chain.
  • [check_variable](/wiki/trigger/check_variable): When career profile values need to be compared in conjunction with temporary variables, the two work together by first storing the value in a temporary variable before performing complex evaluations.

Common Pitfalls

  1. Incorrect id field entry: The id must match exactly (including case sensitivity) with the actual value key name defined in the career profile system. Entering a non-existent key name will not produce an error but will always return false, causing the condition block to silently fail and be difficult to debug.
  2. Misuse outside career mode: This trigger depends on the existence of career profile data. If used in an environment without the relevant DLC or career features activated, you should first apply protective checks using [is_ironman](/wiki/trigger/is_ironman) or related game rule triggers. Otherwise, the condition may never be satisfied.