Where to find all the icon usage?

CivilizationAce

Warlord
Joined
Jan 17, 2017
Messages
240
So I busily created ICON_UNIT_MYUNITNAME_PORTRAIT entries in 6 or so different sizes, some with circles and some without.

Then I start the game and go looking for them. I find the 95 pixel one when I select a unit, but where are the other sizes? And it's hardly alone. I'm pretty sure that the non-portrait icons aren't all used too.

It occurs to me that it might help some developers if they could find them all, so they can see if they work, so if you know where any of the icon sizes for stuff (units, buildings, districts, leaders, civilizations and any other types I've missed) please reply :)

I'll get things started in a format that makes some sense. So they're easy to spot please bullet point them.
  • Unit Portrait 95 — Select the unit in the game. It appears in the panel at the bottom right.
  • Civilization Colour 45 — Appears when selecting your leader before starting a new game.
  • Civilization 256 — I presume that this is the icon that appears behind the text while a game is loading and I'm fairly sure that it's the one top right on the civilopedia page for the civ.
  • The same goes for the other 256 icons re the relevant civilopedia pages.
For the rest, I haven't got a clue, nor do I know how to check for sure. I read a rumour that the game can scale down from larger icons in some circumstances.
 
I can't seem to get my unit portrait icons to show up, my unit icons and my unit fow icons show up fine, as well as my building icons. I followed your Guide (How to make a civilization icon in way too many steps). I figured the portrait icons were added the same way, but I guess I was wrong. And when I say portrait icons, I am talking about the icon that shows up when a unit is building and when you select a unit:

upload_2017-8-22_2-9-48.png


upload_2017-8-22_2-10-25.png


I've imported image sizes of 22, 30, 36, 38, 44, 45, 48, 50, 64, 70, 80, 95, 200, 256 any ones I am missing?
And I have added them to my icon.xml and my .xlp files and imported the art files under InGame Actions just like I did with all the others. Do I need to add another library dependency in my Mod.Art.xml files specifically for portraits maybe?
Or is there an extra step you have to do to get portrait icons for units to work?
 
I haven't tried changing the portrait, but you may want to look at the Icons_UnitPortraits file in D:\Steam\steamapps\common\Sid Meier's Civilization VI\Base\Assets\UI\Icons for some examples if you haven't already.

Yea, I looked at that file already. I added icon sizes 38, 70, and 95 because those sizes were listed. Also, I noticed that ethnicity versions were listed also so I put those in there to. Of course I think it would default to the original anyways so stating ethnicity versions should not be required.

Code:
<!--Icon.xml-->
<?xml version="1.0" encoding="utf-8"?>
<GameInfo>
    <IconTextureAtlases><Row Name="ICON_ATLAS_UNIT_NEW_UNIT_PORTRAITS" IconSize="22" IconsPerRow="1" IconsPerColumn="1" Filename="UnitNewUnitAtlasPortraits22.dds"/>
    <!--REPEAT FOR ALL SIZES-->
    </IconTextureAtlases>
    <IconDefinitions>
        <Row Name="ICON_UNIT_NEW_UNIT_PORTRAITS" Atlas="ICON_ATLAS_UNIT_NEW_UNIT_PORTRAITS" Index="0"/>
        <Row Name="ICON_ETHNICITY_ASIAN_UNIT_NEW_UNIT_PORTRAITS" Atlas="ICON_ATLAS_UNIT_NEW_UNIT_PORTRAITS" Index="0"/>
        <Row Name="ICON_ETHNICITY_MEDIT_UNIT_NEW_UNIT_PORTRAITS" Atlas="ICON_ATLAS_UNIT_NEW_UNIT_PORTRAITS" Index="0"/>
        <Row Name="ICON_ETHNICITY_SOUTHAM_UNIT_NEW_UNIT_PORTRAITS" Atlas="ICON_ATLAS_UNIT_NEW_UNIT_PORTRAITS" Index="0"/>
        <Row Name="ICON_ETHNICITY_AFRICAN_UNIT_NEW_UNIT_PORTRAITS" Atlas="ICON_ATLAS_UNIT_NEW_UNIT_PORTRAITS" Index="0"/>
    </IconDefinitions>   
</GameInfo>

Code:
<!--Mod.Art.xml-->
<?xml version="1.0" encoding="UTF-8" ?>
<AssetObjects::GameArtSpecification>
    <id>
        <name text="New Project"/>
        <id text="MOD ID"/>
    </id>
    <artConsumers>
        <!--other element entries-->
        <!--the three elements below specifically dealing with icons-->
        <Element>
            <consumerName text="UI"/>
            <relativeArtDefPaths>
            </relativeArtDefPaths>
            <libraryDependencies>
                <Element text="UITexture"/>
            </libraryDependencies>
            <loadsLibraries>true</loadsLibraries>
        </Element>
        <Element>
            <consumerName text="FOW"/>
            <relativeArtDefPaths>
            </relativeArtDefPaths>
            <libraryDependencies>
                <Element text="FOWSprite"/>
                <Element text="FOWTexture"/>
            </libraryDependencies>
            <loadsLibraries>true</loadsLibraries>
        </Element>
        <Element>
            <libraryName text="UITexture"/>
            <relativePackagePaths>
                <Element text="UI/Icons"/>
                <Element text="UI/UILeaders"/>
            </relativePackagePaths>
        </Element>
        <!--other element entries-->
    </requiredGameArtIDs>
</AssetObjects::GameArtSpecification>

Code:
<!--NewUnit.xlp-->
<?xml version="1.0" encoding="UTF-8" ?>
<AssetObjects::XLP>
    <m_Version>
        <major>4</major>
        <minor>0</minor>
        <build>253</build>
        <revision>867</revision>
    </m_Version>
    <m_ClassName text="UITexture"/>
    <m_PackageName text="UI/Icons"/>
    <m_Entries>   
        <Element>
            <m_EntryID text="UnitNewUnitAtlasPortraits22"/>
            <m_ObjectName text="UnitNewUnitAtlasPortraits22"/>
        </Element>
        <!--REPEAT FOR ALL SIZES-->
    </m_Entries>
    <m_AllowedPlatforms>
        <Element>WINDOWS</Element>
        <Element>LINUX</Element>
        <Element>MACOS</Element>
        <Element>IOS</Element>
    </m_AllowedPlatforms>
</AssetObjects::XLP>

Code:
--Then of course under Project Properties
--In Game Actions
    --UpdateIcons
        --Icons.xml
    --ImportFiles
        --UnitNewUnitAtlasPortraits22.dds
        --UnitNewUnitAtlasPortraits22.tex
        --etc...
    --UpdateArt
        --(Mod Art Dependency File)

And again, all of my other icons work just fine, it is just the portraits that are giving me trouble.
 
I noticed what my problem was now. I had PORTRAITS instead of PORTRAIT under the IconDefinition section in Icons.xml. Also I tested it, you do not have to do ethnicity versions, so the following code is the corrected code:

Code:
<!--Icon.xml-->
<?xml version="1.0" encoding="utf-8"?>
<GameInfo>
    <IconTextureAtlases><Row Name="ICON_ATLAS_UNIT_NEW_UNIT_PORTRAITS" IconSize="22" IconsPerRow="1" IconsPerColumn="1" Filename="UnitNewUnitAtlasPortraits22.dds"/>
    <!--REPEAT FOR ALL SIZES-->
    </IconTextureAtlases>
    <IconDefinitions>
        <Row Name="ICON_UNIT_NEW_UNIT_PORTRAIT" Atlas="ICON_ATLAS_UNIT_NEW_UNIT_PORTRAITS" Index="0"/> 
        <!-- "ICON_UNIT_NEW_UNIT_PORTRAITS" changed to "ICON_UNIT_NEW_UNIT_PORTRAIT" and ethnicity versions removed.-->  
        <!--*Note the Atlas's can remain the same.-->       
    </IconDefinitions>   
</GameInfo>

I guess trying to code when I'm sleepy is not a good idea... #Don't Code When Your Sleepy... #Stop Coden When Your Dozen.
 
Back
Top Bottom