Wiki

effect · deactivate_shine_on_focus

Definition

  • Supported scope:COUNTRY
  • Supported target:any

Description

Deactivate the shine effect on the focus with the given id. The current focus cannot have it's shine effect removed.

Note that tooltips are only shown in debug mode.

### Example:

deactivate_shine_on_focus = GER_prioritize_economic_growth

实战 · 配合 · 坑

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

实战用法

当国家焦点树中某个焦点完成后,开发者通常会用闪光效果吸引玩家注意力;一旦玩家已完成该焦点或情境不再需要高亮提示,就应在对应的 completion_reward 或事件 option 中调用此命令撤销效果,避免界面持续闪烁干扰体验。例如在德国焦点完成后关闭另一个焦点的高亮:

completion_reward = {
    # 焦点完成,撤销对引导性焦点的高亮
    deactivate_shine_on_focus = GER_prioritize_economic_growth
    add_political_power = 50
}

配合关系

  • [activate_shine_on_focus](/wiki/effect/activate_shine_on_focus):两者是一对互逆操作,通常先用 activate_shine_on_focus 在特定时机开启高亮,再在条件满足后用本命令关闭,形成完整的引导流程。
  • [complete_national_focus](/wiki/effect/complete_national_focus):脚本触发焦点完成时,配套调用本命令可确保该焦点的闪光在逻辑完成的同一时刻被清除,保持界面整洁。
  • [has_completed_focus](/wiki/trigger/has_completed_focus):作为前置条件检查,判断目标焦点是否已完成,再决定是否执行 deactivate_shine_on_focus,避免在焦点尚未完成时过早撤销高亮。

常见坑

  1. 对当前正在进行的焦点使用:官方文档明确说明无法移除当前正在研究中焦点的闪光效果,若对 current_focus 对应的焦点调用此命令,效果会静默失败且不报错,新手容易误以为是其他逻辑出了问题。
  2. 忘记在 debug 模式外验证:该命令的 tooltip 仅在 debug 模式下显示,直接在正式游戏中测试时看不到任何提示反馈,容易误判命令未执行,应养成用 -debug 启动游戏进行脚本测试的习惯。

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

When a focus in a nation's focus tree is completed, developers typically use a shine effect to draw player attention. Once the player has completed the focus or the scenario no longer requires highlighting, the command should be called in the corresponding completion_reward or event option to remove the effect, preventing continuous screen flicker from disrupting the user experience. For example, disabling the highlight on another focus after a German focus completes:

completion_reward = {
    # Focus completed, deactivate highlight on guidance focus
    deactivate_shine_on_focus = GER_prioritize_economic_growth
    add_political_power = 50
}

Synergy

  • [activate_shine_on_focus](/wiki/effect/activate_shine_on_focus): These two commands form a complementary pair of inverse operations. Typically, activate_shine_on_focus is used first to enable highlighting at a specific moment, then this command is used to disable it once conditions are met, forming a complete guidance flow.
  • [complete_national_focus](/wiki/effect/complete_national_focus): When a script triggers focus completion, pairing this command ensures that the focus's shine effect is cleared at the same logical moment of completion, keeping the interface clean.
  • [has_completed_focus](/wiki/trigger/has_completed_focus): Used as a prerequisite condition check to determine whether the target focus has been completed before deciding whether to execute deactivate_shine_on_focus, preventing premature removal of highlighting while the focus is still in progress.

Common Pitfalls

  1. Using on the currently active focus: The official documentation explicitly states that the shine effect cannot be removed from a focus that is currently being researched. Calling this command on the focus corresponding to current_focus will fail silently without error, leading newcomers to mistakenly believe other logic is broken.
  2. Forgetting to verify outside debug mode: The command's tooltip only displays in debug mode. When testing directly in regular gameplay, no visual feedback appears, making it easy to misjudge whether the command executed. Develop the habit of launching the game with -debug to test scripts properly.