How do I set up a map cycle?

Locked
Marscaleb
Posts: 18
Joined: Wed Nov 02, 2016 2:56 am

How do I set up a map cycle?

Post by Marscaleb »

I've never really played Quake 3 over a LAN before. But I was toying with it today, and to my disappointment, I found that when a match ended, the game just played the same match again.

Is there a way to set up the game to use a map cycle, so it changes to a new map after each match?
(BTW I'm just using the vanilla Q3 from GOG.)

I'm also just a bit disappointed by the lack of options that I can see when I create a game. Are there more options that I can access though some hidden menu?
User avatar
CZghost
Posts: 1931
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: How do I set up a map cycle?

Post by CZghost »

Vanilla Q3 doesn't know universal command for map loop, but you can make a workaround using scripting:

Code: Select all

set d1 "nextmap q3dm1; vstr d2"
set d2 "nextmap q3dm2; vstr d3"
set d3 "nextmap q3dm3; vstr d4"
set d4 "nextmap q3dm4; vstr d5"
set d5 "nextmap q3dm5; vstr d6"
set d6 "nextmap q3dm6; vstr d1"
This is an example of a map rotation script. You can of course set up different count of maps, it's up to you. You can also use custom maps, of course (as long as your server allows auto-download feature ensuring players will play the map given - it will make the pk3 file auto-download by player's client from your server)...

