Heh, and most people are trying to keep their server from sending clients maps that are not being played. =)
You can do this by “abusing” the sv_pure check. In pure mode, any pk3 file in use on the server must be on all clients. However, a pk3 that just holds a map and its assets won’t be “in use” unless its currently being played. Therefore, we just have to trick the pure check into thinking that the pk3 is actually being used.
The easiest way to do this is to take the map pk3s and merge them with the pk3 that holds your custom campaign script. This makes one “uber” pk3 that holds everything. Since the .campaign files are considered “in use” while the server is in campaign mode (server needs to know what campaigns are available), the whole pk3 is considered in use and therefore manditory on all clients.
Here’s a step-by-step on how to do it:
You probably know how to do all this stuff. But if I make this newbie-friendly hopefully we can just link to it when someone else asks how to set this up.
Make a new pk3 file
Pk3 files are just zip files with a different extension. You can open them by changing their file entension from .pk3 to .zip, then using an application like WinZip or WinXP’s native zip management feature.
To begin, open up your custom campaign’s pk3 file. Then, open up every custom map’s pk3 and move their entire contents to your custom campaign’s pk3. Make sure you copy everything, as a missing shader or script will cause all sorts of funkiness on your server. Once you have every map that you are using in your campaigns in that archive, zip it back up and change the extension back to .pk3.
Do not simply move the pk3 file into the new archive. You have to open it up, extract the contents, and add those into your archive.
Install the pk3 on the server (and your redirect)
Copy your newly crafted pk3 file to the etmain folder of your server (or if you are using a server mod with its own folder, install it there). If you are using the http redirect feature (which you should if you have the resources), make sure you send a copy to that location as well.
Restart the server
Using the server’s console or rcon, exec the server.cfg (/rcon exec server.cfg) to restart the server. The server will read your new pk3 file and add it to the pure list.
Connect to your server and test it out
Assuming you haven’t copied the pk3 to your local etmain folder, when you connect to the server it will start to send you your custom pk3 with all the maps.
A few notes about this:
First off, it isn’t very “polite.” If I have a copy of northpole, frostbite, and temple3 in their respective pk3s, I’ll still have to download your custom pk3 in order to play on your server. In essense, I’ll have two copies of these maps on my computer. If the six servers I play on each decide to do this, I could potentially end up having to download six copies of a particular map. Most maps are only 4 to 5 megs in size, so its not that big of a deal. But there are a few that come in at 30 to 50 megs each. Having to store ten copies of these maps to play on ten server’s custom setups means you’re eating up half a gig of drivespace. That’s pretty silly.
Its also inefficent from a server standpoint. Keep in mind that every client that connects to your server will need to download this pk3 file. If it starts to get over 30 megs or so (which isn’t totally out of the question), you’re talking about a pretty signifigant bandwidth allotment for even an occasionally busy server.
Since we’re talking about large files, its super important that you set up a redirect if you have the resources. Not only is it much faster than the q3 file transfer system, you also keep downloaders from choking server bandwidth.
Finally, if you decide to switch up your map rotation by swapping some maps for others, you’ll have to make a new pk3 file. Your clients will have to download this new copy as well. Think hard about what maps you want to include, since changing them around is a serious pain.
Savvy server admins will notice that all a pk3 file needs to be considered “in use” is a .campaign script file. That means you could edit all your custom map pk3s and add simple .campaign scripts to them. This makes it easier should you decide to move maps around, but you still run into all of the other problems listed above. The new pk3 file will have a different checksum than the original, so clients will have to download your unique version.
RK