Hands-On Usage
province_vp is commonly used in battle events or specialized AI decision mods to tie trigger conditions to the strategic value of the combat province—for example, triggering reinforcements or special combat modifiers only in high-victory-point provinces. It operates within COMBATANT scope (from the combatant's perspective), with typical use cases being adding narrative or mechanical weight to battles over key strategic locations.
# Example: Trigger a battle event only when the combat province has high victory points
combat_event = {
id = my_mod.1
trigger = {
is_attacker = yes
province_vp > 3
}
...
}
Synergy
- is_attacker / is_defender: Distinguish between attacking and defending sides before evaluating victory point thresholds, preventing event logic conflicts from double-triggering on both sides.
- is_fighting_in_terrain: Combined with terrain checks, enables complex conditions like "fighting in mountainous high-value provinces," enhancing strategic depth in campaigns.
- is_winning: Coordinate with battle momentum; trigger special rewards or narrative events when one side is gaining advantage and the province has high value, creating a sense of "decisive battle for key territory."
- tag: Restrict triggers to specific nations, preventing mod events from being indiscriminately triggered by all combatants.
Common Pitfalls
- Scope Confusion:
province_vp must be used within COMBATANT scope. Newcomers often mistakenly place it in trigger blocks within COUNTRY or STATE scope, causing script errors or silent failures. Always verify the outer scope has entered a combatant context.
- Comparison Operator Syntax: Official syntax requires using
> / < directly with a numeric value (e.g., province_vp > 2). Beginners sometimes incorrectly attempt syntax like province_vp = { value > 2 } with curly braces, which is not valid for this trigger.