Wiki

effect · add_scientist_role

Definition

  • Supported scope:COUNTRY, CHARACTER
  • Supported target:none

Description

Add scientist role to a character. The character can come from the scope or from an input parameter.
The scientist role format is the same as in the character DB.
Except the visible trigger - a scientist role created via effect cannot have triggers.
Examples:
# From character scope
my_character = {
	add_scientist_role = {
		scientist = {
			desc = desc_loc_key # Optional
			traits = { scientist_trait_token ... } # Optional
			skills = { specialization_token = 2 ... }
			# cf. game/common/characters/_documentation/md for full explanation
		}
	}
}

# From country scope
SOV = {
	add_scientist_role = {
		character = my_character / var:my_char_var / PREV # accepts variables and keywords
		scientist = { ... }
	}
}

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

add_scientist_role is most commonly used in flavor events or upon national focus completion to dynamically unlock the scientist role for a character—for example, enabling a specific historical figure to become a specialized scientist after a research project begins. When operating on a specific character from the national scope, you can use the character = parameter to precisely target them; if you're already within the character's own scope, you can omit this parameter and simply write the scientist = { ... } block directly.

# After national focus completion, add scientist role to a specified character from country scope
complete_national_focus = {
    SOV = {
        add_scientist_role = {
            character = sov_igor_kurchatov
            scientist = {
                desc = kurchatov_scientist_desc
                traits = { nuclear_specialist }
                skills = { nuclear = 3 }
            }
        }
    }
}

Synergy

  • [remove_scientist_role](/wiki/effect/remove_scientist_role): The symmetric counterpart—used to revoke the role when a character needs to exit the research position. Both typically appear in paired fashion within event options.
  • [add_scientist_trait](/wiki/effect/add_scientist_trait): Append exclusive traits after granting the scientist role, compensating for the limitation that scientist = { traits = {} } only sets initial traits. Ideal for dynamic progression systems.
  • [add_scientist_xp](/wiki/effect/add_scientist_xp): Immediately inject experience points into a newly appointed scientist, giving them an acceptable rank at the start to avoid low early-game competency harming player experience.
  • [any_scientist](/wiki/trigger/any_scientist): Check the nation's current scientist status within condition blocks. Can be used to determine whether a similar character already exists, preventing duplicate scientist role assignments.

Common Pitfalls

  1. Forgetting the skills field causes script errors or scientists to malfunction: The skills field in the scientist = { } block is not optional—you must declare at least one specialization direction with a skill value, otherwise the character may fail to be assigned to research projects or even trigger warnings upon save load.
  2. Writing the character = parameter when already in CHARACTER scope: If the scope is already the target character and you then fill in character = ..., it causes targeting confusion or gets ignored. Only use the character = parameter when you're in the national scope to specify the target character.