How to...

jmelnick

Bad Mod Skills, Big Ideas
Joined
Dec 10, 2011
Messages
180
Location
New Jersey
Hi CivFanatics-

jmelnick here. Just trying to make a mod, but I am terrible at art files. How do you create icons?? I am so bad at creating them its embarrassing, and I would love anyone who's good at art to tell me!

Also, in Civ5 vanilla, where are the files that dictate the icon atlases? If my icons fail, I want to use one from the vanilla game but can't find them.
 
Just trying to make a mod, but I am terrible at art files. How do you create icons??

First, start with a template. I prefer the .xcf templates downloadable here, in the downloads section of this site, although there's now also some .psd alternatives. The core game comes with .psd templates, but those are 4-channel images that do all sorts of screwy things when you try to use them, so you're really much better off using one of the above. These templates have only two layers: an image and an alpha, and the alpha mask explicitly makes each icon a circle. Within vanilla Civ5 a unit's image can extend outside of the normal circle, so if you want something like that you'll have to do a little more work editing the alpha channel, but for anything else you can just paste a graphic directly into the top layer.

Second, make sure you have a good art program that can handle .DDS files. I prefer GIMP; it doesn't come with a DDS plugin by default, but you can download that easily. Other people prefer other programs, of course, and there are a few other options. But GIMP has a few advantages: it's free, it's got versions for pretty much every OS out there (I use it at work on a Linux machine AND a Mac AND at home on my Windows box), and it can read just about any image type.

Open your 2048-pixel template in GIMP, and save a copy as a .DDS file, within your mod's ModBuddy directory, with the BX3/DXT5 compression (or whatever the name is, I'm at work right now; it should be obvious which one I mean). Open the source material (a .jpg, .gif, .png, .bmp, whatever), preferably using a program that has an area selection tool and/or a crop function. Cut and paste your image (or preferably some specific part of it) onto the template, and then crop or resize it as necessary to fit within the little white circle, without overlapping any of the nearby circles. I like setting GIMP's grid to 64x64, and snapping to grid, so that the center of my pasted image can easily be placed in the center of the circle, but whatever works for you. You can fit 62 icons on that template, as two of the positions (54 and 63) are blacked out.
Also note that the little white circles are only about 175 pixels wide, for the "256-pixel" size. So when you're trying to decide how much to cut and paste, realize that you're not going to get a 256x256 area to work with.

When it's done, save the image again. Now resize the 2048 version to any lower sizes needed (some combination of 1712, 1024, 640, 512, 360, 256) and save each with a different filename. Add them to your mod, set VFS=true for each, and add the appropriate entries in the IconAtlases table. At that point, you're done; just note that you have to exit Civ5 entirely and come back in when altering icons, you can't just reload a game from the main menu.

In some cases, I've found it more convenient to scale the initial template up to a larger size (3072 or 4096), paste images, and then scale back down, but that depends on how much you trust the scaling algorithms your art program uses. Generally speaking you're better off starting at 2048 and scaling pasted bits down at the start.

Also, in Civ5 vanilla, where are the files that dictate the icon atlases? If my icons fail, I want to use one from the vanilla game but can't find them.

The art files are stored inside the .fpk files, within the resource directory right next to the vanilla XML/UI code. You can unpack them using Nexus, but the unpacked DDS versions aren't directly viewable as they're sort of scrambled. Someone else figured out a way around that a while back that allowed them to convert them to .png files, which you can then cut and paste into your own mod. Or, if you just want to leave them where they are, it's easy enough to use them in your XML.

Note that reusing old icons will only work if the icon you want has all of the appropriate sizes; for instance, technologies have every size of icon, but Policies lack many, such as the 128-pixel size, so you can't use a Policy icon for a new Technology since it'll break whenever it needs that size. But you CAN reverse this and use a Technology icon for a new Policy (or unit, or resource, or building...), although note that policies actually have two icons, a grey one and a yellow one (depending on whether you've taken that policy already), so you'll still need to do a little work yourself.
 
Thanks for all the info! I am gonna have to dissect it all and try it out, but it seems doable. I use GIMP myself, but do not know much of the interface. As for the vanilla icons, I just wanted to use the icon of Russia, their coat of arms icon/symbol thing.
 
Back
Top Bottom