Hands-On Usage
all_scientists is commonly used to check whether all scientists of a country meet specific conditions — for example, verifying an achievement unlock requirement (all scientists reaching a specified level), or ensuring that no scientist is injured before triggering a research speed bonus in an event or decision's available block.
# Decision: only available when all German scientists are uninjured and at least level 2
GER_elite_science_decision = {
available = {
GER = {
all_scientists = {
NOT = { is_scientist_injured = yes }
has_scientist_level = {
level > 1
}
}
}
}
}
Synergy
- is_scientist_injured — Used alongside
all_scientists to check whether any scientist is injured; commonly used as a protective condition guard.
- has_scientist_level — Used inside
all_scientists to check each scientist's level, enabling special events or decisions that require all scientists to meet a minimum threshold.
- is_active_scientist — Combined with
all_scientists to confirm that all scientists are in an active state, preventing false positives against inactive characters.
- has_trait — Used inside
all_scientists to verify that every scientist holds a specific trait; frequently seen in achievement-oriented mods as a completion condition check.
Common Pitfalls
- Scope confusion:
all_scientists can only be called within a COUNTRY scope. If you nest all_scientists directly inside a character scope (e.g., inside the loop body of every_scientist), the scope will be incorrect and may cause errors. You must first return to the country scope using ROOT, PREV, or similar before calling it.
- Opposite semantics to
any_scientist: all_scientists returns true only when every scientist satisfies the condition. Beginners often mistakenly use all_scientists when they actually mean "at least one scientist meets the condition." The correct approach is to use any_of_scopes with every_scientist, or use the corresponding any_scientist series trigger instead.