UDMF

From Eternity Wiki
Revision as of 21:47, 15 July 2023 by Altazimuth (talk | contribs) (Update skew fields)
Jump to navigationJump to search

UDMF is the extensible format that replaces the classic Doom format and ExtraData. Each level, instead of being defined by the classic lumps (THINGS, LINEDEFS, SIDEDEFS etc.) is defined by a human-readable lump named TEXTMAP, and can have associated lumps (e.g. ZNODES, BLOCKMAP, REJECT if needed) and other lumps, until a marker lump named ENDMAP.

TEXTMAP has a well-defined language. Check the UDMF article at doomwiki.org. Each game and port has its own namespace(s), for example we have these namespaces: "doom", "heretic", "hexen", "strife", "zdoom" and others. Eternity has the "eternity" namespace.

At its core, UDMF is made of many blocks, each titled "vertex", "sector", "sidedef", "linedef", "thing" and containing several properties, some mandatory, others optional. Each game or port namespace can define its own set, which is typically hard-coded, though it's also possible for the user to add their own fields (which have to be preceded by a safe prefix, to avoid conflicts with the standard).

Maps designed in UDMF no longer need ExtraData.

The standard was defined by James "Quasar" Haley and has also been successfully implemented in Vavoom, ZDoom and the ZDoom-derivative ports.

Basics

Eternity supports the "doom" and "eternity" namespaces. In the rest of this article, we'll detail the "eternity" namespace. See the base UDMF specifications for the options not detailed in this document.

A TEXTMAP for Eternity must start with this:

namespace = "eternity";

Eternity compatibility

You can also add the following field in UDMF TEXTMAP:

ee_compat = true;

which, no matter the namespace used (e.g. "zdoom"), assumes the map is going to work in Eternity. In other words, it is equivalent to setting namespace as "eternity". Any fields not supported by Eternity, however, may make the mod fail.

Node format

Nodes for UDMF use the uncompressed GL-nodes format under the ZNODES name. Tools such as ZDBSP should build such a lump upon detecting a TEXTMAP lump.

Linedefs

linedef
{
  blocklandmonsters = <boolean>;
  blockplayers = <boolean>;

  polycross = <boolean>;
  monstershoot = <boolean>;

  midtex3d = <boolean>;
  firstsideonly = <boolean>;
  blockeverything = <boolean>;
  zoneboundary = <boolean>;
  clipmidtex = <boolean>;
  midtex3dimpassible = <boolean>;
  lowerportal = <boolean>;
  upperportal = <boolean>;

  portal = <integer>;

  alpha = <floating-point>;        // default 1.0
  renderstyle = <string>;
  tranmap = <string>;
}

Explanation of fields

  • blocklandmonsters
If true, linedef blocks walking monsters but allows fliers to pass. Players can pass anyway.
  • blockplayers
If true, linedef blocks players but allows monsters and projectiles to pass.
  • polycross
If true, linedef is activated when a polyobject's center point crosses it.
  • monstershoot
If true, linedef is activated when a monster fires hitscan on it.
  • midtex3d
If true, this linedef's middle texture uses 3dmidtex physics.
  • firstsideonly
Linedef can only be activated from front side.
  • blockeverything
Linedef blocks all objects, acting like an external solid wall
  • zoneboundary
Linedef acts like a boundary for reverb effects.
  • clipmidtex
Middle texture is clipped against the floor or ceiling as if a light change took place.
  • midtex3dimpassible
Treat the 3dmidtex line as a classic impassable middle texture, with regards to projectiles (i.e. they will pass through, just like hitscans).
  • lowerportal, upperportal
Apply edge portal on the lower or upper part of this linedef, copying back sector's floor or ceiling portal into it.
  • portal
The ID of the portal to apply on this linedef, as defined from Portal_Define
  • alpha (default: 1.0)
Opacity of this line.
  • renderstyle
Either "translucent" or "add". Default is "".
  • tranmap
Boom translucency map. Mutually exclusive with alpha and renderstyle.

Sidedefs

sidedef
{
  offsetx = <floating-point>;
  offsety = <floating-point>; 
  offsetx_top = <floating-point>;
  offsety_top = <floating-point>;
  offsetx_middle = <floating-point>;
  offsety_middle = <floating-point>;
  offsetx_bottom = <floating-point>;
  offsety_bottom = <floating-point>;

  skew_top_type = <string>;
  skew_middle_type = <string>;
  skew_bottom_type = <string>;
}

