It's not too hard. Simply create a text file in the baseq3 folder inside your Quake III Arena installation folder. Give it a .cfg filename extension (instead of .txt). Then you can start Quake 3, open the console with the tilde (~) key and type:
\exec filename.cfg
where filename should of course be replaced by the name of the cfg file you created. You can also start Quake 3 and automatically have the cfg file executed by creating a text file with a .bat filename extension, put it in your Quake III Arena installation folder and put the following in it:
quake3.exe +exec filename.cfg
So now the next question. What to put in that .cfg file?
you can define variables in Quake 3 scripts and assign lists of commands to those variables. These commands can then be executed from within the script. This is done as follows:
Code: Select all
set v1 "map q3dm1; set nextmap vstr v2"
set v2 "map q3dm2; set nextmap vstr v1"
vstr v1
The "set" command assigns a value to a variable. In this case we define two variables: v1 and v2. The commands we assign to a variable can be executed using the "vstr" command. So "vstr v1" means "execute the commands stored in the v1 variable".
First a "map" command is assigned to each of these variables which will inform Quake 3 to load the specified map. Each variable also gets a "set" command assigned. This set command assigns a value to the "nextmap" variable. The nextmap variable is a special system variable whose commands are executed whenever a game in a map ends.
So basically we say that when v1 is executed, we want v2 to be executed when the game ends and vice versa. Finally we execute the commands in v1 to get the thing going.
So this is basic script used by servers all over the world to get a server to rotate through a set of maps. This can be expanded with additional things. Example:
Code: Select all
set v1 "timelimit 5; map q3dm1; set nextmap vstr v2"
set v2 "timelimit 10; map q3dm2; set nextmap vstr v1"
vstr v1
We now set a timelimit. This means that the first game (in q3dm1) will last for 5 minutes and the second game (in q3dm2) will last 10 minutes.
Finally, you said you wanted to load different graphics settings for each map. This is possible, but ONLY if the player is playing a local game. If he is connected to a separate (dedicated) server (even if it's running on his own machine), it won't work.
You can also add graphics related settings to your script, like so:
Code: Select all
set v1 "r_picmip 3; vid_restart; timelimit 5; map q3dm1; set nextmap vstr v2"
set v2 "r_picmip 0; vid_restart; timelimit 10; map q3dm2; set nextmap vstr v1"
vstr v1
This script will set the picmip level to 3 (lower quality textures) for the first map and sets it to 0 (highest quality) for the second map. I
think the vid_restart command is required to reinitialize the graphics renderer to take the new setting into account, but it could be that this is already automatically done when the new map is loaded. Just try it with and without vid_restart and see what happens.
I'm not going to point out and explain all graphics settings that exist. Google for those (or simply type \r_ in the console and hit tab, you'll get a list of all renderer related settings. That covers most of it)
If you really want to change a lot of graphics settings and your command variables get cluttered, you could also put those commands in a different cfg file and execute that, like so:
Code: Select all
set v1 "exec gfx1.cfg; timelimit 5; map q3dm1; set nextmap vstr v2"
set v2 "exec gfx2.cfg; timelimit 10; map q3dm2; set nextmap vstr v1"
vstr v1
example of gfx1.cfg:
Code: Select all
r_picmip 0
r_lightmap 0
vid_restart
Good luck with it!