Wiki

effect · add_equipment_bonus

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Adds the specified equipment bonuses to the country. As description the given loc key or the name of given special project will be used. Same usage as in Ideas/National spirits.
Example:
add_equipment_bonus = {
	project = FROM # Optional special project scope for using special project name. If not set, the name will be used.
	bonus = {
		armor = { # Type of equipment
					armor_value = 3 # Bonus to apply to the stats of the equipment type
					soft_attack = 3
					instant = yes # Optional. Default no. If true, the bonus will be applied immediately. Otherwise it will be applied only on new equipment variant creation.
		}
		small_plane_naval_bomber_airframe = {
					air_range = 0.1 naval_strike_attack = 0.1
		}
	}
}

add_equipment_bonus = {
	name = SUPER_BONUS_NAME # Optional loc key to use as name.
	prefix = SUPER_BONUS_PREFIX # Optional loc key prefix to use (will be added before the name).
	bonus = {
		small_plane_naval_bomber_airframe = {
					air_range = 0.1 naval_strike_attack = 0.1
		}
	}
}

实战 · 配合 · 坑

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

实战用法

add_equipment_bonus 常用于科技突破、国家精神奖励或特殊项目完成后,为全国所有同类装备追加属性加成,例如给坦克装甲值或舰载机打击力加一个持续增益。典型场景是在焦点树或事件完成时奖励玩家某种"装备升级"效果,而不必真正触发新科技研究。

# 完成焦点后为坦克系装备添加装甲与软攻加成
complete_national_focus = focus_tank_doctrine
country_event = {
    id = my_mod.1
}

# 事件 option 内:
add_equipment_bonus = {
    name = TANK_UPGRADE_BONUS          # 对应 localisation key
    prefix = MY_MOD_BONUS_PREFIX
    bonus = {
        medium_tank_chassis = {
            armor_value = 2
            soft_attack = 1
            instant = yes
        }
    }
}

配合关系

  • [add_ideas](/wiki/effect/add_ideas):通常与 add_equipment_bonus 搭配,前者给国家精神(提供研发或生产加成),后者直接强化已有装备属性,两者共同构成完整的"科技奖励包"。
  • [add_tech_bonus](/wiki/effect/add_tech_bonus):在同一焦点或事件中先用 add_tech_bonus 加速某条科技的研究,再用 add_equipment_bonus 对已解锁装备立即追加数值,形成"研究 + 即时强化"的双重效果。
  • [complete_special_project](/wiki/effect/complete_special_project):特殊项目完成后常以 project = FROM 的写法调用本 effect,将项目名称作为加成的显示名,语义上高度绑定。
  • [has_completed_focus](/wiki/trigger/has_completed_focus):作为前置条件触发器,确认焦点已完成后再通过 effect 块施加装备加成,避免重复给予。

常见坑

  1. 忽略 instant 字段导致加成不生效:默认情况下加成只对新创建的装备型号生效,若希望已在库存中的装备立即受益,必须显式写 instant = yes;新手常以为添加后所有装备立刻改变数值,实测却毫无变化。
  2. nameproject 同时填写引发冲突name(本地化键)和 project(特殊项目 scope)只应二选一作为显示名来源,若同时写入,游戏实际取哪个依赖内部优先级,可能导致 UI 中显示的加成名称与预期不符,调试时难以定位。

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

add_equipment_bonus is commonly used after tech breakthroughs, national spirit rewards, or special project completions to apply attribute bonuses to all equipment of the same type across the nation—for example, adding armor value to tanks or strike power to carrier aircraft as a persistent buff. The typical scenario is rewarding the player with an "equipment upgrade" effect upon completing a focus tree or event, without requiring actual new tech research.

# Add armor and soft attack bonuses to tank-class equipment after completing a focus
complete_national_focus = focus_tank_doctrine
country_event = {
    id = my_mod.1
}

# Inside event option:
add_equipment_bonus = {
    name = TANK_UPGRADE_BONUS          # Corresponds to localisation key
    prefix = MY_MOD_BONUS_PREFIX
    bonus = {
        medium_tank_chassis = {
            armor_value = 2
            soft_attack = 1
            instant = yes
        }
    }
}

Synergy

  • [add_ideas](/wiki/effect/add_ideas): Typically paired with add_equipment_bonus—the former grants national spirits (providing research or production bonuses), the latter directly enhances existing equipment stats, together forming a complete "tech reward package."
  • [add_tech_bonus](/wiki/effect/add_tech_bonus): Within the same focus or event, use add_tech_bonus first to accelerate research on a specific tech line, then apply add_equipment_bonus to unlocked equipment for immediate stat increases, creating a dual "research + instant enhancement" effect.
  • [complete_special_project](/wiki/effect/complete_special_project): Upon special project completion, this effect is commonly invoked with project = FROM syntax, using the project name as the bonus display identifier with tight semantic binding.
  • [has_completed_focus](/wiki/trigger/has_completed_focus): As a prerequisite trigger, confirm the focus is completed before applying equipment bonuses via effect blocks, preventing duplicate grants.

Common Pitfalls

  1. Omitting the instant field causes bonuses to fail: By default, bonuses apply only to newly created equipment variants. To make existing equipment in stockpiles benefit immediately, you must explicitly set instant = yes. Newcomers often assume all equipment values change instantly after adding the bonus, but testing reveals no change at all.
  2. Filling both name and project causes conflicts: name (localization key) and project (special project scope) should be used exclusively as one bonus display source. If both are specified, which one the game actually uses depends on internal priority, potentially causing the bonus name shown in the UI to differ from expectations and making debugging difficult to pinpoint.