Hands-On Usage
has_mastery is commonly used to design unlock conditions for national focus trees or decisions, for example requiring players to accumulate sufficient experience in a specific unit type before triggering enhancement rewards, thereby encouraging players to focus on developing a particular combat line. In custom campaign mods, it can also be used to release story events in stages, linking narrative progression to military development.
# Only allow a decision to trigger when infantry mastery reaches the threshold
available = {
has_mastery = {
amount = 150
track = infantry
}
}
Synergy
[has_completed_track](/wiki/trigger/has_completed_track): Commonly used in conjunction with has_mastery, the former checks whether a track has been fully completed, the latter checks cumulative mastery amount, and together they form a dual threshold of "quality + quantity".
[add_mastery](/wiki/effect/add_mastery): Functions as a reward effect paired with this trigger—first use has_mastery to check if mastery value reaches the phase goal, then use add_mastery to stack additional bonuses, forming a "check → reward" loop.
[add_mastery_bonus](/wiki/effect/add_mastery_bonus): Used to further increase the acquisition rate thereafter once mastery amount meets the condition, working with has_mastery to implement snowball-style growth design.
[has_completed_subdoctrine](/wiki/trigger/has_completed_subdoctrine): Mastery values are often tied to subdoctrine unlocks; combining the two allows precise specification of the composite condition "unlocked a certain subdoctrine and mastery amount is reached".
Common Pitfalls
- Typos in the
track field value: The track field must contain the actual mastery track identifier that exists in the game (such as infantry, armor, etc.). If misspelled or if a Chinese name is used, the trigger will silently fail (always return false) without an error message, making it easy to overlook during debugging.
- Mistakenly thinking it checks the exact value of a single track: The official description clearly states "any track of the given type", meaning as long as any one track of that type reaches the specified amount, it returns true—not summing all tracks or requiring all to reach the threshold. When designing multi-track gates, additional conditions must be added to constrain the scope.