Civilization II on Glyph Web

Civilization II Unit Graphics

If you've ever downloaded a scenario or a MOD pack for Civ2, you'll know that all the unit graphics in the game can be modified to represent anything that the designer desires. On this page, we'll look at some of the techniques you can use to create your own new unit graphics from scratch.

Before you start, you'll need some extra software - an image editor. You can use any application that will open and save files in GIF format, but without doubt the best software around for this is Paint Shop Pro by Jasc, Inc. This is distributed as shareware - you can download an evaluation copy from the Jasc Website. Throughout this tutorial, we'll be describing things in terms of the menus and options found in PSP (as it is known) - if you're using different software, you'll have to adapt these instructions to the particular application you have.

By it's nature, this page contains a lot of graphic images. If you have a slow connection, be prepared to be patient while they download. If your machine is set up to display only 256 colours, you'll have a problem too - Civ2 uses a very specific set of colours, and they're completely different to those used by most browsers, which means the images on this page won't come out well at all. Set your machine to high- or true-colour mode if you want to see the page properly.


The Basics

Before you do anything else make a backup copy of a file called units.gif in your main Civilization II directory (this will be c:\mps\civ2, unless you chose a different directory when you installed the game). The easiest way to do this is to create a subdirectory, c:\mps\civ2\backup, and copy it into there.

Now, use your image editor to load the file from your main Civ2 directory. You should see something like this (this shows just the top left-hand corner of the image, but you get the idea):

As you might guess, each of the purple boxes contains an image that relates to a single unit in Civ2. The extreme top left-hand image is used for Settlers, the next for Engineers, then Warriors and so on. If you make any changes to these images, the game will use your modified image instead of the standard one. There are three images at the bottom right-hand corner put there intentionally for you to change:

These are three units known as 'Extra Land', 'Extra Ship' and 'Extra Air'. They don't appear in a normal game of Civ2 - we'll see how to make them come to life later. You aren't confined to using just these three units. If you want your Settlers to push a lawn mower instead of a hoe (if that's what it is), feel free to alter the Settlers image. One word of warning, though - don't make any changes to the bottom line of the file (the one that starts with a barbarian chieftain followed by six blank spaces). It might be tempting to put your new units in these blank spaces, but if you do, the game will crash.


Bring on the Extras

Getting the extras into your game means making another back up, this time of a file called rules.txt. Once you've made a copy of the file, open it up inside a text editor (Windows Notepad or Wordpad is fine) and search for the word 'Extra' - this should take you to a part of the file that looks like this:

Extra Land, nil, 0, 1.,0, 1a,1d, 1h,1f, 5,0, 0, no, 000000000000000
Extra Ship, nil, 2, 4.,0, 4a,2d, 2h,1f, 5,1, 2, no, 000000000000000
Extra Air, nil, 1, 8.,4, 8a,8d, 2h,2f, 10,0, 0, no, 000000000000000

As you might guess from all those numbers, you can make these units do just about anything you want, but a discussion of that kind is way beyond the scope of this tutorial. For now, replace the word 'no' near the end of each line to 'nil', as shown below.

Extra Land, nil, 0, 1.,0, 1a,1d, 1h,1f, 5,0, 0, nil, 000000000000000
Extra Ship, nil, 2, 4.,0, 4a,2d, 2h,1f, 5,1, 2, nil, 000000000000000
Extra Air, nil, 1, 8.,4, 8a,8d, 2h,2f, 10,0, 0, nil, 000000000000000

The bit of the file that we changed here relates to the technology required to develop the unit. 'no' means the unit can never be developed (that's why you don't see them in a normal game), while 'nil' means you don't need any technology (in other words, the unit is always available). Is it possible to make these units dependent on a specific advance? It surely is - change the 'nil' to the abbreviation for the advance you want to use. For example, if you set the file up like this:

Extra Land, nil, 0, 1.,0, 1a,1d, 1h,1f, 5,0, 0, Chi, 000000000000000
Extra Ship, nil, 2, 4.,0, 4a,2d, 2h,1f, 5,1, 2, Nav, 000000000000000
Extra Air, nil, 1, 8.,4, 8a,8d, 2h,2f, 10,0, 0, Fli, 000000000000000

You'd need Chivalry to build Extra Land units, Navigation for Extra Ships and Flight for Extra Air units. There's a complete list of all the technology abbreviations further up the rules.txt file (search for '@CIVILIZE' to find it). You don't need to worry about this right now, but you might want to experiment with it in the future. For now, just stick with the three 'nil's.

Now save rules.txt and start Civilization II. Changes you make to units.gif and rules.txt only take effect if you restart the game, by the way, so every time you want to make a change like this, you'll have to come right out of the game, and start again.

Once Civ2 is loaded, start a new game and have your Settlers build a city right away. When the City Window comes up, click the 'Change' button, and you should see the three new units sitting in the list, ready to be built.


First Steps with Unit Graphics

That's more than enough theory - now to create our first unit graphic. To start with, you'll need a blank purple box to work on - here's one we prepared earlier:

