effect · set_victory_points
Definition
- Supported scope:
any - Supported target:
any
Description
sets victory points for a province
set_victory_points = {
province = 42
value = 5
}
set_victory_pointsanyanysets victory points for a province
set_victory_points = {
province = 42
value = 5
}
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.
set_victory_points is commonly used in mods to dynamically adjust the importance of strategic locations. For example, after a nation completes a specific national focus or event, you can reset a key province's victory points to a desired value to alter AI attack priorities or influence victory condition checks. Note that it overwrites the province's existing victory points rather than adding to them.
# After a nation completes the "Strengthen Capital Defense" national focus,
# increase the victory points of the capital province
complete_national_focus = {
focus = strengthen_capital
immediate = {
set_victory_points = {
province = 3600 # Province ID
value = 10
}
}
}
[add_victory_points](/wiki/effect/add_victory_points): When you need incremental adjustments based on existing values rather than hard overwrites, use this alongside set_victory_points to form a complete victory points management solution.[custom_effect_tooltip](/wiki/effect/custom_effect_tooltip): set_victory_points does not automatically display explanatory text in the UI, so pair it with this command to show players readable tooltips and improve user experience.[check_variable](/wiki/trigger/check_variable): Use this trigger within if blocks to check variable conditions and determine whether to execute set_victory_points, enabling conditional logic for dynamic victory point allocation.[if](/wiki/effect/if): Wrap set_victory_points to implement conditional branches, preventing unconditional victory point overwrites across all scenarios.province field requires the specific province numeric ID on the map, not the state (state) ID—the two are easily confused. You can enable debug mode in-game and hover over a province to view the correct ID.set_victory_points is a hard set operation that directly replaces the current victory points of that province. If you want to add points to the existing value, use add_victory_points instead, otherwise you may accidentally zero out carefully configured point values.