Map rotations & CampaignsSetting up a rotation for stopwatch, objective and campaign are all
similar, the major difference is for a campign, you first need to make
the campaign file before there is any point putting it into the
rotation. If you have any experience with making scripts for a Q3
engine game it should be pretty easy to understand a map rotation. The
basic premise is once a map is completed, it looks to run the cvar
"nextmap". The way a map rotation works is hence to simply set what
"nextmap" is. m1r1 and so on are known as a string library, kind of like a name given to a string of commands - tell the game to run the 'name' and it runs the string of commands associated with it. What basically happens here is the engine stores these lines kind of like "m1r1 command means: set g_gametype to 3, load map oasis and set 'nextmap' to run 'm1r2'". The very last line of the rotation is "vstr m1r1", which tells the engine to actually execute the line m1r1, which will startup the map rotation. Hence: g_gametype is set to 3, Oasis is loaded, and once the round of Oasis is finished, it runs "nextmap" which has been set to run m1r2, whereupon the map is restarted the the map cycle continues. Note the "set b_mapscriptdirectory etpromapscripts". This should only be used if the server is running ETPro mod, and you want to make use of the map modification scripts supplied with ETPro - allies can dynamite the back door on battery, spawn in the CP building on Fueldump and so on. If you dont want this, or are not running ETPro mod, just remove this line. For a campaign rotation, it is fairly similar up to this point. Here is an example of a roation that runs both of the official campaigns, one after the other: Notice the similarity with the stopwatch rotation - really its almost exactly the same. The important things to notice is that: g_gametype is 4, and the campaign mode version of nextmap is "nextcampaign". Secondly, also notice the first campaign being loaded is northafrica, which starts with Oasis, and in the d_initial line the map there (which is first loaded) is also Oasis. Custom Campaigns "name" and "description" is what appears in the loading screen, also "mapTC" is the co-ordinates for centering the map there. With the description, a * makes it continue on the next line, a bit like <br> html tags. See the image, though note there the name was set as "sixmapi". "shortname" is important, it is what is used to load the map - notice "campaign cmpgn_centraleurope" on the campaign rotation above. "maps" are of course the maps used in the campaign, note you cannot use more than 10 maps in a campaign. You're not done quite yet. Now you have to put the file in a folder called "scripts" (just make it anywhere) and then zip all this up into a zipfile, which you then rename the .zip extension to .pk3. This has to be done with "recurse folder names" or similar option ticked - basically if you unzip this file it should make a folder called scripts that contains the .campaign file. Since this means there is a customised .pk3 file loaded on the server, clients will have to download it. Players will need to have ET set to allow downloads, and the server must also have sv_allowdownloads set to 1 (if you are using http redirect, include the campaign file at the file host). By the way, campaign files are automatically loaded even if the campaign is not run, so players connecting to ANY server running from the same ET install will all need the campaign file... Just for another irritating annoyance, a few custom maps aren't really 100% compatible with campaigns at all, and some maps (including officials) dont work properly at the start or end of campaigns... It's not hard to quickly check though, simply load ET and select to host server, selecting campaign mode and then the map you're thinking of starting off with - you will get a message if the map isnt setup to start a campaign. Radar and Oasis are both safe maps to start off campaigns, while Goldrush and Fueldump are safe for ending campaigns on. Making the campaign .pk3 of course just creates what the campaign is, you still need to tell the server to run it, so you need a map/campaign rotation. The rotation itself is identical to the one shown previously, except this time the "campaign" command is set to "cmpgn_mycustom" (which is what we set shortname to in the example .campaign file). The other difference is there is only one campaign running, so only the one line for it. Just to repeat myself, notice our custom campaign starts with the map Radar, so the map being loaded on the campaign rotation (below) is also Radar. You can find an example 6 map campaign here if you would find it easier to just edit as you like (be sure to change the actual file name and 'shortname' to something unique to your server, else you may create havok for any players who already have campaign files with the same names - remember to then change the campaign rotation so it uses your new names!) MORE troubles? Please take note of the .PK3 Count Bug! Highboy's has a webpage script setup to make you a custom campaign nice and simple, but its not too great if it's lacking a map you wish to use, or arent too keen on the little advert... Update - Highboys is ETPro campaigns note: ETPro added server cvar "b_campaignfile": new: b_campaignFile allows admin to specify specific campaign file, to prevent server from referencing every pk3 on the server and forcing players to download every referenced pk3 on the serverFor more info try this thread. Map Names Campaign Names
Shuffling Teams
|