Custom Civ Icons

molotovcow

Chieftain
Joined
Apr 18, 2012
Messages
4
I have been trying for the better part of 8 hours to get the game to load the icons for my custom civ properly. I followed kael's instructions for the XML, and searched around and found SamBCs .xcf templates. Tried several suggestions, nothing works. The DOM screen i made loads just fine, but no icons, just the partial white circle with black around it. any help is much appreciated.
 
There are a few possible things you're doing wrong.

1> If it's giving you a "cannot load texture something.DDS" popup error, then the problem is your VFS. Simply put, in ModBuddy you need to right-click on each DDS file, select "Properties", and look at the little window it pops up. The last entry in that window should say "Import into VFS", and defaults to False. You need to set it to True for:
> Any new art or sound assets, including your icon DDS files.
> Any modified versions of existing non-GameData, non-executable assets. That usually means UI mods or alterations to map generation algorithms.
> Any file that'll be included within another file through an explicit "include" command.
This system isn't explained in Kael's guide because it wasn't implemented until three or four months after he wrote that guide.
The only things VFS should be left False for are either GameData XML and SQL (which need an OnModActivated/UpdateDatabase activation), or newly made executable Lua (which uses the InGameUIAddin option). Since those two categories consist of 99% of all modding, it's easy to see why they left the default to False, but you're running into one of the situations where it needs overriding.

2> If you ARE using VFS and it's still giving you the error, one problem might be the compression you're using for the DDS. The game tends to have serious issues with uncompressed DDS files; I generally use the BC3/DXT5 system, which unfortunately requires all images to have axial lengths in multiples of 4.

3> Finally, there's a cache issue. Unlike normal mods, graphical file changes won't be seen until the next time you reload the entire game; you can't just exit out to the main menu like you can with simple XML changes. Sometimes, even restarting the game isn't enough, so after you quit the game, go into your user directory and delete the contents of the "Cache" subdirectory. The game will rebuild that the next time you start it up.

It's also possible that there's something wrong with your specific graphics file. Maybe you deleted the alpha channel, maybe you scaled it to the wrong size. If the above three points don't fix it, then attach your mod to a post and we'll look at it for you.
 
I tried all those, still no success. My guess is it's a problem with the images, but I don't know nearly enough image editing to even know where to start. I've attached my mod, thanks for the advice so far.
 

Attachments

That's only the ModBuddy config file, we need the zipped sub-directory (and all of it's contents and sub-contents) of your mod from the "...\My Games\Sid Meier's Civilization 5\Mods" sub-directory
 
(As usual,) the answers to your issues are in database.log

On the first load attempt

Code:
[COLOR="Red"][33434.992] While executing - 'insert into Language_en_US('Tag', 'Text') values (?, ?);'
[33434.992] In XMLSerializer while inserting row into table Language_en_US('Tag', 'Text') with  values (TXT_KEY_CITY_NAME_VITORIA, Vitoria, ).
[33434.992] In XMLSerializer while updating table Language_en_US from file XML/NewText/GameText.xml.
[33434.992] columns Language, Tag are not unique[/COLOR]
[COLOR="Magenta"][33444.757] Invalid Reference on Civilizations.IconAtlas - "CIV_COLOR_ATLAS_LEGENDS" does not exist in IconTextureAtlases[/COLOR]
[COLOR="DarkOrange"][33444.835] Invalid Reference on Civilization_BuildingClassOverrides.BuildingType - "BUILDING_SOCCERSTADIUM" does not exist in Buildings
[33444.835] Invalid Reference on Civilization_BuildingClassOverrides.BuildingType - "BUILDING_GOVERNMENTINSTITUTE" does not exist in Buildings[/COLOR]

The red lines are caused by you defining TXT_KEY_CITY_NAME_VITORIA when it is already defined by the game (Spain DLC in this case, so it may not affect you but it will affect others) - always use a unique prefix for your TXT_KEY_ entries (especially for cities) eg TXT_KEY_BRAZIL_CIV_VITORIA

The magenta line is because .modinfo files are case sensitive - the atlas file is called "CIV5IconTextureAtlases.xml" but you have hand-written the OnModActivated -> UpdateDatabase entry as "Civ5IconTextureAtlases.xml"

The orange lines are because you have created 6 xml update files but only activated 5 - guess which one is missing

If you correct those and re-run, you will get

Code:
[33938.657] table Buildings has no column named Science
[33938.657] In Query - insert into Buildings('Type', 'BuildingClass', 'Cost', 'GoldMaintenance', 'PrereqTech', 'Help', 'Description', 'Civilopedia', 'Strategy', 'ArtDefineTag', 'SpecialistType', 'Science', 'SpecialistCount', 'MinAreaSize', 'ConquestProb', 'HurryCostModifier', 'IconAtlas', 'PortraitIndex') values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
[33938.657] In XMLSerializer while updating table Buildings from file XML/Buildings/CIV5Buildings.xml.

No matter how much you may want a database table column to exist, you can't just make them up!

Correct that and you will get

Code:
[34239.661] Invalid Reference on Buildings.Help - "TXT_KEY_BUILDING_SOCCERSTADIUM_HELP" does not exist in Language_en_US
[34239.661] Invalid Reference on Buildings.Help - "TXT_KEY_BUILDING_GOVERNMENTINSTITUTE_HELP" does not exist in Language_en_US
[34239.692] Invalid Reference on Buildings.Strategy - "TXT_KEY_BUILDING_SOCCERSTADIUM_STRATEGY" does not exist in Language_en_US
[34239.723] Invalid Reference on Buildings.Civilopedia - "TXT_KEY_CIV5_BUILDINGS_SOCCERSTADIUM_TEXT" does not exist in Language_en_US
[34239.723] Invalid Reference on Buildings.Civilopedia - "TXT_KEY_CIV5_BUILDINGS_GOVERNMENTINSTITUTE_TEXT" does not exist in Language_en_US
[34239.754] Invalid Reference on Buildings.Description - "TXT_KEY_BUILDING_SOCCERSTADIUM_DESC" does not exist in Language_en_US

which I ignored as they don't stop the mod from loading - you will need to fix them

With the mod loaded, all but the size 80 icons are visible, and a quick look in the 80.dds file shows this is because you have pasted the graphic into slot (2,2) and not (0,0)
 
Back
Top Bottom