Wiki

trigger · has_completed_subdoctrine

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Checks if the current country has ever completed the specified subdoctrine (even if it was later switched out).

	### Examples
	```
	TAG = {
		has_completed_subdoctrine = mobile_infantry
	}
	```

实战 · 配合 · 坑

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

实战用法

has_completed_subdoctrine 常用于国家焦点、决议或事件中,检测玩家/AI 是否曾研究过特定子教义分支,从而解锁后续内容或给予奖励加成。即使玩家后来切换了教义路线,该 trigger 仍会返回 true,非常适合用来追踪"历史进程"而非"当前状态"。

# 如果曾完成过机动步兵子教义,允许激活某个特殊决议
available = {
    has_completed_subdoctrine = mobile_infantry
}

配合关系

  • [has_completed_focus](/wiki/trigger/has_completed_focus):两者逻辑相似,常并列用于 available 块中,同时要求完成某个国家焦点走过特定教义路线,才开放高阶内容。
  • [has_doctrine](/wiki/trigger/has_doctrine)has_doctrine 检查当前正在使用的教义,与 has_completed_subdoctrine 配合可区分"曾经研究过但已切换"和"目前仍在使用"两种状态,逻辑更精确。
  • [add_doctrine_cost_reduction](/wiki/effect/add_doctrine_cost_reduction):在 focus/event 奖励阶段,确认玩家走过某条教义分支后给予后续教义折扣,形成"研究越深、成本越低"的设计。
  • [add_tech_bonus](/wiki/effect/add_tech_bonus):同样作为研究奖励,根据已完成的子教义给予特定科技加成,强化教义路线与科技树的联动叙事。

常见坑

  1. 误以为它检测"当前"教义:该 trigger 只记录"是否曾经完成",不关心玩家现在用的是哪条路线。如果你想判断当前激活的教义,应改用 [has_doctrine](/wiki/trigger/has_doctrine),否则逻辑会出现"已切走但条件仍满足"的意外情况。
  2. 子教义名拼写错误导致永远返回 false:子教义的 token 名必须与 \common\technologies\ 下对应的科技/教义定义完全一致,大小写敏感,建议直接从原文件复制粘贴,避免手写拼错后毫无报错提示地静默失败。

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_completed_subdoctrine is commonly used in national focuses, decisions, or events to detect whether the player or AI has ever researched a specific subdoctrine branch, thereby unlocking subsequent content or granting reward bonuses. Even if the player later switches doctrine paths, this trigger will still return true, making it ideal for tracking "historical progress" rather than "current state."

# If the mobile infantry subdoctrine was ever completed, allow activation of a special decision
available = {
    has_completed_subdoctrine = mobile_infantry
}

Synergy

  • [has_completed_focus](/wiki/trigger/has_completed_focus): Similar logic to this trigger; commonly used together in available blocks to require both completion of a national focus and progression through a specific doctrine path before unlocking advanced content.
  • [has_doctrine](/wiki/trigger/has_doctrine): has_doctrine checks the currently active doctrine. Combined with has_completed_subdoctrine, it allows you to distinguish between "researched in the past but switched away" and "currently still in use," enabling more precise logic.
  • [add_doctrine_cost_reduction](/wiki/effect/add_doctrine_cost_reduction): During focus/event reward phases, after confirming the player has progressed through a certain doctrine branch, grant subsequent doctrine cost reductions, creating a "deeper research = lower costs" design pattern.
  • [add_tech_bonus](/wiki/effect/add_tech_bonus): Similarly serves as a research reward; based on completed subdoctrines, grant specific technology bonuses to strengthen the synergy between doctrine paths and the tech tree narrative.

Common Pitfalls

  1. Mistaking it for checking the "current" doctrine: This trigger only records "whether it was ever completed," regardless of which path the player currently uses. If you need to determine the currently active doctrine, use [has_doctrine](/wiki/trigger/has_doctrine) instead; otherwise you'll encounter unexpected situations where "the condition remains satisfied even though the player has switched away."
  2. Subdoctrine name misspellings causing permanent false returns: The subdoctrine token name must exactly match the corresponding technology/doctrine definition under \common\technologies\, and is case-sensitive. It's recommended to copy-paste directly from the source file to avoid silent failures from typos with no error messages.