Map (console command): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(Used DISPLAYTITLE. Added disambiguation note. Put map_background, map_commentary and maps in a table. Added Category: Core Console Commands.)
Line 1: Line 1:
The '''map''' [[ConCommand|console command]] loads the specified map and starts a game on it. {{Warning|For multiplayer games, this command will kick everyone from your server before changing the map, or does a ''hard change'', so to speak. If you want to soft change your map from console use the {{ent|changelevel}} command.}}
{{DISPLAYTITLE:<code>map</code>}}
{{for|about=the console command|the place in a game|[[Map (level design)]]|the file format|[[MAP file format]]}}
'''<code>map</code>''' is a [[ConCommand|console command]] that loads the specified map and starts a game on it.
{{Warning|For multiplayer games, this command will kick everyone from your server before changing the map, or does a ''hard change'', so to speak. If you want to soft change your map from console use the {{ent|changelevel}} command.}}


==Usage==
==Usage==
<code>map mapname <gamemode></code> (omit the .bsp extension)
{{pre|map <mapname> [gamemode]}}


Can access both maps in mounted [[VPK]]s and in the <code>maps\</code> folder. Maps that are in a subdirectory of <code>maps\</code> need to have the folder name included in the console command.
The .[[BSP|bsp]] extension must be omitted. The game can access both maps in mounted [[VPK]]s and in the <code>maps\</code> folder. Maps that are in a subdirectory of <code>maps\</code> need to have the folder name included in the console command.


Example: <code>map de_dust2 deathmatch</code>
{{Example|<code>map de_dust2 deathmatch</code>}}


In {{csgo}}, the optional <code>gamemode</code> parameter can be <code>deathmatch, casual, competitive, armsrace, coopstrike ...</code> etc. For a list of these gamemode parameters and more details, see [[CSGO_Game_Mode_Commands]].
{{tip|{{csgo}} The optional <code>gamemode</code> parameter can be <code>deathmatch, casual, competitive, armsrace, coopstrike ...</code>, see [[CS:GO Game Modes]].<br>{{todo|A similar list exists for {{l4d2}}.}} }}


{{todo|A similar list exists for {{l4d2}}.}}
==Similar Commands==
{| class=wikitable
! ConCommand !! Description
|-
| <code>map_background</code>
| Analogous to <code>map</code> but loads a map as a background for the main menu. The player will not be able to move normally, but they can still use the console to move, attack, etc. This was introduced and used in {{hl2|4}} and its series but it does no longer work properly in newer games.
|-
| <code>map_commentary</code>
| Analogous to <code>map</code> but also enables [[commentary mode]], introduced in {{hl2lc|4}}.
|-
| <code>maps&nbsp;<substring></code>
| Lists all the maps the game has access to that contain a certain character sequence. Use <code>*</code> to list all maps.
|}


==map_background==
==See Also==
<code>map_background</code> is a command analogous to <code>map</code> that will load a map as a background. The player will not be able to move normally, but they can still use the console to move, attack, etc.
 
==map_commentary==
<code>map_commentary</code> is a command that is analogous to <code>map</code> but also enables [[commentary mode]].
 
==maps==
<code>maps</code> lists all the maps the game has access to that begin with a certain prefix. Use <code>*</code> to list all maps.
 
==See also==
*[[Console Command List]]
*[[Console Command List]]


[[Category: Console Commands]]
[[Category: Console Commands]]
[[Category: Core Console Commands]]

Revision as of 19:55, 20 May 2022

This article is about the console command. For the place in a game, see Map (level design).  For the file format, see MAP file format.

map is a console command that loads the specified map and starts a game on it.

Warning.pngWarning:For multiplayer games, this command will kick everyone from your server before changing the map, or does a hard change, so to speak. If you want to soft change your map from console use the changelevel command.

Usage

map <mapname> [gamemode]

The .bsp extension must be omitted. The game can access both maps in mounted VPKs and in the maps\ folder. Maps that are in a subdirectory of maps\ need to have the folder name included in the console command.

PlacementTip.pngExample:map de_dust2 deathmatch
Tip.pngTip:Counter-Strike: Global Offensive The optional gamemode parameter can be deathmatch, casual, competitive, armsrace, coopstrike ..., see CS:GO Game Modes.
Todo: A similar list exists for Left 4 Dead 2.

Similar Commands

ConCommand Description
map_background Analogous to map but loads a map as a background for the main menu. The player will not be able to move normally, but they can still use the console to move, attack, etc. This was introduced and used in Half-Life 2 Half-Life 2 and its series but it does no longer work properly in newer games.
map_commentary Analogous to map but also enables commentary mode, introduced in Half-Life 2: Lost Coast Half-Life 2: Lost Coast.
maps <substring> Lists all the maps the game has access to that contain a certain character sequence. Use * to list all maps.

See Also