UDMF

From SRB2 Wiki
Jump to navigation Jump to search
This article is a stub. It already has some of the necessary information on this topic, but it could be expanded upon. You can help the SRB2 Wiki and its users by expanding it!

The Universal Doom Map Format (abbreviated as UDMF) is a map format for games based on the Doom engine. Doom's original map format is a binary format, storing the map as raw, non-human readable binary data. By contrast, UDMF is text-based. This makes it easily extensible and forward-compatible, allowing a game to introduce new map properties without requiring changes to the format itself.

In SRB2, UDMF is fully supported since v2.2.11. However, support is still experimental and details of the implementation may change in the future.

UDMF maps can be created in any map editor that supports the format. This includes Doom Builder and its offshoots, such as Ultimate Doom Builder (UDB). Configuration files for UDB are available as part of SRB2's source code, under extras/conf/udb. A version of UDB with SRB2-specific support, called Ultimate Zone Builder, is in development.

Format

As in the binary format, a UDMF map is stored as a series of consecutive lumps in a WAD or PK3 file. The first lump in this series is the header. This is an empty marker lump with the name MAPxx, where xx is the extended map number. The final lump is another empty marker lump called ENDMAP. In between these two, the map data is stored.

The main data of a UDMF map is stored in the TEXTMAP lump. This is a text lump that contains an entry for each Thing, linedef, sidedef, vertex and sector in the map. Each entry consists of a list of properties (also called fields) and their values, with all unlisted properties falling back on a default value. For example, a Thing entry might look like this:

thing
{
x = 0.000;
y = -768.000;
angle = 90;
type = 1;
flags = 3;
}

The TEXTMAP lump is followed by the lumps created by the nodebuilder. The only nodebuilder that supports UDMF maps is ZDBSP. The BSP tree is stored in a lump called ZNODES, in a format designed specifically for UDMF maps. Optionally, the nodebuilder may precalculate the blockmap data struture, which is stored in the BLOCKMAP lump. If this lump is missing, the game will generate the blockmap automatically when the map is loaded. Theoretically, UDMF maps may also have a REJECT lump. This is an optional precalculated table used to speed up line-of-sight calculations. However, since ZDBSP does not build a REJECT lump, UDMF maps do not have it in practice.

Fields

Fields without a default are mandatory. If they are omitted, the map will fail to load.

Linedef

Name Type Description Default
id Integer Tag 0
moreids String Additional tags, specified as a space-separated list, e.g., "2 666 1003 4505" empty
v1 Integer Index of first vertex none
v2 Integer Index of second vertex none
sidefront Integer Front sidedef index none
sideback Integer Back sidedef index -1
alpha Float Translucency 1.0
blendmode String Blending mode (Alias: renderstyle). Possible values:
  • "translucent"
  • "add"
  • "subtract"
  • "reversesubtract"
  • "modulate"
  • "fog"
"translucent"
executordelay Integer Linedef executor delay (in tics) 0
Action
special Integer Linedef action aka linedef type 0
arg0 Integer Action argument 1 0
arg1 Integer Action argument 2 0
arg2 Integer Action argument 3 0
arg3 Integer Action argument 4 0
arg4 Integer Action argument 5 0
arg5 Integer Action argument 6 0
arg6 Integer Action argument 7 0
arg7 Integer Action argument 8 0
arg8 Integer Action argument 9 0
arg9 Integer Action argument 10 0
stringarg0 String Action string argument 1 null
stringarg1 String Action string argument 2 null
Flags
blocking Boolean Impassable false
blockmonsters Boolean Block Enemies false
twosided Boolean Double-Sided false
dontpegtop Boolean Upper Unpegged false
dontpegbottom Boolean Lower Unpegged. Unlike in the binary format, this does not affect the pegging of the middle texture. false
skewtd Boolean Slope Skew false
noclimb Boolean Not Climbable false
noskew Boolean No Midtexture Skew false
midpeg Boolean Peg Midtexture false
midsolid Boolean Solid Midtexture false
wrapmidtex Boolean Repeat Midtexture false
nonet Boolean No Netgame false
netonly Boolean Netgame Only false
bouncy Boolean Bouncy Wall false
transfer Boolean Transfer Line false

Sidedef

Name Type Description Default
offsetx Integer Texture X offset 0
offsety Integer Texture Y offset 0
texturetop String Upper texture -
texturebottom String Lower texture -
texturemiddle String Middle texture -
sector String Sector index none
repeatcnt Integer Number of middle texture repetitions 0

Vertex

