Wiki

trigger · career_profile_check_playthrough_value

Definition

  • Supported scope:any
  • Supported target:any

Description

Compares a playthrough value to a number

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

This trigger is commonly used in Career Profile system scenarios for unlocking achievements or milestones. It compares specific accumulated values from a single playthrough (such as the number of defeated nations, provinces controlled, etc.) to determine whether conditions are met. For example, in the available block of a custom achievement, you can check whether the player's tracked value in the current game reaches a threshold:

available = {
    career_profile_check_playthrough_value = {
        tag = GER
        variable = num_conquered_states
        value > 20
    }
}

Synergy

  • [career_profile_check_playthrough_ratio](/wiki/trigger/career_profile_check_playthrough_ratio) — When you need to compare the ratio of two playthrough values rather than absolute numbers, using both together can construct more flexible composite conditions.
  • [career_profile_check_points](/wiki/trigger/career_profile_check_points) — Usually appears alongside this trigger in the available block of career profile achievements. The former checks points while the latter checks specific tracked values, jointly constraining unlock thresholds.
  • [career_profile_set_temp_playthrough_variable](/wiki/trigger/career_profile_set_temp_playthrough_variable) — Before making a judgment, use this trigger to read a playthrough variable into a temporary variable, making it convenient for subsequent complex mathematical comparisons or debug output.
  • [check_variable](/wiki/trigger/check_variable) — If you need to compare a playthrough value with another dynamic variable (rather than a hardcoded constant), you can first write the playthrough value to a temporary variable, then use this trigger to complete the variable-to-variable comparison.

Common Pitfalls

  1. Incorrect comparison operator syntax: Beginners often write value = 20 as a standalone field and forget the operator, allowing only exact matching instead of greater-than/less-than judgments. You should use comparison operators like >, <, >= directly within the field.
  2. Reading playthrough variables before they are recorded: career_profile_check_playthrough_value reads tracked values that have been specifically recorded in the current playthrough. If the corresponding playthrough variable was never written in the game logic, the trigger will never be satisfied. When troubleshooting, verify that the variable has been correctly accumulated in the career profile's recording logic.