Country creation

From Europa Universalis 4 Wiki
Jump to: navigation, search

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

Quick check-list[edit]

  • 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]

Countries need a 3-character country tag. This is how a country is referred to in all of the game's script. All country tags must be unique. A country cannot share a tag with any other country.

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/

Country file[edit]

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]

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]

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]

The idea groups that the AI will invest in as the country. The AI will invest in the order specified by the list. In start dates where the country had the administrative technology to already have idea groups unlocked, this list will determine which groups are picked.

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]

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]

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]

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

leader_names = {
	Leman
}

Ship names[edit]

Determines potential names for ships.

ship_names = {
	"Comte de Smet de Nayer"
}

Army names[edit]

Determines potential names for armies.

army_names = {
	"Armee von $PROVINCE$"
}

Fleet names[edit]

Determines potential names for fleets.

fleet_names = {
	"Stadtflotte"
}

Country history[edit]

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]

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]

Defines the starting mercantilism for the country.

mercantilism = 10

Technology group[edit]

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]

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

religion = catholic

Culture[edit]

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]

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]

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]

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 line French (for example for war names).

Flag[edit]

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]

Main article: Idea group modding

Adding the country to the game[edit]

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

  • Using events
  • By decision
  • Editing province history

Adding countries by event or decision[edit]

Main article: Event modding
Main article: Decision modding

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

cede_province = BEL

Using this script in an event option or decision effect, 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]

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


Modding
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