Estate modding

From Europa Universalis 4 Wiki
Jump to navigation Jump to search

Estates are factions within the nation that influence domestic politics.

Estates[edit]

Estates are found in /Europa Universalis IV/common/estates/*.txt. An estate follows this general format:

<estate> = {
    icon = <index>      # Refers to the frame index of an icon in GFX_estates_icons
    color = { <rgb> }   # What color the estate appears as in the estate mapmode
    
    # Whether the country gets the estate
    trigger = {
        <triggers>
    }
    
    # Whether the province can be granted the estate
    province_trigger = {
        <triggers>
    }
    
    # When to apply a custom name to this estate
    custom_name = {
        desc = <key> # The new name to apply
        trigger = {
            <triggers>
        }
    }
    
    # When an estate is declared independant, only provinces belong to the estate that pass this check will be part of the independant nation
    independence_trigger = { 
        <triggers>
    }
    
    # The government a nation that breaks free through this estate gets
    independence_government = <government>
    
    # The technology group a nation that breaks free through this estate gets
    independence_tech_group = <technology group>
    
    
    # The modifiers to apply when the estate is "happy"
    country_modifier_happy = {
        <modifiers>
    }
    
    # The modifiers to apply when the estate is "neutral"
    country_modifier_neutral = {
        <modifiers>    
    }
    
    # The modifiers to apply when the estate is "angry"
    country_modifier_angry = {
        <modifiers>
    }
    
    # The modifiers to apply to provinces belong to this estate when "happy"
    province_modifier_happy = {
        <modifiers>
    }
    
    # The modifiers to apply to provinces belong to this estate when "neutral"
    province_modifier_neutral = {
        <modifiers>
    }
    
    # The modifiers to apply to provinces belong to this estate when "angry"
    province_modifier_angry = {
        <modifiers>
    }
    
    # The minimum autonomy floor for provinces belonging to this estate
    min_autonomy = <float>
    
    # Which province modifiers that autonomy does not effect when a province belongs to this estate
    # Can be any province modifier
    autonomy_does_not_affect = <modifier>
    
    # Whether the estate is removed from a province when ownership changes.
    keep_on_conquest = yes / no                     
    
    # Whether the estate is removed from a province when ownership changes, to an owner of a different religion
    always_remove_on_religious_conquest = yes / no  
    
    # The minimum percentage of territory the estae expects
    min_territory = <float>
    
    # The maximum amount of provinces that territory demands will be ignored to
    min_provinces_to_want_territory = <int>
    
    # Modifies the amount of power granting provinces to this estate gives as a percentage of the base.
    territory_power_modifier = <float>      

    # Modifies the base territory wanted
    wanted_territory_modifier = {
        desc = <key>
        trigger = {
            <triggers>
        }
        value = <float>
    }
    
    # The base amount of influence this estate has
    base_influence = <float>
    
    # Modifies the base estate influence
    influence_modifier = {
        desc = <key>
        trigger = {
            <triggers>
        }
        influence = <float>
    }
    
    # Modifiers the base estate loyalty
    loyalty_modifier = {
        desc = <key>
        trigger = {
            <triggers>
        }
        loyalty = <float>
    }
    
    # Used by the AI to determine when to assign provinces to estates beyond the minimum
    ai_territory_modifier = {
        trigger = {
            <triggers>
        }
        value = <float>
    }
    
    # The AI weighting for which provinces are granted this estate
    ai_grant_province = {
        factor = <float>
        
        modifier = {
            factor = <float>
            <triggers>
        }
    }
    
    # Interactions, see below
}

Country modifiers for an estate will scale with the estate loyalty and influence.

Province modifiers will not scale, and are only applied in provinces owned by the estate.

Interactions[edit]

Estate interactions are defined within the estates scope, following this general format:

interaction = {
    name = "<key>"      # Localisation used for the interaction name
    icon = <index>      # Refers to the frame index of an icon in GFX_estate_interactions
    
    years_between_use = <float> # The length of the cooldown for this action.
    
    # Determines when this interaction can appear
    potential = {
        <trigger>
    }
    
    # Determines when this interaction can be taken
    trigger = {
        <triggers>
    }
    
    # The effects to execute
    effect = {
        <effects>
    }
    
    # The AI weighting for using this interaction
    ai_will_do = {
        factor = <float>
        
        modifier = {
            factor = <float>
            <triggers>
        }
    }
}

Interface[edit]

For estate pictures to work you have to go into interface/countryestatesview.gfx and edit the noOfFrames at GFX_estates_icons and GFX_estate_interactions to match your amount The icons used for the estates themselves are defined via GFX_estates_icons:

spriteType = {
    name = "GFX_estates_icons"
    texturefile = "gfx//interface//estates//estates_icons.dds"
    noOfFrames = 6
    loadType = "INGAME"
}

The icons used for the estate interactions are defined via GFX_estate_interactions:

spriteType = {
    name = "GFX_estate_interactions"
    texturefile = "gfx//interface//estate_interactions_strip.dds"
    noOfFrames = 22
    loadType = "INGAME"
}

Localisation[edit]

Typically an estate will need the following localisation keys defined:

<estate>: "Name"
<estate>_desc: "Description"

Influence and loyalty modifiers use this: §Y$VAL$%§! within their tooltips to display the amount of influence or loyalty they change.

An estate can be referred to in localisation with: $<estate>$, which will display the current name of the estate, adapting to any custom name entries for the estate. Requires the localisation scope to support dynamic localisation however (i.e. won't work in interaction titles).

Documentation EffectsTriggersModifiersScopesVariablesLocalisationCustomizable localization
Scripting AdvisorsAgesBookmarksBuildingsCasus belliColonial regionsCountriesCultureDecisionsDefinesDiplomatic actionsDisastersEstatesEventsFactionsGovernmentGreat projectsHistoryIdea groupsInstitutionsMissionsModifiersNation designerPoliciesReligionRebel typesSubject typesTechnologyTrade companiesTrade goodsUnits
Map MapRandom New WorldTrade nodes
Graphics 3D ModelsInterfaceGraphical AssetsFontsParticlesShadersUnit models
Audio MusicSound
Other Console commandsChecksumJoroDox mod making toolMod structureTroubleshootingThe Validator
Guides Adding a province