Universal Wolfenstein Map Format
The Universal Wolfenstein Map Format (UWMF) is a text based, extendable, specification for defining map structures. At the current time ECWolf is not a complete implementation of the specification.
Overview
UWMF is loosely based on the textual map format for Doom known as Universal Doom Map Format (UDMF). The UDMF format should be referenced for the grammar rules.
UWMF keeps the main concepts present in vanilla Wolf3D map editing. At its core, the format still supports the idea of planes of data which act as paintable canvases. The big difference is that textures are referenced by names instead of a global index, making maps much more portable than before. In the future editors will, however, likely hide most of the details in defining the palettes for textures, sectors, and sound zones (previously floor codes). Technically each individual wall side on a map tile could be given its own unique texture, if desired.
One thing the format does away with is special floor codes. A secret exit is defined by assigning a secret exit trigger to a wall. "Deaf" enemies are defined by simply flagging them as such. The format also handles special triggers which are possible to assign uniquely to each side of a wall - for example, one way doors or pushwalls that can be activated only from a certain direction.
Currently ECWolf does not implement the entirety of the new format, and no editor is directly capable of creating it. Maps can be created by using the export feature present in WDC and HWE. This is for two main reasons: whilst the format allows things to be placed independently on different walls of the grid, no editor is capable of providing this granularity; also, the format is designed assuming the possibility of stacking planes, a goal for ECWolf 2.x. Currently maps are limited to one plane (a plane in the new format is a Z layer).
Note that ECWolf planes are a different concept from planes in vanilla Wolfenstein 3D. In the latter case the term 'plane' refers to the wall/floor layer or the object layer, whereas in ECWolf the term refers to a complete 2-d map layout including all objects and walls.
In order to harness the full power of the ECWolf engine, this map format will need to be used. It is, however, not required as binary format maps can be translated on the fly with some limitations.
General Notes
- All coordinates are in tile units. (0,0) is at the top-left (north-west) corner of the map. (3,1) would be a tile in the fourth column, second row. Fractional units represent positions inside a tile.
- UWMF properties are case-insensitive but are documented as camelCase for clarity.
UWMF Sections
Global Properties
Properties global for the map. Must be the first thing defined in a map.
Required Properties
- namespace = "Wolf3D";
- The namespace of the textures/actors/etc used by this map. Must be the first item in a map.
- name = "<string>";
- The name of the map. This can be overridden in MAPINFO.
- tileSize = <integer>;
- Sets the width, in pixels, of a standard map tile. A standard Wolf3D map uses 64.
- width = <integer>;
- Width of the map in tiles.
- height = <integer>;
- Height of the map in tiles.
Example
namespace = "Wolf3D"; name = "Test Map"; tileSize = 64; width = 64; height = 64;
Tiles
Defines a set of textures and properties to use for the walls of a map tile. Tiles will automatically be assigned an index based on the order in which they are defined, starting with 0.
Required Properties
- textureEast = "<string>";
- textureNorth = "<string>":
- textureSouth = "<string>";
- textureWest = "<string>";
- Sets the texture to use on each side of the tile. This can be the name of a texture, a hexadecimal color prefixed with a hash character, or "-" which indicates there is no texture for that side.
Optional Properties
- blockingEast = <bool>;
- blockingNorth = <bool>;
- blockingSouth = <bool>;
- blockingWest = <bool>;
- Sets the side of the tile as blocking.
- Default is true.
- offsetVertical = <bool>;
- offsetHorizontal = <bool>;
- Whether to offset the two of the side by a half-tile (typically used for doors). Vertical = the sides facing east/west will be offset, Horizontal = the sides facing north/south will be offset.
- Default is false.
- dontOverlay = <bool>;
- Prevents the tile from appearing on the overlay map.
- Default is false.
- mapped = <int>;
- Sets if the tile should appear on the auto map even if the player hasn't seen it. The value must be greater than the skill's MapFilter property in order to be seen.
- Default is undefined (tiles will only appear on map when the player has seen it).
- comment = "<string>";
- An optional comment about the block. Ignored by the engine.
- Default is an empty string.
- soundSequence = "<string>";
- Sets the sound sequence to use for events regarding this tile.
- Default is undefined (no sound sequence).
- textureOverhead = "<string>";
- Sets the texture to be used for the tile on the auto map.
- Default is undefined (the east texture will be used).
Examples
tile { textureEast = "GSTONEA2"; textureNorth = "GSTONEA1"; textureWest = "GSTONEA2"; textureSouth = "GSTONEA1"; } tile { textureEast = "SLOT1_1"; textureNorth = "DOOR1_1"; textureWest = "SLOT1_1"; textureSouth = "DOOR1_1"; offsetHorizontal = true; comment = "A door facing north-south"; }
Sectors
Defines the floor and ceiling texture for a tile. Sectors will automatically be assigned an index based on the order in which they are defined, starting with 0.
Required Properties
- textureCeiling = "<string>";
- textureFloor = "<string>";
- Sets the texture to use on the floor/ceiling of a tile. This can be the name of a texture or a hexadecimal color prefixed with a hash character.
Optional Properties
- comment = "<string>";
- An optional comment about the block. Ignored by the engine.
- Default is an empty string.
Example
sector { textureCeiling = "#C0C0C0"; textureFloor = "#A0A0A0"; }
Zones
Zones are areas in which sound can travel through. There are no properties for zones at this time, but they must be defined. Zones will automatically be assigned an index based on the order in which they are defined, starting with 0.
Optional Properties
- comment = "<string>";
- An optional comment about the block. Ignored by the engine.
- Default is an empty string.
Example
zone { }
Planes
Defines a single plane of tiles. Unlike in the binary format, a plane contains all information for one slice of the level's Z-axis. In other words, most levels have one plane. Each plane must have a corresponding Plane Map defined.
Required Properties
- depth = <integer>;
- Height of the plane in pixels.
Optional Properties
- comment = "<string>";
- An optional comment about the block. Ignored by the engine.
- Default is an empty string.
Example
plane { depth = 64; }
Plane Maps
A plane map defines a layer of map spots that create the layout of the level. There must be Width * Height map spots in each plane map. Map spots start at (0,0) and are assigned in row-major order.
Components
{tile,sector,zone,tag}
Required Components
- tile - The index of the tile to use to draw at this map spot. Use -1 for empty space.
- sector - The index of the sector to use at this map spot. Note that walls surrounding the area the player can move around in should have a sector specified to avoid rendering errors. A value of -1 can be used for map spots in the "void."
- zone - The index of the sound zone to use at this map spot. -1 can be used for areas in the "void" outside the playable map area.
Optional Components
- tag - An optional tag to link this map spot to a trigger or other action. Used for doors, pushwalls, etc.
Example
// a 4x4 level planeMap { {0,0,-1}, {0,0,-1}, {0,0,-1}, {0,0,-1}, {0,0,-1}, {-1,0,0}, {-1,0,0}, {0,0,-1}, {0,0,-1}, {-1,0,0}, {-1,0,0}, {0,0,-1}, {0,0,-1}, {0,0,-1}, {0,0,-1}, {0,0,-1} // Note that the last entry does not have a trailing comma }
Things
Actors inside the map.
Required Properties
- type = "<string>";
- The actor name (as defined in DECORATE) of thing to spawn.
- x = <float>;
- y = <float>;
- z = <float>;
- Gives the coordinates of the spawning point of the thing (in map tile coordinates). Note that these are floating point values; a position of (2.5, 9.5) would be in the middle of tile (2, 9).
Optional Properties
- angle = <integer>;
- Angle of the spawning point in degrees. 0 = east, 90 = north, 180 = west, 270 = south.
- Default is 0.
- ambush = <bool>;
- If enabled the thing is deaf to sound.
- Default is false.
- patrol = <bool>;
- Spawns the thing as patrolling.
- Default is false.
- skill1 = <bool>;
- skill2 = <bool>;
- skill3 = <bool>;
- skill4 = <bool>;
- Sets the skill levels in which the thing will spawn.
- Default is false (although you should enable at least one!)
- comment = "<string>";
- An optional comment about the block. Ignored by the engine.
- Default is an empty string.
Example
thing { type = "Guard"; x = 2.5; y = 10.5; z = 0; angle = 90; ambush = true; skill2 = true; skill3 = true; skill4 = true; }
Triggers
Triggers define actions that can occur from the player performing an action.
Required Properties
- x = <integer>;
- y = <integer>;
- z = <integer>;
- Gives the coordinate of the map tile this trigger applies to.
- action = "<string>";
- Sets the action special to execute for this trigger.
Optional Properties
- arg0 = <integer>;
- arg1 = <integer>;
- arg2 = <integer>;
- arg3 = <integer>;
- arg4 = <integer>;
- Arguments to pass to the action.
- Default is 0.
- activateEast = <bool>;
- activateNorth = <bool>;
- activateSouth = <bool>;
- activateWest = <bool>;
- Sets the faces on which the trigger will activate.
- Default is true.
- playerCross = <bool>;
- Allows the player to activate the trigger by crossing the face.
- Default is false.
- playerUse = <bool>;
- Allows the player to activate the trigger.
- Default is false.
- monsterUse = <bool>;
- Allows monsters to activate the trigger.
- Default is false.
- repeatable = <bool>;
- Allows the trigger to be activated multiple times.
- Default is false.
- secret = <bool>;
- The trigger will count as a secret and will be tallied on first activation.
- Default is false.
- comment = "<string>";
- An optional comment about the block. Ignored by the engine.
- Default is an empty string.
Example
trigger { x = 5; y = 6; z = 0; type = "Door_Open"; arg0 = 1; // tag arg1 = 16; // speed arg2 = 300; // delay arg3 = 0; // lock arg4 = 1; // facing north-south playerUse = true; repeatable = true; monsterUse = true; }