Hands-On Usage
every_navy_leader is commonly used in country events or decisions to batch-modify the attributes of all naval leaders — for example, boosting skills or attaching traits to every naval leader of a country after a mod story event fires. It can also be combined with a limit block to target only leaders that meet specific conditions, such as reinforcing only those who lack a certain trait.
GER = {
every_navy_leader = {
limit = {
NOT = { has_trait = old_guard }
}
add_unit_leader_trait = naval_invader
add_skill_level = 1
}
}
Synergy
- has_trait — Used inside a
limit block to filter naval leaders who already have or are missing a specific trait, ensuring the effect is applied only to the intended targets.
- add_unit_leader_trait — The most common child effect; used to bulk-add a new trait to all qualifying naval leaders.
- add_skill_level — Combined with this command, it allows you to raise the overall skill level of multiple naval leaders in a single event or story beat.
- remove_unit_leader_trait — Pairing this with
every_navy_leader enables a "strip old trait, apply new trait" replacement pattern, commonly seen in leader reworks triggered by major national events.
Common Pitfalls
- Wrong scope:
every_navy_leader can only be called within a COUNTRY scope. Writing it directly inside a STATE or CHARACTER scope will cause the effect to silently fail — a frequent source of debugging headaches for newcomers who don't realize the outer scope is wrong.
- Omitting
limit causes unintended overwrites: Without a limit block, the effect applies to every naval leader belonging to that country, including characters not yet recruited. If the change is irreversible (e.g. remove_unit_leader_trait), it can corrupt the intended initial setup of predefined leaders. Always make it a habit to write an explicit limit block.