(help) 64x64 => small/low-res civilopedia icon/button?


Sep 16, 2007
I have a problem that's been bugging me for a few days now. I just spent 6 hours browsing through these forums but I can't find an answer to my problem. So I'll just ask it here. I apologize if this has been asked before.

I tried to create some custom Civilizations for BtS following the guides that are posted on the forums. I know these guides are not for BtS but with some research I managed to work my way through it. I was able to make 8 playable civs, each with their own leader and unique unit and unique building. Everything works fine in-game but I have a small problem with the buttons I created. They seem to only appear in 32x32 resolution in the Civilopedia although they are 64x64.

I created custom buttons for Civilizations, Leaders, Units and Buildings. Now if I create the files in 128x128, they show up in the Civilopedia with the same size as all other icons/buttons do. This is not a problem for the Civilization and Leader buttons. But it is a problem for the Units and Buildings buttons. For the latter, I have to create them as 64x64 otherwise the game crashes when I try to build them in a city.

Now this is really bugging me. If I use 64x64 images, the buttons in the Civilopedia (which when clicked forward you to the page of that item) appear very small (seems 32x32). And all custom icons appear in lower resolution versions of the original 64x64 images (seems like they've been scaled down to 32x32, and then stretched out to 64x64 again).

I've tried several options in the Civ4ArtDefines_Units.xml (and same stuff in the Buildings file):

1) <Button>,Art/Interface/Buttons/Units/worker_crawler.dds,Art/Interface/Buttons/Final_Fantasy_XI_Atlas.dds,6,2</Button>
I made a custom atlas file containing all the custom icons I created, similar to the atlas files I could find in other mods. The atlas file is 512x1024 and each individual icon is 64x64. The specific .dds files seem to be overwritten by the atlas file cause it doesn't matter if I use 64x64, 128x128 or other resolutions for them. In-game, it always uses the atlas file. If anyone knows why, please let me know. This option works fine (but still with the same small/low-res icon problem), although I don't understand what the first part of the tag is for.

2) <Button>Art/Interface/Buttons/Units/worker_crawler.dds</Button>
This second option also works (I removed the comma cause I read this in a lot of posts on here, but for me, it works with the comma as well so I'm not too sure about that). Anyway, this only works if the .dds file is set to 64x64. Anything higher and the game crashes when I try to build the unit/building. But in 64x64, the icons/buttons are smaller or lowered in resolution than the other icons. If I set this file to 128x128, the icons look good in the Civilopedia and also on the building screen, but the game crashes when I try to build it.

I've been playing this mod with all custom units and buildings in 64x64, but I'd really like to solve this problem. The icons just look too crappy now. Is there a way to get the icons back to their normal size?

I've read a lot of posts about people getting a "!" on the city bar when building a custom unit. I don't have this problem, the custom icon does appear on the city bar when I'm building the custom unit/building. I noticed the icon on the city bar is smaller in size than all other icons in the game. Could it be that the way I've set up the .xml file it is using this one image file for different kinds of graphics in the game? I don't know but it seems like the image is reduced in size to fit on the city bar (when building that unit/building), and that this reduced size is used in all other places where the icon/button appears by either showing a smaller icon or a lower resolution icon.

If it is of any help, I saved the image files from bmp to dds with the DXTBmp program, and used "save as DDS DXT 3". I'm using an alpha channel that makes the borders transparent (it all looks ok when I preview it in DXTBmp). Same with the atlas file, I created a custom alpha channel to round the borders of each individual icon in there, it looks fine when previewed. But in game it all looks low-res or smaller.

If the problem is due to the way I defined it in the .xml file; which would be a correct method to do this? Or is there anything else I'm doing wrong? Thanks in advance. If you need me to post more info, please let me know.
I took some screenshots of how it looks in the civilopedia. The button for the leaderhead is saved in 128x128 and shows up correctly, same for the flag button. The unique unit and unique building buttons have been saved in 64x64 (otherwise the game crashes when I try to build them) but they show up smaller than expected.

The second image shows how the icon for the unique unit looks like. It's been saved in 64x64 with a much better quality than what is shown here in the civilopedia. Apparently, it's been scaled down and stretched out again for some reason. The Unique building icons have the same problem.

I can make the icon show up nicely in the Civilopedia if I save it in 128x128 resolution, but then the game crashes when building the item.
I've tried several combinations for the button tags in the Civ4ArtDefines_Units.xml file as I tried to explain in previous post.

Any idea what I could be doing wrong?
Button sizes aren't determined by the size of the graphic file. The size is set in the code where the button is displayed (in your case the pedia python files). If you want to modify the display size you will want to get into the python screen files and change the button sizes.
Hey Vlacatocc,

You might have multiple layers in your button dds file. I've noticed this problem in the buttons from a few other mods, I'm not sure what creates them.

Anyway, to fix just open the button graphic in an image editor and delete the extra layers, then resave.

Using Gimp (http://gimp-win.sourceforge.net/stable.html), just open the file, then go to Dialogs -> Layers, delete everything but the first full frame one, then save as a DXT3 (64x64).

Adjust your screen resolution to resolve this problem.
Top Bottom