MAPINFO/Cluster definition
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:
Property | Description |
---|---|
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. To create multi-line messages, quote each line separately and separate them with commas.
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 enter text defined, then it will be shown instead of this cluster's exit text. To create multi-line messages, quote each line separately and separate them with commas.
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 enter or exit text of this cluster is displayed. For Doom, 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 enter or exit text is displayed.
|
Pic = "<piclump>" | This is the pic to use as a background while this cluster's enter or exit text 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 is 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.
|
AllowIntermission | Enables intermission for a hub cluster. Note that Intermission and NoIntermission flags still apply per-level. This command does nothing for non-hub clusters.
|
Intro { ... }
Outro { ... } GameOver { ... } |
Specifies an intro, outro and gameover cutscene to play at the beginning, end and upon the player's death in this cluster, respectively. The following properties can be used within the Intro, Outro and GameOver blocks:
|
Examples
This example references the E1TEXT section of the LANGUAGE lump
cluster 1 { flat = "FLOOR4_8" music = "$MUSIC_VICTOR" exittext = lookup, "E1TEXT" }
This example, from Eviternity, has the text directly written into the MAPINFO lump
cluster 5 { flat = OGRATB02 music = D_READ_M exittext = "In the farthest reaches, a Light", "awoke, and cast his luminous rays", "on all around him.", " ", "He fashioned a world unto his image,", "created beasts of his will, and declared", "himself eternal, ruler of his domain.", " ", "But his hubris cast a sickness, and", "from distant worlds called forth ", "the agent of retribution, drawn ", "through the cosmos by his pride. ", " ", "It cast down his beasts, it rejected ", "his rule, and through lands eternal ", "it brought forth his doom." }