Icons unable to load

paisvalencia

Chieftain
Joined
Jun 9, 2014
Messages
42
So, the title is pretty self-explanatory. Whatever I do, I get mystery (?) icons on everything, the leader backgrounds don't load etc. The rest of the mod works well, so I don't know what I'm doing wrong.
 
Sure, the modinfo:
<?xml version="1.0" encoding="utf-8"?>
<Mod id="9714df4c-13e9-4e6c-a454-d729971ce86f" version="1">
<Properties>
<Name>Crown of Aragon - Jaume I</Name>
<Description>Adds the Crown of Aragon with Jaume I as its leader.</Description>
<Teaser>Adds the Crown of Aragon with Jaume I as its leader.</Teaser>
<Authors>Nasulon</Authors>
<SpecialThanks>You</SpecialThanks>
<CompatibleVersions>2.0</CompatibleVersions>
</Properties>
<FrontEndActions>
<UpdateDatabase id="Config">
<File>Core/Aragon_Jaume_I_Config.xml</File>
</UpdateDatabase>
<UpdateArt id="Art">
<File>Crown of Aragon - Jaume I.dep</File>
</UpdateArt>
<UpdateIcons id="Icons">
<File>Core/Aragon_Jaume_I_Icons.xml</File>
</UpdateIcons>
<UpdateText id="Text">
<File>Text/Aragon_Jaume_I_ConfigText.xml</File>
</UpdateText>
<ImportFiles id="NewAction">
<File>Textures/Aragon_Jaume_I_Background.dds</File>
<File>Textures/Aragon_Jaume_I_Diplomacy.dds</File>
</ImportFiles>
</FrontEndActions>
<InGameActions>
<UpdateDatabase id="Gameplay">
<File>Core/Aragon_Jaume_I_Agenda.xml</File>
<File>Core/Aragon_Jaume_I_Civ.xml</File>
<File>Core/Aragon_Jaume_I_Leader.xml</File>
<File>Core/Aragon_Jaume_I_Buildings.xml</File>
<File>Core/Aragon_Jaume_I_Units.xml</File>
<File>Core/Aragon_Jaume_I_CityName.xml</File>
<File>Core/Aragon_Jaume_I_Colors.xml</File>
<File>Core/Aragon_Jaume_I_Gossip.xml</File>
<File>Core/LeaderBackground.xml</File>
</UpdateDatabase>
<UpdateArt id="Art">
<File>Crown of Aragon - Jaume I.dep</File>
</UpdateArt>
<UpdateIcons id="Icons">
<File>Core/Aragon_Jaume_I_Icons.xml</File>
</UpdateIcons>
<UpdateText id="Text">
<File>Core/Aragon_Jaume_I_AgendaText.xml</File>
<File>Text/Aragon_Jaume_I_Jaume_IText.xml</File>
<File>Text/Aragon_Jaume_I_CivPedia.xml</File>
<File>Text/Aragon_Jaume_I_ConfigText.xml</File>
<File>Text/Aragon_Jaume_I_Diplotext.xml</File>
<File>Text/Aragon_Jaume_I_GossipText.xml</File>
<File>Text/Aragon_Jaume_I_CityName.xml</File>
</UpdateText>
<ImportFiles id="NewAction">
<File>Textures/Aragon_Jaume_I_Background.dds</File>
<File>Textures/Aragon_Jaume_I_Diplomacy.dds</File>
</ImportFiles>
</InGameActions>
<Files>
<File>Crown of Aragon - Jaume I.dep</File>
<File>ArtDefs/Civilizations.artdef</File>
<File>ArtDefs/Cultures.artdef</File>
<File>ArtDefs/FallbackLeaders.artdef</File>
<File>ArtDefs/Units.artdef</File>
<File>Core/Aragon_Jaume_I_Agenda.xml</File>
<File>Core/Aragon_Jaume_I_AgendaText.xml</File>
<File>Core/Aragon_Jaume_I_Buildings.xml</File>
<File>Core/Aragon_Jaume_I_CityName.xml</File>
<File>Core/Aragon_Jaume_I_Civ.xml</File>
<File>Core/Aragon_Jaume_I_Colors.xml</File>
<File>Core/Aragon_Jaume_I_Config.xml</File>
<File>Core/Aragon_Jaume_I_Gossip.xml</File>
<File>Core/Aragon_Jaume_I_Icons.xml</File>
<File>Core/Aragon_Jaume_I_Leader.xml</File>
<File>Core/Aragon_Jaume_I_Units.xml</File>
<File>Core/LeaderBackground.xml</File>
<File>Textures/Aragon_Jaume_I128.dds</File>
<File>Textures/Aragon_Jaume_I200.dds</File>
<File>Textures/Aragon_Jaume_I22.dds</File>
<File>Textures/Aragon_Jaume_I256.dds</File>
<File>Textures/Aragon_Jaume_I30.dds</File>
<File>Textures/Aragon_Jaume_I36.dds</File>
<File>Textures/Aragon_Jaume_I44.dds</File>
<File>Textures/Aragon_Jaume_I45.dds</File>
<File>Textures/Aragon_Jaume_I48.dds</File>
<File>Textures/Aragon_Jaume_I50.dds</File>
<File>Textures/Aragon_Jaume_I64.dds</File>
<File>Textures/Aragon_Jaume_I80.dds</File>
<File>Textures/Aragon_Jaume_I_Building256.dds</File>
<File>Textures/Aragon_Jaume_I_Building32.dds</File>
<File>Textures/Aragon_Jaume_I_Building45.dds</File>
<File>Textures/Aragon_Jaume_I_Building50.dds</File>
<File>Textures/Aragon_Jaume_I_Building55.dds</File>
<File>Textures/Aragon_Jaume_I_Building64.dds</File>
<File>Textures/Aragon_Jaume_I_Building80.dds</File>
<File>Textures/Aragon_Jaume_I_Leader256.dds</File>
<File>Textures/Aragon_Jaume_I_Leader32.dds</File>
<File>Textures/Aragon_Jaume_I_Leader45.dds</File>
<File>Textures/Aragon_Jaume_I_Leader50.dds</File>
<File>Textures/Aragon_Jaume_I_Leader55.dds</File>
<File>Textures/Aragon_Jaume_I_Leader64.dds</File>
<File>Textures/Aragon_Jaume_I_Leader80.dds</File>
<File>Textures/Aragon_Jaume_I_Leader_Diplomacy.dds</File>
<File>Textures/Aragon_Jaume_I_Unit22.dds</File>
<File>Textures/Aragon_Jaume_I_Unit256.dds</File>
<File>Textures/Aragon_Jaume_I_Unit32.dds</File>
<File>Textures/Aragon_Jaume_I_Unit38.dds</File>
<File>Textures/Aragon_Jaume_I_Unit50.dds</File>
<File>Textures/Aragon_Jaume_I_Unit80.dds</File>
<File>Text/Aragon_Jaume_I_CityName.xml</File>
<File>Text/Aragon_Jaume_I_CivPedia.xml</File>
<File>Text/Aragon_Jaume_I_ConfigText.xml</File>
<File>Text/Aragon_Jaume_I_Diplotext.xml</File>
<File>Text/Aragon_Jaume_I_Jaume_IText.xml</File>
<File>Text/Aragon_Jaume_I_GossipText.xml</File>
</Files>
</Mod>

