Mapping Guide Fixing Flyers

## Fixing flyers in custom maps

Original information provided by **TranspersonalPsy**

## Overview

Since there is no dedicated official mapping tool for DoW: Soulstorm, maps for the game are usually being done with the modtools for Dark Crusade. There is however a difference in the pathing in the game, causing flyers on custom maps done with DC modtools to behave very buggy at best.

The following intermediate to advanced guide was first incepted by TranspersonalPsy and the goal of it is to fix any and all maps to work with Soulstorm’s flyers where they would otherwise get stuck on custom maps' terrain.

### Requirements

For this guide you will need the Advanced Map Editor 1.04\_2 for Soulstorm, as well as a graphics program of your choice capable of editing .tga files.

### Important note

This fix has to be implemented EVERY TIME a map is saved in the DC mod tools, otherwise pathing will be recalculated and the incorrect pathing sectors will be set.

AME will try to load in non-existent custom entities when you import the impassability and path sector layers into your original map, which will cause AME to auto generate impassable terrain and path sector issues. To mitigate this, delete all (custom) entities from your working copy before importing it in AME to apply the flyer fix.

If not done, AME will put impassable terrain where the custom entity was imported, resulting in an incomplete fix. Worse, ground units will be blocked as well.

### Basics

Generally speaking, for the flyer fix to work we have to set up a second layer of pathing calculation for pathing. Thankfully, the Advanced Mapping Editor can do that if it is given the correct information. So in short, we use a copy of the original map to set up both layers of pathing which we then reimport as a base on which the Advanced Mapping Editor can recalculate paths for both ground and air units.

## How to fix square maps

Mapsizes: 256², 512², …

1)      Make sure that your map has set up all passable and impassable terrain as you want it. There should be no passable holes inside impassable terrain. The whole process is depending on it!

2)      Create a copy of your map in the same folder.

- For the purpose of this guide, I am going to fix the map Last Stand from the unification mod.

3)      Open the original map with the Advanced Map Editor.

4)      Select Ground -> Generate Deepwater map. Give it a name that you can easily remember.

- For this guide, the file created is 2p\_Last\_Stand\_hm.tga. As you can see, it is a Targa file that can be edited with a graphics program.

5)      Open the copy of the map with the DC mod tools.

6)      Select the Impass Map Editor and make ALL Terrain passable.

7)      Now we import the Deepwater map into the copy. Select File -> Import -> Import Heightmap and select the file that you saved your Deepwater map as.

8)      The result will look wild. This is normal. Make sure that upper area matches up to what you set as passable in the original map. If it doesn’t you need to go back to step one and fix your map before attempting again. If it everything looks solid, save the copy of the map.

9)      Switch back to the Advanced Map Editor. Click on Ground -> Import Path Sector and select the copy of the map.

10)   Check both Path Sectors and the Passability map on the drop down menu on the top. If done correctly, the Path Sectors will be all white while the Passability map will still the correct impassabilities set up. If that is correct, save the original map and check out your results ingame. Flyers should now correctly ignore terrain while ground units do not.

## How to fix rectangular maps

Mapsizes: 128\*256, 256\*512,…

Fixing rectangle maps is fundamentally the same process, but there are extra steps involved to make sure the pathing calculation is done correctly.

**WARNING**

**There have been reports that for some players, custom rectangular maps (128x256, 256x512 and so on) that use the flyer fix will result in deleted / destroyed buildings leaving a permanent footprint on the map that blocks pathing. While it's currently inconclusive as to why it only affects some and not all players, it seems to be related as to how AME is forced to recalculate pathing after injecting the flyer fix into the rectangular map. Because of this, it may be better to not use a rectangular map size if you plan on implementing the flyer fix until a solution is found.**

1)      Make sure that your map has set up all passable and impassable terrain as you want it. There should be no passable holes inside impassable terrain. The whole process is depending on it!

2)      Open the original map with the Advanced Mapping Editor. Click on map -> resize map and resize your map to match the longest side.

- As an example map, I am using the unification survival map Airport from the Survival Mappack.

3)      Export the Deepwater map.

4)      Resize your map back its original values, save the map and make a copy of it.

5)      Open your graphics editing program and load in the deepwater map. It’s a targa file.

6)      Scale the size of the deepwater map to match the size of your original map. Make sure the edges are cut off and the picture itself is not scaled down. Then, invert the map top to bottom. Save the file.

a.       The example pictures for a rectangular map are from the unification survival mappack Airport.

7)      Open the copy of the map with the DC modtools. As with the square maps, make all terrain passable.

8)      Import the deepwater map. If you have processed the deepwater map correctly, the upper area of the imported heightmap will match with the passability map from your original map. If that is the case, save the map

9)      Switch back to the Advanced Map Editor and import your copy via ground -> import path sector. If done correctly, the Path Sectors will be all white while the Passability map will still the correct impassabilities set up. Make sure that the Pathsector Map only extends to edges of the playing field and not beyond, otherwise the fix was not implemented correctly. If that is correct, save the original map and check out your results ingame. Flyers should now correctly ignore terrain while ground units do not.

Link to AME 1.04\_2
https://drive.google.com/file/d/1BCoFqvFyqjVQcD0j44Hjuqqc2cFya8lc/view