How to change maps and set a mapcycle on a TF2 server
Set your Team Fortress 2 server's map rotation with mapcycle.txt, change maps from the console, and add custom maps on Schokr.
Updated · 2 min read
TF2 rotates through the maps listed in tf/cfg/mapcycle.txt, moving to the next one when the time limit or win limit is reached. Edit that file to set your rotation, and use changelevel to switch maps immediately.
Change map right now
In the Schokr console, type:
changelevel cp_process_final
Map names don't include .bsp. If the name is wrong, the console says the map can't be found. Run maps * to list every map the server has.
Set the default map
The map the server loads on start is set in your server's Startup settings. Change it there and restart.
Edit the map cycle
- Open
tf/cfg/in the file manager. - Edit
mapcycle.txt, or create it. If onlymapcycle_default.txtexists, copy its contents into a newmapcycle.txt. - List one map per line:
cp_badlands
cp_process_final
ctf_2fort
koth_harvest_final
pl_upward
pl_badwater
- Make sure
server.cfgpoints to it:
mapcyclefile "mapcycle.txt"
- Restart the server or change map for it to apply.
When the map changes
These settings in tf/cfg/server.cfg control when the server moves to the next map:
| Setting | What it does |
|---|---|
mp_timelimit | Minutes before changing map. 0 means no time limit |
mp_winlimit | Rounds a team must win before changing. 0 means off |
mp_maxrounds | Total rounds before changing. 0 means off |
A typical public setup is mp_timelimit 30 with the other two at 0.
Map prefixes
| Prefix | Mode |
|---|---|
cp_ | Control Point |
ctf_ | Capture the Flag |
pl_ | Payload |
plr_ | Payload Race |
koth_ | King of the Hill |
arena_ | Arena |
mvm_ | Mann vs. Machine |
Group similar modes in your map cycle so players know what to expect.
Adding custom maps
- Upload the map's
.bspfile totf/maps/with the file manager. - Add its name to
mapcycle.txt. - Test it with
changelevel mapname.
Players need to download the map. Direct downloads from the game server are slow, so for custom maps it's common to use a FastDL web host with sv_downloadurl in server.cfg, pointing at a folder that contains a maps folder with your .bsp files (optionally bzip2-compressed as .bsp.bz2).
Map voting
TF2 has built-in votes, enabled with:
sv_allow_votes 1
sv_vote_issue_nextlevel_allowed 1
sv_vote_issue_changelevel_allowed 1
For rock-the-vote and end-of-map voting, SourceMod includes the mapchooser and rockthevote plugins. They're disabled by default; move them from addons/sourcemod/plugins/disabled/ into addons/sourcemod/plugins/. See SourceMod and Metamod.
Still stuck?
If the rotation ignores your file, check mapcyclefile and the spelling of each map. The Schokr Discord can help.