Open main menu

Mod structure

To create a mod for Europa Universalis IV, you need to replicate the directory structure of the files which will be altered, then create a .mod file which tells the launcher the location of the new files.

Contents

.mod fileEdit

Where this file goes depends on the platform:

  • Windows: Documents\Paradox Interactive\Europa Universalis IV\mod
  • Linux: ~/.local/share/Paradox Interactive/Europa Universalis IV/mod
  • Mac OS: ~/Documents/Paradox Interactive/Europa Universalis IV/mod

It simply tells the launcher the directory it should look in, the name it should display to the user, and (as of Patch 1.8) the supported version of Europa Universalis IV[1]. For example:

name = "My Mod version 3"
path = "mod/mymod_v3"
supported_version = "1.9"

The supported version must match the major version number of Europa Universalis IV (1.8, 1.9, etc.) being used by the launcher in order to be loaded into the game.

When uploading it to the Steam workshop include a picture and tags so it is more easily found while browsing, like so:

name = "My Mod version 3"
path = "mod/mymod_v3"
supported_version = "1.9"
picture = "mymod_picture.jpg"
tags = {
 "Events"
 "Historical"
}

The picture file should go inside the "mymod_v3" folder rather than the Europe Universalis IV\mod directory.

Steam tagsEdit

The tags are the tags in use in Steam's system.

Currently any combination of the following works:

  • Alternative History
  • Balance
  • Events
  • Expansion
  • Fixes
  • Gameplay
  • Graphics
  • Guide
  • Historical
  • Loading Screen
  • Map
  • Military
  • Missions And Decisions
  • National Ideas
  • New Nations
  • Religion
  • Sound
  • Technologies
  • Trade
  • Translation
  • Utilities

General notesEdit

  • Audio file format
    As far as known, only OGG files will correctly play. While the engine doesn't crash or throw errors, it will not play MP3 files. Executing 'nextsong' in the console will print the console message "playing music/foo.mp3", suggesting that the file is read, but not actually played.

Mod folderEdit

This folder goes in the same place as the .mod file. It should have the same directory structure as the contents of the Europa Universalis IV folder, minus the unchanged files. The game will load files from the root Europa Universalis IV folder, but if it encounters a different version of a file in the mod folder, it will load that instead.

However, if to completely change a folder - for instance removing all missions from the game - add replace_path = "missions" in the .mod file. Any game folder that is added with this command will simply not be loaded.

name = "coolmod"
path = "mod/coolmod"
supported_version = "1.9"
replace_path = "missions"

Important: if to replace a folder with an empty folder - making sure nothing of that content is loaded - place a dummy file in the folder. Otherwise the empty folder in the mod won't be included when uploaded to Steam. [2]

What is in each folderEdit

commonEdit

advisortypesEdit

Defines the different types of advisors which can be hired: their traits, associated monarch power, and what modifies the chance of getting one.

ai_attitudesEdit

Defines the attitudes AI countries can have to the player and each other, such as   Neutral,   Friendly,   Hostile,   Protective, etc., along with what modulates the chances of having these attitudes.

ai_personalitiesEdit

Defines the overall "personalities" that AI countries can have, such as   Administrator,   Militarist,   Diplomat, etc. There isn't much that you can change in here; it's practically hardcoded.

bookmarksEdit

Defines the bookmarked dates that appear in the scenario selection screen, along with the suggested countries to play.

buildingsEdit

Specifies what buildings can be built and their associated costs and benefits.

cb_typesEdit

Defines the Casus Bellis (CBs) a nation may use to declare war. It is important to note that wargoals are not defined in this file, and that incorrectly defining either may cause strange bugs.

church_aspectsEdit

Defines   Protestant church aspects and benefits of them and blessings for   Coptic nations.

client_statesEdit

Defines the preset client states which a nation may create upon reaching technology level 22.

colonial_regionsEdit

Defines the areas where colonial nations may spawn in. You need 5 provinces in a colonial region to spawn a colonial nation.

countriesEdit

Contains a list of text files describing some of the properties all countries, such as their historical idea groups, ruler names, leader names, ship names, their color on the map, and so on.

country_colorsEdit

Ordinarily the colors of a country's soldiers' uniforms are determined by the engine looking at the dominant colors of their flags. However, for certain countries it is sometimes needed to override this.

