viewtopic.php?p=11579#11579
Here what I propose as a standard map cycle for server.cfg (BTW there will be more map in each map cycle ) :
- Code: Select all
set pl_dm1 "g_gametype 0 ; map dm_dry ; set pl_dm vstr pl_dm2 ; set nextmap vstr playlist"
set pl_dm2 "g_gametype 0 ; map dm_tillian ; set pl_dm vstr pl_dm3 ; set nextmap vstr playlist"
set pl_dm3 "g_gametype 0 ; map dm_hangemhigh ; set pl_dm vstr pl_dm4 ; set nextmap vstr playlist"
set pl_dm4 "g_gametype 0 ; map dm_dawnfort ; set pl_dm vstr pl_dm1 ; set nextmap vstr playlist"
set pl_dm "vstr pl_dm1"
set pl_br1 "g_gametype 5 ; map br_durango ; set pl_br vstr pl_br2 ; set nextmap vstr playlist"
set pl_br2 "g_gametype 5 ; map br_cobber ; set pl_br vstr pl_br3 ; set nextmap vstr playlist"
set pl_br3 "g_gametype 5 ; map br_hangemhigh ; set pl_br vstr pl_br4 ; set nextmap vstr playlist"
set pl_br4 "g_gametype 5 ; map br_dawnfort ; set pl_br vstr pl_br1 ; set nextmap vstr playlist"
set pl_br "vstr pl_br1"
set pl_du1 "g_gametype 1 ; map du_highnoon ; set pl_du vstr pl_du2 ; set nextmap vstr playlist"
set pl_du2 "g_gametype 1 ; map du_showdown ; set pl_du vstr pl_du1 ; set nextmap vstr playlist"
set pl_du "vstr pl_du1"
set playlist "vstr pl_dm"
set g_available_playlist "pl_dm pl_br pl_du"
set nextmap vstr playlist
vstr nextmap
It looks slightly more complicated at first sight, so let me explain
This config support multiple playlist, and index of each playlist are stored (that's why "nextmap" should be "vstr playlist" everytime).
Basicly, you can switch playlist with the command "/playlist vstr pl_br" for example if you want the BR playlist. Then, if you type "/playlist vstr pl_dm", you go back to your deathmatch playlist without restarting from the begining of it.
About this line: set g_available_playlist "pl_dm pl_br pl_du", it does nothing for instance, but it could be a good idea to add a new vote, allowing players to choose from one of the server playlist. So this string contains all available playlist separated by a white space.
For example, rather than changing g_gametype through voting, choosing a playlist will do it better. For instance, if players want to play BR on a server with a Deathmatch map cycle, they have to call a vote at every end of map. Choosing the "pl_br" playlist will allow them to play BR at will.
And we could use Tequila's idea, let's say we got a cvar named "g_noplayer_command" that is executed everytime the last human player leave a server, we can go back to the default server's playlist. For example, if you want deathmatch by default, you will add this line to your server.cfg :
set g_noplayer_command "set playlist vstr pl_dm"
I really like that idea. What do you thing about that ?