Introduction to Modding

Modifications, or "mods" for short, change the look and possibly a lot of other things about the game. They are usually created by fans and made available to others to enhance their games. In Caesar 4, the easiest and most important thing that can be modified is the look of the buildings and people.

Further than that the game is not easily adapted to suit a player's need: there are a few scripts for visual effects that you can change, but doing things like changing the functionality or shape of buildings is not possible.

In this article we will only focus on the art of editing textures to give buildings and people a new look.

Installing mods

Most of the mods in our downloads section come with a readme file which details what needs to be done to "install" the mod.

In general, you take the new texture file(s) (and possibly other files) and overwrite the original file(s) that came with the game. Because you're overwriting the original files, it's advisable to make a backup of the original files in case you want to remove the mod: if you don't have a backup, you will have to reinstall the game.

Since most mods just edit texture files, making a backup consists of copying the entire [C4]\Data\Graphics to a location outside the Caesar IV installation folder, for example your My Documents folder. If the mod also changes other things such as sounds, back up the appropriate folders as well.

Creating a mod

Some say that the best way to teach is by example, so we'll be creating a very simple mod in this section: replacing one of the plaza tiles in the game with a new, much more boring one.

Which tools do I need?
First of all, a decent graphics editing program: MS Paint won't do the job for quality mods. Photoshop or Paintshop Pro are two commercial programs, but there's a free alternative for these: the Gimp.

The textures in the game are stored in .dds file, DirectDraw Surface files. You will need a program that can load and save these file formats. If you're using the Gimp for graphics editing, you can download a DDS plugin which can read and write programs. If you use another editing program, check if there are similar plug-ins available. If not, don't despair: there's a handy tool named DDS Converter which does just that: it can convert DDS files to a variety of other formats for editing, and convert them back to DDS once you're done.

If you just want a quick way to view DDS files without editing them, I recommend IrfanView. Download the plugins package to be able to view DDS files.

Where are the files to edit?
The texture files that can be edited are located in [C4]\Data\Graphics, in the subfolders Textures and TerrainTextures, where [C4] is the folder where Caesar IV is installed. The Textures folder contains the textures for all buildings and walkers, while the terraintextures folders contains the plaza and road textures, and the so-called "aprons": the terrain you see beyond the map edge of a scenario.

Original plaza

The original plaza tile

We wanted to change a plaza tile, so let's take a look at the current tile in the terraintextures folder. On the right is the texture file we're going to replace. As you can see, the plaza will cover 4x4 tiles in the game, so the texture is one tile wider than a standard road. The dds image is 256 by 256 pixels: we have to use the same size for our replacement tile.

Original plaza

Our new plaza tile

Our new and boring design is the age-old checkerboard pattern shown on the left. After making a backup copy of the original plaza tile and then saving this new plaza as "" in the proper folder, we can take a look in the game.

New plaza in the game

Our new plaza tile in the game
(click to enlarge)

Our new plaza tile works! It may not be pretty, but it shows how to get the job done. If you look closely, however (click on the image to enlarge it), you see that the original tile pattern is still visible on the new plaza tiles. This is because we left the "" file as it was.

Bump-mapping is a technique in 3D programming to make a flat surface look more natural, by making it appear as though it has depth. The "bump" file is used for that, so if you want to make the original plaza pattern go away, you will have to edit the bump file as well, which is left as an exercise for the reader.