命令百科

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).
		}
	}
	```

实战 · 配合 · 坑

实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。

实战用法

add_mastery 常用于国策、事件或决议触发后奖励玩家在特定学说方向的精通进度,例如完成某条军事改革国策后批量提升陆地文件夹中的精通值,或在特定战争胜利条件触发后加速解锁特定大学说的子轨道。下面是一个完成国策后奖励机动战争相关精通的典型写法:

# 国策完成后奖励精通
focus = {
    id = GER_mobile_warfare_reform
    # ...
    completion_reward = {
        add_mastery = {
            amount = 150
            folder = land
            grand_doctrine = mobile_warfare
        }
    }
}

配合关系

  • [has_completed_track](/wiki/trigger/has_completed_track):在给予精通奖励前,先检查玩家是否已完成特定轨道,避免奖励落空或逻辑矛盾。
  • [has_any_grand_doctrine](/wiki/trigger/has_any_grand_doctrine):判断国家当前是否持有某大学说,只在符合学说路线时才触发 add_mastery,防止给错学说方向加点。
  • [add_daily_mastery](/wiki/effect/add_daily_mastery):两者搭配可区分"一次性大额奖励"与"持续小额增长"的应用场景,实现更细腻的学说成长节奏设计。
  • [add_doctrine_cost_reduction](/wiki/effect/add_doctrine_cost_reduction):常与 add_mastery 同时出现在国策奖励中,一个降低后续解锁成本,一个直接推进进度,双管齐下加速学说树推进。

常见坑

  1. 忘记 amount 字段add_mastery 没有默认值,漏写 amount 会导致脚本报错或效果静默失效,务必显式填写数值。
  2. 过度依赖无过滤器写法:不加任何过滤器时效果会作用于所有活跃轨道,初学者容易误以为只影响当前主学说,实际上可能把精通意外分散到不相关的学说方向,建议在奖励设计时至少指定 foldergrand_doctrine 进行限定。