Classic Battlefield Modding Wikia

Battlefield 1942 Pathmapping Part 1-B

PM1 banner.png

Viewing Pathmaps[]

Now that we have the Pathmap in a format we can use and view, Open it in your favorite Image Editor and you should see something similar to this:

Pathmap1 BW.png

For starters, like many other things in Battlefield 1942 this is upside down. Once we turn it up the right way it might make more sense


Pathmap1 PS1.png

Corel Paint 

Pathmap correll.png

Once up the right way, look for features you may recognize. Near the bottom is the Axis base, you can see the fence that goes around the House, and the Barn off to the right.

Pathmap1 BW flip.png

The best way to see how a Pathmap interacts with the Terrain and Static Objects, is to preview it, textured onto the map.

Rexman has another tool for us, exactly for this purpose. Ai_GenerateForLevel will convert a level0 Pathmap to TX*.dds terrain tiles that we can then use to view in a Map Editor or even In Game.

  • Go back to Kursk's extracted Pathmaps and grab another Copy of Car4Level0Map.raw.
  • Browse to the folder for Ai_GenerateForLevel and Paste the Pathmap there.


The _convertTolevelTexture.bat runs the several steps that are required, and controls how our pathmap is converted. There are two settings in the .bat file we may need to adjust from time to time depending on which Pathmap we want to preview (car/infantry/tank) and the size of the map.

  • Right-Click on the .bat file, and select Edit, this will open the file in notepad for our convenience.

The first setting relates to the Unit type of the Pathmap that we want to preview.

@echo off

rem --- Do NOT put a .raw at the end of the filename here! ---

set tmpFileAI=Infantry1Level0Map

The tmpFileAI setting is a setting that allows to specify a variable that will be used a few times within the batch file, so thankfully this allows us to make one change instead of several. You need to change this to correspond with the Pathmap that you are going to preview, in this case we want to preview the Car Pathmap so:

  • change the line to read:

set tmpFileAI=Car4Level0Map

And of course you need to change this line again to match your Pathmap if you wish to view others such as the Tank0 or Infantry1 pathmap.

The next setting to look at is further down. This command runs a program that will split our pathmap into tiles, you can see the tmpFileAI reference that calls the setting we changed above. The setting we need to change here is the value at the end. This refers to the number of Texture Segments & needs to be set for the appropriate value for the of size of a map.

tgaSplit.exe %tmpFileAI%.tga 4

How do you know what setting you should use ? Well, in most cases there is a very straight-forward answer, the following Table covers the Standard Size maps.

PM1 WorldMap table.png

Of course there are a few things that can throw a spanner in the works. 

The most common being “missing” tiles – in some maps that only use a portion of the terrain, the texture tile where no play occurs can be removed to reduce the .RFA size – so this will stuff up counting them. If the last tile in the series is “missing” (eg: tx15x15) that will stuff up matching that to the table.

Something else you may have to work around is Texture offsets. This command is used in Init/Terrain.con to “move” the textures, and you may want to check this file to ensure that GeometryTemplate.texOffsetX and GeometryTemplate.texOffsetY are BOTH set to 0.

Next is a not so common occurrence ... non-standard maps where the Worldsize is not 4 times Heightmap Size as is the standard. Custom map makers may use something like a 512/4096 Level (Heightmap/Worldsize) to increase the playing area without increasing CPU requirements, or go the other way with a 256/512 level for greater detail in the terrain. Your best guide in these cases is the Worldsize which you can check in Init/Terrain.con the setting to look for is GeometryTemplate.worldSize.

Since there are only a few choices, if you don't get it right first go, at least you will know which one it isn't. ; ) In this case we look at Kursk's Textures folder, and we note there is 16 Texture tiles, and also that the highest numbered Tile is

PM1 kursk textures.png

This matches with a Standard 1024 Worldsize level and the value we need is 4.

  • Check the setting in the .bat file and change the required value.

,In this case the 4 is already set.

  • Save the changes to the .bat file, and then double-click it, to run the process.

It doesn't take long for the magic to manifest.

PM1 conversion.png

Browse into the dds_terrain folder, and there you have your Pathmap on a Map.

PM1 dds terrain.png

  • Cut all the .dds file.
  •  Browse to the Folder where Kursk is extracted, and Paste the new .dds files into the Textures folder and Overwrite all the old files.


You could repack the Kursk.rfa with these new textures, or even just make a _00x.rfa style update, but for now, viewing the map in an Editor will do fine. Coin Coin's Editor42 is used heavily in Pathmapping.

The next section will teach you how to Edit Pathmaps in Editor 42:

BF42 Pathmapping - Part 1-C