effect · add_victory_points
Definition
- Supported scope:
any - Supported target:
any
Description
adds victory point to province
add_victory_points = {
province = 42
value = 5
}
add_victory_pointsanyanyadds victory point to province
add_victory_points = {
province = 42
value = 5
}
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
add_victory_points 常用于剧情事件或决议中动态增减战略要地的胜利点数,例如占领某省后给予奖励、或因战争破坏而削减某城市的战略价值。在备用地图重绘 mod 中,也常用它来补充新建省份的初始胜利点权重。
# 某国完成"重建港口"决议后,为目标港口省份追加胜利点
complete_effect = {
add_victory_points = {
province = 11603 # 目标港口省份 ID
value = 3
}
}
[set_victory_points](/wiki/effect/set_victory_points):add_victory_points 是在现有值上增减,set_victory_points 是直接覆盖赋值;两者配合可先清零再精确设定,避免叠加导致数值失控。[custom_effect_tooltip](/wiki/effect/custom_effect_tooltip):胜利点变动对玩家不直接显示文字说明,配合该指令可在 UI 中补充可读提示,告知玩家究竟哪个省份点数发生了变化。[if](/wiki/effect/if):常包裹在条件块中,只在特定触发条件(如省份归属、战争状态)满足时才执行点数变动,防止错误地对不存在或未控制的省份操作。[check_variable](/wiki/trigger/check_variable):在执行前用变量检查确认动态省份 ID 已被正确赋值,与 if 联用可保证 province 字段传入有效值。province 字段需要填写省份(province)的数字 ID,而非州(state)ID,两者数值范围重叠但含义不同,填错会导致效果静默失败或作用到错误地点,务必用地图编辑器或 map/definition.csv 核对。value 支持负数以扣减胜利点,但若扣减后总值低于 0,游戏行为并不统一(部分版本会截断至 0,部分版本可能产生异常显示),建议配合 [if](/wiki/effect/if) + [check_variable](/wiki/trigger/check_variable) 做下限保护。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.
add_victory_points is commonly used in story events or decisions to dynamically increase or decrease victory points for strategic locations. For example, granting rewards after capturing a province, or reducing a city's strategic value due to war damage. In alternate map redraw mods, it is also frequently used to supplement initial victory point weights for newly created provinces.
# After a country completes the "Rebuild Harbor" decision, add victory points to the target harbor province
complete_effect = {
add_victory_points = {
province = 11603 # Target harbor province ID
value = 3
}
}
[set_victory_points](/wiki/effect/set_victory_points): add_victory_points adds or subtracts from the existing value, while set_victory_points overwrites the value directly. Used together, you can reset to zero first, then set precise values, avoiding loss of control due to stacking.[custom_effect_tooltip](/wiki/effect/custom_effect_tooltip): Victory point changes do not display text explanations to the player directly. Pairing with this command allows you to add readable tooltips in the UI, informing the player which province's points have changed.[if](/wiki/effect/if): Commonly wrapped in conditional blocks to execute point changes only when specific trigger conditions (such as province ownership or war status) are met, preventing accidental operations on non-existent or uncontrolled provinces.[check_variable](/wiki/trigger/check_variable): Use variable checks before execution to confirm that dynamic province IDs have been correctly assigned. Used with if, it ensures that the province field receives a valid value.province field requires the numeric ID of a province, not a state ID. Although their numeric ranges overlap, they have different meanings. Entering the wrong one causes the effect to fail silently or apply to the wrong location. Always verify using the map editor or map/definition.csv.value supports negative numbers to deduct victory points, but if the total value drops below 0, game behavior is inconsistent across versions (some versions truncate to 0, others may produce abnormal displays). It is recommended to add lower bound protection using [if](/wiki/effect/if) + [check_variable](/wiki/trigger/check_variable).