Explanation of fields

  • offsetx, offsety
Overall horizontal and vertical offsets for the top, middle, and bottom textures of this sidedef.
  • offsetx_top, offsety_top, offsetx_middle, offsety_middle, offsetx_bottom, offsety_bottom
Horizontal and vertical offsets for the individual top, middle, and bottom portions of this sidedef.
  • skew_top_type, skew_bottom_type, skew_middle_type
The type of skewing that the a given texture of this sidedef has. This skew starts at the left side of the sidedef (if viewing the sidedef straight-on) and conforms to either the slope on the front or back side of the line the sidedef is on. Either the floor or ceiling slope can be picked as the slope for the skewing to conform to. Values are "none", "front_floor", "front_ceiling", "back_floor", and "back_ceiling", with "none" being the default.

Vertices

No change yet from the base "doom" namespace.

Sectors

sector
{
  heightfloor = <floating-point>;
  heightceiling = <floating-point>;

  xpanningfloor = <floating-point>;
  ypanningfloor = <floating-point>;
  xpanningceiling = <floating-point>;
  ypanningceiling = <floating-point>;

  xscalefloor = <floating-point>;
  yscalefloor = <floating-point>;
  xscaleceiling = <floating-point>;
  yscaleceiling = <floating-point>;
  rotationfloor = <floating-point>;
  rotationceiling = <floating-point>;

  secret = <boolean>;
  friction = <integer>;

  leakiness = <integer>;
  damageamount = <integer>;
  damageinterval = <integer>;
  damage_endgodmode = <boolean>;
  damage_exitlevel = <boolean>;
  damageterraineffect = <boolean>;
  damagetype = <string>;

  floorterrain = <string>;
  ceilingterrain = <string>;

  lightfloor = <integer>;
  lightceiling = <integer>;
  lightfloorabsolute = <boolean>;
  lightceilingabsolute = <boolean>;

  phasedlight = <boolean>;
  lightsequence = <boolean>;
  lightseqalt = <boolean>;

  colormaptop = <string>;
  colormapmid = <string>;
  colormapbottom = <string>;

  scroll_ceil_x = <floating-point>;
  scroll_ceil_y = <floating-point>;
  scroll_ceil_type = <string>;
  scroll_floor_x = <floating-point>;
  scroll_floor_y = <floating-point>;
  scroll_floor_type = <string>;

  floorid = <integer>;
  ceilingid = <integer>;
  attachfloor = <integer>;
  attachceiling = <integer>;

  soundsequence = <string>;

  portalfloor = <integer>;
  portalceiling = <integer>;

  portal_floor_disabled = <boolean>;
  portal_floor_norender = <boolean>;
  portal_floor_nopass = <boolean>;
  portal_floor_blocksound = <boolean>;
  portal_floor_useglobaltex = <boolean>;
  portal_floor_overlaytype = <string>;
  alphafloor = <floating-point>;
  portal_floor_attached = <boolean>;

  portal_ceil_disabled = <boolean>;
  portal_ceil_norender = <boolean>;
  portal_ceil_nopass = <boolean>;
  portal_ceil_blocksound = <boolean>;
  portal_ceil_useglobaltex = <boolean>;
  portal_ceil_overlaytype = <string>;
  alphaceiling = <floating-point>;
  portal_ceil_attached = <boolean>;
}

Explanation of fields

  • heightfloor, heightceiling (mandatory)
Unlike the base field from the core specs, these ones allow floating-point values.
  • xpanningfloor, ypanningfloor, xpanningceiling, ypanningceiling
These properties control the panning of the floor or ceiling flat.
  • xscalefloor, yscalefloor, xscaleceiling, yscaleceiling (default: 1.0)
These properties control the scaling of the floor or ceiling flat. Greater values result in smaller textures.
  • rotationfloor, rotationceiling
These properties control the rotation of the floor or ceiling flat, in degrees.
  • secret
If true, the sector counts as a secret when visited by player.
  • friction (default: -1)
This one controls the friction of movement on the floor. The value of this field is equivalent to the length of a horizontal linedef with the classic Boom friction special. Default value: -1 (use usual Doom friction).
  • leakiness
