MAPINFO/Cluster definition

From ZDoom Wiki
Jump to: navigation, search

A cluster definition begins with the keyword "cluster". For purposes of ZDoom, clusters are used to displays messages when moving between maps, at the beginning or end of episodes and to optionally group different levels into a hub.

Cluster commands

cluster <value> { properties }

<value> is the cluster number that this definition defines. A cluster of 0 is used internally to mean "no cluster" and should be avoided.

Cluster properties

The following properties are supported within a cluster definition:

  • entertext = "<message>"
  • entertext = lookup, "<keyword>"
<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.
Alternatively, you can use the lookup keyword as above to instruct ZDoom to locate a string defined in the LANGUAGE lump by the specified keyword.
  • exittext = "<message>"
  • exittext = lookup, "<keyword>"
<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.
Alternatively, you can use the lookup keyword as above to instruct ZDoom to locate a string defined in the LANGUAGE lump by the specified keyword.
  • exittextislump
Uses the <message> defined by the exittext property as a lump name rather than printing its text directly. This is used within ZDoom's MAPINFO for Strife to print the text lumps present within that game rather than defining them within the MAPINFO directly.
  • 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.
  • flat = "<flatlump>"
This is the name of the flat to use as a background while this cluster's entertext or exittext is displayed.
  • pic = "<piclump>"
This is the pic to use as a background while this cluster's entertext or exittext is displayed.
  • 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.

Examples

cluster 1
{
   flat = "FLOOR4_8"
   music = "$MUSIC_VICTOR"
   exittext = lookup, "E1TEXT"
}