Custom Pathing Maps
By SD_Ryoko
What is a pathing map?
A pathing map determines the pathing for units around a certain object or area.
Almost all units, doodads, and models have a pathing map. This defines how the area around the object behaves. For example,
a 'pathing blocker' blocks units from walking or flying in an area. Buildings also have pathing maps to prevent units from walking
on them or building to close to them.
You may recognize this basic pathing blocker doodad from the Doodad Pallet.
How are pathing maps made?
Pathing maps are simple. They are a small TGA file made up of some basic colors.
- Pathing maps are made from TGA files.
- Each color represents some type of pathing behavior.
- Each pixel in the TGA file represents 32 grid units in the editor.
Below is a list of the different colors a pathing map can use, and what effect that color has. Knowing all this, you
could make areas where only flying units could enter. Or, the opposite, keeping all flyers out.
I created a massive blocker using blue pixels, to place on the grass in my TD. This keeps players from unfairly building
towers in areas that are not used or decoration.
Color | Buildable | Walkable | Flyable | Red | Green | Blue |
White | no build | no walk | no fly | 255 | 255 | 255 |
Red | build ok | no walk | fly ok | 255 | 0 | 0 |
Yellow | build ok | no walk | no fly | 255 | 255 | 0 |
Green | build ok | walk ok | no fly | 0 | 255 | 0 |
Cyan | no build | walk ok | no fly | 0 | 255 | 255 |
Blue | no build | walk ok | fly ok | 0 | 0 | 255 |
Magenta | no build | no walk | fly ok | 255 | 0 | 255 |
Black | build ok | walk ok | fly ok | 0 | 0 | 0 |
How do I change a pathing map for an object?
You can see what pathing map each doodad and building uses inside the object editor. If you want to view the actual
filename of the map, press CTRL-D to view the raw object data. Knowing this, you can change the pathing map of an object if you need to.
- You can view raw file names by pressing CTRL-D in the object editor.
- You can view your terrains pathing by pressing 'p' in the map editor.
- You can view more specific detail from the 'View' menu.
Note, there are different files listed under Units, Doodads, and Destructables.
Can I edit an existing pathing map?
Yes! You can extract any of pathing maps from the Warcraft III database. This file is inside the root directory where you
installed warcraft.
Most pathing maps are stored inside the 'war3.mpq' file, and newer paths are inside 'war3x.mpq'. You can use a tool like WinMPQ to
open the database (see Tools and Utils page). They are
stored inside the folder 'PathTexures'.
A Custom Pathing Example
Here is an example of how you can create a custom pathing map. Below is a model of a spiral staircase that I created in GMAX.
For the stairs to work properly, I will need a custom pathing map to define where a unit can and cannot walk.
|
A Custom Model
Here is a custom model of a spiral staircase I created in GMAX. I have set the grid to 32x32, to count the
number of pixels the pathing map will have to be.
Remember, 1 pixel is 32 warcraft grid units.
|
|
Creating the Pathing Map
Here is what my pathing map will look like. Each pixel has a color to control
the pathing inside warcraft.
- Magenta is un-walkable and un-buildable.
- Blue is walkable and un-buildable.
- Black pixels do nothing.
Now I'll import the TGA file into my map. In the object editor, I will edit my doodad and
select my custom imported pathing map.
|
|
A Finished Product
Success! Heres what it looks like in the game. The unit can walk up and down the stairs, but not walk off
the edges. The unit can also stand on the center area as well.
Rectangular, invisible 'helper' surfaces in my model help the unit walk over the cliff edge.
|
|