Country creation

From Europa Universalis 4 Wiki
Jump to navigation Jump to search

This article is about creating countries by modding. For the in-game nation designer, see Nation designer.

Quick check-list[edit | edit source]

  • Define a unique 3-character country tag
  • Create a file in /Europa Universalis IV/common/countries
  • Create a file in /Europa Universalis IV/history/countries
  • Add localisation
  • Add a flag
  • Pick or create your country idea group.
  • Optional: Add the country to the game

Country tag[edit | edit source]

Countries need a 3-character country tag. This is how a country is referred to in all of the game's script.

To create a tag, add a new file to /Europa Universalis IV/common/country_tags (or edit an existing file) and add something like the following:

BEL	= "countries/Belgium.txt"

where

countries/Belgium.txt

is address of the country file that will be created/edited, located in /Europa Universalis IV/common/

All country tags must be unique. A country cannot share a tag with any other country.

Country tags should start with a letter and contain at most one number.

Country tags that do not work properly and should be avoided:

ADD, ADM, AND, ART, AUX, CAR, CAT, CAV, CON, DIP, HAS, HRE, INF, MIL, MIN, NOT, NUL, PRN, RGB, SUM, VAL, and VAN.

Country file[edit | edit source]

Create a new file in the /Europa Universalis IV/common/countries folder. Alternatively, copy the file of a very similar country, then rename and edit it.

Graphical culture[edit | edit source]

Defines the set of graphics used for units and advisor portraits. You can find a list of graphical cultures in /Europa Universalis IV/common/graphicalculturetype.txt.

graphical_culture = westerngfx

Color[edit | edit source]

This is the country's colour on the political map mode. It uses the rgb colour scale.

color = { 157  51  167 }

Historical idea groups[edit | edit source]

In start dates where the country had the administrative technology to already have idea groups unlocked, this list will determine which groups are picked. This list will not affect the idea groups the AI will choose while already in a game.[1]

historical_idea_groups = {
	defensive_ideas
	offensive_ideas
	religious_ideas
	economic_ideas
	diplomatic_ideas
	innovativeness_ideas
	spy_ideas
	trade_ideas
}

To construct the list, you'll need to look in the /Europa Universalis IV/common/ideas/00_basic_ideas.txt file, either of Vanilla or of your mod.

Historical units[edit | edit source]

Defines which land units the country will pick when it has the corresponding level of military technology.

historical_units = {
	western_medieval_infantry
	western_medieval_knights
	western_men_at_arms
	swiss_landsknechten
	dutch_maurician
	austrian_tercio
	austrian_grenzer
	austrian_hussar
	austrian_white_coat
	prussian_uhlan
	austrian_jaeger
	mixed_order_infantry
	open_order_cavalry
	napoleonic_square
	napoleonic_lancers
}

Monarch names[edit | edit source]

A list of names from which countries generate ruler names.

monarch_names = {
	"Leopold #1" = 100
}

The “#” after the name is for regnal numbering, e.g. if “Steve #2” is used, the next monarch named Steve will be named Steve III, assuming that the country has a government type that uses regnal numbering.

The “= [number]” section determines how likely a new monarch or heir is to get this name. A negative number denotes a female name.

Leader names[edit | edit source]

Determines names for leaders (generals, explorers, etc.). Use quotation marks for names that include multiple words.

leader_names = {
	Leman
}

Ship names[edit | edit source]

Determines potential names for ships.

ship_names = {
	"Comte de Smet de Nayer"
}

Army names[edit | edit source]

Determines potential names for armies.

army_names = {
	"Armee von $PROVINCE$"
}

Fleet names[edit | edit source]

Determines potential names for fleets.

fleet_names = {
	"Stadtflotte"
}

Country history[edit | edit source]

Create a file in the /Europa Universalis IV/history/countries folder. Alternatively, copy, rename, and edit a similar file. The file name should be [country tag - country name], e.g. "BEL - Belgium". This file contains information about the history and default attributes of the country.

Government[edit | edit source]

This can be any valid government type. A list of government types in the vanilla game was be found in /Europa Universalis IV/common/governments.

government = absolute_monarchy

Mercantilism[edit | edit source]

Defines the starting mercantilism for the country.

mercantilism = 10

Technology group[edit | edit source]

Defines the default technology group for the country. A list of technology groups can be found in /Europa Universalis IV/common/technology.txt.

technology_group = western

Religion[edit | edit source]

Defines the default religion for the country. A list of religion can be found in /Europa Universalis IV/common/religions

religion = catholic

Culture[edit | edit source]

This defines the default primary culture for the country

primary_culture = flemish

Accepted cultures can be added with

add_accepted_culture = dutch

These cultures can be found in /Europa Universalis IV/common/cultures

Capital[edit | edit source]

Defines which province will be the country's default capital.

capital = 90	# Antwerp

Optionally, you can also add the following:

fixed_capital = 90 # Antwerp

A fixed capital means that moving the capital to this province costs no monarch points. The AI will also not be able to move its capital away from this province.

History[edit | edit source]

If you intend the country to exist in any start dates, define rulers and heirs here. If the nation should change any of the attributes in above subsections, this is where it should be changed.

Localisation[edit | edit source]

Add the localisation for your new country to the following file

/Europa Universalis IV/localisation/countries_l_[GAME LANGUAGE].yml

where [GAME LANGUAGE] can either be English, German, Spanish or French. A file can be created for each language for better coverage across the supported languages.

Define the localisation for the country's name and its adjective like so:

BEL: "Belgium"
BEL_ADJ: "Belgian"
BEL_ADJ2: "Belgian"

In some languages like English, the second adjective is superfluous. This second adjective is however important in languages like French (for example for war names).

Flag[edit | edit source]

The flag needs to be a 128x128 pixel TGA-file with the name of the country tag. All flags are located in /Europa Universalis IV/gfx/flags.

Setting up Country Traditions and Ideas[edit | edit source]

Main article: Idea group modding

Adding the country to the game[edit | edit source]

There are four ways to implement the new country into the game.

  • Using events
  • By decision
  • By mission
  • Editing province history

Adding countries by event, mission or decision[edit | edit source]

Main article: Event modding
Main article: Decision modding

There are a variety of ways to add a country's presence by event, mission or decision. Here are two:

any_owned_province = { add_core = BEL }
release = BEL

Using this script in a decision or mission effect, or event option, when scoped to a province, set of provinces, or region, will cause the province to be owned by the new country.

change_tag = BEL

This script will change the tag of a country to the new country. This is how country formation decisions work.

Adding countries with province history[edit | edit source]

Change the owner, controller, and cores in province history files so that they include the new country either by default or in defined start dates.

add_core = BEL
owner = BEL
controller = BEL


Documentation EffectsTriggersModifiersScopesVariablesLocalisationCustomizable localizationRun files
Scripting Scripted functionAdvisorsAgesBookmarksBuildingsCasus belliColonial regionsCountriesCultureDecisionsDefinesDiplomatic actionsDisastersEmpire of ChinaEstatesEventsFactionsGovernmentGreat projectsHistoryHoly Roman EmpireIdea groupsInstitutionsMercenariesMissionsModifiersNation designerOn ActionsParliamentPeace treatiesPoliciesRebel typesReligionSubject 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 editingScripting Tutorial
  1. The AI uses a dynamic weight system to determine its ideas. See Idea groups#AI preference more information.