Changing Terrain Features in RTW

By Hussarknight

As you’ll probably know, RTW basically has two maps: the campaign map, where you move your armies around, and the battle map where you fight out your battles in 3D. This guide will teach you how to change features like rivers and volcanoes on the campaign map.

Before you edit anything it is a good idea to make a backup of the file we’ll be editing. It is called map_features.tga and can be found in RTW\\data\\world\\maps\\base.

If you don’t have a program that can edit .tga files you can convert the file to another format using a program like Irfanview. You’ll have to convert it back to .tga format to be able to use it.

The file

When you open the file map_features.tga you will see a black background on which there are blue and yellow lines, as well as two red pixels. The game uses these different colours to represent different terrain features. Here is what each colour stands for.

ColourRGB-valueFunction
Black0,0,0The background color, which sets no special features.
Blue0,0,255This sets the course of a river.
White255,255,255The beginning of a river. This is important, because it determines the direction the river flows in.
Cyan0,255,255A river crossing. At this place armies and agents will be able to cross the river. Roads will also cross the river in this point.
Yellow255,255,0A cliff. Cliffs cannot be walked upon by any character or army.
Red255,0,0Probably the most spectacular map feature, red pixels determine the appearance of a volcano. It will even erupt at random times.

What to watch out for

Editing the features of a terrain isn’t hard, but there are a few things you should watch out for.

In order to make your changes appear on the map, you have to delete RTW\\data\\world\\maps\\base\\map.rwm. This is the file that the game reads the map for and it is only updated with your changes when it is re-generated. This happens when you start a campaign and the file isn’t present yet.

A river can split, but it cannot rejoin itself, i.e. it can’t completely enclose a piece of land

Rivers cannot go diagonally. That means that from one pixel they can only go to a pixel that is touched on the bottom, on the top or on one of the sides. You can make rivers go diagonally by using a stair-like pattern, i.e. starting in one pixel, then going one pixel to the side, then one down.

There can’t be a square of river, so pieces of river measuring 2 by 2 pixels or more cannot exist.

All terrain features (including rivers) cannot be placed upon the sea. This can be tricky, because the sea isn’t displayed in map_features.tga. However there is a trick which allows you to get the sea into map_features.tga. Open RTW\\data\\world\\maps\\base\\map_regions.tga. Using the “Magic wand” tool (or something similar) select the sea. Don’t forget to add the Caspian Sea, the Red Sea and the lake in Israël to your selection. Now copy everything you have selected and go to map_features.tga. Paste the selection into the file and move it so that the sea is in the right place. Now you can clearly see where there’s land and where sea. Make the changes you want, then replace the blue with black again and save the file.

Unlike rivers, cliffs can go diagonally and form squares.

Here are a few examples to help you understand the limitations on rivers.

Examples of good and faulty rivers.

Examples 1 and 4 both show good rivers. In picture 1 two rivers join into one and in picture 4 a river splits into two.

River 2 is incorrect, because it goes diagonally and it contains a square of river. The purple arrows indicate the errors.

Example 3 is also an incorrect river, because the river splits and then re-joins itself. Once again, the purple arrows point at the faulty parts.

Final thoughts

Hopefully you will now know everything needed to edit terrain features. If you have further questions, don’t hesitate to contact me in the forums or via e-mail. Happy modding!