Hands-On Usage
generate_scientist_character is commonly used in mods to dynamically create scientist characters with specific specializations for a nation—for example, rewarding the player with a high-skill scientist upon completing a national focus, event, or decision, or injecting key talent into a faction at the start of a specialized research chain. The example below demonstrates generating a female scientist with a specific specialization for the Soviet Union after completing a national focus:
SOV = {
generate_scientist_character = {
gender = female
skills = {
specialization_nuclear = 3
}
traits = { scientist_trait_nuclear_specialist }
}
}
Synergy
[any_scientist](/wiki/trigger/any_scientist) — Use before scientist generation to check if a similar scientist already exists, preventing duplicate creation and personnel redundancy.
[any_active_scientist](/wiki/trigger/any_active_scientist) — Combine with logic to assess the number or specializations of activated scientists, determining whether generation logic needs to be triggered.
[add_scientist_role](/wiki/effect/add_scientist_role) — If a generic character has already been created via generate_character, this command can supplement the scientist function; both are complementary and cover different character creation paths.
[add_research_slot](/wiki/effect/add_research_slot) — After generating an advanced scientist, it is common practice to simultaneously add research slots as a combined reward within an overall "research capability boost" event package.
Common Pitfalls
- Forgetting that scope must be COUNTRY: Beginners often invoke this command directly under STATE scope or character scope, causing script errors or silent failures; always ensure the scope is a nation by using
TAG = { ... } or confirming the current context is already at country scope before use.
- Filling the skills block with non-existent specialization tokens: The game will not automatically report an error, but the scientist's specialization levels will be anomalous or revert to default values after generation; specialization tokens must exactly match the
scientist_specializations definitions in the base game or mod, and it is recommended to verify available specialization_* key names in the vanilla common/characters first.