trigger · career_profile_check_playthrough_value
Definition
- Supported scope:
any - Supported target:
any
Description
Compares a playthrough value to a number
career_profile_check_playthrough_valueanyanyCompares a playthrough value to a number
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
此 trigger 常用于职业档案(Career Profile)系统的成就或里程碑解锁场景,通过比较某一周目中积累的特定数值(如击败的国家数、控制的州省数等)来决定是否满足条件。例如在自定义成就的 available 块中,判断玩家本局游戏中某项追踪值是否达到阈值:
available = {
career_profile_check_playthrough_value = {
tag = GER
variable = num_conquered_states
value > 20
}
}
[career_profile_check_playthrough_ratio](/wiki/trigger/career_profile_check_playthrough_ratio) — 当需要比较两个周目值的比率而非绝对数值时,二者配合可构建更灵活的复合条件。[career_profile_check_points](/wiki/trigger/career_profile_check_points) — 通常与本 trigger 同时出现在职业档案成就的 available 块中,前者检查积分,后者检查具体追踪数值,共同约束解锁门槛。[career_profile_set_temp_playthrough_variable](/wiki/trigger/career_profile_set_temp_playthrough_variable) — 在判断之前先用此 trigger 将周目变量读入临时变量,可方便后续做更复杂的数学比较或调试输出。[check_variable](/wiki/trigger/check_variable) — 若需要将周目值与另一个动态变量(而非硬编码常量)比较,可先将周目值写入临时变量,再用此 trigger 完成变量间的对比。value > 20 写成单独的字段 value = 20 而忽略运算符,导致只能精确匹配而无法做大于/小于判断,实际应在字段内直接使用 >、<、>= 等运算符形式。career_profile_check_playthrough_value 读取的是当前周目中已被专门记录的追踪值,若对应的周目变量从未在游戏逻辑中被写入,trigger 将始终无法满足条件,排查时要确认该变量在 career profile 的记录逻辑中已正确累积。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.
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
}
}
[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.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.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.