Hands-On Usage
every_character is commonly used in mods to batch-process all characters belonging to a country — for example, applying a trait to qualifying generals, clearing flags, or adjusting skills inside a focus or event. Typical scenarios include: marking all female characters with a flag at game start, or stripping a specific trait from all army commanders after a historical event fires.
GER = {
every_character = {
limit = {
is_army_leader = yes
has_trait = brilliant_strategist
}
add_trait = { token = politically_connected }
set_character_flag = purge_processed
}
}
Synergy
- has_trait — Use inside a
limit block to filter characters that have a specific trait, preventing effects from being applied blindly to every character.
- is_unit_leader — Use inside
limit to restrict execution to unit commanders only, excluding advisors and operatives.
- add_unit_leader_trait — Pairs naturally with this command to bulk-add commander traits to all matching characters; one of the most common sub-effects used alongside it.
- remove_unit_leader_trait — Combine with
every_character for "cleanup" passes: strip an outdated trait from all matching characters before uniformly assigning a replacement.
Common Pitfalls
- Forgetting
limit, causing unintended changes to all characters: every_character targets every character in the country by default — including advisors, operatives, and others. Omitting a limit block will silently modify unrelated characters. Always narrow the scope with triggers such as is_unit_leader or is_operative.
- Calling the effect outside a COUNTRY scope: This effect is only valid inside a country scope. Writing
every_character directly inside a CHARACTER or STATE scope will either fail silently or produce an error. Use ROOT, FROM, or similar references to return to the correct country scope first.