MAPINFO: Difference between revisions

From ZDoom Wiki
Jump to navigation Jump to search
Content deleted Content added
No edit summary
 
(166 intermediate revisions by 28 users not shown)
Line 1: Line 1:
ZDoom supports a special MAPINFO lump that can be used to define special characteristics for the different maps in a wad. This lump contains two types of entries: map definitions and cluster definitions which are indicated by the keywords "map" and "clusterdef" respectively. Everything following one of these keywords up until the next "map" or "clusterdef" is considered to be part of the definition for a specific map or cluster.
{{doomwiki}}ZDoom supports a special '''MAPINFO''' lump that can be used to define special characteristics for the different maps in a [[WAD]]/[[PK3]], in addition to defining custom skill levels, [[intermission]]s, and game settings.


==Map definitions==
==MAPINFO and ZMAPINFO==
If you create a mod compatible with other source ports, but wish to use some ZDoom-specific MAPINFO options when played in ZDoom, it is advised to create a ZMAPINFO lump for ZDoom, and a different MAPINFO lump for other ports. The ZMAPINFO lump has to use the new format; while the MAPINFO can use the [[MAPINFO (old format)|old syntax]] or the Hexen one, if the mod is for Hexen.


{{warning|If a ZMAPINFO is present, MAPINFO will not be parsed at all. Using both only makes sense if a project is made to be compatible with multiple source ports, and some specific options must be applied in GZDoom only (since it will ignore MAPINFO in this case). In all other cases, only one lump should be used.}}
A map definition begins with the word "map". You can also specify standard characteristics for later map definitons by using the word "defaultmap" instead (and leaving <maplump> and <nice name> blank):


==Format==
===map <maplump> <nice name>===
====defaultmap====
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.


'''MAPINFO''' contains eleven types of entries: game information, episode definitions, map definitions, cluster definitions, skill definitions, intermission definitions, automap definitions, editor number definitions, spawn number definitions, conversation number definitions and damage type definitions, which are indicated by the keywords “''gameinfo''”, “''episode''”, “''map''”, “''cluster''”, “''skill''”, “''intermission''”, “''automap''”, “''doomednums''”, “''spawnnums''”, “''conversationids''” and “''damagetype''”, respectively.
After the map (or defaultmap) line, the following properties can be specified:


After the above keyword, the name or number of the defined element is specified (e.g. ''map E2M4'') followed by a block of properties enclosed in curly-braces which affect the newly-created element. Properties may take zero or more parameters and are specified in the following format:
====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.)


property = value1, value2, value3...
====next <maplump>====
<maplump> is the name of the map to move to when the normal exit (Exit_Normal special) is used. This is also the map to travel to when the timelimit or fraglimit is hit in a deathmatch game. This should be the name of the map in the wad and not the map's nice name.


Within this article, parameters that are required are enclosed in <angle brackets>, while optional parameters are enclosed in [square brackets]. A parameter that is enclosed in neither type of bracket is a literal value that must be typed exactly as shown in order to work.
====secretnext <maplump>====
<maplump> is the name of the map to move to when the secret exit is used. This should be the name of the map in the wad and not the map's nice name.
Next and secretnext also accept the special EndGame? names that indicate that ZDoom should end the game instead of continuing to another level. These are:
EndGameC = The cast finale for Doom II
EndGame1 = Displays the picture used after episode 1
EndGame2 = Displays the picture used after episode 2
EndGame3 = The bunny scroller after episode 3
EndGame4 = Displays the picture used after episode 4
Note that using these will not display any text. To do that, use an "exittext" for this level's cluster. (See clusterdef below.)


If a property is specified with no parameters, only the property name (no equals sign) is needed. In addition, all string parameters must be enclosed within quotation marks (as shown).
====cluster <number>====
<number> is the cluster that this map belongs to. See cluster definitions below for more details.


MAPINFO/ZMAPINFO lumps can include others with the {{c|include}} keyword. For example:
====doublesky====
include mapinfo/gameconfig.txt
Specifies that both sky textures are drawn, with sky1 in front of sky2. Sky2 will show through wherever sky1 is color 0 (*not* cyan).
include mapinfo/skills.txt
include mapinfo/episode1.txt


Only the most important notions are described on this page, for examples and complete listing of all commands and properties, refer to each definition's subpage.
====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; 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.


==[[MAPINFO/Cluster definition|Cluster definition]]==
====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.


A [[cluster]] definition begins with the keyword “''cluster''”. For purposes of ZDoom, clusters are used to displays messages when moving between maps and to optionally group different levels into a [[hub]].
====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.


See [[MAPINFO/Cluster definition|cluster definition]] for full list of properties and examples.
====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.


==[[MAPINFO/Episode definition|Episode definition]]==
====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 for.


An [[episode]] definition begins with the keyword “''episode''”.
====par <partime>====
Partime is the number of seconds shown as the level's par in the intermission screen.


See [[MAPINFO/Episode definition|episode definition]] for full list of properties and examples.
====music <musiclump>====
<musiclump> is the name of the song to play while the player is playing the level.


==[[MAPINFO/Map definition|Map definition]]==
====nointermission====
This indicates that when the current level is finished, ZDoom should continue immediately to the next level without showing the intermission screen.


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:
====nosoundclipping====
This indicates that sounds should not be clipped on the current level no matter how far away they are. I can't say that it's terribly useful, but it is the behavior Doom used on maps E1M8, E2M8, E3M8, and E4M8.
allowmonstertelefrags
This indicates that monsters can telefrag each other or the player on the level. Normally, monsters will never telefrag anything.


See [[MAPINFO/Map definition|map definition]] for full list of properties and examples.
====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.


==[[MAPINFO/Skill definition|Skill definition]]==
====baronspecial====
Skill definitions begin with the keyword “''skill''” followed by the name of the skill and the properties block.
After every Baron of Hell on this level has died, a special action will be triggered.


See [[MAPINFO/Skill definition|skill definition]] for full list of properties and examples.
====cyberdemonspecial====
After every Cyber Demon on this level has died, a special action will be triggered.


==[[MAPINFO/GameInfo definition|GameInfo definition]]==
====spidermastermindspecial====
GameInfo definitions begin with the keyword "''gameinfo''" followed by a list of properties. This sets some miscellaneous data about the game such as what lump to use for the title picture.
After every Spider Mastermind on this level has died, a special action will be triggered.


See [[MAPINFO/GameInfo definition|GameInfo definition]] for full list of properties and examples.
The above three specials should also be used with one of the following
three special actions:


==[[MAPINFO/Intermission definition|Intermission definition]]==
====specialaction_exitlevel====
Exits the level after all of the specified monsters have died.


Custom intermission definitions begin with the keyword "''intermission''" followed by a name, and then a list of properties. This define an intermission sequence, such as Doom II's cast call or Hexen's chess game.
====specialaction_opendoor====
After all of the specified monsters have died, opens any doors tagged 666 with blazing speed.


See [[MAPINFO/Intermission definition|Intermission definition]] for full list of properties and examples.
====specialaction_lowerfloor====
After all of the specified monsters have died, lowers the floors of all sectors tagged 666 to the next lowest floor.


==[[MAPINFO/Automap definition|Automap definition]]==
====lightning====
Creates lightning in the map.


Custom automap definitions begin with the keyword "''automap''" followed by a list of properties. These colors and settings will apply to the player's automap if the {{c|{{CVAR|A|am_customcolors}}}} [[CVARs|console variable]] is enabled.
====fadetable <colormap>====
Included for Hexen compatibility. Please don't use it. 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.


See [[MAPINFO/Automap definition|Automap definition]] for full list of properties and examples.
====evenlighting==== (I don't know if this is still valid)
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). While this gives better definition to corners, it looks dumb if you have a rotating polyobject because the polyobject's lighting will vary as it rotates. You can disable that behavior by specifying this.


