Map translator

From ECWolf Wiki
Revision as of 21:17, 3 February 2013 by Blzut3 (talk | contribs) (New include feature.)

The map translator specifies how the engine should handle translating binary format maps into internal structures (which map closely to UWMF). A map translator is sometimes referred to as xlat, but besides being a similar concept has nothing to do with the map translators in ZDoom. There is no particular lump name that the translator must conform to, but it must be referenced in MAPINFO.

A translator contains 3 sections which correspond to the three plans in a binary map: tiles, things, and flats. Each section or block is enclosed in braces and the specific contents varies. Each plane consists of series of 2-byte values for each "tile," so when an oldnum is asked for it should be assumed to be some value 0-65535 (although using 0 should probably be avoided in most cases).

Other translation files can be included using include lumpname (development version 1.2+ only). If the lumpname is "$base" then the default translator will be loaded.

Tiles

  • modzone oldnum [fillzone] ambush;
Checks for a thing in the tile. If one exists then the thing has the AMBUSH flag set. If the fillzone keyword is used, one adjacent zone code is then filled into the spot.
  • modzone oldnum [fillzone] changetrigger action { properties }
Searches all adjacent tiles for triggers with the specified action. For each one found the trigger is disabled on the side facing the modzone and a new trigger for that side is added based on the properties specified.
  • tile oldnum { properties }
Assigns a wall tile to the oldnum.
  • trigger oldnum { properties }
Assigns a trigger to the tile.
  • zone oldnum {}
Assigns a sound zone to the oldnum.

Note that there are no limits to how you allocate your 65536 oldnums. Doors are simply the combination of a tile and trigger with the same number.

Things

  • trigger oldnum { properties }
Assign a trigger to the tile it is contained in. This will be in addition to any triggers already on the tile. Typically a pushwall would use this.
  • { oldnum, ednum, angles, flags, minskill }
Maps the oldnum to the ednum that is assigned in DECORATE. The angles parameter indicates how many sequential indexes should be assigned to rotations. For example if angles is 4 and oldnum is 100 then 100-103 would be assigned to this mapping with each being at 90 degrees. Minskill indicates the minimum skill level required for this thing to spawn (starting at 0). Flags are:
  • HOLOWALL - When placed into a wall, this thing will make the wall non-solid. When combined with the PATHING flag then the wall immediate in front will be non-solid as well.
  • PATHING - This monster follows a patrol route instead of sitting in the Spawn state.

Flats

  • ceiling { flats, ... }
  • floor { flats, ... }
Assigns floor/ceiling textures to sequential codes starting with 0. Up to 256 textures can be defined in each.