Name Type Description Default
x Float X coordinate none
y Float Y coordinate none
zfloor Float Floor Z coordinate none (use sector's floor height)
zceiling Float Ceiling Z coordinate none (use sector's ceiling height)

Sector

Name Type Description Default
heightfloor Integer Floor height 0
heightceiling Integer Ceiling height 0
texturefloor String Floor flat -
textureceiling String Ceiling flat -
id Integer Tag 0
moreids String Additional tags, specified as a space-separated list, e.g., "2 666 1003 4505" empty
xpanningfloor Float Floor texture X offset 0.0
ypanningfloor Float Floor texture Y offset 0.0
xpanningceiling Float Ceiling texture X offset 0.0
ypanningceiling Float Ceiling texture Y offset 0.0
rotationfloor Float Floor texture rotation in degrees 0.0
rotationceiling Float Ceiling texture rotation in degrees 0.0
ceilingplane_a Float Used for defining a ceiling slope via equation 0.0
ceilingplane_b Float Used for defining a ceiling slope via equation 0.0
ceilingplane_c Float Used for defining a ceiling slope via equation 0.0
ceilingplane_d Float Used for defining a ceiling slope via equation 0.0
floorplane_a Float Used for defining a floor slope via equation 0.0
floorplane_b Float Used for defining a floor slope via equation 0.0
floorplane_c Float Used for defining a floor slope via equation 0.0
floorplane_d Float Used for defining a floor slope via equation 0.0
friction Float Friction 0.90625
gravity Float Gravity 1.0
Lighting and colormap
lightlevel Integer Light level 255
lightfloor Integer Floor's light level, relative to sector's light level 0
lightceiling Integer Ceiling's light level, relative to sector's light level 0
lightfloorabsolute Boolean Floor's light level is an absolute value False
lightceilingabsolute Boolean Ceiling's light level is an absolute value False
lightcolor Integer Light color: Color displayed at full brightness 0.0
lightalpha Integer Light color intensity 25
fadecolor Integer Fade color: Color displayed at full darkness 0.0
fadealpha Integer Fade color intensity 25
fadestart Integer Start of colormap fading range 0
fadeend Integer End of colormap fading range 31
colormapfog Boolean Use fog-like plane lighting for colormap? False
colormapfadesprites Boolean Fade fullbright sprites in colormap? False
colormapprotected Boolean Colormap cannot be changed by a linedef effect? False
Special effects
damagetype String Type of damage inflicted by this sector. Possible values: "None"
triggertag Integer Tag of a linedef executor trigger to run when this sector is entered, or 0 if none should be run 0
triggerer String Who needs to enter the sector in order to trigger linedef executors via triggertag? Possible values:
  • "Player": One player
  • "AllPlayers": All players
  • "Mobj": A pushable (or any object with a thinker if triggerline_mobj is checked)
0
outerspace Boolean Space Countdown False
doublestepup Boolean Ramp Sector (double step-up) False
nostepdown Boolean Non-Ramp Sector (no step-down) False
speedpad Boolean Speed Pad False
starpostactivator Boolean Star Post Activator False
exit Boolean Exit Sector False
specialstagepit Boolean Special Stage Pit False
returnflag Boolean CTF Flag Return False
redteambase Boolean CTF Red Team Base False
blueteambase Boolean CTF Blue Team Base False
fan Boolean Fan Sector False
supertransform Boolean Super Sonic Transform False
forcespin Boolean Force Spin False
zoomtubestart Boolean Zoom Tube Start False
zoomtubeend Boolean Zoom Tube End False
finishline Boolean Circuit Finish Line False
ropehang Boolean Rope Hang False
jumpflip Boolean Flip Gravity on Jump False
gravityoverride Boolean Make Reverse Gravity Temporary False
Flags affecting special effects
flipspecial_nofloor Boolean "Plane touch" special effects do not trigger when touching the floor? False
flipspecial_ceiling Boolean "Plane touch" special effects trigger when touching the ceiling? False
triggerspecial_touch Boolean Special effects trigger when touching the edge of the sector? False
triggerspecial_headbump Boolean "Plane touch" special effects trigger even when the triggering object is in opposite gravity? False
triggerline_plane Boolean Linedef executor triggers require plane touch? False
triggerline_mobj Boolean Non-pushable objects with a thinker can trigger linedef executors while they are in this sector?
Note that this doesn't just apply to triggers on the sector itself, but also triggers on FOFs and PolyObjects that affect this sector.
False
Other flags
invertprecip Boolean Inverts the presence of precipitation in this sector (i.e., it only shows up when the sector is indoors) False
gravityflip Boolean Are objects in this sector flipped if gravity is negative? False
heatwave Boolean Apply heat wave visual effect? False
noclipcamera Boolean Intangible to the Camera? False

Thing

Name Type Description Default
id Integer Tag 0
moreids String Additional tags, specified as a space-separated list, e.g., "2 666 1003 4505" empty
x Float X coordinate 0.0
y Float Y coordinate 0.0
height Float Height/Z position relative to the floor (or ceiling if flipped) 0
angle Integer Angle in degrees 0
pitch Integer Pitch in degrees 0
roll Integer Roll in degrees 0
scale Float Scale (Aliases: scalex, scaley) 1.0
type Integer Thing type 0
arg0 Integer Argument 1 0
arg1 Integer Argument 2 0
arg2 Integer Argument 3 0
arg3 Integer Argument 4 0
arg4 Integer Argument 5 0
arg5 Integer Argument 6 0
arg6 Integer Argument 7 0
arg7 Integer Argument 8 0
arg8 Integer Argument 9 0
arg9 Integer Argument 10 0
stringarg0 String String argument 1 null
stringarg1 String String argument 2 null
flip Boolean Flip flag false