Event modding

From Imperator Wiki
Jump to navigation Jump to search

Event modding[edit]

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[edit]

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

Documentation EffectsTriggersModifiersScopesVariablesData TypesLocalisationCustomizable localization
Scripting AIBuildingsCasus belliCharacterCharacter InteractionsCombat TacticsCountriesCultureDecisionsDefinesEconomic PoliciesEventsEthnicitiesGovernmentGovernor PoliciesIdeasModifiersMilitary TraditionsOfficesOn ActionsPartiesPricesPopsProvince setupReligionScript ValuesScript ModifiersSubject TypesTechnologyTrade goodsTraitsUnits
Map MapTerrain
Graphics 3D ModelsInterfaceCoat of armsGraphical AssetsFontsParticlesShadersUnit models
Audio MusicSound
Other Console commandsChecksumMod structureTroubleshooting