Then I've got the UI files which all follow this model:
<GameInfo>
<IconTextureAtlases>
<Row Name="ICON_ATLAS_ARAGON" IconSize="22" IconsPerRow="1" IconsPerColumn="1" Filename="Art/Aragon_Jaume_I_Civ22.dds"/>
<Row Name="ICON_ATLAS_ARAGON" IconSize="30" IconsPerRow="1" IconsPerColumn="1" Filename="Art/Aragon_Jaume_I_Civ30.dds"/>
<Row Name="ICON_ATLAS_ARAGON" IconSize="32" IconsPerRow="1" IconsPerColumn="1" Filename="Art/Aragon_Jaume_I_Civ32.dds"/>
<Row Name="ICON_ATLAS_ARAGON" IconSize="36" IconsPerRow="1" IconsPerColumn="1" Filename="Art/Aragon_Jaume_I_Civ36.dds"/>
<Row Name="ICON_ATLAS_ARAGON" IconSize="45" IconsPerRow="1" IconsPerColumn="1" Filename="Art/Aragon_Jaume_I_Civ45.dds"/>
<Row Name="ICON_ATLAS_ARAGON" IconSize="44" IconsPerRow="1" IconsPerColumn="1" Filename="Art/Aragon_Jaume_I_Civ44.dds"/>
<Row Name="ICON_ATLAS_ARAGON" IconSize="48" IconsPerRow="1" IconsPerColumn="1" Filename="Art/Aragon_Jaume_I_Civ48.dds"/>
<Row Name="ICON_ATLAS_ARAGON" IconSize="50" IconsPerRow="1" IconsPerColumn="1" Filename="Art/Aragon_Jaume_I_Civ50.dds"/>
<Row Name="ICON_ATLAS_ARAGON" IconSize="64" IconsPerRow="1" IconsPerColumn="1" Filename="Art/Aragon_Jaume_I_Civ64.dds"/>
<Row Name="ICON_ATLAS_ARAGON" IconSize="80" IconsPerRow="1" IconsPerColumn="1" Filename="Art/Aragon_Jaume_I_Civ80.dds"/>
<Row Name="ICON_ATLAS_ARAGON" IconSize="256" IconsPerRow="1" IconsPerColumn="1" Filename="Art/Aragon_Jaume_I_Civ256.dds"/>
</IconTextureAtlases>

