Inconsistent Icon Display Behaviour

lilgamefreek

Warlord
Joined
Oct 30, 2014
Messages
229
Hey everyone. I have a serious brain scratcher here. Basically, my new sponsor icons that depend on the Alpha Atlas display very inconsistently. Here's what I mean:



The icons in red are the icons in question. In this screenshot they are working correctly, but this is not always the case. These icons depend on the icons defined in the Alpha Atlas.



Depending on the game's mood, the icon can be replaced by this icon, an offset ARC icon. This is the only icon that is ever displayed other than my own.



The strange thing is, all 5 of the highlighted instances seem to act independent of one another. Sometimes both icons in the scoreboard are in error. Sometimes only one of them is. Which icon is in error stays consistent within a single instance of a game. Reloading the mod may cause different icons to change.

I've double checked my materials several times at this point and I don't believe there are any critical errors with the .dds's themselves. I may be building the atlas incorrectly in some way. Has anyone encountered similar issues and no off the cuff what the issue may be. This is my first mod ever and lots of it is trial and error for me.

Here is a download of the mod if anyone is interested in spelunking. Still a solid WIP:
https://www.dropbox.com/s/7u2qbhgn1f3o3tq/University of Planet (v 1).zip?dl=0
 
Could you post a zip file of you mod as an attachment to your post?

Maybe I can look in and see something
 
One thing I did, with using 1x1 squares, I just made the "57" 56x56 (and 44x44 for the "45") since it must be multiples of 4.

But I've seen that if someone resizes to meet the 'mulitples of 4' and keeping it at 57 by "Image Size" rather than "Canvas Size" it could throw it off and offset the image down and to the right a bit. Because the Diplomacy screen is an offset ARC icon for some reason. Not really understanding why it is showing an ARC icon there though

But all the other icons look correct on the screens above.

EDIT:
Didn't see this before, but this post - http://forums.civfanatics.com/showthread.php?t=537688 - may have something you could find useful in this situation.
 
Thanks for the info! It looks like the multiples of 4 is to cause images to comply with the compression formats most modders prefer. I'm not quite at that stage of cleanup yet, so I'm going with the lossless formats the original game uses. I tried playing around with the image and canvas sizes, as per your suggestion, but it didn't seem to affect it. :(

I'll be sure to keep your advice in mind as I optimize my mod at the end. In the meantime, this just keeps getting more frustrating....



This is new. :/
 
I wonder how you have figured out that the problem is with 57x57 file, as it looks like these aren't used at all in the game ;)

The problem you have is that file Alpha_Atlas_University_48.dds is missing in your mod. Believe it or not, but to have sponsor icons in diplomacy window properly displayed, two variants of icons are needed - Icon_Atlas_University_64.dds and Alpha_Atlas_University_48.dds.

and two quick thoughts:
- if you plan to stick to lossless compression, bear in mind that original files have been compressed even further by some specific algorythm, and we can't recreate it just yet, so if you save files as ARGB 8888 your files will be about twice the size of originals,
- you may want to delete all gradient and glow files and remove references to them in the code of your mod - these features don't work.
 
Yeah! I figured out the issue a few days ago when expecting the lua logs! Not sure why I never bothered to check, haha. I figured it was the size 57's because when I changed them to a pure black image, all of the icons immediately buggered out completely, so I figured that was the dependency.

And I read through your thread thoroughly on the icons. It was super informative, and I plan to go back and optimize everything. But I'm also lazy.........
 
After testing this with a few other sponsors, this appears to be happening on all Sponsor mods. I even tried it out on Leugi's Abya Yala sponsor, and this same thing happened. And if it happened on the Art King's sponsor mod, I'm betting it's another modding bug??

Try some other sponsors out and see if you get the same problem. I am seeing the same thing from your screenshots happen in everyone's sponsor mods.
 
Leugi's mod is also missing the 48px resolution alpha icon. What Artisanix investigated is correct. Information on what resolutions the game relies on just hasn't disseminated through the community yet! I've had 48px alphas in both the University mod and my new Spartan mod and they've both been absolutely fine.
 
Awesome, game's iconatlas files do show a 48......I missed that as well :mad:, I guess because the color atlas doesn't use a 48 I just jumped over that one for the alphas...

Thanks guys!

EDIT: and when I read Artisanix's reply yesterday, my mind just automatically substituted 45 in place of the 48 he was talking about....smh
 
And I read through your thread thoroughly on the icons. It was super informative, and I plan to go back and optimize everything. But I'm also lazy.........
You don't need to do much to have a decent level of optimization in your mod :) Beacuse optimization is more about avoiding unwanted/unecesary things, and such habits may be blended seamlessly into a normal workflow - just make sure to always save without mip maps, and don't use use much larger dimensions for icons that are needed - then you'll be fine. As for choosing ARGB 8888 compression versus DXT1/DXT3/DXT5 - it's not that important, you can use the former if you like (you may want to check my thread again, as I've reviewed that info a bit after some additional research - the differences between these formats should be a bit better described there now).


After testing this with a few other sponsors, this appears to be happening on all Sponsor mods. I even tried it out on Leugi's Abya Yala sponsor, and this same thing happened. And if it happened on the Art King's sponsor mod, I'm betting it's another modding bug??

That's not a bug, but rather "copy-paste" behavior ;)
The explanation is actually quite simlple. The very first sponsor mod that was published here was The Holy See by JFD. The great mod by itself but just with that file missing. And all other modders started to copy this soulution as a base for their mods, so this issue has propagated to all of them this way.
 
Top Bottom