Hands-On Usage
global_every_army_leader is ideal for mass-applying traits or modifying attributes of army leaders across all nations in global events or decisions—for example, adding wartime traits to every leader when World War breaks out, or purging certain traits in the game's immediate block at startup. When you know the target nation explicitly, prefer every_army_leader instead; only resort to this command when you need to iterate over all nations to avoid unnecessary performance overhead.
# Global event: add a trait to all army leaders with skill ≥4 across all nations
global_every_army_leader = {
limit = {
skill > 3
}
add_trait = { trait = brilliant_strategist }
}
Synergy
[any_army_leader](/wiki/trigger/any_army_leader): Use this trigger in conditional blocks first to verify whether a nation has leaders matching your criteria, then decide whether to execute the global iteration—this avoids pointless loops.
[every_army_leader](/wiki/effect/every_army_leader): Once you've logically determined the target nation, switch to every_army_leader instead of the global variant for better performance; both share identical structure making them interchangeable.
[add_trait](/wiki/effect/add_trait): The most common inner execution command; pair it with limit to filter leaders, then batch-assign or modify traits.
[every_country_with_original_tag](/wiki/effect/every_country_with_original_tag): Sometimes you need to iterate over a specific nation set first, then call every_army_leader in the nested layer; global_every_army_leader merges these two steps into a convenient shortcut—understanding their relationship helps you choose the right approach.
Common Pitfalls
- Overlooking performance cost:
global_every_army_leader iterates through all army leaders in every nation that exists in the game; late-game overhead becomes significant as nation count grows. If you only need to handle a few specific nations, switch to every_army_leader with explicit scope instead of filtering nations with limit in the global variant—limit can only filter leaders, not nations at the top level.
- Misusing scope: This command's scope is COUNTRY, but the execution block automatically switches to character scope. Newcomers often nest another
every_army_leader inside, causing logic errors or infinite loops; the inner block should directly contain character-scoped effects (such as add_trait, add_skill_level, etc.).