事件修改

本页面所适用的版本可能已经过时,最后更新于1.3


Event modding

There are different event types that have different scopes by default. The most common types are Country and Character events, but there are also State and Province events, and there may be more types yet untested. Every event file has a namespace. This is very useful so that you don't have to give every event an id number or keep track of which numbers are used, the game does it automatically upon startup.

An (semi) official guide is available at the forums

Event structure

namespace = rel_flavor  #Defined at start of event file, every file has a different namespace to prevent confusion
rel_flavor.16 = { #Every namespace can only have one event per id number
    type = country_event # EVENT TYPE - Can be Country/Province/Character/State decides ROOT Scope
    title = rel_flavor.16.t # LOCALIZATION KEY - Title of Event
    desc = rel_flavor.16.desc # LOCALIZATION KEY - Description of Event
    picture = aqueducts # EVENT PICTURE
    hidden = no # SPECIAL FIELD - Can hide the event from a player's view
    fire_only_once = yes # SPECIAL FIELD - Will limit the event to once per tag
    goto_location = capital_scope # SPECIAL FIELD - Will let the player jump to the province in question
 
    left_portrait = current_ruler # LEFT PORTRAIT - Shown at the left hand side of event
    right_portrait = current_ruler # RIGHT PORTRAIT - Shown at the right hand side of event

    weight_multiplier = { # MODIFIER - Will modify the chances for the event to fire

    }

    trigger = { # TRIGGER FIELD - Checks if the event will fire at all
 
    }

    immediate = { # EFFECT FIELD - Fires after trigger check, but before everything else

    }

    option = { # EFFECT FIELD - FIRST OPTION - Options the player can choose between when receiving the event
        name = rel_flavor.16.a # LOCALIZATION KEY
    }
    option = { # EFFECT FIELD - SECOND OPTION - Options the player can choose between when receiving the event
        name = rel_flavor.16.b # LOCALIZATION KEY
    }
    option = { # EFFECT FIELD - THIRD OPTION - Options the player can choose between when receiving the event
        name = rel_flavor.16.c # LOCALIZATION KEY
        trigger = { # TRIGGER FIELD - Checks if this specific option will be shown

        }
        exclusive = yes # SPECIAL FIELD - Will be the only option available, if it is available
        highlight = yes # SPECIAL FIELD - Will highlight the option
    }

    after = { # EFFECT FIELD - Happens after the player has clicked an option

    }
}