The Anatomy of an XLAT File

The Map Translator file or XLAT (no relation to ZDoom’s version) is the file that translates binary format maps into ECWolf’s internal structure. It can be named anything you want, but it must be referenced in MAPINFO in your ECWolf mod for the game to start.

By the end of this guide you should have a much better understanding of what this file is, and how to alter it for your projects.

First important thing to know is the “include” function. If you wanted to, say, only add a remote door, or a few new tiles and still use the original Wolfenstein 3D XLAT, you can use this function.

Example:

include "xlat/wolf3d.txt"

This will tell your game to use all the definitions from the original Wolfenstein 3D along with anything you specify in this file.

Next are the feature flags. These flags enable certain ECWolf specific mapping features, mostly stuff carried over from Rise of the Triad. Keep in mind that a lot of this stuff requires the development version of ECWolf.

It is easiest to put these at the top of the file:

enable globalmeta;

This enables Blake Stone data tiles. As of the writing of this tutorial it is incomplete and doesn’t function, so this won't be covered in this guide.

enable lightlevels;

This enables the light and visibility levels from Rise of the Triad. To use this, you must add the tiles 216-223 (for brightness) and 252-267 (for visibility) to the walls plane in your map editor, and then place the brightness tile in x2y0 and the visibility tile in x3y0 in the walls plane (1st plane).
This can actually be achieved easier and with more control in MAPINFO with the commands “defaultlighting” and “defaultvisibility”. The tiles are as follows:

Light Levels
216 0 (Darkest)
217 1
218 2
219 3
220 4
221 5
222 6
223 7 (Brightest)
Visibility Levels
252 0 (Lowest)
253 1
254 2
255 3
256 4
257 5
258 6
259 7
260 8
261 9
262 10
263 11
264 12
265 13
266 14
267 15 (Highest)
enable planedepth;

This enables Rise of the Triad’s taller level feature. It works, but is incomplete. Some things are quirky, like doors extend all the way to the ceiling since it doesn’t have ROTT’s animated doors or upper textures. It can be used, but would require some workarounds to make it look right. To use this, you must also add tiles 90-97 and 450-457 to the objects plane in your map editor, and the tile must be placed in the upper left corner of the map (x0y0) on the objects plane (2nd plane). Note: 90-97 are also the patrol point tiles, they will work both ways.

The tiles are as follows:

Level Height
90 1 (1 tile high, or 64x64)
91 2
92 3
93 4
94 5
95 6
96 7
97 8
450 9
451 10
452 11
453 12
454 13
455 14
456 15
457 16 
enable zheights;

This makes it so, in tandem with the prior effect, actors will spawn at different heights. In order to use this, you must enable the info plane (4th plane) in your map editor. On each object you want to spawn at a different height, you must (in the 4th plane) on top of the object place in High Byte mode, place tile 176 (hex: 0xB0). Then, in low-byte mode, tiles 0-127 raise the object and 255-128 lowers the object in 4 unit (1/16th of a tile) increments.

music { track, track, etc }

ROTT’s music selection feature. ROTT determines music track by a tile in top row in the info plane. The high byte tile must be 186 and the low byte selects the index in the table defined. This is completely unnecessary, as MAPINFO defines the track played in ECWolf, inheriting from ZDoom.

This section of the XLAT defines what goes in the 1st plane, otherwise known as walls and floor codes. These commands will define different walls, triggers, and all sorts of stuff.

modzone tilenumber [fillzone] ambush;

This is the “Deaf Guard” tile, it applies +AMBUSH to whatever object occupies the spot this tile is placed.

modzone tilenumber [fillzone] changetrigger action { properties }

This searches for all adjacent tiles for triggers with the specified action, and then replaces it with whatever is defined in properties. An example is the Secret Exit floor tile tile tilenumber This defines a wall tile. Tilenumber is the number of the corresponding map symbol in your map editor.

trigger tilenumber { properties }

This assigns a trigger, such as a door to a tile. Triggers can be referred to on the ECWolf wiki (https:// maniacsvault.net/ecwolf/wiki/ Universal_Wolfenstein_Map_Format#Triggers). The trigger tile number made must match the tile number in the “tiles” section.

zone tilenumber {}

This defines a sound zone, also known as a floor code. These determine the area that a guard can hear your shots.

These tiles define the object, or 2nd plane.

elevator tilenumber

Makes a ROTT elevator destination point. You must place these between the door and the switch, and then the elevator will “round robin” between these points. Elevator starts in the uppermost spot if located vertically or leftmost if located horizontally from each other.

trigger tilenumber { properties }

This also defines a trigger to a tile, but in the 2nd plane instead of the first. This is what makes things such as the push wall and the Victory Spin trigger.

{ tilenumber, actor, angles, flags, minskill }

This defines actors to a tile number. If your actor has angles defined, you will need a tile number for each angle. minskill indicates the minimum skill level this thing spawns at starting at 0.

Flags:

Flags can be combined with a pipe. Example: PATHING | HOLOWALL

  • HOLOWALL - when placed into a wall, it makes the wall non solid
  • PATHING - follows a patrol route instead of standing still
  • AMBUSH - deaf actor

By default, ECWolf has the 3rd and 4th planes enabled. The 4th plane is used as ROTT’s 3rd plane - the information plane, which is used for switches, touch plates, and other features transplanted from ROTT. Instead, ECWolf’s 3rd plane is used for textured ceilings and floors, much like the more advanced Wolf3D mods.

To be able to use the 3rd plane, the tiles must be defined in both the XLAT and your map editor:

ceiling { “flat”, “flat”, “flat”, etc }
floor { “flat”, “flat”, “flat”, etc }

The first flat defined is the same as Tile 0 in the map editor. Ceilings are defined in High Byte mode in the map editor, and floors are in Low Byte mode. Keep this in mind when writing your floors in XLAT, as the first one will be your default floor/ceiling and will be what displays when no tile is in that spot.