Difference between revisions of "Universal Wolfenstein Map Format"

From ECWolf Wiki
(Trigger section)
m (Updated formatting)
Line 32: Line 32:
  
 
=== Required Properties ===
 
=== Required Properties ===
* '''namespace = "Wolf3D";'''
+
* <tt>namespace = "Wolf3D";</tt>
 
:The namespace of the textures/actors/etc used by this map. Must be the first item in a map.
 
:The namespace of the textures/actors/etc used by this map. Must be the first item in a map.
* '''name = "<string>";'''
+
* <tt>name = "<string>";</tt>
 
:The name of the map. This can be overridden in [[MAPINFO]].
 
:The name of the map. This can be overridden in [[MAPINFO]].
* '''tileSize = <integer>;'''
+
* <tt>tileSize = <integer>;</tt>
 
:Sets the width, in pixels, of a standard map tile.  A standard Wolf3D map uses 64.
 
:Sets the width, in pixels, of a standard map tile.  A standard Wolf3D map uses 64.
* '''width = <integer>;'''
+
* <tt>width = <integer>;</tt>
 
:Width of the map in tiles.
 
:Width of the map in tiles.
* '''height = <integer>;'''
+
* <tt>height = <integer>;</tt>
 
:Height of the map in tiles.
 
:Height of the map in tiles.
  
Line 54: Line 54:
  
 
=== Required Properties ===
 
=== Required Properties ===
* '''textureEast = "<string>";'''
+
* <tt>textureEast = "<string>";</tt>
* '''textureNorth = "<string>":'''
+
* <tt>textureNorth = "<string>":</tt>
* '''textureSouth = "<string>";'''
+
* <tt>textureSouth = "<string>";</tt>
* '''textureWest = "<string>";'''
+
* <tt>textureWest = "<string>";</tt>
 
: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.
 
: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 ===
 
=== Optional Properties ===
* '''blockingEast = <bool>;'''
+
* <tt>blockingEast = <bool>;</tt>
* '''blockingNorth = <bool>;'''
+
* <tt>blockingNorth = <bool>;</tt>
* '''blockingSouth = <bool>;'''
+
* <tt>blockingSouth = <bool>;</tt>
* '''blockingWest = <bool>;'''
+
* <tt>blockingWest = <bool>;</tt>
 
:Sets the side of the tile as blocking.  
 
:Sets the side of the tile as blocking.  
::Default is '''true'''.
+
::Default is <tt>true</tt>.
*'''offsetVertical = <bool>;'''
+
*<tt>offsetVertical = <bool>;</tt>
*'''offsetHorizontal = <bool>;'''
+
*<tt>offsetHorizontal = <bool>;</tt>
 
: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.
 
