Wiki

trigger · career_profile_has_player_flag

Definition

  • Supported scope:any
  • Supported target:any

Description

Checks if the flag is set for the local player

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_has_player_flag is commonly used in career profile mods to unlock special options or achievement conditions based on personal flags accumulated by the player across multiple playthroughs—for example, detecting whether the player has completed a specific story branch and set a commemorative flag, then unlocking hidden content accordingly. It works well placed in the available or allowed blocks of focuses or decisions as a prerequisite threshold check.

# In the available block of a focus: check if the player has set the flag in historical saves
available = {
    career_profile_has_player_flag = my_mod_completed_special_branch
}

Synergy

  • [career_profile_check_value](/wiki/trigger/career_profile_check_value): Both belong to the career profile system's trigger family and are commonly used together. First use flag checking to confirm the player followed a specific path, then use value checking to verify score thresholds, forming composite prerequisite conditions.
  • [career_profile_check_ribbon](/wiki/trigger/career_profile_check_ribbon): Combining ribbon checks with flag checks enables dual-unlock logic such as "obtained a specific ribbon AND triggered a specific story event."
  • [custom_trigger_tooltip](/wiki/trigger/custom_trigger_tooltip): Wrapping this trigger within it displays player-friendly localized tooltip text, avoiding direct exposure of raw flag names on the UI.
  • [or](/wiki/trigger/or): When multiple different save flags can satisfy the same unlock condition, use or to group multiple career_profile_has_player_flag instances, improving fault tolerance.

Common Pitfalls

  1. Flag name spelling inconsistency between check and assignment: The flag checked by this trigger must match exactly with how it was written (case-sensitive). Beginners often use different spellings across different files (e.g., MyFlag vs my_flag), causing the trigger to always return false and making bugs hard to trace.
  2. Mistaking it for a country flag substitute: career_profile_has_player_flag targets cross-save career profile data for the local player, not country flags within the current game session. If you only need to check temporary state within a single session, use the standard country flag mechanism instead. Mixing them causes inconsistent behavior across single-player, multiplayer, or ironman environments.