<IconDefinitions>
<Row Name="ICON_CIVILIZATION_ARAGON" Atlas="ICON_ATLAS_ARAGON" Index="0"/>
</IconDefinitions>
</GameInfo>
 
Last edited:
Code:
<IconTextureAtlases>
<Row Name="ICON_ATLAS_ARAGON" IconSize="22" IconsPerRow="1" IconsPerColumn="1" Filename="Art/Aragon_Jaume_I_Civ22.dds"/>
Neither the filename nor the folder name are part of the modinfo file.

<IconTextureAtlases> wants the simple file name instead of "Path/Filename"
 
Code:
<IconTextureAtlases>
<Row Name="ICON_ATLAS_ARAGON" IconSize="22" IconsPerRow="1" IconsPerColumn="1" Filename="Art/Aragon_Jaume_I_Civ22.dds"/>
Neither the filename nor the folder name are part of the modinfo file.

<IconTextureAtlases> wants the simple file name instead of "Path/Filename"
Thanks, I changed it however icons still don't appear. I keep getting these error messages in the logs:

Modding.log
[2447811.147] Unable to load art for content 'Crown of Aragon - Jaume I'. It has missing dependencies.

UserInterface.log
[DataError] IconManager is unable to find the icon "ICON_LEADER_JAUME_I"
[DataError] IconManager is unable to find the icon "ICON_CIVILIZATION_ARAGON_JAUME_I"
[DataError] IconManager is unable to find the icon "ICON_UNIT_ALMOGAVER"
[DataError] IconManager is unable to find the icon "ICON_BUILDING_LLOTJA"

and the weirdest one,
Database.log
[2447810.238] [Database] ERROR: UNIQUE constraint failed: IconTextureAtlases.Name, IconTextureAtlases.IconSize
[2447810.238] [Database]: While executing - 'insert into IconTextureAtlases('Name', 'IconSize', 'IconsPerRow', 'IconsPerColumn', 'Filename') values (?, ?, ?, ?, ?);'
[2447810.238] [Database]: In XMLSerializer while inserting row into table insert into IconTextureAtlases('Name', 'IconSize', 'IconsPerRow', 'IconsPerColumn', 'Filename') with values (ICON_ATLAS_UNIT_PORTRAITS, 38, 1, 1, AlmogaverUnitPortraits38.dds, ).
[2447810.238] [Database]: In XMLSerializer while updating table IconTextureAtlases from file C:/Users/andre/Documents/My Games/Sid Meier's Civilization VI/Mods/Aragonese Crown - Jaume I/Core/Aragon_Jaume_I_Icons.xml.
[2447810.238] [Database] ERROR: UNIQUE constraint failed: IconTextureAtlases.Name, IconTextureAtlases.IconSize