: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'''.
+
::Default is <tt>false</tt>.
* '''dontOverlay = <bool>;''' {{new}}
+
* <tt>dontOverlay = <bool>;</tt> {{new}}
 
:Prevents the tile from appearing on the overlay map.   
 
:Prevents the tile from appearing on the overlay map.   
::Default is '''false'''.
+
::Default is <tt>false</tt>.
* '''mapped = <int>;''' {{new}}
+
* <tt>mapped = <int>;</tt> {{new}}
 
: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 [[MAPINFO/Skill_definition|skill]]'s MapFilter property in order to be seen.   
 
: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 [[MAPINFO/Skill_definition|skill]]'s MapFilter property in order to be seen.   
 
::Default is undefined (tiles will only appear on map when the player has seen it).
 
::Default is undefined (tiles will only appear on map when the player has seen it).
* '''soundSequence = "<string>";''' {{new}}
+
* <tt>soundSequence = "<string>";</tt> {{new}}
 
:Sets the [[SNDSEQ|sound sequence]] to use for events regarding this tile.
 
:Sets the [[SNDSEQ|sound sequence]] to use for events regarding this tile.
 
::Default is undefined (no sound sequence).
 
::Default is undefined (no sound sequence).
* '''textureOverhead = "<string>";''' {{new}}
+
* <tt>textureOverhead = "<string>";</tt> {{new}}
 
:Sets the texture to be used for the tile on the auto map.
 
:Sets the texture to be used for the tile on the auto map.
 
::Default is undefined (the east texture will be used).
 
::Default is undefined (the east texture will be used).
Line 106: Line 106:
  
 
=== Required Properties ===
 
=== Required Properties ===
* '''textureCeiling = "<string>";'''
+
* <tt>textureCeiling = "<string>";</tt>
* '''textureFloor = "<string>";'''
+
* <tt>textureFloor = "<string>";</tt>
 
: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.
 
: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.
  
Line 129: Line 129:
  
 
=== Required Properties ===
 
=== Required Properties ===
* '''depth = <integer>;'''
+
* <tt>depth = <integer>;</tt>
 
:Height of the plane in pixels.
 
:Height of the plane in pixels.
  
Line 139: Line 139:
  
 
== Plane Maps ==
 
== 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.
+
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 ===
 
=== Components ===
'''{tile,sector,zone,tag}'''
+
<tt>{tile,sector,zone,tag}</tt>
 
=== Required Components ===
 
=== Required Components ===
*'''tile''' - The index of the [[#Tiles|tile]] to use to draw at this map spot.  Use -1 for empty space.
+
*<tt>tile</tt> - The index of the [[#Tiles|tile]] to use to draw at this map spot.  Use -1 for empty space.
*'''sector''' - The index of the [[#Sectors|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."
+
*<tt>sector</tt> - The index of the [[#Sectors|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 [[#Zones|sound zone]] to use at this map spot.  -1 can be used for areas in the "void" outside the playable map area.
+
*<tt>zone</tt> - The index of the [[#Zones|sound zone]] to use at this map spot.  -1 can be used for areas in the "void" outside the playable map area.
 
=== Optional Components ===
 
=== Optional Components ===
*'''tag''' - An optional tag to link this map spot to a [[#Triggers|trigger]] or other action.  Used for doors, pushwalls, etc.
+
*<tt>tag</tt> - An optional tag to link this map spot to a [[#Triggers|trigger]] or other action.  Used for doors, pushwalls, etc.
  
 
=== Example ===
 
=== Example ===
Line 175: Line 175:
  
 
=== Required Properties ===
 
=== Required Properties ===
* '''type = <integer>;'''
+
* <tt>type = <integer>;</tt>
 
:Gives the editor number (as defined in [[DECORATE]]) of thing to spawn.
 
:Gives the editor number (as defined in [[DECORATE]]) of thing to spawn.
* '''x = <float>;'''
+
* <tt>x = <float>;</tt>
* '''y = <float>;'''
+
* <tt>y = <float>;</tt>
* '''z = <float>;'''
+
* <tt>z = <float>;</tt>
 
: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).
 
: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).
* '''angle = <integer>;'''
+
* <tt>angle = <integer>;</tt>
 
:Angle of the spawning point in degrees.  0 = east, 90 = north, 180 = west, 270 = south.
 
:Angle of the spawning point in degrees.  0 = east, 90 = north, 180 = west, 270 = south.
  
 
=== Optional Properties ===
 
=== Optional Properties ===
* '''ambush = <bool>;'''
+
* <tt>ambush = <bool>;</tt>
:Set to '''true''' to make the thing deaf to sound.
+
:If enabled the thing is deaf to sound.
::Default is '''false'''.
+
::Default is <tt>false</tt>.
* '''patrol = <bool>;'''
+
* <tt>patrol = <bool>;</tt>
 
:Spawns the thing as patrolling.  
 
:Spawns the thing as patrolling.  
::Default is '''false'''.
+
::Default is <tt>false</tt>.
* '''skill1 = <bool>;'''
+
* <tt>skill1 = <bool>;</tt>
* '''skill2 = <bool>;'''
+
* <tt>skill2 = <bool>;</tt>
* '''skill3 = <bool>;'''
+
* <tt>skill3 = <bool>;</tt>
* '''skill4 = <bool>;'''
+
* <tt>skill4 = <bool>;</tt>
 
:Sets the skill levels in which the thing will spawn.  
 
:Sets the skill levels in which the thing will spawn.  
::Default is '''false''' (although you should enable at least one!)
+
::Default is <tt>false</tt> (although you should enable at least one!)
  
 
=== Example ===
 
=== Example ===
Line 216: Line 216:
  
 
=== Required Properties ===
 
=== Required Properties ===
* '''x = <integer>;'''
+
* <tt>x = <integer>;</tt>
* '''y = <integer>;'''
+
* <tt>y = <integer>;</tt>
* '''z = <integer>;'''
+
* <tt>z = <integer>;</tt>
 
:Gives the coordinate of the map tile this trigger applies to.
 
:Gives the coordinate of the map tile this trigger applies to.
* '''action = <integer>;'''
+
* <tt>action = <integer>;</tt>
 
:Sets the [[Action specials|action special]] to execute for this trigger.
 
:Sets the [[Action specials|action special]] to execute for this trigger.
  
 
=== Optional Properties ===
 
=== Optional Properties ===
* '''arg0 = <integer>;'''
+
* <tt>arg0 = <integer>;</tt>
* '''arg1 = <integer>;'''
+
* <tt>arg1 = <integer>;</tt>
* '''arg2 = <integer>;'''
+
* <tt>arg2 = <integer>;</tt>
* '''arg3 = <integer>;'''
+
* <tt>arg3 = <integer>;</tt>
* '''arg4 = <integer>;'''
+
* <tt>arg4 = <integer>;</tt>
 
:Arguments to pass to the action.  
 
:Arguments to pass to the action.  
::Default is '''0'''.
+
::Default is <tt>0</tt>.
* '''activateEast = <bool>;'''
+
* <tt>activateEast = <bool>;</tt>
* '''activateNorth = <bool>;'''
+
* <tt>activateNorth = <bool>;</tt>
* '''activateSouth = <bool>;'''
+
* <tt>activateSouth = <bool>;</tt>
* '''activateWest = <bool>;'''
+
* <tt>activateWest = <bool>;</tt>
 
:Sets the faces on which the trigger will activate.  
 
:Sets the faces on which the trigger will activate.  
::Default is '''true'''.
+
::Default is <tt>true</tt>.
* '''playerCross = <bool>;'''
+
* <tt>playerCross = <bool>;</tt>
 
:Allows the player to activate the trigger by crossing the face.  
 
:Allows the player to activate the trigger by crossing the face.  
::Default is '''false'''.
+
::Default is <tt>false</tt>.
* '''playerUse = <bool>;'''
+
* <tt>playerUse = <bool>;</tt>
 
:Allows the player to activate the trigger.  
 
:Allows the player to activate the trigger.  
::Default is '''false'''.
+
::Default is <tt>false</tt>.
* '''monsterUse = <bool>;'''
+
* <tt>monsterUse = <bool>;</tt>
 
:Allows monsters to activate the trigger.  
 
:Allows monsters to activate the trigger.  
::Default is '''false'''.
+
::Default is <tt>false</tt>.
* '''repeatable = <bool>;'''
+
* <tt>repeatable = <bool>;</tt>
 
:Allows the trigger to be activated multiple times.  
 
:Allows the trigger to be activated multiple times.  
::Default is '''false'''.
+
::Default is <tt>false</tt>.
* '''secret = <bool>;'''
+
* <tt>secret = <bool>;</tt>
 
:The trigger will count as a secret and will be tallied on first activation.  
 
:The trigger will count as a secret and will be tallied on first activation.  
::Default is '''false'''.
+
::Default is <tt>false</tt>.
  
 
=== Example ===
 
=== Example ===

Revision as of 02:22, 9 March 2016

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>; (New from 1.4)
Prevents the tile from appearing on the overlay map.
Default is false.
  • mapped = <int>; (New from 1.4)
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).
  • soundSequence = "<string>"; (New from 1.4)
Sets the sound sequence to use for events regarding this tile.
Default is undefined (no sound sequence).
  • textureOverhead = "<string>"; (New from 1.4)
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";
}
// A door facing north-south
tile
{
    textureEast = "SLOT1_1";
    textureNorth = "DOOR1_1";
    textureWest = "SLOT1_1";
    textureSouth = "DOOR1_1";
    offsetHorizontal = true;
}

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.

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.

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.

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 = <integer>;
Gives the editor number (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).
  • angle = <integer>;
Angle of the spawning point in degrees. 0 = east, 90 = north, 180 = west, 270 = south.

Optional Properties

  • 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!)

Example

thing
{
    type = 11;
    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 = <integer>;
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.

Example

trigger
{
    x = 5;
    y = 6;
    z = 0;
    type = 1; // door type
    arg0 = 1; // tag
    arg1 = 16; // speed
    arg2 = 300; // delay
    arg3 = 0; // lock
    arg4 = 1; // facing north-south
    playerUse = true;
    repeatable = true;
    monsterUse = true;
}

See Also