• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Iituem

Corporal
42 Badges
Jun 12, 2013
47
4
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II
  • Europa Universalis IV: Mare Nostrum
  • Victoria 2: Heart of Darkness
  • Victoria: Revolutions
  • Victoria 2: A House Divided
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Rights of Man
  • Crusader Kings III
  • Crusader Kings II: Jade Dragon
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Stellaris: Ancient Relics
  • Stellaris: Federations
  • Stellaris
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • Victoria 2
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis IV
Hello! New to modding Stellaris (a few successful efforts modding CKII in the past, so not a complete newbie), could use some help from those a little more versed in the mechanics.

How would I mod in a new resource? I know where to define them (common/strategic_resources/00_strategic_resources), where to make buildings that use them (common/buildings/00_buildings), and where to put new graphics (gfx/interface/icons/resources).

How do I put these all together? That is; how do I link the graphics to the resources, so that they'll show up in game, and what else do I need to do to implement them?
 
First up, here's the Mod I made in pursuit of this, then I'll go into detail for those who follow as to how I did it. For this post MXX stands for the mod folder.

As mentioned in the first post, define your resource (in MXX/common/strategic_resources/, make sure that you name the file something like 'mxx_strategic_resources.txt' to avoid conflicts with existing resources). Then define your building that uses it (MXX/common/buildings/mxx_buildings.txt). Techs etc as required.

Now, you need graphics. MXX/gfx/interface/icons/ is where you want to start. MXX/gfx/interface/icons/resources/ is where you want to put the icon for your resource. Let's call it MXX/gfx/interface/icons/resources/mxx_resource.dds . You can use various programs to turn a file into a .dds file, I use paint.net because it's free and simple. For your building, do the same (MXX/gfx/interface/icons/buildings/building_mxx.dds). Make sure that the name of your resource (mxx_resource) and your building (building_mxx) are the same as the names of the resource and building in their 'common' files, or they won't get referenced properly.

I'm not 100% on the next step being necessary, but I did it anyway. Create MXX/interface/ and add a file called MXX/interface/mxx_resources.gfx . You can copy the base from the Stellaris/interface/resources.gfx, just delete all the other resources and add something like the below:

spriteTypes = {
spriteType = {
name = "GFX_resource_stored_food"
textureFile = "gfx/interface/icons/resources/stored_food.dds"
}
}

I'm not sure you need it, it seems to work without it.

Finally, in MXX/localisation/ you want to add a file along the lines of mxx_l_english.yml, which is a text file that looks like this:

l_english:

##########
# My Mod!
##########

#Resource
mxx_resource: "Modded Resource"
mxx_resource_desc: "This resource was added by a passing hyperdimensional traveller."

#Building
building_mxx: "Modded Building"
building_mxx_desc: "This building uses the Modded Resource, or perhaps produces it."

With luck and a little tinkering, this should all work out just fine!
 
  • 1
Reactions: