MAPINFO/Map definition

From ZDoom Wiki
Jump to: navigation, search

A map definition begins with the keyword "map". You can also specify standard characteristics for later map definitions by using the keyword "defaultmap" or "adddefaultmap" instead:

Map commands

map <maplump> <nice name> { properties }
map <maplump> lookup <keyword> { properties }

Substitute the name of the map in the wad for <maplump>, and the map's nice name (shown in the automap) for <nice name>. If <nice name> contains spaces, it must be enclosed in quotation marks ("). <Maplump> can be *any* lump in the wad, but since most editing utilities will only recognize maps of the form MAP?? or E?M?, you should probably stick to those if you want to be able to edit the levels easily.
Alternatively, you can use the lookup keyword to look the nice name up by finding the specified token within the LANGUAGE lump. Note that <nice name> is mandatory. Omitting it will result in errors.

defaultmap { properties }

Sets the defaults that will be automatically used for all subsequent map definitions. It resets the default information so anything specified in previous defaultmap sections is lost.

adddefaultmap { properties }

Similar to defaultmap but keeps the existing defaultmap information and just adds to it.

gamedefaults { properties }

Used to define default settings that apply to an entire game, even when PWADs are loaded for it. This is mainly used by Hexen and Strife so that PWADs which define their own defaultmap don't override basic game settings. It has limited use with PWADs.

Map properties

The following properties are supported within a map, [add]defaultmap or gamedefaults definition:

Property Description
LevelNum = <levelnum> This is the map's identification number that is used to identify it to the Teleport_NewMap special. If the map's name is of the form MAPxx, then it will automatically have a LevelNum of xx unless you specify differently. (i.e. MAP23's LevelNum will be 23 unless you set it to something else.)


[Secret]Next = "<maplump>"
[Secret]Next = "<endgame type>"
[Secret]Next = endpic, "<lump>"
[Secret]Next = endsequence, "<intermission sequence>"
Defines which map or ending to proceed to after this map is completed. Next defines the map to proceed to after using the normal exit (or reaching the time/fraglimit in a deathmatch game) and SecretNext defines the map to proceed to if the player locates the secret exit. For compatibility with Vavoom MAPINFO lumps, Secret can be used as an alias for SecretNext. <maplump> should be the name of the map in the wad and not the map's nice name.

Alternatively, you can also use one of the following directives in place of the lump name to indicate that ZDoom should end the game instead of continuing to another level. Valid names are:

  • EndPic, "<lump>" Displays the specified lump as an image. This method should be used instead of the next four.
  • "EndGame1" Displays the credit picture used after Doom episode 1 and Heretic episodes 1 and 5
  • "EndGame2" Displays the picture used after Doom episode 2, or the credits screen for Doom 2
  • "EndGameW" Displays the picture used after Heretic episode 2
  • "EndGame4" Displays the picture used after Doom and Heretic episode 4
  • "EndGameC" Rolls the cast finale for Doom II
  • "EndGame3" The horizontal scroller (right to left) after Doom episode 3
  • "EndDemon" The vertical scroller (bottom to top) after Heretic episode 3
  • "EndGameS" The conditional end game script for Strife
  • "EndTitle" Returns to the title screen
  • EndSequence, "<intermission name>" Specifies the custom intermission to go to after finishing the level.

A third option is to specify an endgame block. This will end the game using completely customized ending screens and music. The format is as follows:

[secret]next = endgame
{
    [pic = "<lump>"] // displays a single image.
    [hscroll = "<left>", "<right>"] // scrolls horizontally from left to right.
    [vscroll = "<bottom>", "<top>"] // scrolls vertically from bottom to top.
    [cast] // Rolls the Doom 2 cast sequence (Same as EndGameC).
    [music = "<lump>", [loop]] // Music to play.  If none specified, uses the level's music.
       // [loop] can be 0 or 1 (default), and specifies whether the music should loop.
}

Note exactly one of pic, hscroll, vscroll, or cast should be used. Music may be used in addition to whichever option is selected.

Note also that using any of these options will not display any text. To do that, use an exittext for this level's cluster.


Slideshow = "<intermission name>" Defines a slideshow to be be played in this level if a SlideshowStarter is given to the player. Slideshows are defined the exact same way as custom intermission.


DeathSequence = "<intermission name>" Ends the level and goes to the custom intermission specified, only if the player dies within the current level.


Redirect = "<item>", "<maplump>" If the player is carrying at least one of <item>, they will be taken to the map specified by <maplump> instead of the normal Next or SecretNext map.


Cluster = <number> <number> is the cluster that this map belongs to.


Sky1 = "<texture>", [scrollspeed] <texture> is the name of the texture to use for the sky. [scrollspeed] is the rate at which the sky moves left or right (useful for clouds on windy maps). To keep the sky from moving, use a value of 0.0 or omit this parameter; to move it left, use a positive value; and to move it right, use a negative value. This is the number of steps that the sky moves each tic.


Sky2 = "<texture>", [scrollspeed] Used the same as Sky1, except it selects the properties for the background sky layer (if DoubleSky is used) or an alternate sky image that can be shown in selected sectors.


Skybox = "<texture>" This is an alias for Sky1 which does not let you define a scrollspeed parameter (0 is used instead). This is added for compatibility with Vavoom MAPINFO lumps.


DoubleSky Specifies that both sky textures are drawn, with Sky1 in front of Sky2. Sky2 will show through wherever Sky1 is color 0 (*not* cyan).


ForceNoSkyStretch If you have a sky graphic that looks fine whether it tiles or not, you can use this, and the sky will never be stretched on this level, regardless of the value of r_stretchsky.


SkyStretch Forces the sky texture to stretch when r_stretchsky is set to 1 if it's not large enough to fill the screen without tiling. This is the default setting


Fade = "<color>" <color> is the color that things fade to the further away or "darker" they are. Normally, this is black, so that things seem darker as they get further away. To simulate fog (ala Hexen), set this to a gray instead. Other colors are also supported, but may not necessarily look very good. <color> can be either the name of a color (such as red or cyan) or a color descriptor of the form "RR GG BB". For example, to set the fade to red, both of the following will work:
Fade = "red"
Fade = "ff 00 00"

To find a good fade within the game, you can use the testfade console command.


FadeTable = "<colormap>" Included for Hexen compatibility and should not be used by custom maps. Right now, it does what it's supposed to (specify a default colormap to use instead of the regular COLORMAP lump), but in the future it will probably just act like a fadeto line.


OutsideFog = "<color>" This is like Fade except that the <color> fade is only applied to sectors with a sky ceiling and not all sectors on the map.


TitlePatch = "<patch>" This is the name of a graphic to display on the intermission screen for this level (such as "CWILV00"). It should contain the name of the level. If this is omitted, the intermission screen will create a graphic using the map's nicename.


Par = <partime> Partime is the number of seconds shown as the level's par in the intermission screen.


SuckTime = <value> The time (in hours) the player is allowed to finish the map within before the player is told their time "SUCKS" on the intermission screen. For Doom, this defaults to 1 hour. Only integer values (1, 2, 3...) are accepted. If this is 0 or not present, the actual time will always be displayed.


NoIntermission This indicates that when the current level is finished, ZDoom should continue immediately to the next level without showing the intermission screen.


Music = "<musiclump>" <musiclump> is the name of the music to play while the player is playing the level.


CDTrack = <track number> If you want the level to play music off a CD, this is the track number to play.


CDId = <CD identification number> If you know the ID for the CD you want to play, you can use this in conjunction with CDTrack to play the track only when a specific CD is in the drive. However, there is no easy way to find a CD's ID unless you write a program to do it yourself, which makes this somewhat useless. If you are planning on using a CD to provide the music for your map, you are strongly encouraged to consider the other music formats supported by ZDoom.


ExitPic = "<picname>" This defines the picture which is used as the backdrop for the 'Level finished' screen. If none is specified the current game's default will be used. If the name is preceded with a '$' the lump will be used as an intermission script.


EnterPic = "<picname>" This defines the picture which is used as the backdrop for the 'entering Level' screen. If none is specified the current game's default will be used. If the name is preceded with a '$' the lump will be used as an intermission script.


InterMusic = "<musicname>" This defines the music that will be played during the 'Level finished' and 'Entering level' screens.


BorderTexture = "<picname>" This defines the image that will be used to create a border around the viewable playing area if the user has his screenblocks CVAR set to a value below 9.


Lightning Creates lightning in the map.


EvenLighting Specifies that lighting should be applied to walls evenly no matter what their orientation. Doom would use different light levels for walls that were vertical, horizontal, or diagonal (when viewed from above). This is done to give better definition to corners but can look bad in areas with many differently angled walls. You can disable that behavior by specifying this.

Note that using EvenLighting is equivalent to using "VertWallShade 0" and "HorizWallShade 0".


SmoothLighting Specifies that different light levels should be used for every wall angle.


VertWallShade = <amount> This controls how much the light level on vertical (north/south) walls differs from the sector's light level. The default is +16. The EvenLighting property sets this value to 0.


HorizWallShade = <amount> This controls how much the light level on horizontal (east/west) walls differs from the sector's light level. The default is -16. The EvenLighting property sets this value to 0.


TeamDamage = <amount> This forces team damage to the specified level when the map is played in Team Deathmatch or Cooperative mode. 1 is normal damage, lower values cause lower damage to team mates and higher values increase damage done. 0 turns off team damage completely. Note that this setting can be overridden by the host by changing the CVAR value after the map has started.


Gravity = <amount> The amount of gravity to exert on actors within the map. The default setting is 800. Lower values lessen gravity, while higher values increase it.


AirControl = <amount> This specifies the amount of control the player has when airborne. A value of 1 means the player can move as freely in the air as he can on land, and 0 means the player has no control at all and must wait until landing before he can control his movements again. The standard aircontrol value is 0.00390625, which is just enough to allow you to easily jump up onto ledges.


AirSupply = <amount> Specifies the time in seconds the player can remain under water without taking damage. Setting this to 0 allows the player to stay under water indefinitely. The default setting is 20 seconds which can be quite short if you wish to use extensive water areas within your map.


F1 = "<image>" Enable Skulltag's custom F1 help screens. If the user presses the F1 key, the specified image will be displayed over the UI.


MapBackground = "<image>" Allows to specify an image to be used as the automap background for the given map.


Translator = "<lumpname>" Sets a definition lump how Doom format maps' linedef and sector types are translated into the internal Hexen format representation.


AllowMonsterTelefrags This indicates that monsters can DoomWikiLogoIcon.pngtelefrag each other or the player on the level. Normally, monsters will never telefrag anything.


ActivateOwnDeathSpecials When a thing with a special dies and activates this special, it is considered the activator of the special. Vanilla Hexen maps use this. Otherwise, the default is that the activator is considered to be the thing's killer. This flag can be overridden on a per-actor basis with the Activation property and the THINGSPEC_TriggerActs flag.


SpecialAction = "<monstertype>", "<action special>", [arg1], [arg2], [arg3], [arg4], [arg5] Assigns an action to a monster class. This action is executed when all monsters of this type are dead. The monster needs to call A_BossDeath for this to take effect. Unlike the specialized death action properties you can define as many special actions as you want and these special actions can call any action special they like.


Map07Special This level wants the special feature of Doom II MAP07. In this case, when every mancubus on the level dies, any sectors tagged 666 will have their floors lower to the next lowest floor, and when every arachnotron on the level is dead, any sectors tagged 667 will have their floors raised by the height of their lower textures.


BaronSpecial
CyberdemonSpecial
SpiderMastermindSpecial
IronlichSpecial
MinotaurSpecial
DSparilSpecial
After every monster of the appropriate class (Baron of Hell as in Doom E1M8, Cyberdemon as in Doom E2M8 and E4M6, Spider Mastermind as in Doom E3M8 and E4M8, Iron Lich as in Heretic E1M8 and E4M8, Minotaur as in Heretic E2M8 and E5M8 or D'sparil as in Heretic's E3M8) on this level has died, a special action will be triggered.

Only one of the previous six monsterspecial properties should be used at a time. In addition, you must specify one of the SpecialAction properties to tell ZDoom what should happen when the above conditions are met. If multiple SpecialAction properties are used, all will be triggered at once.


SpecialAction_ExitLevel
SpecialAction_OpenDoor
SpecialAction_LowerFloor
SpecialAction_KillMonsters
After all of the specified monsters have died, perform a special action: exit the level to go to the next, opens any doors tagged 666 with blazing speed, lowers the floors of all sectors tagged 666 to the next lowest floor, or kill all remaining monsters in the level.


ClipMidTextures Normally middle textures are set to be clipped on a per linedef basis using the second parameter of Line_SetIdentification or the clipmidtex linedef property within a UDMF format map. This will apply clipping to middle textures globally, meaning middle textures will never be drawn into the floor or ceiling.


NoAutoSequences By default, the sound sequence played in a sector when it moves is determined by the special used to activate it. If you specify this property, whatever sound sequence has ID 0 will be used by default instead. In either case, placing a sound sequence thing (1400-1409) in a sector will cause the sound assigned to that thing to be played.


AutoSequences Forces the ZDoom behavior of choosing the sound sequence for a moving sector based on the special used to activate it. This is the default setting.


StrictMonsterActivation By default ZDoom allows monsters to use certain line special types that are only flagged to be used by the player (slow doors, lifts and teleporters.) If you set this property in MAPINFO, monsters can only activate lines that are either of the activation type 'monster crosses' or have the 'monsters can activate' flag set. This gives you better control over the actions that monsters can perform. For example, with the default setting it is not possible to create teleporters that cannot be used by monsters. For new maps it is strongly recommended to use this and control this yourself with the 'monsters can activate' flag in your maps. This is the default setting when playing Hexen or for Doom format maps.


LaxMonsterActivation Resets the activation checks to the default, allowing monsters to activate certain specials that are not flagged for them. This is the default setting.


MissileShootersActivateImpactLines Actors that fire missiles are considered the activator if the missile triggers an impact line. This is the default ZDoom behavior.


MissilesActivateImpactLines When a missile triggers an impact line, it is considered the activator rather than the actor who shot it. This is Hexen's original behavior.


FallingDamage Enables Hexen-style falling damage on the level. This uses the exact same formula as Hexen. This overrides the DMflag in the gameplay options menu, so the player cannot turn it off for this map.


OldFallingDamage
ForceFallingDamage
Enables ZDoom-style falling damage on the level. This enables ZDoom's old algorithm which differs from the one Hexen uses. The differences between this and Hexen's falling damage style are small. The minimum falling speed at which you start to take damage is lower and minimum speed above which you die for sure is somewhat higher for this style. Another difference is that Hexen's falling damage requires the player to have a certain minimum speed in order to die at all while this old style does not so it can kill you even with a minor impact in case you are already badly hurt.

The alternate name comes from Skulltag, which had it as a MAPINFO option first.


StrifeFallingDamage Enables Strife-style falling damage on the level. Unlike the two other types this is extremely punishing as you lose a lot of health when falling too far.


NoFallingDamage Disables falling damage. Unlike FallingDamage, the player can still turn falling damage on using DMFlags. This is the default setting.


MonsterFallingDamage Enables monsters to take falling damage.


FilterStarts This filters out player starts based on skill and gametype settings.


AllowRespawn If this property is present, after the player dies in a single-player game, they may respawn without resetting the map or loading the most recent autosave, just as if they had respawned in a cooperative multiplayer game.


TeamPlayOn Forces teamplay to true when this map is started. (Can be overridden by the host).


TeamPlayOff Forces teamplay to false when this map is started. (Can be overridden by the host).


NoInventoryBar This prevents the inventory bar from ever being drawn in a Doom map.


KeepFullInventory Normally the player's inventory items have their quantity reduced to 1 when exiting a map that is not part of a hub. If this property is specified within a map block, the player will not have their inventory reduced when they leave that map.


InfiniteFlightPowerup Makes the flight powerup last for the duration of the level rather than a fixed amount of time. This is the default behavior for Hexen.


NoJump Disallows jumping in a map.


AllowJump Allows jumping in a map. This is the default setting.


NoCrouch Disallows crouching in a map.


AllowCrouch Allows crouching in a map. This is the default setting.


NoFreelook Disables freelooking and vertical aiming of projectile weapons in a map.


AllowFreelook Allows freelooking and vertical aiming of projectile weapons in a map. This is the default setting.


NoInfighting Monsters in this map will never turn on each other, even if they are hit by another monster's attacks which damage them.


NormalInfighting Monsters will turn on each other as normal when they get caught in a crossfire. Monsters of the same type who are hit by each other's projectile attacks will not be damaged and will not infight. This is the default setting.


TotalInfighting All monsters will potentially infight with each other, even monsters of the same species.


CheckSwitchRange Enables checks to see whether switch textures are vertically reachable. If a switch is completely above or below the player and this option is on, the switch won't activate.


NoCheckSwitchRange Disables checks to see whether switch textures are vertically reachable. This is the default setting.


UnFreezeSinglePlayerConversations Allows the game to continue while a Strife-style conversation window is open. Normally, the game freezes in single-player mode while a conversation is ongoing. Use this to disable that behavior.


NoAllies Turns friendly actors into hostile ones by clearing the FRIENDLY flag from said actors. The once-friendly actors will now behave and attack the player as regular monsters would.


NoSoundClipping (deprecated) Does nothing. Previously, this was used to emulate the behavior of Doom 1 boss maps where sounds would never be clipped no matter how far the player was away from the source. Now it is only recognized so old maps that use it will work properly.


ResetHealth Health is reset when entering the map, enforcing a "pistol start" gameplay.


ResetInventory Inventory is reset when entering the map, enforcing a "pistol start" gameplay.


Grinding_Polyobj Corpses caught in a polyobject's way are crushed into gibs just like they would be if they were under a crusher or a closing door. This, however, does not affect dropped items, contrarily to doors and crushers which destroy them.


No_Grinding_Polyobj Clears the Grinding_Polyobj flag.


<Compat Option> = [value] You can alter some compatibility options in MAPINFO as well. Specifying a compatibility option with no parameters turns it on, but the user can override the setting later. If [value] is 0, the option is forced off for the map, and a setting of 1 forces it on, regardless of the CVAR settings. This ensures that a map that requests a certain option to be on or off can be played correctly no matter what the user's settings are.


DefaultEnvironment = val1[, val2]
DefaultEnvironment = "name"
Specifies a default sound environment (see REVERBS for more information). You can use either the numeric identifiers or the name.


NoAutosaveHint Mark the level as not requiring a separate autosave. An autosave will still be performed, depending on user settings, but it will be overwritten by the next autosave. Use this for "fake" levels that are used only for scripted sequences. Note that this flag will be ignored if the previous level also had it.


UsePlayerStartZ By default, the Z height of player starts is ignored because of compatibility code needed to make player starts work correctly in certain levels. If this property is set, the Z height is enforced. This can be used to have the player start on a 3D floor.


RandomPlayerStarts By default, when there are several player start points for the same player, a DoomWikiLogoIcon.pngvoodoo doll is spawned in each extra start. If this property is set, no voodoo dolls will be created and instead the player will start at a point chosen randomly from the many start points available.


PrecacheSounds = "<sound1>", "<sound2>", "<sound3>", ... Preloads all the sounds provided when the level is first loaded. (New from 2.7.1)


ForgetState This prevents a map's state from being remembered in a hub, so when you return to it without leaving the hub, it will be as if you had never been in there yet. (New from 2.7.1)


RememberState In case the ForgetState flag is not desired, this flag turns it off, thus allowing the state of a map to be saved like normal. (New from 2.7.1)


SpawnWithWeaponRaised Player's weapon will already be raised when entering this map. (New from 2.7.1)

Examples

map E1M1 lookup "HUSTR_E1M1"
{
   levelnum = 1
   titlepatch = "WILV00"
   next = "E1M2"
   secretnext = "E1M9"
   sky1 = "SKY1", 0
   cluster = 1
   par = 30
   sucktime = 1
   music = "$MUSIC_E1M1"
}
map E1M8 lookup "HUSTR_E1M8"
{
   levelnum = 8
   titlepatch = "WILV07"
   next = "EndGame1"
   secretnext = "E1M9"
   sky1 = "SKY1", 0
   cluster = 1
   par = 30
   nointermission
   nosoundclipping
   baronspecial
   specialaction_lowerfloor
   sucktime = 1
   music = "$MUSIC_E1M8"
}