maconnolly
Warlord
- Joined
- Jun 3, 2019
- Messages
- 210
OK, so I'm fairly confused.
The game specifies a number of sizes of atlas for each of the Unit and Unit Portrait icon-sets. They are specified clearly and are easy to pick out from the base-game files.
For the units, the information is in the Icons_Units.xml and appears as below:
For the unit portraits, we have it in the Icons_UnitPortraits.xml. An extract (excluding cultural variations) is as below:
Therefore, it stands to reason that unit icons are in sizes: 22px, 32px, 38px, 50px, 80px, 256px.
Similarly, unit portraits are in sizes: 38px, 50px, 70px, 95px, 200px, 256px.
However, when I configure my mods to match these specifications, the units icons work like a charm. However, unit portraits do not work correctly when they are in these sizes.
If I include unit portraits at the same sizes as the unit icons, they work just fine. Therefore, my workflow is to ignore what I can see in the base-game and simply go with what works. But I'm interested to understand what I'm missing.
I can't see anything in either of the Expansions that suggests Firaxis have modified the unit portraits atlases to use any sizes other than those quoted in code, above. Can anyone unravel this mystery for me?
The game specifies a number of sizes of atlas for each of the Unit and Unit Portrait icon-sets. They are specified clearly and are easy to pick out from the base-game files.
For the units, the information is in the Icons_Units.xml and appears as below:
Spoiler :
Code:
<IconTextureAtlases>
<Row Name="ICON_ATLAS_UNITS" IconSize="256" IconsPerRow="16" IconsPerColumn="8" Filename="Units256.dds"/>
<Row Name="ICON_ATLAS_UNITS" IconSize="80" IconsPerRow="16" IconsPerColumn="8" Filename="Units80.dds"/>
<Row Name="ICON_ATLAS_UNITS" IconSize="50" IconsPerRow="16" IconsPerColumn="8" Filename="Units50.dds"/>
<Row Name="ICON_ATLAS_UNITS" IconSize="38" IconsPerRow="16" IconsPerColumn="8" Filename="Units38.dds"/>
<Row Name="ICON_ATLAS_UNITS" IconSize="32" IconsPerRow="16" IconsPerColumn="8" Filename="Units32.dds"/>
<Row Name="ICON_ATLAS_UNITS" IconSize="22" IconsPerRow="16" IconsPerColumn="8" Filename="Units22.dds"/>
<Row Name="ICON_ATLAS_UNITS_FOW" IconSize="32" IconsPerRow="16" IconsPerColumn="8" Filename="Units32.dds"/>
</IconTextureAtlases>
For the unit portraits, we have it in the Icons_UnitPortraits.xml. An extract (excluding cultural variations) is as below:
Spoiler :
Code:
<IconTextureAtlases>
<Row Name="ICON_ATLAS_UNIT_PORTRAITS" IconSize="256" IconsPerRow="8" IconsPerColumn="8" Filename="UnitPortraits256_1"/>
<Row Name="ICON_ATLAS_UNIT_PORTRAITS_2" IconSize="256" IconsPerRow="8" IconsPerColumn="8" Filename="UnitPortraits256_2"/>
<Row Name="ICON_ATLAS_UNIT_PORTRAITS" IconSize="200" IconsPerRow="8" IconsPerColumn="8" Filename="UnitPortraits200_1"/>
<Row Name="ICON_ATLAS_UNIT_PORTRAITS_2" IconSize="200" IconsPerRow="8" IconsPerColumn="8" Filename="UnitPortraits200_2"/>
<Row Name="ICON_ATLAS_UNIT_PORTRAITS" IconSize="95" IconsPerRow="8" IconsPerColumn="8" Filename="UnitPortraits95_1"/>
<Row Name="ICON_ATLAS_UNIT_PORTRAITS_2" IconSize="95" IconsPerRow="8" IconsPerColumn="8" Filename="UnitPortraits95_2"/>
<Row Name="ICON_ATLAS_UNIT_PORTRAITS" IconSize="70" IconsPerRow="8" IconsPerColumn="8" Filename="UnitPortraits70_1"/>
<Row Name="ICON_ATLAS_UNIT_PORTRAITS_2" IconSize="70" IconsPerRow="8" IconsPerColumn="8" Filename="UnitPortraits70_2"/>
<Row Name="ICON_ATLAS_UNIT_PORTRAITS" IconSize="50" IconsPerRow="8" IconsPerColumn="8" Filename="UnitPortraits50_1"/>
<Row Name="ICON_ATLAS_UNIT_PORTRAITS_2" IconSize="50" IconsPerRow="8" IconsPerColumn="8" Filename="UnitPortraits50_2"/>
<Row Name="ICON_ATLAS_UNIT_PORTRAITS" IconSize="38" IconsPerRow="8" IconsPerColumn="8" Filename="UnitPortraits38_1"/>
<Row Name="ICON_ATLAS_UNIT_PORTRAITS_2" IconSize="38" IconsPerRow="8" IconsPerColumn="8" Filename="UnitPortraits38_2"/>
</IconTextureAtlases>
Therefore, it stands to reason that unit icons are in sizes: 22px, 32px, 38px, 50px, 80px, 256px.
Similarly, unit portraits are in sizes: 38px, 50px, 70px, 95px, 200px, 256px.
However, when I configure my mods to match these specifications, the units icons work like a charm. However, unit portraits do not work correctly when they are in these sizes.
If I include unit portraits at the same sizes as the unit icons, they work just fine. Therefore, my workflow is to ignore what I can see in the base-game and simply go with what works. But I'm interested to understand what I'm missing.
I can't see anything in either of the Expansions that suggests Firaxis have modified the unit portraits atlases to use any sizes other than those quoted in code, above. Can anyone unravel this mystery for me?