Wiki

trigger · career_profile_check_ribbon

Definition

  • Supported scope:any
  • Supported target:any

Description

Checks if the required ribbon is achieved and collected

实战 · 配合 · 坑

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

实战用法

career_profile_check_ribbon 常用于生涯模式相关 mod 中,检查玩家是否已经获得并领取了特定勋带(ribbon),从而解锁后续奖励、特殊事件或成就路径。典型场景是在生涯档案界面的 availabletrigger 块中,根据勋带收集状态决定某个选项是否可选。

# 示例:仅当玩家收集了指定勋带后,才允许触发某个特殊事件选项
country_event = {
    id = my_career.1
    option = {
        name = my_career.1.a
        trigger = {
            career_profile_check_ribbon = {
                ribbon = my_mod_ribbon_first_victory
            }
        }
        # 执行后续效果...
    }
}

配合关系

  • [career_profile_check_medal](/wiki/trigger/career_profile_check_medal):与勋带检查逻辑并行,用于同时验证玩家是否获得了对应勋章,二者常组合在 and 块中构成复合解锁条件。
  • [career_profile_check_points](/wiki/trigger/career_profile_check_points):在判断勋带收集状态的同时检查生涯积分门槛,确保玩家满足多维度条件才能触发内容。
  • [and](/wiki/trigger/and) / [or](/wiki/trigger/or):勋带检查几乎总是嵌套在逻辑运算块内,与其他生涯条件自由组合,实现"满足其一"或"全部满足"的灵活判断。
  • [career_profile_has_player_flag](/wiki/trigger/career_profile_has_player_flag):用于追踪玩家是否已经处理过某个勋带奖励,避免重复触发,与勋带检查配合实现状态机控制。

常见坑

  1. 将 ribbon 键名与 medal 键名混用career_profile_check_ribboncareer_profile_check_medal 是两个独立系统,直接把 medal 定义的 key 填入 ribbon 字段会导致条件永远为假且不报错,排查时极难发现。
  2. 只获得未领取(collect)就判定为真:该 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_ribbon is commonly used in career mode-related mods to check whether the player has obtained and claimed a specific ribbon, thereby unlocking subsequent rewards, special events, or achievement paths. Typical scenarios involve using it within the available or trigger block of a career profile interface, determining whether an option is selectable based on the player's ribbon collection status.

# Example: Allow a special event option to trigger only after the player has collected the specified ribbon
country_event = {
    id = my_career.1
    option = {
        name = my_career.1.a
        trigger = {
            career_profile_check_ribbon = {
                ribbon = my_mod_ribbon_first_victory
            }
        }
        # Execute subsequent effects...
    }
}

Synergy

  • [career_profile_check_medal](/wiki/trigger/career_profile_check_medal): Works in parallel with ribbon checking logic to simultaneously verify whether the player has obtained the corresponding medal. These two are often combined within and blocks to form composite unlock conditions.
  • [career_profile_check_points](/wiki/trigger/career_profile_check_points): Checks career point thresholds while evaluating ribbon collection status, ensuring the player meets multidimensional conditions before triggering content.
  • [and](/wiki/trigger/and) / [or](/wiki/trigger/or): Ribbon checks are almost always nested within logical operator blocks, freely combinable with other career conditions to achieve flexible "any one of" or "all conditions met" evaluations.
  • [career_profile_has_player_flag](/wiki/trigger/career_profile_has_player_flag): Tracks whether the player has already processed a specific ribbon reward to prevent duplicate triggers. Works with ribbon checks to implement state machine control.

Common Pitfalls

  1. Mixing ribbon key names with medal key names: career_profile_check_ribbon and career_profile_check_medal are two independent systems. Directly inserting a medal-defined key into the ribbon field will cause the condition to always return false without error, making it extremely difficult to debug.
  2. Treating collected-but-unclaimed as true: This trigger requires the ribbon to be "claimed" to return true. Meeting the achievement condition alone is insufficient if the player has not manually claimed it in the career profile interface. Do not use it as a simple progress check for "whether an achievement is unlocked."