You can download this image to work on - just right-click and use the pop-up menu. With some browsers, you can copy it and paste it straight into your image editor, while others need you to save it somewhere first and the open it in your editing software. You might be tempted to just copy one of the blank graphics at the bottom of units.gif, but don't - as we'll see later, these have vital components missing and will cause your game to crash if you use them.

The purple patchwork in this box represents the terrain that the unit will occupy in the game. The main pale purple diamond is the terrain square where the unit will actually stand, and the others represent the squares around it. As the file says, units cannot overlap the area below this main diamond. In other words, you can draw anywhere in the box except on those parts marked red here:

As you can see, the green border and blue dots are also out of bounds.

Now, we'll draw a very simple new unit to replace 'Extra Land':

Keep it simple at this stage - don't try anything like pasting in samples from other images, or changing colours in the palette, because there's a strong chance you'll confuse the game. Just draw something by hand using the colours provided (or download the image shown above, if you like).

Copy the image, and paste it into units.gif over the top of the existing Extra Land image. You have to be very careful to make sure that you get it in exactly the same place, and that the green lines match up right to the pixel. When you've finished, the relevant section of units.gif should look like this:

The next step is to save units.gif in your main Civ2 directory. The file should be saved as a GIF and, importantly, you should make sure that the version saved is non-interlaced 87a (PSP will use the latest version, 89a interlaced, unless you tell it otherwise). Close down Civ2, if it's still running, restart it and get into the game.