This one controls the probability that, if this sector is also damaging, it will leak damage through the radiation suit. As reference, the classic Doom 20% sector has 5 leakiness. For damage which always goes through the suit, use 256.
  • damageamount
Damage per hit for players on the floor.
  • damageinterval
Time between hits. The classic Doom damaging floors use a 32 period.
  • damage_endgodmode
If true, it will cause the damaging floor to disable the godmode cheat.
  • damage_exitlevel
If true, it will cause the damaging floor to exit the level in victory if the player has too little health.
  • damageterraineffect
If true, then each damage hit will produce a splash, like the Heretic lava.
  • damagetype (default: "Unknown")
The damage type of the floor. For Doom damaging floors you can use "Slime".
  • floorterrain (default: "@flat")
The terrain effect of the floor.
  • ceilingterrain (default: "@flat")
The terrain effect of the ceiling. Currently used for particle recolouring.
  • lightfloor, lightceiling
The light amount to add to the floor or ceiling, relative to the designated light level.
  • lightfloorabsolute, lightceilingabsolute
If true, then lightfloor or lightceiling just overrides the light.
  • phasedlight = <boolean>;
Equivalent to ExtraData flag.
  • lightsequence = <boolean>;
Equivalent to ExtraData flag.
  • lightseqalt = <boolean>;
Equivalent to ExtraData flag.
  • colormaptop, colormapmid, colormapbottom (default: "@default")
The colormap to set for the top, normal or bottom part of a Boom sector with fake flats. Or for any normal part, if it's colormapmid. Use a lump from between C_START and C_END. "WATERMAP" and "LAVAMAP" are provided by Eternity.
  • scroll_ceil_x, scroll_ceil_y, scroll_floor_x, scroll_floor_y
These fields make the sector ceiling or floor scroll at startup. The values you input there are the equivalents of a Boom trigger linedef length divided by 10. So to emulate a linedef pointing east of length 64 having a scroll trigger, set value 6.4 on scroll_ceil_x or scroll_floor_x.
  • scroll_ceil_type, scroll_floor_type (default: "none")
These fields control the kind of scrolling for each surface and can be: "none" (no scrolling enabled), "visual" (only scroll the texture), "physical" (only carry the things), "both" (both scroll and carry). For now, scroll_ceil_type only supports "none" or "visual".
  • floorid, ceilingid
ID of the floor or ceiling of this sector to use for attached surfaces. Use this id in attachfloor and attachceiling.
  • attachfloor, attachceiling
Makes the floor or ceiling of this sector move whenever sectors with floorid or ceilingid with the same number move their respective surfaces. If you want this sector's floor or ceiling to move in opposite direction, use the negative value.
  • soundsequence
Name of the soundsequence to use for the movement of this sector. It will only work if said soundsequence has an id. It can also be a number (the sound sequence id) surrounded by quotes.
  • portalfloor, portalceiling
Portal ID to use on the floor or ceiling of this sector, using the same value as the one set in Portal_Define. For two-way portals, use the negative number for the opposite portal (i.e. one way uses portal n, and the other way uses -n).
  • portal_floor_disabled, portal_ceil_disabled
If true, the portal is disabled (has no effect).
  • portal_floor_norender, portal_ceil_norended
If true, the portal is not rendered but may have effects.
  • portal_floor_nopass, portal_ceil_nopass
If true, it disables any linked portals interaction.
  • portal_floor_blocksound, portal_ceil_blocksound
If true, it blocks sounds from monsters listening for alerts.
  • portal_floor_useglobaltex, portal_ceil_useglobaltex
Reserved.
  • portal_floor_overlaytype, portal_ceil_overlaytype (default: "none")
Can be "none", "translucent" or "additive". Controls the rendering of portal overlays.
  • alphafloor, alphaceiling (default: 1.0)
Alpha of the portal overlay. 1.0 makes it fully visible, 0.0 is invisible.
  • portal_floor_attached, portal_ceil_attached
If true, and the sector has a linked portal on the floor or ceiling, the portal will move along with the floor or ceiling surface, instead of remaining at the same height as default. This is useful for easily moving platforms vertically.

Things

thing
{
  health = <floating-point>;
}

Explanation of fields

  • health
Health modifier. Works like in ZDoom: 0 means no change from EDF, positive values multiply the initial spawn health, and negative values change the absolute spawn health.