Wiki

trigger · has_mastery_level

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Checks if the country has reached the specified number of mastery levels (rewards) for the given subdoctrine

	### Examples
	```
	TAG = {
		has_mastery_level = {
			amount = 2
			sub_doctrine = mobile_infantry
		}
	}
	```

Hands-On Notes

Hands-on notes are AI-generated and checked against the vanilla command vocabulary — treat them as a starting point, not authoritative reference. The definition above is the game's own documentation.

Hands-On Usage

has_mastery_level is commonly used in custom doctrine mods to unlock additional decisions or advisors based on the cumulative mastery rewards a player has accumulated in a specific sub-doctrine. For example, in a mod emphasizing army doctrine mastery progression, you can use it as an available condition for a decision to ensure the player reaches sufficient mastery tier before activation:

available = {
    has_mastery_level = {
        amount = 3
        sub_doctrine = mobile_infantry
    }
}

Synergy

  • [has_completed_subdoctrine](/wiki/trigger/has_completed_subdoctrine): First check whether the sub-doctrine is researched, then use has_mastery_level to determine reward tier, forming a complete conditional chain of "research completed and mastery reached".
  • [add_mastery](/wiki/effect/add_mastery): In effect blocks, increase mastery value through this effect, combining with has_mastery_level to create a positive feedback loop of "reach threshold → grant additional rewards".
  • [add_mastery_bonus](/wiki/effect/add_mastery_bonus): Used to stack additional doctrine bonuses after mastery tier conditions are met, commonly placed in the same if structure as reward distribution.
  • [has_any_grand_doctrine](/wiki/trigger/has_any_grand_doctrine): First filter whether a nation holds the corresponding grand doctrine, then nest has_mastery_level within it, avoiding invalid evaluation against nations that haven't chosen that doctrine path.

Common Pitfalls

  1. Incorrect sub_doctrine specification: Must use the actual sub-doctrine token defined in-game (the key name under sub_doctrines). Writing the doctrine display name or parent doctrine name directly will cause the condition to always evaluate false without error, making debugging extremely difficult.
  2. amount means "at least tier N", not "exactly tier N": If you need to precisely match a specific tier (for example, trigger a special event only at exactly tier 2), you must pair it with an inverted has_mastery_level check to set an upper limit, otherwise higher-tier players will trigger it repeatedly.