Technology modding
spriteType = {
name = "GFX_tech_group_strip"
texturefile = "gfx//interface//tech_group_strip.dds"
transparencecheck = yes
noOfFrames = 18
}
Technologies are the advancements you can purchase with monarch points in the Technology interface.
Technology Tables[edit | edit source]
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.
Note2: as of a test in 11.2022 the AI does actually purchase those technologies quite normally.
Interface[edit | edit source]
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.
Technologies[edit | edit source]
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 | edit source]
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 }
Technology[edit | edit source]
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 | edit source]
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. |
governing_capacity | ADM | governing_capacity = 100 | This adds to a country's governing capacity. 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. Going above MAX_COMBAT_WIDTH will cause the game to crash during battle. |
Expected Institutions[edit | edit source]
Technologies contain an expects_institution = { }
entry. These blocks contain a list of entries made up of institutions, and tech-cost penalties for not having that institution.
Example:
expects_institution = { feudalism = 0.5 renaissance = 0.5 new_world_i = 0.5 printing_press = 0.5 global_trade = 0.5 manufactories = 0.15 }
In this example, the first five institutions increase tech costs by +50% if you buy this tech without those institutions. The last institution (Manufactories) only gives a +15% tech cost penalty for trying to buy this tech without having Manufactories embraced.
Technology Groups[edit | edit source]
The effects as described below are contained in the technology.txt file in the common folder. What group each country belongs to at the beginning of each game is defined in the country files in the history folder.
A technology group looks like this:
groups = { western = { start_level = 3 start_cost_modifier = 0 nation_designer_cost = { trigger = { capital_scope = { OR = { continent = new_world continent = north_america continent = south_america continent = oceania } } } value = 75 } }
Groups are set in the order of the file.
The total number of technological groups is in \Europa Universalis IV\interface\countrygovernmentview.gfx
In the base game there are 17
spriteType = { name = "GFX_tech_group_strip" texturefile = "gfx//interface//tech_group_strip.dds" transparencecheck = yes noOfFrames = 18 }
Base Game
Group | ![]() |
![]() |
---|---|---|
Western | +0% | 3 |
High American [+] | +0% | 3 |
Eastern | +0% | 3 |
Anatolian | +0% | 3 |
Muslim | +0% | 3 |
Indian | +0% | 3 |
Chinese | +0% | 3 |
East African | +0% | 3 |
West African | +50% | 2 |
Central African | +50% | 2 |
Nomadic | +50% | 3 |
Mesoamerican | +50% | 1 |
Andean | +50% | 1 |
North American | +50% | 1 |
South American | +50% | 1 |
Aboriginal | +50% | 1 |
Polynesian | +50% | 2 |
Tech group sprites[edit | edit source]
The file is in /Europa Universalis IV/gfx/interface/tech_group_strip.dds
Image are set in the order of the file /Europa Universalis IV/common/technology.txt
It's 38x38 pixels for each sprite.
Localisation[edit | edit source]
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 | Effects • Triggers • Modifiers • Scopes • Variables • Localisation • Customizable localization • Run files |
Scripting | Scripted function • Advisors • Ages • Bookmarks • Buildings • Casus belli • Colonial regions • Countries • Culture • Decisions • Defines • Diplomatic actions • Disasters • Empire of China • Estates • Events • Factions • Government • Great projects • History • Holy Roman Empire • Idea groups • Institutions • Mercenaries • Missions • Modifiers • Nation designer • On Actions • Parliament • Peace treaties • Policies • Rebel types • Religion • Subject types • Technology • Trade companies • Trade goods • Units |
Map | Map • Nation designer • Random New World • Trade nodes |
Graphics | 3D Models • Interface • Graphical Assets • Fonts • Particles • Shaders • Unit models |
Audio | Music • Sound |
Other | Console commands • Checksum • JoroDox mod making tool • Mod structure • Troubleshooting • The Validator • Run files |
Guides | Adding a province • Save-game editing |