We'll use Civ2's 'cheat' facility to quickly see our new unit in action. Press Ctrl-K to enable Cheat mode, then press Shift-F2 (Select Map View). Make sure 'Entire Map' is selected, and press OK. The entire map will now be visible. Pick a likely spot to show off your new unit, and right-click there (it should be a land square). Now press Shift-F1 (Create Unit) and choose 'Extra Land' from the list (if it isn't in the list, you didn't make the changes to rules.txt we discussed earlier, so you'll have to backtrack and sort that out).

If everything's gone according to plan, you should get something like this:


Now For a Real Unit

In practice, you'll only need a Huge Yellow Ball unit very rarely, if at all. Most units are much more complicated than this, and you'll need to be able to draw realistic human figures, horses and so on, in correct proportion. Or, you can cheat.

The quickest and easiest way to create new units is simply to adapt those that are already in the game. As an example, let's create a Klingon Warrior. First, pick a unit that looks something like the one you want to create - in this case, the Warriors and Pikemen images are both candidates, but we like the Partisan because of his angry stance.

The first step is to copy your base image as an individual picture. You'll need the green lines from the top and left of the image, but not those from the bottom and right. Here's our friend standing ready for his makeover.
Before you start, remove any unwanted weapons, tools and so on, by drawing over them in purple. Be careful to use the right shade of purple for the background - notice that the top of the Partisan's rifle is over a pale purple background, while the bottom end is over a darker purple - you'll have to switch between these two colours to do the job properly.
Now our unit has a Klingon haircut. This wasn't difficult to achieve - we copied part of the Partisan's face and moved it up a couple of pixels, then filled in some extra flesh tones to give the famous high forehead.
The pants and boots are now in place. When you're working with this kind of thing, you can follow the same shading as the original to get the right effect - where the Partisan had dark green, for example, we've used dark grey, and we've replaced light green with light grey.
The first serious problem - the Partisan's top half is almost completely black, so we have no guide for doing the shading. We start this process by just filling the area with a solid grey. Note that the epaulettes are a separate part of the suit, so we've used a different shade for them so that we can pick them out easily when we're shading.
In the original Partisan image, the light is coming from the right-hand side, so we use paler shades on the right, and darker shades on the left. Notice that, instead of drawing an outline round the epaulettes to make them obvious, we've just used a little shading - this technique helps to make your illustration more realistic.
A final few details - some ridges on the uniform, a brighter buckle, fingerless gloves and a disruptor pistol, and our Klingon is ready to go. He's far from perfect, of course, but he'd do for all but a professionally produced scenario. Here he is in action:

(To do this, we just pasted our new image over the 'Extra Land' unit in the units.gif, saved the file, restarted Civ2 and created a couple of units).

For a final touch, go back to rules.txt and find the 'Extra Land' line, which should look like this at the moment:

Extra Land, nil, 0, 1.,0, 1a,1d, 1h,1f, 5,0, 0, nil, 000000000000000

Change it to:

Klingon Warrior, nil, 0, 1.,0, 1a,1d, 1h,1f, 5,0, 0, nil, 000000000000000

Save it, restart Civ2, and you can impress your friends with displays like the one shown below (assuming you have friends who are easily impressed).


Green Lines and Blue Dots: Placing Shields

If you look closely at our new unit, you'll notice that his right arm partially obscures the front of the shield showing which civlization he belongs to. This isn't too bad in this case, but what about something like this?

The shield is so badly obscured that you can't even tell who this Extra Ship belongs to! (We hasten to add that there's nothing wrong with MicroProse's original graphic - we've introduced this error deliberately to demonstrate what can happen if you're not careful).

Look back at the original images from units.gif, and you'll see that each is accompanied by two blue dots - one in the green line above the unit, and one in the green line to its left. These dots define where the top left-hand corner of the shield will be when the unit appears in the game. By moving the dots, you can move the shield to a better spot relative to your unit, like so:


The upper blue dot is too far to the left...

...and the shield is almost invisible.

Move the upper blue dot to the right...

...and the shield appears.

Creating a Brand New Unit

Eventually, you'll want to create a unit that's completely different from any image already held in units.gif - an airship, say, or a moon buggy. You first port of call should be the various Civ2 sites on the Web, many of which carry extra unit images - we have a few ourselves in our download section, and you'll find larger libraries on other sites - try our Links page for some suggestions.

If you still can't find a suitable image to base yours around, you've no choice but to start with a blank purple square, and create your unit image from scratch. It isn't possible for us to explain every aspect of creating a new image here, of course, but we can give you a few tips that might be helpful.

1. Get the Shape Right First
Start your image with just one or two basic colours, to get the outline of the shape right - detail comes later. It's much easier to make corrections this way - imagine putting a perfect image of, say, Stephenson's Rocket together, and then finding you've got one cog in the wrong place - you'd have to take out the cog, redraw the detail of the background, then draw in the cog again. If you get a basic image in place first, problems of this kind can be solved before they arise.

2. Shadows
If you look at the existing Civ2 unit images, you'll see that they all have small shadows lying beneath the unit, as if the light was coming from directly above. Keep to this standard, and your units will fit will with the existing ones. If you use a long shadow, or no shadow at all, your unit will look very odd in comparison with those around it.

3. Shading
Shading is vital if you're going to create realistic looking images. Decide where the light is coming from, and shade all parts of your unit accordingly - brighter shades towards the light, and darker ones away from it. Your style of shading should differ depending on the nature of the object:


Smooth, shiny objects, such as those made from metal and plastic, have bright highlights and dark lowlights, with sharp transitions.

Objects with a matte surface, such as cloth or wood, have less definite highlights and lowlights, with smoother transitions.
Unless you're shading a very smooth object, try to introduce small random variations. At the resolutions used by Civ2, where individual pixels are only barely visible, these help to make your illustration look more detailed:

This object looks completely smooth.

This object looks as though it has a slightly textured surface.

Don't use shading effects that are two subtle - these tend to show up well against the purple background when you're designing the image, but can disappear altogther when seen against the more colourful backdrop of the game itself.

4. Use Detail
Even if a detail on your image is so small it only uses a single pixel (like the gloves on our Klingon Warrior), put it in anyway. Details like these are generally too small to be seen in themselves during the game, but cumulatively the help to give the unit a much more polished appearance.

5. Think About Your Background
Remember that you're designing images to be used within the game, and think at all times about the possible backgrounds that your finished unit might have. A pale green tank, for example, will be practically invisible against grassland during the game itself, as will a bright blue ship as it sails across a bright blue ocean. There is an exception to this rule, of course - you might want to create a unit that's intentionally hard to spot (like a Stealth Tank).

6. Using Clipart or Scanned Images
If you have an appropriate piece of clipart or a scanned image, there's no reason why you shouldn't add this as your unit.

Images like this are generally held in full colour, and you'll need to change this to Civ2's own 256-colour palette before you can use this in the game. To do this, first load units.gif into PSP. Choose 'Save Palette...' from the 'Colors' menu, select 'JASC Palette' as the file type, and save the palette as 'civ2.pal' or something similar. Now, open your clipart, and pick 'Load Palette' from the 'Colors' menu. Pick the .pal file you just saved, and click OK. PSP will automatically convert the colours to match Civ2's requirements. Sometimes this can produce a fine result, and sometimes your image becomes pretty well unusable - it depends on the original image. You can try experimenting with the settings on the 'Load' dialog to optimise the image - 'error diffusion' typically gives the best results.

You should remember, of course, that the normal Civ2 units aren't photographic quality, so if you add one from a photograph, it'll look a little strange next to the others. If you do this, it's usually a good idea to retouch it by hand to make it look more 'Civ2ish'.


Clearing Up
When you've finished experimenting with units.gif and rules.txt, the chances are you'll want Civ2 to go back to the way it was before.

Do you want to keep your changes?
If so, make a directory to hold them (e.g. c:\mps\civ2\tryout), and save them in there. When you recover your original files, any changes you've made will be overwritten, so if you want to keep them, save them somewhere else first.

Recover the old files
This is easy - just copy the backups you made earlier from the directory where you saved them (c:\mps\civ2\backup, for instance) into your main Civ2 directory. Everything will now be back to normal.

Whoops!
If you didn't bother to make backups, then (a) pay more attention next time, and (b) here's how to fix the problem. Put your Civ2 CD in the drive, and find a directory called simply 'Civ2'. So, for example, if your CD is drive 'e:', then the directory you want is called 'e:\Civ2'. In there, you'll find the original copies of both units.gif and rules.txt, ready to be copied onto your hard disk in the main Civ2 directory.


Downloads
Forum
Reference
Links

E-mail

There's more to Glyph Web than just Civ2. Take a trip to our home page for interactive games and quizzes, Web authoring resources and plenty more besides.

Glyph Internet