Wiki

effect · add_mastery

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Adds doctrine mastery.

	You can use flexible filters to have this effect apply to all tracks that match the specified
	folder, grand doctrine, subdoctrine or specific track. If a certain filter is not present, it will be counted as a pass.
	For example, you can add mastery to all active tracks in all folders by not specifying any filters at all.

	### Examples
	```
	GER = {
		add_mastery = {
			amount = 100						# Amount of mastery to add

			# FILTERS:
			folder = land						# Optional - will filter by tracks in the specified folder
			grand_doctrine = mobile_warfare		# Optional - will filter by tracks in folders with the specified grand doctrine
			sub_doctrine = mobile_infantry		# Optional - will filter by tracks with the specified subdoctrine
			track = infantry					# Optional - will filter by tracks of the specified type
			index = 1							# Optional - will filter by the track index within the folder (0-indexed).
		}
	}
	```

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

add_mastery is commonly used to reward players with mastery progress in specific doctrine directions when national focuses, events, or decisions are triggered. For example, upon completing a military reform focus, you can batch increase mastery values in the land folder, or accelerate the unlocking of specific grand doctrine sub-tracks after achieving certain war victory conditions. Below is a typical implementation that rewards mobile warfare-related mastery upon focus completion:

# Reward mastery upon focus completion
focus = {
    id = GER_mobile_warfare_reform
    # ...
    completion_reward = {
        add_mastery = {
            amount = 150
            folder = land
            grand_doctrine = mobile_warfare
        }
    }
}

Synergy

  • [has_completed_track](/wiki/trigger/has_completed_track): Check whether the player has already completed a specific track before granting mastery rewards, preventing wasted rewards or logical contradictions.
  • [has_any_grand_doctrine](/wiki/trigger/has_any_grand_doctrine): Determine whether the country currently possesses a grand doctrine, only triggering add_mastery when the doctrine path is valid, preventing mastery points from being added to the wrong doctrine direction.
  • [add_daily_mastery](/wiki/effect/add_daily_mastery): Used together with add_mastery, these can differentiate between "one-time bulk rewards" and "continuous incremental growth" scenarios, enabling more granular doctrine progression design.
  • [add_doctrine_cost_reduction](/wiki/effect/add_doctrine_cost_reduction): Frequently appears alongside add_mastery in focus rewards. One reduces subsequent unlock costs while the other directly advances progress, working in tandem to accelerate doctrine tree progression.

Common Pitfalls

  1. Forgetting the amount field: add_mastery has no default value. Omitting amount causes script errors or silent effect failure. Always explicitly specify a numeric value.
  2. Over-relying on unfiltered implementation: Without any filters, the effect applies to all active tracks. Beginners often mistakenly assume it only affects the current primary doctrine, when in reality mastery can be unexpectedly scattered across unrelated doctrine directions. It is recommended to specify at least folder or grand_doctrine as a limiting parameter when designing rewards.