Wiki

effect · complete_national_focus

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

completes a focus for a country

实战 · 配合 · 坑

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

实战用法

complete_national_focus 常用于剧本触发特定国策完成、绕过正常研究时间,以及在事件或决议中强制推进某国的国策树进度。例如在一个"时间线重置"mod中,开局时为玩家自动补全已应当完成的历史性国策:

country_event = {
    id = my_mod.1
    hidden = yes
    immediate = {
        # 跳过开局已应完成的历史国策
        complete_national_focus = POL_build_the_gdynia_port
        complete_national_focus = POL_modernize_the_army
    }
}

配合关系

  • [has_completed_focus](/wiki/trigger/has_completed_focus) — 执行前先检查目标国策是否已完成,避免重复触发或逻辑冲突。
  • [add_ideas](/wiki/effect/add_ideas) — 国策完成后往往需要补充应当附带的 idea(当国策奖励因脚本原因未自动发放时手动补偿)。
  • [add_political_power](/wiki/effect/add_political_power) — 通过脚本完成国策不会消耗政治点数,若需维持经济平衡可配合扣除相应政治点。
  • [add_tech_bonus](/wiki/effect/add_tech_bonus) — 与科研类国策配合,在强制完成国策后补发应有的科技加成 buff。

常见坑

  1. 国策前置未满足时强制完成会导致状态不一致complete_national_focus 不检查前置国策链,直接调用可能跳过先决条件,造成国策树 UI 显示异常或后续国策解锁逻辑错乱,应先手动完成所有前置国策或确认设计上允许跳过。
  2. 国策奖励不会自动触发:该 effect 仅标记国策为已完成状态,并不执行国策本身 completion_reward 块内的效果,新手常误以为能同时获得奖励,实际上需要另行手动调用对应效果。

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

complete_national_focus is commonly used to trigger specific focus completion in scenarios, bypass normal research time, and force a nation's focus tree progression in events or decisions. For example, in a "timeline reset" mod, automatically fill in historically completed focuses for the player at game start:

country_event = {
    id = my_mod.1
    hidden = yes
    immediate = {
        # Skip historically completed focuses at game start
        complete_national_focus = POL_build_the_gdynia_port
        complete_national_focus = POL_modernize_the_army
    }
}

Synergy

  • [has_completed_focus](/wiki/trigger/has_completed_focus) — Check if the target focus is already completed before execution to avoid duplicate triggers or logic conflicts.
  • [add_ideas](/wiki/effect/add_ideas) — After focus completion, often requires adding associated ideas (manual compensation when focus rewards fail to apply due to scripting reasons).
  • [add_political_power](/wiki/effect/add_political_power) — Scripted focus completion does not consume political power; pair with deducting corresponding political power if economic balance is needed.
  • [add_tech_bonus](/wiki/effect/add_tech_bonus) — Combine with tech-related focuses to retroactively grant the intended tech bonus buffs after forcing completion.

Common Pitfalls

  1. Forcing completion without satisfied prerequisites causes state inconsistency: complete_national_focus does not verify prerequisite focus chains; direct invocation may skip preconditions, resulting in abnormal focus tree UI display or broken downstream unlock logic. Always manually complete all prerequisite focuses first or confirm the design permits skipping them.
  2. Focus rewards do not trigger automatically: This effect only marks the focus as completed and does not execute the effects within the focus's completion_reward block. Beginners often mistakenly expect to gain rewards simultaneously, but you must manually call the corresponding effects separately.