Wiki

effect · set_grand_doctrine

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Activate (unlock and assign) the specified grand doctrine

	### Examples
	```
	GER = {
		set_grand_doctrine = mobile_warfare
	}
	```

实战 · 配合 · 坑

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

实战用法

set_grand_doctrine 常用于国策树、决策事件或剧本触发器中,当某国完成特定历史节点时自动解锁并激活指定的大条令(grand doctrine),无需玩家手动在条令界面操作。例如德国完成"闪击战"相关国策后自动赋予对应大条令:

focus = {
    id = GER_blitzkrieg_focus
    ...
    completion_reward = {
        set_grand_doctrine = mobile_warfare
    }
}

配合关系

  • [has_completed_focus](/wiki/trigger/has_completed_focus):在 limit 中检查是否已完成前置国策,确保大条令按正确顺序解锁,避免跳级激活。
  • [has_any_grand_doctrine](/wiki/trigger/has_any_grand_doctrine):用于判断目标国家是否已持有任意大条令,可在条件判断中防止重复赋予或用于 AI 逻辑分支。
  • [add_doctrine_cost_reduction](/wiki/effect/add_doctrine_cost_reduction):常与其配合,在激活大条令的同时降低后续子条令的研究费用,给予额外的条令发展奖励。
  • [has_completed_subdoctrine](/wiki/trigger/has_completed_subdoctrine):用于检查子条令完成情况,配合 set_grand_doctrine 构建"完成某子条令 → 解锁大条令"的完整条令推进逻辑。

常见坑

  1. 直接在 STATE scope 下调用:该 effect 仅支持 COUNTRY scope,若在州事件或 every_owned_state 内直接调用会导致脚本报错或静默失效,必须确保执行块位于国家 scope 下。
  2. 传入不存在的大条令键名set_grand_doctrine 的值必须是 00_grand_battle_plan.txt 等条令文件中实际定义的 grand_doctrine 键名,拼写错误或使用普通子条令名称不会有任何提示,但效果不会生效,调试时极易遗漏。

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

set_grand_doctrine is commonly used in focus trees, decisions, events, or scripted triggers to automatically unlock and activate a specified grand doctrine for a nation when reaching certain historical milestones, without requiring manual player interaction in the doctrine interface. For example, Germany automatically receives the corresponding grand doctrine upon completing the "Blitzkrieg" focus:

focus = {
    id = GER_blitzkrieg_focus
    ...
    completion_reward = {
        set_grand_doctrine = mobile_warfare
    }
}

Synergy

  • [has_completed_focus](/wiki/trigger/has_completed_focus): Check in limit blocks whether prerequisite focuses have been completed, ensuring grand doctrines unlock in the correct sequence and preventing premature activation.
  • [has_any_grand_doctrine](/wiki/trigger/has_any_grand_doctrine): Verify whether the target nation already possesses any grand doctrine; useful in conditional logic to prevent duplicate assignments or for AI behavior branching.
  • [add_doctrine_cost_reduction](/wiki/effect/add_doctrine_cost_reduction): Often paired together to reduce research costs for subsequent subdoctrines while activating a grand doctrine, granting additional doctrine progression bonuses.
  • [has_completed_subdoctrine](/wiki/trigger/has_completed_subdoctrine): Check subdoctrine completion status; combined with set_grand_doctrine to establish complete doctrine advancement logic such as "Complete subdoctrine → Unlock grand doctrine."

Common Pitfalls

  1. Calling directly within STATE scope: This effect only supports COUNTRY scope. Invoking it within state events or inside every_owned_state will cause script errors or silent failures. Always ensure the execution block is within a country scope.
  2. Passing a non-existent grand doctrine key: The value for set_grand_doctrine must be an actual grand_doctrine key defined in doctrine files like 00_grand_battle_plan.txt. Spelling errors or using regular subdoctrine names produce no warnings but fail silently, making debugging extremely difficult.