==[[MAPINFO/Editor number definition|Editor number definition]]==
====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.


An [[editor number]] definition begins with the keyword “''DoomEdNums''”, followed by a list of actor names and their assigned editor numbers.
====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, 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.


See [[MAPINFO/Editor number definition|editor number definition]] for more information.
==Cluster definitions==


==[[MAPINFO/Spawn number definition|Spawn number definition]]==
A cluster definition begins with the word "clusterdef". For purposes of ZDoom, clusters are used to displays messages when moving between maps and to optionally group different levels into a hub.


A [[spawn number]] definition begins with the keyword “''SpawnNums''”, followed by a list of actor names and their assigned spawn numbers.
===clusterdef <cluster>===
<Cluster> is the cluster that this clusterdef defines. A cluster of 0 is used internally to mean "no cluster" and should be avoided.


See [[MAPINFO/Spawn number definition|spawn number definition]] for more information.
After clusterdef, the following properties are valid:


==[[MAPINFO/Conversation number definition|Conversation number definition]]==
====entertext <message>====
<message> is a message to be displayed when the player has just finished a level in another cluster and is entering a level in this cluster.


A conversation number definition begins with the keyword “''ConversationIDs''”, followed by a list of actor names and their assigned conversation numbers.
====exittext <message>====
<message> is a message to be displayed when the player has just finished a level in a different cluster from the next one. If the next level's cluster has an entertext defined, then it will be shown instead of this cluster's exittext.


See [[MAPINFO/Conversation number definition|conversation number definition]] for more information.
====music <musiclump>====
This is the music to play while either the entertext or exittext of this cluster is displayed. For Doom I, this is normally D_VICTOR, and for Doom II, this is normally D_READ_M.


==[[MAPINFO/Damage type definition|Damage type definition]]==
====flat <flatlump>====
This is the name of the flat to use as a background while this cluster's entertext or exittext is displayed.


A [[damage type]] definition begins with the keyword “''DamageType''”, followed by a list of properties to create [[custom damage types]].
====hub====
Indicates that this cluster is a hub. When leaving a hub, the game will remember the contents of the level when the player left it and restore the level to that state when the player returns to it. Moving to a different cluster will cause the game to forget the state of the levels in this hub in order to save memory. Each level a player visits in a hub uses memory (about 20k for a typical level), so it's probably a good idea not to have too many levels in a single hub. Just how many is "too many" is arbitrary. Unless you use very large levels, you could probably use 50 levels in a hub, and only about 1 meg would be required to keep track of the state of each level.