I changed the Icons.xml file as you said, here you can see that I don't repeat the Almogaver Unit Portrait size 38 icon or anything and I think I'm doing everything correctly:
<GameData>
<IconTextureAtlases>
<!-- Aragon -->
<Row Name="ICON_ATLAS_ARAGON_JAUME_I" IconSize="22" IconsPerRow="1" IconsPerColumn="1" Filename="Aragon22.dds"/>
<Row Name="ICON_ATLAS_ARAGON_JAUME_I" IconSize="30" IconsPerRow="1" IconsPerColumn="1" Filename="Aragon30.dds"/>
<Row Name="ICON_ATLAS_ARAGON_JAUME_I" IconSize="36" IconsPerRow="1" IconsPerColumn="1" Filename="Aragon36.dds"/>
<Row Name="ICON_ATLAS_ARAGON_JAUME_I" IconSize="44" IconsPerRow="1" IconsPerColumn="1" Filename="Aragon44.dds"/>
<Row Name="ICON_ATLAS_ARAGON_JAUME_I" IconSize="45" IconsPerRow="1" IconsPerColumn="1" Filename="Aragon45.dds"/>
<Row Name="ICON_ATLAS_ARAGON_JAUME_I" IconSize="48" IconsPerRow="1" IconsPerColumn="1" Filename="Aragon48.dds"/>
<Row Name="ICON_ATLAS_ARAGON_JAUME_I" IconSize="50" IconsPerRow="1" IconsPerColumn="1" Filename="Aragon50.dds"/>
<Row Name="ICON_ATLAS_ARAGON_JAUME_I" IconSize="64" IconsPerRow="1" IconsPerColumn="1" Filename="Aragon64.dds"/>
<Row Name="ICON_ATLAS_ARAGON_JAUME_I" IconSize="80" IconsPerRow="1" IconsPerColumn="1" Filename="Aragon80.dds"/>
<Row Name="ICON_ATLAS_ARAGON_JAUME_I" IconSize="128" IconsPerRow="1" IconsPerColumn="1" Filename="Aragon128.dds"/>
<Row Name="ICON_ATLAS_ARAGON_JAUME_I" IconSize="200" IconsPerRow="1" IconsPerColumn="1" Filename="Aragon200.dds"/>
<Row Name="ICON_ATLAS_ARAGON_JAUME_I" IconSize="256" IconsPerRow="1" IconsPerColumn="1" Filename="Aragon256.dds"/>
<!-- Jaume_I -->
<Row Name="ICON_ATLAS_JAUME_I" IconSize="32" IconsPerRow="1" IconsPerColumn="1" Filename="Aragon_Jaume_I_Leader32.dds"/>
<Row Name="ICON_ATLAS_JAUME_I" IconSize="45" IconsPerRow="1" IconsPerColumn="1" Filename="Aragon_Jaume_I_Leader45.dds"/>
<Row Name="ICON_ATLAS_JAUME_I" IconSize="50" IconsPerRow="1" IconsPerColumn="1" Filename="Aragon_Jaume_I_Leader50.dds"/>
<Row Name="ICON_ATLAS_JAUME_I" IconSize="55" IconsPerRow="1" IconsPerColumn="1" Filename="Aragon_Jaume_I_Leader55.dds"/>
<Row Name="ICON_ATLAS_JAUME_I" IconSize="64" IconsPerRow="1" IconsPerColumn="1" Filename="Aragon_Jaume_I_Leader64.dds"/>
<Row Name="ICON_ATLAS_JAUME_I" IconSize="80" IconsPerRow="1" IconsPerColumn="1" Filename="Aragon_Jaume_I_Leader80.dds"/>
<Row Name="ICON_ATLAS_JAUME_I" IconSize="256" IconsPerRow="1" IconsPerColumn="1" Filename="Aragon_Jaume_I_Leader256.dds"/>
<!-- Almogaver -->
<Row Name="ICON_ATLAS_UNIT_ALMOGAVER" IconSize="22" IconsPerRow="1" IconsPerColumn="1" Filename="AlmogaverUnitFlag22.dds"/>
<Row Name="ICON_ATLAS_UNIT_ALMOGAVER" IconSize="32" IconsPerRow="1" IconsPerColumn="1" Filename="AlmogaverUnitFlag32.dds"/>
<Row Name="ICON_ATLAS_UNIT_ALMOGAVER" IconSize="38" IconsPerRow="1" IconsPerColumn="1" Filename="AlmogaverUnitFlag38.dds"/>
<Row Name="ICON_ATLAS_UNIT_ALMOGAVER" IconSize="50" IconsPerRow="1" IconsPerColumn="1" Filename="AlmogaverUnitFlag50.dds"/>
<Row Name="ICON_ATLAS_UNIT_ALMOGAVER" IconSize="80" IconsPerRow="1" IconsPerColumn="1" Filename="AlmogaverUnitFlag80.dds"/>
<Row Name="ICON_ATLAS_UNIT_ALMOGAVER" IconSize="256" IconsPerRow="1" IconsPerColumn="1" Filename="AlmogaverUnitFlag256.dds"/>
<Row Name="ICON_ATLAS_UNIT_ALMOGAVER_FOW" IconSize="256" IconsPerRow="1" IconsPerColumn="1" Filename="AlmogaverUnitFlag256.dds"/>
<!-- Llotja -->
<Row Name="ICON_ATLAS_BUILDING_LLOTJA" IconSize="32" IconsPerRow="1" IconsPerColumn="1" Filename="AragonLlotja32.dds"/>
<Row Name="ICON_ATLAS_BUILDING_LLOTJA" IconSize="45" IconsPerRow="1" IconsPerColumn="1" Filename="AragonLlotja45.dds"/>
<Row Name="ICON_ATLAS_BUILDING_LLOTJA" IconSize="50" IconsPerRow="1" IconsPerColumn="1" Filename="AragonLlotja50.dds"/>
<Row Name="ICON_ATLAS_BUILDING_LLOTJA" IconSize="55" IconsPerRow="1" IconsPerColumn="1" Filename="AragonLlotja55.dds"/>
<Row Name="ICON_ATLAS_BUILDING_LLOTJA" IconSize="64" IconsPerRow="1" IconsPerColumn="1" Filename="AragonLlotja64.dds"/>
<Row Name="ICON_ATLAS_BUILDING_LLOTJA" IconSize="80" IconsPerRow="1" IconsPerColumn="1" Filename="AragonLlotja80.dds"/>
<Row Name="ICON_ATLAS_BUILDING_LLOTJA" IconSize="256" IconsPerRow="1" IconsPerColumn="1" Filename="AragonLlotja256.dds"/>
<Row Name="ICON_ATLAS_BUILDING_LLOTJA_FOW" IconSize="256" IconsPerRow="1" IconsPerColumn="1" Filename="AragonLlotja256.dds"/>
<!-- Almogaver Portrait -->
<Row Name="ICON_ATLAS_UNIT_PORTRAITS" IconSize="38" IconsPerRow="1" IconsPerColumn="1" Filename="AlmogaverUnitPortraits38.dds"/>
<Row Name="ICON_ATLAS_UNIT_PORTRAITS" IconSize="50" IconsPerRow="1" IconsPerColumn="1" Filename="AlmogaverUnitPortraits50.dds"/>
<Row Name="ICON_ATLAS_UNIT_PORTRAITS" IconSize="70" IconsPerRow="1" IconsPerColumn="1" Filename="AlmogaverUnitPortraits70.dds"/>
<Row Name="ICON_ATLAS_UNIT_PORTRAITS" IconSize="95" IconsPerRow="1" IconsPerColumn="1" Filename="AlmogaverUnitPortraits95.dds"/>
<Row Name="ICON_ATLAS_UNIT_PORTRAITS" IconSize="200" IconsPerRow="1" IconsPerColumn="1" Filename="AlmogaverUnitPortraits200.dds"/>
<Row Name="ICON_ATLAS_UNIT_PORTRAITS" IconSize="256" IconsPerRow="1" IconsPerColumn="1" Filename="AlmogaverUnitPortraits256.dds"/>
</IconTextureAtlases>