country_tagsEdit

Defines a unique, 3 letter code, or "tag", for every single country, and points to the file in common\countries in which it is defined. It is important that every single tag defined herein has a corresponding file in common\countries, or else the game will crash at launch. Check to make sure it is spelled correctly.

culturesEdit

Defines   cultures and culture groups.

custom_country_colorsEdit

Defines colors that can be used by custom nations.

custom_ideasEdit

Defines ideas that can be used by custom nations.

definesEdit

Defines the bonuses to players and AIs with different difficulty levels.

diplomatic_actionsEdit

Defines diplomatic actions and requirements for completing them.

disastersEdit

Defines disaster types, triggers, and modifiers.

dynasty_colorsEdit

Defines the colors of dynasties on the dynasty mapmode.

estatesEdit

Defines the estates that you can interact and give provinces to.

event_modifiersEdit

Defines modifiers which may give bonuses or maluses to a country, which are activated by event. These can be for either provinces or countries. The duration of the modifier is not specified in here, but in the event which triggered it.

factionsEdit

Defines the factions used in   Ming's Celestial Empire government, merchant republics, and revolutionary republics. It is possible to define new factions in here too, for other countries. This requires many other files to work in tandem. For more information see modding factions.

fervorEdit

Defines use of   fervor and related bonuses.

fetishist_cultsEdit

Defines the cults that you can choose from when playing as a   Fetishist nation.

government_namesEdit

Defines the names that will appear in events and decisions depending on your government rank and type.

governmentsEdit

Defines the different types of governments and under what conditions the AI will switch to them.

great_projectsEdit

Defines Great Projects and associated modifiers.

hre_reformsEdit

Defines the reforms the Emperor can pass, from Reichsreform to Renovatio Imperii

ideasEdit

Defines the   ideas unlocked through spending points, as well as unique country (and group) National Ideas and Traditions.

institutionsEdit

Defines   institutions, bonuses for supporting them, as well as their spawn province.

leader_personalitiesEdit

Defines personality traits that generals and admirals may acquire after battles, and their associated bonuses.

native_advancementEdit

Defines native ideas and other properties.

nativesEdit

Defines what type of natives live in different unoccupied provinces according to region, and their numbers,   aggressiveness, and   ferocity.

on_actionsEdit

These are triggers for events which fire when the game engine reaches certain conditions. These conditions do not seem to be documented well anywhere (though see this forum discussion) Some of these conditions are based on a game event like losing a siege, which can trigger event #9206, an event about tribal armies looting. Others are triggered via "pulses", as in "on_bi_yearly_pulse" which has a chance to trigger one of several events every two years.

opinion_modifiersEdit

Defines the modifiers to countries' opinions of each other, and how long they last for.

parliament_bribesEdit

Defines the required bribes for Parliament to increase the chances of passing legislation.

parliament_issuesEdit

Defines the issues that you can choose from in the Parliament menu.

personal_deitiesEdit

Defines personal deities and associated bonuses for each for Hindu and Norse religions.

policiesEdit

Defines policies (acts) and associated modifiers granted by enabling each of them.

powerprojectionEdit

Defines fixed, dynamic, and ticking sources of   power projection, their decay, and their maximums.

pricesEdit

Defines the prices of tradegoods, and what alters the demand for them.

province_namesEdit

Defines dynamic province names; used if setting is enabled.

rebel_typesEdit

Specifies the different types of rebels, what their demands are, when they spawn, how hard they fight, etc.

region_colorsEdit

Determines the color of each region in the region mode, not labeled.

religionsEdit

Defines the different religions ingame along with their associated heresies, province and country bonuses, what they call their wars, and so on. More more information see religion modding

religious_reformsEdit

Defines religious reforms for the   Nahuatl,   Inti, and   Mayan religions.

revolt_triggersEdit

Determines if a country will become independent from rebels.

ruler_personalitiesEdit

Defines various ruler personalities, their effects, modifiers to chances of developing, and costs for custom nations.

scripted_effectsEdit

Scripted effects.

scripted_functionsEdit

Scripted functions.

scripted_triggersEdit

Scripted triggers.

static_modifiersEdit

Defines the effects of a large number of effects that don't change, such as   prestige,   legitimacy, and   war exhaustion.

technologiesEdit

Specifies the different tech levels according to what monarch power is used for them.

