Wiki

trigger · career_profile_check_points

Definition

  • Supported scope:any
  • Supported target:any

Description

Compares a career points value to a number

实战 · 配合 · 坑

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

实战用法

career_profile_check_points 常见于生涯模式相关的 mod 场景,例如根据玩家积累的生涯积分解锁特殊决议、事件选项或隐藏成就。典型用途是在某个事件的 trigger 块中判断玩家是否达到特定积分门槛,从而给予奖励或开放额外内容。

# 示例:当玩家生涯积分达到某门槛时,允许触发特殊事件
country_event = {
    id = my_mod.1
    trigger = {
        career_profile_check_points = {
            points_type = campaign_score
            compare = greater_than_or_equals
            value = 500
        }
    }
    # ...
}

配合关系

  • [career_profile_check_medal](/wiki/trigger/career_profile_check_medal):同属生涯档案系列 trigger,常与积分检查并列使用,同时验证勋章与积分是否都满足解锁条件。
  • [career_profile_check_value](/wiki/trigger/career_profile_check_value):用于检查生涯档案中的具体数值,当需要同时判断多种生涯维度(积分 + 特定值)时配合使用。
  • [num_of_career_profile_points](/wiki/trigger/num_of_career_profile_points):功能相近,可交叉验证积分数量,或在 or 块中作为备选条件使用。
  • [custom_trigger_tooltip](/wiki/trigger/custom_trigger_tooltip):包裹本 trigger 用于在 UI 中显示友好的本地化提示,避免玩家看到原始脚本字段。

常见坑

  1. 积分类型字段填错points_type 必须填写游戏内实际存在的生涯积分类型键名,若填写不存在的类型,条件会静默返回 false 而不报错,导致功能看似正常实则永不触发。
  2. 在非生涯模式存档中使用:该 trigger 依赖生涯档案数据,若玩家在非生涯模式下游玩,档案数据不存在时条件同样会静默失败,建议搭配 [game_rules_allow_achievements](/wiki/trigger/game_rules_allow_achievements) 或相关标志先做前置判断,避免逻辑误判。

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_points is commonly found in career mode-related mod scenarios, such as unlocking special decisions, event options, or hidden achievements based on career points accumulated by the player. The typical use case is checking within a trigger block of an event whether the player has reached a specific points threshold, thereby granting rewards or unlocking additional content.

# Example: Allow a special event to trigger when the player's career points reach a certain threshold
country_event = {
    id = my_mod.1
    trigger = {
        career_profile_check_points = {
            points_type = campaign_score
            compare = greater_than_or_equals
            value = 500
        }
    }
    # ...
}

Synergy

  • [career_profile_check_medal](/wiki/trigger/career_profile_check_medal): Part of the same career profile trigger family, commonly used alongside points checks to simultaneously verify whether both medals and points meet unlock conditions.
  • [career_profile_check_value](/wiki/trigger/career_profile_check_value): Used to check specific values in the career profile; combine when you need to evaluate multiple career dimensions (points + specific values) simultaneously.
  • [num_of_career_profile_points](/wiki/trigger/num_of_career_profile_points): Similar functionality; can cross-verify point counts or serve as an alternative condition within an or block.
  • [custom_trigger_tooltip](/wiki/trigger/custom_trigger_tooltip): Wrap this trigger to display user-friendly localized tooltips in the UI, preventing players from seeing raw script fields.

Common Pitfalls

  1. Incorrect points_type field: points_type must use the actual in-game career points type key name. If you specify a non-existent type, the condition silently returns false without error, causing the feature to appear normal but never trigger.
  2. Using in non-career mode saves: This trigger depends on career profile data; if the player is not playing in career mode, the profile data does not exist and the condition will silently fail. It is recommended to first perform prerequisite checks using [game_rules_allow_achievements](/wiki/trigger/game_rules_allow_achievements) or related flags to avoid logic errors.