See [[MAPINFO/Damage type definition|damage type definition]] for more information.
==New features for Zdoom's mapinfo since v1.22 are:==
(Note: the '-' means that i don't know what it does, but i'#m sure some nice person can fill in the gaps ;-) ).


==Options for ZDoom's child ports==
====fallingdamage====
Enables falling damage on the level. This is set permanently meaning that you can't disable it.


The MAPINFO syntax allows properties to be specified for ZDoom-derivitave engines that support them. All others will skip over these lines.
====nofallingdamage====
Disables falling damage. This also can not be re-enabled if set in the mapinfo lump.


[[MAPINFO options for GZDoom's GL renderer]] {{OpenGLsmall}}<br>
====cdtrack====
You can now set tracks from a Cd as music for Zdoom. -


[[Category:ZDoom special lumps]]
====cdid====
-

====vertwallshade====
This controls the Vertical wall shading. -

====horizwallshade====
This controls the horizontal wall shading. -

====gravity====
Gravity is now accessible through the mapinfo lump. Set this for the amount of gravity.

====aircontrol====
-

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

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

Latest revision as of 20:34, 26 April 2024

DoomWiki.org
For more information on this article, visit the MAPINFO page on the Doom Wiki.

ZDoom supports a special MAPINFO lump that can be used to define special characteristics for the different maps in a WAD/PK3, in addition to defining custom skill levels, intermissions, and game settings.

MAPINFO and ZMAPINFO

If you create a mod compatible with other source ports, but wish to use some ZDoom-specific MAPINFO options when played in ZDoom, it is advised to create a ZMAPINFO lump for ZDoom, and a different MAPINFO lump for other ports. The ZMAPINFO lump has to use the new format; while the MAPINFO can use the old syntax or the Hexen one, if the mod is for Hexen.

Warning: If a ZMAPINFO is present, MAPINFO will not be parsed at all. Using both only makes sense if a project is made to be compatible with multiple source ports, and some specific options must be applied in GZDoom only (since it will ignore MAPINFO in this case). In all other cases, only one lump should be used.


Format

MAPINFO contains eleven types of entries: game information, episode definitions, map definitions, cluster definitions, skill definitions, intermission definitions, automap definitions, editor number definitions, spawn number definitions, conversation number definitions and damage type definitions, which are indicated by the keywords “gameinfo”, “episode”, “map”, “cluster”, “skill”, “intermission”, “automap”, “doomednums”, “spawnnums”, “conversationids” and “damagetype”, respectively.

After the above keyword, the name or number of the defined element is specified (e.g. map E2M4) followed by a block of properties enclosed in curly-braces which affect the newly-created element. Properties may take zero or more parameters and are specified in the following format:

property = value1, value2, value3...

Within this article, parameters that are required are enclosed in <angle brackets>, while optional parameters are enclosed in [square brackets]. A parameter that is enclosed in neither type of bracket is a literal value that must be typed exactly as shown in order to work.

If a property is specified with no parameters, only the property name (no equals sign) is needed. In addition, all string parameters must be enclosed within quotation marks (as shown).

MAPINFO/ZMAPINFO lumps can include others with the include keyword. For example:

include mapinfo/gameconfig.txt
include mapinfo/skills.txt
include mapinfo/episode1.txt

Only the most important notions are described on this page, for examples and complete listing of all commands and properties, refer to each definition's subpage.

Cluster definition

A cluster definition begins with the keyword “cluster”. For purposes of ZDoom, clusters are used to displays messages when moving between maps and to optionally group different levels into a hub.

See cluster definition for full list of properties and examples.

Episode definition

An episode definition begins with the keyword “episode”.

See episode definition for full list of properties and examples.

Map definition

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:

See map definition for full list of properties and examples.

Skill definition

Skill definitions begin with the keyword “skill” followed by the name of the skill and the properties block.

See skill definition for full list of properties and examples.

GameInfo definition

GameInfo definitions begin with the keyword "gameinfo" followed by a list of properties. This sets some miscellaneous data about the game such as what lump to use for the title picture.

See GameInfo definition for full list of properties and examples.

Intermission definition

Custom intermission definitions begin with the keyword "intermission" followed by a name, and then a list of properties. This define an intermission sequence, such as Doom II's cast call or Hexen's chess game.

See Intermission definition for full list of properties and examples.

Automap definition

Custom automap definitions begin with the keyword "automap" followed by a list of properties. These colors and settings will apply to the player's automap if the am_customcolors console variable is enabled.

See Automap definition for full list of properties and examples.

Editor number definition

An editor number definition begins with the keyword “DoomEdNums”, followed by a list of actor names and their assigned editor numbers.

See editor number definition for more information.

Spawn number definition

A spawn number definition begins with the keyword “SpawnNums”, followed by a list of actor names and their assigned spawn numbers.

See spawn number definition for more information.

Conversation number definition

A conversation number definition begins with the keyword “ConversationIDs”, followed by a list of actor names and their assigned conversation numbers.

See conversation number definition for more information.

Damage type definition

A damage type definition begins with the keyword “DamageType”, followed by a list of properties to create custom damage types.

See damage type definition for more information.

Options for ZDoom's child ports

The MAPINFO syntax allows properties to be specified for ZDoom-derivitave engines that support them. All others will skip over these lines.

MAPINFO options for GZDoom's GL renderer (OpenGL only: not supported by ZDoom)