PDA

View Full Version : In Game Custom Map Downloads


RosietheRiveter
02-08-2008, 10:46 AM
Fast in game downloads work for all Source games, DODS, HL2DM, CSS and TF2.
A few things to do for your DODS servers

1) Autodownloads should be from a file server seperate from your game server.
You direct your game server to download from your file server with the following cvars

In your game server.cfg file
//map downloads
sv_allowupload 0
sv_allowdownload 1
sv_downloadurl "http://www.yourwebsite.com/downloads/dods/auto"

If players are having trouble downloading bigger maps, you can also add in
net_maxfilesize 30 (or 40 or 50 just make it bigger than the file that is needed to be downloaded)

2) Make a *.res file of the map's required files if there is more than just the *.bsp
This file is tells the server what files to download to support the bsp file.
The res file can be created manually in this format, in Notepad as *txt and then saved as mapname.res The *.res file should be placed in the map folder along with the *.bsp file.
The format of the file is:
-----------------------------------------------
"resources"
{
"blabla.txt" "file"
"sounds/blabla2.txt" "file"
}
-------------------------------------------------

Note the "file" parameter, the .res file consists of key values pairs and each value parameter must be "file" for map resource files.

The res file is needed for both in game downloading and for the http external downloader.

You can use the resMaker (http://www.sunlitgames.net/downloads/utilities/resMaker.zip) to create the file automatically. This program requires that
.NetFramework 2.0 (http://www.sunlitgames.net/downloads/utilities/dotnetfx.rar) be installed first.

On your file host server , put map files in actual directory structure
..downloads/dods/auto/maps
..downloads/dods/auto/gfx
..downloads/dods/auto/models
etc

3) Source maps are notoriously large. Bzip2 compression makes the file size manageable.
They are downloaded in compressed form to the client and Source itself unzips them.
Download Bzip2 (http://www.sunlitgames.net/downloads/utilities/bzip2.exe)

( More info on main site http://www.bzip.org/downloads.html )

====================
SETUP FOR WINDOWS
====================
1. Move the download file (make sure it is for windows) into an empty folder in your default harddisk called "bzip2".

(without the quotes)
So an example of the path to the downloaded file's FOLDER would look like:
C:\bzip2

Change C to your default hardisk

2. Rename the file "bzip2.exe" (don't use the quotes)
3. Add your .BSP files that you want compressed into the bzip2 folder.

=================
BZIPPING for WINDOWS
=================
1. Go to Start menu > Run and enter "cmd" (without quotes) into the text area.
2. Click ok and a black window should open.
3. type:
cd C:\bzip2

Again, changing C to your default harddisk then press ENTER.

4. Now type:
bzip2 -v filename.bsp

Replace filename.bsp with your map name.

5. This will compress your .bsp file. To bzip another, press the up arrow and change the filename.
6. Once you have compressed all of your .bsp files, upload them to your WEBSERVER into the correct location, i.e.

"www.domain.com /game/maps"
and delete the non-zipped versions.

4) Upload the map itself , with all files in the correct directory structure, to the game server
Add the names of the new maps to the mapcycle.txt and maplist.txt files in the root dod directory.

scienci
05-15-2008, 11:51 AM
Where to put the RES file in Sourcegames ?
into "resource" ?
add it to the tutorial if possible

Edit: oh .. i didn't see that it has to be in "maps" ..
delete this post ;)

Crillie
05-16-2008, 12:06 AM
Please note that you can use "7zip" to create a bzip2, just drag the .bsp into 7zip manager and you can select bzip2.

smashingpunk
05-16-2008, 11:21 PM
"www.domain.com /game/maps"
and delete the non-zipped versions.

4) Upload the map itself , with all files in the correct directory structure, to the game server
Add the names of the new maps to the mapcycle.txt and maplist.txt files in the root dod directory.

I forgot how to setup bzipped files on the server, so can you please elaborate on how to setup the files on the web host. And post how the real files structure should look like.

Lets say my webhost is smashingpunk.com.

does it have to be smashingpunk/dod/maps/(zippedfiles go here)

or

does it have to be smashingpunk.com/maps/(zippedfiles go here)

and also do I have to put mapcycle.txt and maplist.txt on the webhost?

right now i have it set like this
sv_downloadurl "http://www.smashingpunk.com/public_html/dod"

Crillie
05-17-2008, 05:26 AM
1. and also do I have to put mapcycle.txt and maplist.txt on the webhost?

2. right now i have it set like this
sv_downloadurl "http://www.smashingpunk.com/public_html/dod"

1. No, in the dod folder on the server.
2. Correct.

Bziped files go in the maps folder on the webhost, the normal .bsp in the maps folder on the server.

smashingpunk
05-19-2008, 08:38 AM
Ok thank you I got it setup, tested it and it works, thanks.

menotyou
08-16-2008, 12:00 PM
ok but how do make a mapcycle.txt on a paid server when it was on my own box i just highlighted the .bsp in maps folder and sent it to mail recipient in xp but on a paid server how do i get a list of map folder console maby?

Rip_svk
03-19-2010, 03:13 AM
hi a have a problem with this settings, i did all step by step but i cant download map.. i need some special hosting or special domain for this DL? i have only free hosting with php,mysql,ftp ..