Hands-On Usage
Commonly used to check whether a country has a scientist with a specific trait or level — for example, to unlock research events or determine whether a project can be initiated. It can also be used inside an available block to restrict a decision, requiring at least one scientist to meet the conditions before it can trigger.
# Check whether Germany has a scientist with a specific trait and above a certain level
GER = {
any_scientist = {
has_scientist_level = {
level > 3
}
has_trait = scientist_trait_rocketry_specialist
}
}
Synergy
- has_trait: Used inside
any_scientist to filter characters with a specific scientist trait — the most common inner condition.
- has_scientist_level: Used inside
any_scientist to evaluate a scientist's level, allowing you to distinguish between senior and junior scientists.
- is_active_scientist: Can be combined to further restrict the check to scientists who are currently active, preventing unassigned scientists from being counted.
- every_scientist: Once
any_scientist confirms that a matching scientist exists, every_scientist is typically used on the effect side to apply effects in bulk to all scientists meeting the criteria.
Common Pitfalls
- Wrong scope:
any_scientist can only be used within a COUNTRY scope. Writing it directly inside a state scope or character scope will cause the trigger to silently fail or throw an error — you must switch to a country scope first.
- Mixing triggers and effects in the inner block: The contents of
any_scientist = { ... } must be trigger conditions scoped to a character. Beginners often mistakenly write effect commands such as add_scientist_trait inside it. The correct approach is to handle effects in an every_scientist block instead.