Event trigger.png We are conducting a survey to learn how we can improve the Paradox Wikis experience for our users. Please take the time to fill the Survey Event trigger.png

Trade goods modding

From Europa Universalis 4 Wiki
Jump to navigation Jump to search

Trade goods are defined in /Europa Universalis IV/common/tradegoods/.

Adding a trade good

All trade goods must be named uniquely. A trade good follows this format:

<TradeGood> = {
     #Color that the province have on trade good map mode.
     color = { 0.96 0.93 0.58 }

     #Modifier that the country gets if they have trading in.
     modifier = {
	land_forcelimit_modifier = 0.20

     #Modifier that the province gets if they have <TradeGood>.
     province = {
	land_forcelimit = 0.5

     #How likely it will appear in empty provinces on colonization.
     chance = {
	factor = 35
        #You can specify it by adding modifiers so it's 32*1.5 = <Chance> if has_terrain = desert
	 modifier = {
                #factor = 0 is never 
		factor = 0 
		area = newfoundland_area #Triggers
	 modifier = {     
		factor = 1.5
		OR = {
			has_terrain = desert #Triggers
			has_terrain = glacier #Triggers


The Prices for trade goods are defined in /Europa Universalis IV/common/prices/.

<TradeGood> = {
        #Base Price
	base_price = 2.5 
        #This resource works like 'gold' if yes, using prices from mine-value in province instead of supply/demand and baseprice. Also creates gold-inflation
        goldtype = yes/no #Optional 


This is optional if you want a manufactory for your trade good. The manufactories are defined in /Europa Universalis IV/common/buildings/.

<manufactory> = {
        # Add your trade good in manufactory = {}
	manufactory = {
	onmap = yes	
	ai_will_do = {
		factor = 1

Adding a picture for the trade good

You need two images for your trade good one of size 28x28 and the other one 64x64. 28x28 images are in /Europa Universalis IV/gfx/interface/. in file called "resources_small" and 64x64 images are in /Europa Universalis IV/gfx/interface/. in file called "resources"

You need to make the images 28/64 pixels width bigger and add your images.

When you are done you need to put this files in your mod mod_file/gfx/interface/. Files need to be in dds/tga format

Register the picture in interface

You need to go to the /Europa Universalis IV/interface/ and copy file called "provinceview.gfx" in to your interface folder in your mod and change the numbers in "noOfFrames"

spriteType = {
	name = "GFX_resource_icon"
	texturefile = "gfx//interface//resources.tga"
	noOfFrames = 33 #Amount of 64x64 images in "resources"
	loadType = "INGAME"
spriteType = {
	name = "GFX_resource_icon_small"
	texturefile = "gfx//interface//resources_small.dds"
	noOfFrames = 33 #Amount of 28x28 images in "resources_small"
	loadType = "INGAME"

spriteType = {
	name = "GFX_resource_icon_transparent"
	texturefile = "gfx//interface//resources.tga"
	noOfFrames = 35 #Amount of 64x64 images in "resources"
	loadType = "INGAME"
	allwaystransparent = yes


 <TradeGood>: "" #Name
 <TradeGood>DESC: "" #Description
Documentation EffectsTriggersModifiersScopesVariablesLocalisationCustomizable localizationRun files
Scripting AdvisorsAgesBookmarksBuildingsCasus belliColonial regionsCountriesCultureDecisionsDefinesDiplomatic actionsDisastersEstatesEventsFactionsGovernmentGreat projectsHistoryIdea groupsInstitutionsMercenariesMissionsModifiersNation designerPoliciesReligionRebel typesSubject typesTechnologyTrade companiesTrade goodsUnits
Map MapRandom 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