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
- 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.
- 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.