The Maplist - odamex/odamex GitHub Wiki
The maplist is a feature allows server administrators fine control over the maps played on their servers. By default, servers have an empty maplist. When the maplist is empty, level progression works the same as in singleplayer: play continues directly from one map to the next in their normal order as specified by (U)MAPINFO or Doom defaults. The one exception to this is when completing the final map in a wad or episode, the next map will be the first map in the wad or the first map in the next episode, depending on various factors.
Once at least one entry has been added to the maplist, it overrides the usual behavior. With a non-empty maplist, the levels played and their order is decided by the maplist. With one exception, exiting a map will proceed directly to the next entry in the maplist, no matter the normal level order or if a secret exit was taken.
This command simply prints the current maplist. This command is also available to clients, allowing players to see the available maps for voting.
Usage: addmap <map lump> [<wads>...] [lastmap=<map1,map2,...>]
- Required:
-
<map lump>
: The lump name of the map to be loaded for this maplist entry
-
- Optional:
-
[<wads>...]
: A space separated list of the wads to be loaded for this entry -
[lastmap=<map1,map2,...>]
: A comma separated list of map transitions that end this entry
-
Appends an entry to the end of the maplist. When progression reaches this maplist entry, the wads specified will be loaded, and then the specified map lump will be loaded. If the list of wads is does not begin with an IWAD, loading that maplist entry will not change the IWAD, which may lead to unexpected results. If the list of wads is omitted, the wad list of the previous maplist entry will be used instead, or the current set of loaded wads if the maplist is empty. After the list of wads, there is an optional lastmap=
parameter, which allows this maplist entry to contain a range of maps instead of a single map.
The lastmap=
parameter allows specifying a comma separated list of map transitions that trigger the end of this maplist entry. Map transitions are specified by a map lump name, optionally followed by an arrow ->
and a second map lump name. Note that the entire lastmap argument should contain no spaces. A transition specified with a single map is interpreted as a transition from that map to any other map, while a transition specified with two maps is a transition from the first map to the second. When this feature is used, the map given as the first argument to addmap
is the starting map of the maplist entry, but the server does not progress to the next entry after completing that map. Instead, it will continue to the next entry only after one of the lastmap transitions occurs.
This feature is most useful for coop and survival gamemodes, as it allows normal level progression, including secret exits. It is also especially useful for wads with episodes, as the behavior when completing a MAPINFO defined episode is not well defined.
The following is the commands to construct a maplist that contains an entry for each of Ultimate Doom's episodes. Each entry begins with the first map of that episode, and ends with the final map of the episode.
addmap e1m1 doom.wad lastmap=e1m8
addmap e2m1 doom.wad lastmap=e2m8
addmap e3m1 doom.wad lastmap=e3m8
addmap e4m1 doom.wad lastmap=e4m8
A more complex case is Eviternity, where the third episode can end on one of two different maps, depending on secret exits taken. An entry for that episode can be created with the command below. The episode ends on map15, unless the secret exit to map31 is taken, in which case the episode ends on map32. The first transition specified with lastmap
indicates that when exiting map15, only consider that the end of this maplist entry if the map being exited to is map16. If the exit leads to any other map, stay on this entry. Then the second transition indicates that any exit from map32 should be the end of this entry.
addmap map11 doom2.wad eviternity.wad lastmap=map15->map16,map32
See the examples below for more information.
Usage: insertmap <map lump> [<wads>...] [lastmap=<map1,map2,...>]
- Required:
-
<maplist index>
: The index at which to insert the new maplist entry -
<map lump>
: The lump name of the map to be loaded for this maplist entry
-
- Optional:
-
[<wads>...]
: A space separated list of the wads to be loaded for this entry -
[lastmap=<map1,map2,...>]
: A comma separated list of map transitions that end this entry
-
The same as addmap except that the entry is inserted into the maplist at the specified index. The index must be valid, i.e. in the range [1, current maplist length + 1]. If the index is 1 and no wads are specified, the behavior is the same as if the maplist were empty.
Usage: delmap <maplist index>
Removes the entry at the specified index from the maplist.
Clears the current maplist. When creating a server configuration file that is intended to be executed while the server is running, it is advisable to run this before any other maplist commands to be sure that you are starting from a clean slate.
Usage: setlobbymap <map lump> [<wads>...]
- Required:
-
<map lump>
: The lump name of the map to be loaded as the lobby
-
- Optional:
-
[<wads>...]
: A space separated list of the wads to be loaded when returning the lobby
-
Sets the specified map as the server's lobby. Each time a map (not a maplist entry) is completed, the server will go to the lobby map instead of the next maplist entry. If no wads are specified, it will instead reload the current wad and go to its first map (this is likely a bug and is subject to change).
See sv_emptyreset for more info.
Clears the set lobby map.
Usage: gotomap <map>
-
<map>
: A maplist index or map lump name
Immediately changes to the specified map. The map argument must either be a valid maplist index, or a map lump name that appears exactly once in the maplist.
For example, with the below maplist, gotomap map01
would produce an error and do nothing, gotomap map02
would go to Doom 2 MAP02, and gotomap 3
would go to TNT MAP01.
1. doom2.wad MAP01
2. doom2.wad MAP02
3. tnt.wad MAP01
Running this commands selects a random maplist entry and immediately goes to it.
Enabling this CVAR modifies the behavior of the maplist so that the next maplist entry is chosen at random instead of choosing the next entry in the linear order.
When this CVAR is enabled, the server will reset the current map (not the current maplist entry) when all players leave the server. If a lobby map is set, it will instead first change the current map to the lobby map.
Servers may allow players to call a vote to change the current map.
Enabling this CVAR gives clients access to callvote map <maplist index>
. A valid maplist index, as seen when printing the maplist with maplist
, must be provided. If a map vote passes, play immediately proceeds to the specified maplist index.
Enabling this CVAR gives clients access to callvote nextmap
. If a nextmap vote passes, play immediately proceeds to the next map in the progression, following whatever the current method for determining the next map is.
Enabling this CVAR gives clients access to callvote randmap
. If a randmap vote passes, the effect is the same as if the randmap
command were run on the server.
For the following examples, assume the initial state of the server is an empty maplist, with doom2.wad as the only loaded wad.
Commands:
addmap map01 doom2.wad
addmap map03 doom2.wad
insertmap 2 map02 doom2.wad
Resulting maplist:
1. doom2.wad MAP01
2. doom2.wad MAP02
3. doom2.wad MAP03
Commands:
addmap map01 doom2.wad
addmap map03
insertmap 2 map02
Resulting maplist:
1. doom2.wad MAP01
2. doom2.wad MAP02
3. doom2.wad MAP03
Commands:
addmap map01
addmap map03
insertmap 2 map02
Resulting maplist:
1. doom2.wad MAP01
2. doom2.wad MAP02
3. doom2.wad MAP03
Commands:
addmap map01
addmap map03 tnt.wad
insertmap 2 map02
Resulting maplist:
1. doom2.wad MAP01
2. tnt.wad MAP02
3. tnt.wad MAP03
Commands:
addmap map01 tnt.wad
addmap map03 doom2.wad
insertmap 2 map02
Resulting maplist:
1. tnt.wad MAP01
2. tnt.wad MAP02
3. doom2.wad MAP03