Hands-On Usage
is_promoted_from_unit is commonly used to distinguish between commanders who were promoted automatically from a division or vessel and those who were created directly via events or focuses. This lets modders grant exclusive traits or bonuses only to organically promoted leaders. For example, in a custom commander progression system you can restrict certain events or stat bonuses so that only field-promoted officers are eligible.
# Add an exclusive trait to all corps commanders who were promoted from a unit
every_unit_leader = {
limit = {
is_promoted_from_unit = yes
is_corps_commander = yes
}
add_unit_leader_trait = veteran_promotee
}
Synergy
- is_corps_commander: Combine with
is_promoted_from_unit to precisely filter for corps commanders who rose through the ranks, excluding any directly appointed leaders.
- is_army_leader: Pair together to identify field army commanders who were promoted from a unit, useful for distinguishing promotion sources across different command tiers.
- add_unit_leader_trait: The most common follow-up effect — once a leader is confirmed as field-promoted, immediately assign a trait.
- has_trait: After filtering with
is_promoted_from_unit, use this to check whether the leader already holds a particular trait, preventing it from being added more than once.
Common Pitfalls
- Wrong scope:
is_promoted_from_unit must be used inside a CHARACTER scope. Writing it at the top level of a country scope (e.g., the trigger block of a country_event) will cause an error or silent failure. You must first enter a character scope via iterators such as any_unit_leader or every_unit_leader.
- Mistaking it for a branch filter: This trigger only checks whether a leader was promoted from a unit — it does not distinguish between an army division and a naval vessel. If you need to tell the two apart, combine it with
is_army_leader or is_navy_leader accordingly.