Wiki

effect · select_tech_tree_icon_origin

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Override tech tree to use other countries icons

实战 · 配合 · 坑

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

实战用法

当你的 mod 为某个国家设计了全新的科技树外观,但希望它在图标显示上"借用"另一个国家的风格时,select_tech_tree_icon_origin 非常有用。例如创建傀儡国或分裂国家时,让新生国家沿用其宗主/母国的科技树图标集,以避免图标缺失或显示错误。

# 让新生的独立国家继承德国的科技树图标风格
REB = {
    select_tech_tree_icon_origin = GER
}

配合关系

  • [has_cosmetic_tag](/wiki/trigger/has_cosmetic_tag) — 常用于检查当前国家是否已经应用了特定外观标签,从而决定是否需要同步替换科技树图标来源,保持视觉风格一致。
  • [drop_cosmetic_tag](/wiki/effect/drop_cosmetic_tag) — 当一个国家切换或移除外观标签时,往往也需要重置科技树图标来源,两者配套使用保证界面表现同步。
  • [add_ideas](/wiki/effect/add_ideas) — 在同一个事件或 focus 执行块中,先赋予代表新势力的 idea,再设置图标来源,属于"国家改造"操作的标准组合。
  • [has_completed_focus](/wiki/trigger/has_completed_focus) — 在国策完成后才触发图标来源覆盖,确保只在特定历史节点才改变科技树外观,避免过早生效。

常见坑

  1. 目标国家填写错误:新手有时误将参数写成 scope 内的某个 trigger 结果或变量,但该 effect 需要填写一个具体存在的国家标签(如 GERUSA),若目标国家在游戏中并不存在(如尚未出现或已被消灭),图标来源将静默失败,不会报错但也不会生效。
  2. 误以为会影响科技研究本身:该 effect 仅改变科技树的图标显示来源,不会解锁、复制或以任何方式影响目标国家的科技内容,将其与 [add_tech_bonus](/wiki/effect/add_tech_bonus) 等真正影响研究的命令混淆会导致设计逻辑错误。

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 your mod designs a completely new tech tree appearance for a nation but wants it to "borrow" another nation's icon style in display, select_tech_tree_icon_origin is extremely useful. For example, when creating puppet states or splitting nations, allowing newly formed nations to inherit their overlord/parent nation's tech tree icon set avoids missing or incorrect icon displays.

# Allow the newly independent nation to inherit Germany's tech tree icon style
REB = {
    select_tech_tree_icon_origin = GER
}

Synergy

  • [has_cosmetic_tag](/wiki/trigger/has_cosmetic_tag) — Commonly used to check whether the current nation has already applied a specific cosmetic tag, thereby deciding whether simultaneous replacement of the tech tree icon origin is needed to maintain visual consistency.
  • [drop_cosmetic_tag](/wiki/effect/drop_cosmetic_tag) — When a nation switches or removes a cosmetic tag, the tech tree icon origin often needs to be reset as well; using both together ensures interface presentation stays synchronized.
  • [add_ideas](/wiki/effect/add_ideas) — Within the same event or focus execution block, first assign ideas representing new forces, then set the icon origin—this is a standard combination for "nation transformation" operations.
  • [has_completed_focus](/wiki/trigger/has_completed_focus) — Trigger icon origin override only after focus completion, ensuring the tech tree appearance changes only at specific historical moments and prevents premature activation.

Common Pitfalls

  1. Incorrect target nation specification: Beginners sometimes mistakenly write a trigger result or variable from within scope as the parameter, but this effect requires a concrete existing nation tag (such as GER, USA). If the target nation does not exist in the game (such as not yet appeared or already eliminated), the icon origin will silently fail without error messages, but also without taking effect.
  2. Mistaking it for affecting tech research itself: This effect only changes the icon display source of the tech tree and does not unlock, copy, or in any way affect the tech content of the target nation. Confusing it with commands like [add_tech_bonus](/wiki/effect/add_tech_bonus) that genuinely affect research will lead to design logic errors.