Wiki

effect · add_design_template_bonus

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Add free bonus design discount to given types with a set of uses.
The value for uses and cost_factor can either be an absolute value or a script constant.
Can use several equipment types, where 1 is mandatory

#### Example
Adding 40% discount to an equipment type:

add_design_template_bonus = { uses = 1 cost_factor = 0.4 equipment = light_tank_flame_chassis_0 name = light_flame_chassis_loc }

Adding 40% discount to an equipment type and archetype with scripted constant:

add_design_template_bonus = { uses = 2 cost_factor = cost.high equipment = light_tank_flame_chassis_0 equipment = light_tank_chassis }

实战 · 配合 · 坑

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

实战用法

此 effect 常用于科技/国策奖励场景,例如完成某个工业或装甲兵焦点后给予玩家特定装备设计的折扣,激励其研发特定底盘变体。在剧本 mod 中也常作为"专属研发优势"奖励发放给特定国家,体现其工业或技术专长。

# 完成装甲焦点后奖励轻型火焰战车设计折扣
focus = {
    id = focus_flame_tank_doctrine
    ...
    completion_reward = {
        add_design_template_bonus = {
            uses = 1
            cost_factor = 0.4
            equipment = light_tank_flame_chassis_0
            name = focus_flame_tank_bonus_loc
        }
    }
}

配合关系

  • [add_equipment_bonus](/wiki/effect/add_equipment_bonus):两者均用于强化某类装备,前者针对设计折扣(一次性购买优惠),后者为装备属性加成,常配合使用以形成完整的装备发展奖励包。
  • [create_equipment_variant](/wiki/effect/create_equipment_variant):先用此命令为国家预建一个装备变体,再配合 add_design_template_bonus 给予后续改型的折扣,实现"技术传承"链条。
  • [has_completed_focus](/wiki/trigger/has_completed_focus):用于条件检查,确保某焦点完成后才触发折扣奖励,避免奖励被过早或重复领取。
  • [add_tech_bonus](/wiki/effect/add_tech_bonus):常与之组合作为焦点奖励包的一部分,add_tech_bonus 加速研究,add_design_template_bonus 降低后续量产成本,两步协同推进装备路线。

常见坑

  1. equipment 填写的必须是具体变体或原型(archetype)的实际定义名,直接填写本地化键名或显示名称将导致效果静默失败且不报错,务必在 equipment_variantsequipment 文件中核实 key 拼写。
  2. name 字段缺失不会报错但会导致 UI 显示异常(设计界面中折扣提示条目显示为空白或乱码),即便功能正常仍会令玩家困惑,切勿省略;同时该字段对应的是本地化 key,需在 .yml 中补充对应条目。

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

This effect is commonly used in technology or national focus reward scenarios, such as granting players a discount on a specific equipment design after completing an industrial or armor focus, incentivizing them to research particular chassis variants. In scenario mods, it also frequently serves as an "exclusive research advantage" reward distributed to specific nations, reflecting their industrial or technological expertise.

# Grant light flame tank design discount after completing armor focus
focus = {
    id = focus_flame_tank_doctrine
    ...
    completion_reward = {
        add_design_template_bonus = {
            uses = 1
            cost_factor = 0.4
            equipment = light_tank_flame_chassis_0
            name = focus_flame_tank_bonus_loc
        }
    }
}

Synergy

  • [add_equipment_bonus](/wiki/effect/add_equipment_bonus): Both are used to enhance a certain class of equipment; the former targets design discounts (one-time purchase savings), while the latter provides equipment stat bonuses. They are often combined to create a comprehensive equipment development reward package.
  • [create_equipment_variant](/wiki/effect/create_equipment_variant): Use this command first to pre-build an equipment variant for a nation, then pair it with add_design_template_bonus to grant discounts on subsequent modifications, establishing a "technological inheritance" chain.
  • [has_completed_focus](/wiki/trigger/has_completed_focus): Used for conditional checks to ensure a focus is completed before triggering the discount reward, preventing premature or duplicate reward acquisition.
  • [add_tech_bonus](/wiki/effect/add_tech_bonus): Frequently combined as part of a focus reward package; add_tech_bonus accelerates research while add_design_template_bonus reduces subsequent production costs, with both steps working synergistically to advance the equipment line.

Common Pitfalls

  1. The equipment field must contain the actual definition name of a concrete variant or archetype; directly entering a localization key or display name will cause the effect to fail silently without error reporting. Always verify the key spelling in the equipment_variants or equipment files.
  2. Omitting the name field will not error but causes UI display issues (the discount indicator in the design interface appears blank or garbled), and even if the function works normally, it will confuse players. Do not skip this field; additionally, it corresponds to a localization key that must have a matching entry added to the .yml file.