Wiki

trigger · career_profile_check_medal

Definition

  • Supported scope:any
  • Supported target:any

Description

Checks if the required medal is achieved and collected

实战 · 配合 · 坑

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

实战用法

career_profile_check_medal 常用于生涯模式 mod 中,根据玩家是否已获取并领取特定勋章来解锁新的选项、事件或奖励内容。例如在某个成就解锁系统中,只有当玩家集齐指定勋章后才允许触发特殊事件或开放隐藏国策:

available = {
    career_profile_check_medal = {
        medal = my_mod_veteran_medal
    }
}

配合关系

  • [career_profile_check_ribbon](/wiki/trigger/career_profile_check_ribbon):勋章与绶带往往作为生涯档案中并列的收集目标,两者组合可构成复合解锁条件。
  • [career_profile_check_points](/wiki/trigger/career_profile_check_points):用于在判断勋章的同时要求玩家达到一定生涯积分,防止条件过于宽松。
  • [has_completed_custom_achievement](/wiki/trigger/has_completed_custom_achievement):与自定义成就检查联用,可在勋章与成就双重验证通过后才视为满足条件。
  • [custom_effect_tooltip](/wiki/effect/custom_effect_tooltip):在 UI 中为玩家显示"尚未获得该勋章"之类的提示文本,改善可读性。

常见坑

  1. 混淆"获得"与"领取":该 trigger 同时要求勋章已被 collected(领取),仅仅在档案中达成获得条件但未领取,判断仍会返回假——新手常误以为只要完成了对应挑战就算通过。
  2. 在非生涯模式存档中使用:若 mod 没有限制该 trigger 只在生涯模式下生效(如先用 [career_profile_check_playthrough_ratio](/wiki/trigger/career_profile_check_playthrough_ratio) 等相关条件守门),在普通存档中调用可能导致条件永远为假,引发难以排查的逻辑错误。

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_medal is commonly used in career mode mods to unlock new options, events, or rewards based on whether the player has obtained and claimed specific medals. For example, in an achievement unlock system, a special event or hidden focus can only be triggered after the player collects all designated medals:

available = {
    career_profile_check_medal = {
        medal = my_mod_veteran_medal
    }
}

Synergy

  • [career_profile_check_ribbon](/wiki/trigger/career_profile_check_ribbon): Medals and ribbons often serve as parallel collection targets in career profiles; combining both can establish compound unlock conditions.
  • [career_profile_check_points](/wiki/trigger/career_profile_check_points): Used to require the player to reach a certain career score threshold while checking medals, preventing conditions from being too permissive.
  • [has_completed_custom_achievement](/wiki/trigger/has_completed_custom_achievement): When used with custom achievement checks, conditions are considered satisfied only after both medal and achievement verification pass.
  • [custom_effect_tooltip](/wiki/effect/custom_effect_tooltip): Displays hints like "Medal not yet obtained" in the UI, improving readability.

Common Pitfalls

  1. Confusing "obtained" with "claimed": This trigger requires that the medal has been collected (claimed); merely meeting the acquisition condition in the profile without actually claiming it will return false. Beginners often mistakenly assume that completing the corresponding challenge is sufficient to pass the check.
  2. Using in non-career mode saves: If the mod does not restrict this trigger to career mode only (such as gating it with related conditions like [career_profile_check_playthrough_ratio](/wiki/trigger/career_profile_check_playthrough_ratio)), calling it in standard saves may cause the condition to always be false, leading to difficult-to-debug logic errors.