effect · unlock_national_focus
Definition
- Supported scope:
COUNTRY - Supported target:
none
Description
unlocks a focus for a country
unlock_national_focusCOUNTRYnoneunlocks a focus for a country
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
unlock_national_focus 常用于通过事件或决议提前解锁某个国策节点,使其无需完成前置节点即可选取,适合制作"历史捷径"或奖励型 mod 场景(例如完成某任务后解锁通常需要漫长前置链才能到达的国策)。以下示例展示在一个国家事件中奖励解锁特定国策:
country_event = {
id = my_mod.1
title = my_mod.1.t
desc = my_mod.1.d
option = {
name = my_mod.1.a
unlock_national_focus = my_special_focus # 解锁目标国策节点
add_political_power = 50
}
}
[has_completed_focus](/wiki/trigger/has_completed_focus) — 常作为触发条件检测玩家已完成某前置国策后,再通过 unlock_national_focus 解锁更深层的节点,形成"条件解锁"逻辑链。[complete_national_focus](/wiki/effect/complete_national_focus) — 两者有本质区别,若需要直接完成(并触发国策效果),应用后者;若仅想让玩家"可选"该国策而不立即生效,才用 unlock_national_focus,二者需根据设计目的明确区分。[has_country_flag](/wiki/trigger/has_country_flag) — 搭配国家标记作为触发守卫,确保解锁只在特定剧情节点触发一次,避免重复解锁造成逻辑混乱。[activate_shine_on_focus](/wiki/effect/activate_shine_on_focus) — 解锁国策后配合使用,可在国策树 UI 上高亮该节点,引导玩家注意刚解锁的国策。unlock_national_focus 只是移除国策的前置节点限制,让其变为可选状态,并不会触发该国策的任何效果;若需要直接执行国策效果,应改用 complete_national_focus,混淆两者会导致预期效果完全不生效。unlock_national_focus 后填写的 ID 与 focus = { id = ... } 定义中完全一致,包括大小写。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.
unlock_national_focus is commonly used in events or decisions to unlock a national focus node prematurely, allowing it to be selected without completing its prerequisite nodes. This is ideal for creating "historical shortcuts" or reward-based mod scenarios (for example, unlocking a focus that normally requires a lengthy prerequisite chain after completing a special task). The following example demonstrates rewarding a player with an unlocked focus in a country event:
country_event = {
id = my_mod.1
title = my_mod.1.t
desc = my_mod.1.d
option = {
name = my_mod.1.a
unlock_national_focus = my_special_focus # Unlock target focus node
add_political_power = 50
}
}
[has_completed_focus](/wiki/trigger/has_completed_focus) — Commonly used as a trigger condition to detect when the player has completed a prerequisite focus, then unlock deeper nodes via unlock_national_focus, forming a "conditional unlock" logic chain.[complete_national_focus](/wiki/effect/complete_national_focus) — These have a fundamental difference: if you need to directly complete a focus (and trigger its effects), use the latter; if you only want to make a focus "selectable" without immediately activating it, use unlock_national_focus. Choose based on your design intent.[has_country_flag](/wiki/trigger/has_country_flag) — Combine with country flags as trigger guards to ensure unlocks trigger only once at specific story points, preventing logic confusion from repeated unlocks.[activate_shine_on_focus](/wiki/effect/activate_shine_on_focus) — Use alongside unlocking a focus to highlight the node in the focus tree UI, directing player attention to the newly unlocked focus.unlock_national_focus only removes the prerequisite restriction from a focus, making it selectable—it does not trigger any of that focus's effects. If you need to directly execute a focus's effects, use complete_national_focus instead. Mixing these up will result in effects not triggering as expected.unlock_national_focus exactly matches the one defined in focus = { id = ... }, including capitalization.