trade_companiesEdit

Defines provinces required, naming, and colors of trade companies.

tradegoodsEdit

Defines tradegoods and what effects come from controlling their trade.

tradenodesEdit

Defines which provinces are in what tradenodes, and how the nodes connect to each other.

triggered_modifiersEdit

Defines things like the "Conquest of Mecca" modifier which hold constant so long as certain conditions are met.

unitsEdit

Defines the stats and tech group of land and naval units.

wargoal_typesEdit

Defines wargoals for Casus Bellis (i.e. what can be taken in peace deals and what causes the ticking warscore)

achievements.txtEdit

Defines achievements.

alerts.txtEdit

This file holds your message settings.

defines.luaEdit

Miscellaneous things. Searching this file can be useful for finding a number of settings.

graphicalculturetype.txtEdit

Defines graphical culture types.

historical_lucky.txtEdit

Defines lucky nations.

technology.txtEdit

Defines tech groups.

decisionsEdit

These .txt files define the decisions a country can take, including its preconditions, effects and what determines whether the AI will pick it.

eventsEdit

These files define events that can happen to players or AI countries: what triggers them, how often they happen, and their options and effects.

gfxEdit

Contains the art assets used ingame. Most germane for modding are the flags and event_pictures folders.

historyEdit

advisorsEdit

Defines historical advisors (Machiavelli, da Vinci, Newton, etc.)

countriesEdit

Files in here define the history of every country in the game. The filenames must begin with the country's tag. At a bare minimum they must contain the preferred government type, tech group, religion, culture and preferred capital. Optionally they may specify historical monarchs, regime changes, religious conversions and the like.

diplomacyEdit

Define historical alliances, royal marriages, vassals, etc.

provincesEdit

The history of every single province in the game is specified here. Who owned it, the base tax, who had discovered it, the religion, trade goods, etc.

warsEdit

Historical wars.

interfaceEdit

These .gfx and .gui files define the structure of the interface, menus, and how the art assets are displayed.

localisationEdit

Contains .yml files specifying what text is displayed ingame, optionally translated into other languages.

mapEdit

lakesEdit

Contains the positions and elevations of lakes.

randomEdit

Base files for use in generating random new world map tiles

tilesEdit

Files and images relating to new random new world tiles

terrainEdit

Contains small image files specifying how things like the fog of war, border lines and so on look.

adjacencies.csvEdit

Defines what provinces are connected to others via narrow straits that troops can walk across unless blockaded by an enemy.

ambient_object.txtEdit

Tells the engine where to display flavor objects on the map, like bears and eagles and windmills and stuff.

area.txt/region.txt/superregionEdit

Defines the areas, regions and superregions for provinces

climate.txtEdit

Defines the climates of provinces, like which ones get the attrition modifiers in winter.

continent.txtEdit

Defines which provinces belong to which continent.

definition.csvEdit

Defines each province by number and what RGB value they correspond to in provinces.bmp

heightmap.bmpEdit

Grayscale image telling the engine how high each bit of the map should be elevated. Light is high, dark is low. Altering this does NOT alter whether provinces have terrain penalties during combat; that is specified in terrain.bmp.

minimap.baseEdit

The background of the minimap

positions.txtEdit

The location of buildings and units in a province

provinces.bmpEdit

The layout of the provinces, both land and sea, are defined here. Each province is a unique RGB color, which is specified in definition.csv. When editing this make sure to do so without antialiasing or blurred brush edges on.

region.txtEdit

Specifies which provinces belong to what region.

rivers.bmpEdit

The locations of the rivers in the game.

seasons.txtEdit

Defines the start and end of the seasons and how the color filter on the map changes.

terrain.bmpEdit

Specifies which areas of the map are mountainous, forest, etc. by color.

terrain.txtEdit

Defines the penalties associated with terrain, and how they correspond to the colors in terrain.bmp

trade_winds.txtEdit

Defines the trade winds for oceanic crossings

trees.bmpEdit

Locations of different tree types

world_normal.bmpEdit

It's a normalmap for the engine to handle lighting and speculars and stuff.

_canal_river.bmpEdit

Shows the location of the canal named at the start of the file

missionsEdit

Defines missions for the player and the AI can attempt, including the requirements, conditions for winning and failure, and the reward.

ReferencesEdit