Modifier modding

From Victoria 3 Wiki
Jump to navigation Jump to search

A modifier is essentially a variable used in internal calculations. However, unlike Defines, modifiers are dynamically changeable within any modifier block. In general, modifiers are typically used to create a consistent and long-lasting effect that can be easily reversed.

Define a modifier[edit | edit source]

To define modifier just write in a new text file in common/modifiers:

splendid_coastal_state = { # This is modifier
	icon = gfx/interface/icons/timed_modifier_icons/ # This is not modifier types, it just a icon, and it is optional
	state_infrastructure_add = 20 # This is a modifier type
    character_popularity_add = 100 # You can add whatever the modifier type as you want, but remember the scope

Apply a modifier[edit | edit source]

To apply a modifier in an effect:

add_modifier = { # Remember it can be in scope, if not, it is in the ROOT scope by default.
    name = splendid_coastal_state # what name you want
    multiplier = -3 # Optional, multiplied by a specific number
    is_decaying = no # Optional, if yes, it will decay, default is no
    months = 3 # Optional, if it is not set, the modifier is permanent.