Wiki

trigger · has_scientist_level

Definition

  • Supported scope:CHARACTER
  • Supported target:none

Description

Checks if the scientist of the character in scope matches the skill level condition for a specialization. Supports < > = operators.
level = <int>
specialization = <specialization_token>
ex: my_character = {
	  has_scientist_level = {
	    level > 2
	    specialization = specialization_nuclear
      }
	}

实战 · 配合 · 坑

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

实战用法

在科研系统相关 mod 中,常用于限制某些决策或事件选项,只有当负责特定领域的科学家达到足够等级时才能触发。例如在核武器研发链中,要求核物理专业科学家达到一定水平才允许推进下一阶段:

available = {
    my_nuclear_scientist = {
        has_scientist_level = {
            level > 2
            specialization = specialization_nuclear
        }
    }
}

配合关系

  • [is_active_scientist](/wiki/trigger/is_active_scientist):先确认该角色当前处于活跃科学家状态,再检查其等级,避免对未启用的科学家进行无效判断。
  • [is_scientist_injured](/wiki/trigger/is_scientist_injured):与等级检查配合,当科学家受伤时跳过高难度研发任务的触发条件,逻辑更严谨。
  • [add_scientist_level](/wiki/effect/add_scientist_level):当科学家等级不足时,可通过事件奖励提升等级,与本 trigger 构成"检查—升级"的完整闭环。
  • [add_scientist_xp](/wiki/effect/add_scientist_xp):若等级条件未满足,可先积累经验值推动升级,作为前置激励手段与本 trigger 联动。

常见坑

  1. 忘记指定正确的 scopehas_scientist_level 必须在 CHARACTER scope 下使用,直接写在国家 scope 的条件块里会导致脚本报错或静默失败,需要先通过角色引用(如 my_character = { ... })进入对应角色的 scope。
  2. specialization token 拼写错误:专业化字段必须使用游戏内定义的精确 token(如 specialization_nuclear),大小写或拼写有误时不会有明显报错提示,条件会始终返回假,导致功能失效难以排查。

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

In research system-related mods, this is commonly used to restrict certain decisions or event options, allowing progression only when the scientist responsible for a specific field reaches a sufficient level. For example, in a nuclear weapons development chain, requiring a nuclear physics specialist to reach a certain proficiency before advancing to the next stage:

available = {
    my_nuclear_scientist = {
        has_scientist_level = {
            level > 2
            specialization = specialization_nuclear
        }
    }
}

Synergy

  • [is_active_scientist](/wiki/trigger/is_active_scientist): Verify that the character is currently in an active scientist state before checking their level, avoiding invalid evaluations on inactive scientists.
  • [is_scientist_injured](/wiki/trigger/is_scientist_injured): When combined with level checks, skip triggering high-difficulty research tasks when a scientist is injured, resulting in more rigorous logic.
  • [add_scientist_level](/wiki/effect/add_scientist_level): If the scientist's level is insufficient, boost it through event rewards, forming a complete "check-upgrade" cycle with this trigger.
  • [add_scientist_xp](/wiki/effect/add_scientist_xp): If level requirements are not met, accumulate experience points to drive leveling first, serving as a prerequisite incentive mechanism working in tandem with this trigger.

Common Pitfalls

  1. Forgetting to specify the correct scope: has_scientist_level must be used within a CHARACTER scope. Writing it directly in a country scope's condition block will cause script errors or silent failures. You must first enter the corresponding character's scope through a character reference (such as my_character = { ... }).
  2. Specialization token spelling errors: The specialization field must use the exact token defined in the game (such as specialization_nuclear). When capitalization or spelling is incorrect, there will be no obvious error message, and the condition will always evaluate to false, resulting in broken functionality that is difficult to diagnose.