<IconDefinitions>
<Row Name="ICON_CIVILIZATION_ARAGON_JAUME_I" Atlas="ICON_ATLAS_ARAGON_JAUME_I" Index="50"/>
<Row Name="ICON_LEADER_JAUME_I" Atlas="ICON_ATLAS_JAUME_I" Index="51"/>
<Row Name="ICON_BUILDING_LLOTJA" Atlas="ICON_ATLAS_BUILDING_LLOTJA" Index="20"/>
<Row Name="ICON_BUILDING_LLOTJA_FOW" Atlas="ICON_ATLAS_LLOTJA_FOW" Index="20"/>
<Row Name="ICON_UNIT_ALMOGAVER" Atlas="ICON_ATLAS_UNIT_ALMOGAVER" Index="10"/>
<Row Name="ICON_UNIT_ALMOGAVER_FOW" Atlas="ICON_ATLAS_UNIT_ALMOGAVER_FOW" Index="10"/>
<Row Name="ICON_UNIT_ALMOGAVER_PORTRAIT" Atlas="ICON_ATLAS_UNIT_PORTRAITS" Index="10"/>
</IconDefinitions>

</GameData>

It's a mystery to me, any help is deeply appreciated.
 
ICON_ATLAS_UNIT_PORTRAITS is part of the game's base code for table IconTextureAtlases. You therefore cannot attempt to create another atlas with the same name.
Code:
<Row Name="ICON_ATLAS_UNIT_PORTRAITS" IconSize="38" IconsPerRow="1" IconsPerColumn="1" Filename="AlmogaverUnitPortraits38.dds"/>
<Row Name="ICON_ATLAS_UNIT_PORTRAITS" IconSize="50" IconsPerRow="1" IconsPerColumn="1" Filename="AlmogaverUnitPortraits50.dds"/>
<Row Name="ICON_ATLAS_UNIT_PORTRAITS" IconSize="70" IconsPerRow="1" IconsPerColumn="1" Filename="AlmogaverUnitPortraits70.dds"/>
<Row Name="ICON_ATLAS_UNIT_PORTRAITS" IconSize="95" IconsPerRow="1" IconsPerColumn="1" Filename="AlmogaverUnitPortraits95.dds"/>
<Row Name="ICON_ATLAS_UNIT_PORTRAITS" IconSize="200" IconsPerRow="1" IconsPerColumn="1" Filename="AlmogaverUnitPortraits200.dds"/>
<Row Name="ICON_ATLAS_UNIT_PORTRAITS" IconSize="256" IconsPerRow="1" IconsPerColumn="1" Filename="AlmogaverUnitPortraits256.dds"/>
The very first row in the table where you are attempting to re-add the existing "ICON_ATLAS_UNIT_PORTRAITS" throws the unique constraint exception for a repeat "Name" and "IconSize" combination. This then results in the game ignoring anything further down within the same file, which means that none of this ever gets read by the game:
Code:
<IconDefinitions>
<Row Name="ICON_CIVILIZATION_ARAGON_JAUME_I" Atlas="ICON_ATLAS_ARAGON_JAUME_I" Index="50"/>
<Row Name="ICON_LEADER_JAUME_I" Atlas="ICON_ATLAS_JAUME_I" Index="51"/>
<Row Name="ICON_BUILDING_LLOTJA" Atlas="ICON_ATLAS_BUILDING_LLOTJA" Index="20"/>
<Row Name="ICON_BUILDING_LLOTJA_FOW" Atlas="ICON_ATLAS_LLOTJA_FOW" Index="20"/>
<Row Name="ICON_UNIT_ALMOGAVER" Atlas="ICON_ATLAS_UNIT_ALMOGAVER" Index="10"/>
<Row Name="ICON_UNIT_ALMOGAVER_FOW" Atlas="ICON_ATLAS_UNIT_ALMOGAVER_FOW" Index="10"/>
<Row Name="ICON_UNIT_ALMOGAVER_PORTRAIT" Atlas="ICON_ATLAS_UNIT_PORTRAITS" Index="10"/>
</IconDefinitions>
Which leads to all the other errors.
 
Alright, so I changed "ICON_ATLAS_UNIT_PORTRAITS" to "ICON_ATLAS_UNIT_ALMOGAVER_PORTRAITS" and the Database.log is quiet, however icons still don't appear - they're not (?) interrogation marks anymore, though, just blank space.

I'm beginning to think the most effective way to do this would be for me to upload the mod so you could scan it for yourself, if you'd be willing to do so. I'm guessing there's something wrong with the icon files as such, probably due to my shamelessly ripping code off other mods with no actual coding knowledge.
 
Last edited:
I got the shapes (sizes at least) from other mods so I don't know why it wouldn't work.
Also I did the icons through paint.net, saving as .dds and in the settings putting B8G8R8A8 Linear, A8R8G8B8. Anything wrong there maybe?
 
Back
Top Bottom