Technology modding

From Europa Universalis 4 Wiki
Jump to navigation Jump to search

Technologies are the advancements you can purchase with monarch points in the Technology interface.

Technology Tables[edit]

Although the base game only contains three technology tables (ADM, DIP and MIL), it is possible to add your own.

In /Europa Universalis IV/common/technology.txt, the technology tables are defined in the tables = { } section. For example, to add example_tech, you'd modify the technology.txt like so:

tables = {
	adm_tech = "technologies/adm.txt"
	dip_tech = "technologies/dip.txt"
	mil_tech = "technologies/mil.txt"
        example_tech = "technologies/example.txt"

You can then add technologies to /Europa Universalis IV/common/technologies/example.txt.

example_tech_cost_modifier is dynamically generated, and can be used as a country-scope modifier.

Note: currently the AI will not purchase technologies from custom tables and the add_x_tech effects are not dynamically generated, meaning functionally custom tables are only for the player.


To integrate your new technology table correctly, you have to edit /Europa Universalis IV/interface/countrytechnologyview.gui.

Importantly, you need to create an new windowType that corresponds with your technology table name. For example:

windowType = {
    name = "countrytechnologyview_table_example_tech"
    # ....

Note: currently the AI doesn't interact correctly with non-vanilla tables. With the lack of a working add_<name>_tech, it is not recommended you add new tables.


Each technology table points to a specific file within /Europa Universalis IV/common/technologies/. These contain the actual technologies that the player and AI can purchase.

There are three internal types of technology: ADM, DIP, MIL. Each type has commands that can only be contained within a file using a certain type.

You set the type for the technology file by placing the following at the top of the file.

monarch_power = <type>  # ADM, DIP or MIL

Ahead of time bonus[edit]

This is applied when a nation is ahead of time in one of the three internal types.

Ahead of time bonus accepts any country modifier:

ahead_of_time = {
    production_efficiency = 0.2


Each technology is separated into their own objects. Each object needs a year set, and any technology commands that the technology should apply. It is formatted like so:

technology = {
    year = <year>

    <technology commands>

The year is used to determine when to apply the ahead of time cost modifier to the technology cost, and to determine if the country is ahead of time in a technology type.

The order of the technologies in game is the order they appear in the file, descending.

Technology Commands[edit]

Name Type Example Notes
<building> ADM/DIP/MIL temple = yes Any building from /Europa Universalis IV/common/buildings/ is valid.
enable = <unit> DIP/MIL enable = barque Any unit from /Europa Universalis IV/common/units/ is valid.
<government> ADM tribal_despotism = yes Any government from /Europa Universalis IV/common/governments/ is valid.
production_efficiency ADM production_efficiency = 0.05 Overall maximum a country can have is 2.0 (200%).
Stacks additivily.
may_support_rebels ADM may_support_rebels = yes
allowed_idea_groups ADM allowed_idea_groups = 1 This sets (not adds) the amount, so increment then number in later technologies.
max_states ADM max_states = 5 This adds to a country's maximum state count.
Stacks additivily.
may_force_march ADM may_force_march = yes
administrative_efficiency ADM administrative_efficiency = 0.1 Overall maximum a country can have is 1.0 (100%).
Stacks additivily.
development_efficiency ADM development_efficiency = 0.1 Overall maximum a country can have is 1.0 (100%).
Stacks additivily.
naval_morale DIP morale = 2.0 Stacks additivily.
naval_maintenance DIP naval_maintenance = 0.1 Stacks additivily.
range DIP range = 50 Stacks additivily.
global_colonial_growth DIP global_colonial_growth = 10 Stacks additivily.
trade_range DIP trade_range = 100 Stacks additivily.
trade_efficiency DIP trade_efficiency = 0.1 Overall maximum a country can have is 2.0 (200%).
Stacks additivily.
num_accepted_cultures DIP num_accepted_cultures = 1
may_fabricate_claims DIP may_fabricate_claims = yes
merchants DIP merchants = yes
reduced_naval_attrition DIP reduced_naval_attrition = yes
allow_client_states DIP allow_client_states = yes
may_steal_maps DIP may_steal_maps = yes
may_study_technology DIP may_study_technology = yes
may_slander_merchants DIP may_slander_merchants = yes
may_sabotage_recruitment DIP may_sabotage_recruitment = yes
may_sow_discontent DIP may_sow_discontent = yes
may_sabotage_reputation DIP may_sabotage_reputation = yes
may_corrupt_officials DIP may_corrupt_officials = yes
may_agitate_for_liberty DIP may_agitate_for_liberty = yes
may_infiltrate_administration DIP may_infiltrate_administration = yes
sprite_level MIL sprite_level = 3 Sets the graphical sprite level to use. 1 to 5 is valid.
infantry_fire MIL infantry_fire = 0.1 Stacks additivily.
infantry_shock MIL infantry_shock = 0.1 Stacks additivily.
cavalry_fire MIL cavalry_fire = 0.1 Stacks additivily.
cavalry_shock MIL cavalry_shock = 0.1 Stacks additivily.
artillery_shock MIL artillery_shock = 0.1 Stacks additivily.
artillery_fire MIL artillery_fire = 0.1 Stacks additivily.
land_morale MIL land_morale = 0.1 Stacks additivily.
military_tactics MIL military_tactics = 0.1 Stacks additivily.
supply_limit MIL supply_limit = 0.25 Stacks additivily.
maneuver_value MIL maneuver_value = 0.1 Cavalry flanking bonus.
combat_width MIL combat_width = 1 Integers only. Stacks additivily.


By default the technology localisation is found in /Europa Universalis IV/localisation/technology_l_english.yml.

It is formatted like so:

 <type>_tech_cs_<num>_name: "Tech name here"
 <type>_tech_cs_<num>_desc: "Tech description here"

The number is the index of the technology in its respective file. The first technology is 0, second is 1, etc.

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