Wiki

effect · add_scientist_level

Definition

  • Supported scope:CHARACTER
  • Supported target:none

Description

Add levels to a special project specialization for a scientist character in scope.
The `level` parameter is a scoped variable

#### Example

my_character = { add_scientist_level = { level = 2 # accepts variables specialization = 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 mods involving the scientist progression system, add_scientist_level is commonly used for task completion rewards, event outcomes, or national focus completions to advance a specific scientist's specialization level, thereby accelerating progress on special projects. For example, after completing a nuclear weapons research task chain, you can advance the project lead:

# In an option within a focus or event
my_nuclear_scientist = {
    add_scientist_level = {
        level = 1
        specialization = specialization_nuclear
    }
}

Synergy

  • [has_scientist_level](/wiki/trigger/has_scientist_level): Check the scientist's current level before advancing to avoid exceeding design caps or executing redundant logic.
  • [add_scientist_xp](/wiki/effect/add_scientist_xp): Pair with level advancement to supplement experience points simultaneously, creating a smoother and more natural growth curve.
  • [add_scientist_trait](/wiki/effect/add_scientist_trait): Sync specialized traits after level advancement to reinforce the scientist's professional identity and role positioning.
  • [is_active_scientist](/wiki/trigger/is_active_scientist): Confirm the character is in active scientist status before executing the level gain, preventing accidental operations on inactive characters.

Common Pitfalls

  1. Scope not switched to CHARACTER: Writing add_scientist_level directly under COUNTRY scope will cause an error. You must first switch the scope to the corresponding CHARACTER through character tags (e.g., my_character = { ... }), otherwise the command fails or causes script crashes.
  2. specialization field contains non-existent key values: The game only recognizes specialization types registered in the special projects system. If you use a custom mod's undeclared specialization, the level will not actually advance and typically no obvious error message appears, making it extremely difficult to debug.