I don't remember the script in it's exact form, so if I made a mistake, please, feel free to correct it :)
[ Linktree | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
User avatar
Eraser
Posts: 19164
Joined: Fri Dec 01, 2000 8:00 am

Re: How do I set up a map cycle?

Post by Eraser »

That script is incorrect, do it like this:

set d1 "map q3dm1 ; set nextmap vstr d2"
set d2 "map q3dm2 ; set nextmap vstr d3"
set d3 "map q3dm3 ; set nextmap vstr d1"
vstr d1
Marscaleb
Posts: 18
Joined: Wed Nov 02, 2016 2:56 am

Re: How do I set up a map cycle?

Post by Marscaleb »

Okay; where do I save this script and how do I execute it?
User avatar
CZghost
Posts: 1931
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: How do I set up a map cycle?

Post by CZghost »

Save that script to baseq3 (or your server mod folder) with all additional server configs (which most important is sv_dedicated set to 1 or 2) under name <your_server_script_name>.cfg - then if you want to launch your server up, simply type exec <your_server_script_name>.cfg (e.g. your server script is named server.cfg - you just type exec server.cfg).

You have to set up the most important cvar and that's sv_dedicated to non-zero value. The only two recognisable are 1 for LAN and 2 for Internet (and 0 for disabled of course). Also set up sv_hostname to some text string, to identify your server in server list.

Server CFG should look at least like this:

Code: Select all

seta sv_hostname "^1FFA Server ^3- Destruction Derby"
seta sv_dedicated 2
seta g_gametype 1

set d1 "map q3dm1 ; set nextmap vstr d2"
set d2 "map q3dm2 ; set nextmap vstr d3"
set d3 "map q3dm3 ; set nextmap vstr d1"
vstr d1
Feel free for additional cvars for your server, you can of course use much wider map rotation and not only stock Q3 maps, but use also custom...
[ Linktree | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
User avatar
Eraser
Posts: 19164
Joined: Fri Dec 01, 2000 8:00 am

Re: How do I set up a map cycle?

Post by Eraser »

You can also download my Quake Toolkit which I made ages ago. It contains a tool to create a server configuration config file for you and launch the game with the server config loaded.

[lvlshot]http://theenginesofcreation.com/other/qtoolkit/3.jpg[/lvlshot]

edit:
oh I see the download link is broken. Don't have access to the website's FTP right now.
Click here for the correct download link.
User avatar
CZghost
Posts: 1931
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: How do I set up a map cycle?

Post by CZghost »

MotD can actually contain a line break, can't it? How to write it down? I saw servers displaying number of useful cvars in MotD, nicely designed in asterisked border on multiple lines.
[ Linktree | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
User avatar
Eraser
Posts: 19164
Joined: Fri Dec 01, 2000 8:00 am

Re: How do I set up a map cycle?

Post by Eraser »

probably with \n

So if you enter this in your config:
"Welcome to\nmy server"
It will end up as

Welcome to
my server

Haven't actually tried this though, so I'm not 100% sure if it works like this.
Lieutenant Dan
Posts: 1148
Joined: Mon Jul 24, 2006 2:25 am

Re: How do I set up a map cycle?

Post by Lieutenant Dan »

To add to this question, is there a way to have the maps auto cycle once the match ends, instead of just sitting at the scoreboard? I'm speaking in terms of a server that has bots in it playing, once one of them reaches the score/timelimit, the server automatically advances to the next map in the rotation. Is that possible?
User avatar
CZghost
Posts: 1931
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: How do I set up a map cycle?

Post by CZghost »

@Lieutenant Dan:
Not really. It would be possible, but illogical. Bots always confirm they're ready at the end of the match, but human players always need to get prepared for next match (physically and psychically). Imagine you have to urgently visit barthroom and match ends just in time. Now you have time to do what you need without being punished in game. You return back and click you're ready to go. Or you are thirsty and need a quick breakout. If the match would move immediately to next round immediately to warm-up, there wouldn't be enough time to do quick tasks before the game begins. Also, not all players need to check ready, usually it's the last player who doesn't take the chance to pause the server flow... Easy. I think there is no need to change something like that at all.
[ Linktree | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
MegaHells
Posts: 14
Joined: Thu Jun 16, 2011 5:45 am

Re: How do I set up a map cycle?

Post by MegaHells »

Hi guys. I cannot realize why map cycle does not work in case of executing 2 configs? How to do it properly? I made 2 shortcuts with some very easy tweaks. In shortcuts i include strings +exec *.*.cfg. In baseq3 i have 2 different configs for these shortcuts. In configs i put map list like this:
set d1 "map q3dm7 ; set nextmap vstr d2"
set d2 "map ztn3dm1 ; set nextmap vstr d3"
set d3 "map q3dm17 ; set nextmap vstr d4"
set d4 "map q3dm4 ; set nextmap vstr d1"
vstr d1

lists are different. And cycle works fine always only for first config. I thought q3 engine cannot recognize similar values. Then i renamed "d" value to "k" for second map list.
set k1 "map cpm8 ; set nextmap vstr k2"
set k2 "map lun3dm1 ; set nextmap vstr k3"
set k3 "map 13black_se ; set nextmap vstr k4"
set k4 "map cpm2 ; set nextmap vstr k1"
vstr k1

But nothing happened. :?:
User avatar
Eraser
Posts: 19164
Joined: Fri Dec 01, 2000 8:00 am

Re: How do I set up a map cycle?

Post by Eraser »

I don't think you can do wildcards like that: *.*.cfg
Literally type out the filename of the cfg file
MegaHells
Posts: 14
Joined: Thu Jun 16, 2011 5:45 am

Re: How do I set up a map cycle?

Post by MegaHells »

No, no. It was just example with standart windows <emptyname> form. You know this type of name is not allowed :) I have differnt config with different names. I have ctf_a_1.cfg with shortcut and ffa_a_2.cfg with shortcut. Shortcut with ctf_a_1.cfg always stuck on first map but shortcut for ffa_a_2.cfg works fine :!: I have more configs in baseq3 but i stuck with just 2.
MegaHells
Posts: 14
Joined: Thu Jun 16, 2011 5:45 am

Re: How do I set up a map cycle?

Post by MegaHells »

I just realized that CTF part which is always not working for me. Then i did some experiments and realized even more :) Even if i have dedicated config files it still messed up somehow with the q3config.cfg which i use to play. In this case some values from ctf_a_1.cfg don't work because same values from the q3config.cfg have difference. CTF maplist starts to work when i changed "punkbuster" to 0 in each file and changed :?: some maps. I'll see how it works
User avatar
CZghost
Posts: 1931
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: How do I set up a map cycle?

Post by CZghost »

That's weird. Punkbuster should not interferre with map cycle settings, nor q3config.cfg. What I suggest you, if you are using the same machine to host occassional server for LAN parties and for lonely gameplay, and you run server from baseq3, make yourself a default config to load for singleplayer (to disable dedicated server), because the seta sv_dedicated 1 or 2 will rewrite your settings in q3config.cfg, I think.

There is a workaround: place your server config files in a mod folder (inside quake3 make a folder dedicated to your server). Since there is no change of internal functions, this mod will act exactly like vanilla q3. But will help you keep server settings separated from your regular gameplay.

If you have a machine dedicated to server hosting, then organising different server settings to different server mod folders also help. Just set up the server config in mod autoexec.cfg file and make symlinks to run these mods - it will automatically run the necessary configs and it's ready to go. Also, you may want to include custom maps specific for a specific server into these mod folders, instead of baseq3 (that applies specifically to CTF maps, but could also turn out to be useful for some ffa, tdm or tourney maps)...
[ Linktree | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
MegaHells
Posts: 14
Joined: Thu Jun 16, 2011 5:45 am

Re: How do I set up a map cycle?

Post by MegaHells »

Thanks for reply. I already realized there was no punkbuster problem. I did some experiments. I had last strings for map cycle section like this
set k10 "q3ctf2 ; set nextmap vstr k1"
vstr k1

And also i had ..+map q3ctf2.. in my shortcut for this config.
I just removed these strings from config and changed value in the shortcut ..+map q3ctf2.. to another map (it's always stuck on q3ctf2 in my case). So it's started to work somehow. Also i found even if i put this value :arrow: ..+map q3ctf4.. in shortcut it doesn't work. It gets first map from cycle in the config. But same settings works for ffa part somehow :)
Yes, in my case settings in q3config.cfg always messed up with dedicated configs in all directions :) So, that's a very good idea to make mod folders for configs and maps. I think i will try it.
User avatar
CZghost
Posts: 1931
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: How do I set up a map cycle?

Post by CZghost »

Definitely go with mod folders. It's better to keep your server settings organised, if none other...
[ Linktree | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
Locked