Holy Roman Empire modding

From Europa Universalis 4 Wiki
Jump to navigation Jump to search

The Holy Roman Empire is a unique mechanic which uses a large range of files to implement. There may only be one Holy Roman Empire in a game, though use of localisation files can disguise it as something else.

Adding/Removing provinces in the empire[edit | edit source]

Provinces can be set as part of the HRE by navigating to /Europa Universalis IV/history/provinces and opening the respective country file. To add the province to the Empire, it the history file should contain the line:

hre = yes

If you want a province to be added to the HRE only on certain bookmarks, you can start with

hre = no

and then add a date for the province to be added to the empire, for example:

1464.1.1 = { hre = yes }

Setting electors[edit | edit source]

To set a country as an elector, navigate to /Europa Universalis IV/history/countries, go to the respective country and add the line:

elector = yes

You can make this status only appear on certain bookmark by setting a date, for example:

1701.1.18 = { elector = yes }

The number of electors is found in the /Europa Universalis IV/common/defines file, and has the initial value:

DESIRED_NUM_OF_ELECTORS = 7
MAX_NUM_OF_ELECTORS = 8

The first number represents a soft limit on the number of electors in the game; if the game already has seven electors, no more will be added. The second number represents a hard limit on the number of electors.

You can increase the soft limit with the command

max_electors = 1

This is used by the imperial reform 'Embrace Rechenschaft Measures'. You cannot increase this soft limit past the hard limit.

Setting the emperor[edit | edit source]

The emperor is defined in the /Europa Universalis IV/history/diplomacy/hre file. For example, the code

1437.12.9 = { emperor = HAB }

defines HAB (Austria) as the Emperor after the 9th of September 1437.

Religion[edit | edit source]

The Holy Roman Empire's default religion is defined in the /Europa Universalis IV/common/religions/00_religion file. The default religion should have the line:

hre_religion = yes

By default this is the Catholic faith. The religion considered the main heresy (which can produce league wars) should have the line:

hre_heretic_religion = yes

By default this is the Protestant faith.

Imperial reforms[edit | edit source]

Imperial reforms can be found in the /Europa Universalis IV/common/imperial_reforms folder. Use the 00_hre_emperor file if you are modding for the Emperor expansion, or just 00_hre otherwise.


An example reform is as follows:

emperor_reichsregiment = {
 empire = hre
  potential = {
   has_dlc = "Emperor"
  }
  province = {
   local_unrest = -2
  }
 emperor = {
  diplomatic_reputation = 1
  diplomats = 1
 }
 required_reform = emperor_reichsreform
 gui_container = mainline
}

Mandatory elements include:

  • A unique name for the reform (in this case, emperor_reichsregiment)
  • The definition of "empire = hre", distinguishing it from a Chinese Empire reform
  • For reforms added based on the Emperor expansion's mechanics, they must also define the "gui_container". Options are "mainline" (the first seven reforms by default), "left_branch" (decentralisation by default) and "right_branch" (centralisation by default).

Two other key elements include:

required_reform = 

This defines what previous imperial reform must be unlocked prior to this one.

disabled_by = 

This defines which imperial reform, if implemented, prevents this reform from being used. This is used in the main game to prevent an Emperor from unlocking both the Centralisation and Decentralisation routes.

Scopes used within imperial reforms include:

  • province - Affects all Empire provinces.
  • all - Affects all Empire member states.
  • elector - Affects all Electors.
  • elector_per_prince - Affects all electors. The effect is multiplied by the number of member states of the HRE.
  • emperor - Affects only the Emperor.
  • emperor_per_prince - Affects only the emperor. The effect is multiplied by the number of member states of the HRE.
  • on_effect - Scoped effects are activated immediately when the reform is passed. For example, you can call an event to activate.
  • off_effect - Scoped effects are activated immediately if the reform is repealed.

Localisation[edit | edit source]

The name of imperial reforms are localised as NAME_title and NAME_desc. For example:

emperor_reichsreform_title:0 "Call for Reichsreform"
emperor_reichsreform_desc:0 "Reform the Empire to a more centralized model."

Reform Images[edit | edit source]

Images for imperial reforms can be found in the /Europa Universalis IV/gfx/interface/imperial_diet_reforms folder. They are in .dds format and have a size of 52 x 40 pixels.

To make these sprites work in-game, they must be defined in the /Europa Universalis IV/interface folder in a gfx file. An example of an existing sprite in the /Europa Universalis IV/interface/hre.gfx file is as follows:

spriteTypes = { 
 spriteType = {
  name = "GFX_emperor_reichsreform"
  texturefile = "gfx/interface/imperial_diet_reforms/call_for_reichsreform.dds"
  loadType = "INGAME"
 }
}

Imperial incidents[edit | edit source]

Documentation EffectsTriggersModifiersScopesVariablesLocalisationCustomizable localizationRun files
Scripting Scripted functionAdvisorsAgesBookmarksBuildingsCasus belliColonial regionsCountriesCultureDecisionsDefinesDiplomatic actionsDisastersEstatesEventsFactionsGovernmentGreat projectsHistoryIdea groupsInstitutionsMercenariesMissionsModifiersNation designerHoly Roman EmpirePoliciesReligionRebel typesSubject typesTechnologyTrade companiesTrade goodsUnits
Map MapNation designerRandom New WorldTrade nodes
Graphics 3D ModelsInterfaceGraphical AssetsFontsParticlesShadersUnit models
Audio MusicSound
Other Console commandsChecksumJoroDox mod making toolMod structureTroubleshootingThe ValidatorRun files
Guides Adding a provinceSave-game editing