Hands-On Usage
any_active_scientist is commonly used in research-focused mods to check whether a country has at least one active scientist meeting specific conditions — for example, restricting a decision so it can only fire when a scientist with a particular trait or skill level is present. It is equally useful inside event trigger blocks to determine whether a country has sufficient scientific talent to unlock a special research path.
# Check whether Germany has at least one active scientist with the nuclear_scientist trait and a level above 2
GER = {
any_active_scientist = {
has_scientist_level = {
level > 2
}
has_trait = nuclear_scientist
}
}
Synergy
- every_active_scientist: The logical counterpart to
any_active_scientist. Where any_active_scientist tests a condition, every_active_scientist iterates over all qualifying active scientists and applies an effect — the two are frequently paired together, with the former in the trigger block and the latter in the effect block.
- has_scientist_level: Filters scientists by skill level inside
any_active_scientist; one of the most common inner conditions used with this trigger.
- has_trait: Checks a scientist's trait within the character scope. Combined with
any_active_scientist, it allows precise targeting of scientists with a specific specialisation.
- is_active_scientist: Used in a character scope to check whether a specific character is currently active. Pairing it with
any_active_scientist enables double verification across different scope levels.
Common Pitfalls
- Wrong scope:
any_active_scientist can only be used inside a COUNTRY scope. Placing it inside a STATE or CHARACTER scope will cause a script error or a silent failure. Always ensure the enclosing scope is a country scope (e.g. GER = { ... } or ROOT = { where ROOT resolves to a country).
- Writing country-level triggers inside the block: The braces of
any_active_scientist automatically switch the scope to CHARACTER. Country-level triggers such as tag = GER cannot be used directly inside it — only character-relevant triggers (e.g. has_trait, has_scientist_level) are valid there.