Neat New Feature On Steam Servers!
Boneless
Join Date: 2002-09-03 Member: 1270Members
<div class="IPBDescription">HTTP custom content download</div> Copy paste from Alfred Reynolds' mail:<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->Here is the README about the HTTP downloading function.
Half-Life Fast HTTP Asset Downloading Instructions
V1.02 January 22, 2004
SUMMARY
-------
Half-Life now supports the download of custom content (maps, skins, sounds, and so on) from a HTTP server (ie: webserver) when connecting, instead of downloading directly from the game server itself.
HTTP downloading has three major benefits:
1) There is no impact on the game server when downloading custom content, as a completely separate HTTP content server does the transfer
2) Players will download custom content at their maximum transfer rate,resulting in *much* faster downloads
3) Players who are downloading custom content do not take up a player slot on the server while they wait
WHAT PLAYERS CONNECTING TO A SERVER WITH CUSTOM CONTENT WILL SEE
----------------------------------------------------------------
When a player connects to a server utilizing custom content, one of two
things will occur:
1) If the server is not configured for HTTP download, the game server will use the normal "trickle" download mechanism
2) If the server is configured for HTTP downloading, the player will see an enhanced download dialog, and much faster downloads. While this content is downloading, they are not connected to the game server. Once the download finishes, they are automatically reconnected to the game server, and ready to play.
CONFIGURING YOUR SERVER TO USE FAST HTTP ASSET DOWNLOADING
----------------------------------------------------------
1) Make a list of all the custom files (bsp, wav, mdl, etc) used on your server
2) Put these files on a HTTP server (ie: webserver), keeping the folder layout intact
3) OPTIONAL: To display a "banner image" to players that download content, place a 340x56 pixel image in the file <custom content directory>/gfx/banner.gif
4) Set the sv_downloadurl cvar to "http://yourserver/custom_content_directory/"
Example:
Your server uses the non-standard map "de_generic", which requires the following files:
C:\Program Files\Steam\SteamCache\your@email.address\Counter-Strike\cstrike\maps\de_generic.map
C:\Program Files\Steam\SteamCache\your@email.address\Counter-Strike\cstrike\de_generic.wad
C:\Program Files\Steam\SteamCache\your@email.address\Counter-Strike\cstrike\sound\ambience\de_generic_a.wav
C:\Program Files\Steam\SteamCache\your@emailaddress\Counter-Strike\cstrike\sound\ambience\de_generic_b.wav
C:\Program Files\Steam\SteamCache\your@email.address\Counter-Strike\cstrike\sound\ambience\de_generic_c.wav
You have web space (perhaps through your ISP) with the URL "http://www.turtlerockstudios.com/~matt" that you will use to host your custom content.
To do this, you copy the files needed for "de_generic" to your webspace,placing them in a folder called "my_cstrike" in your webspace top-level directory keeping their directory layout intact.
You now have the following files in your webspace:
http://www.turtlerockstudios.com/~matt/my_cstrike/maps/de_generic.map
http://www.turtlerockstudios.com/~matt/my_cstrike/de_generic.wad
http://www.turtlerockstudios.com/~matt/my_cstrike/sound/ambience/de_generic_a.wav
http://www.turtlerockstudios.com/~matt/my_cstrike/sound/ambience/de_generic_b.wav
http://www.turtlerockstudios.com/~matt/my_cstrike/sound/ambience/de_generic_c.wav
You now set the "sv_downloadurl" cvar on your game server to "http://www.turtlerockstudios.com/~matt/my_cstrike/". Now, players who connect to your server will automatically download the map "de_generic" and its required files from your webspace when they connect (unless they already have it, of course).
TECHNICAL DETAILS
-----------------
* The maximum length of the sv_downloadurl is 127 characters
* A username and password can be specified for the HTTP server by embedding them in the sv_downloadurl like so:
http://username:password@www.somewhere.com/
( Note - recent IE patches make disable this functionality )
* If a connecting player has an existing file of the same name, it will not be overwritten. The download file will be skipped.
* Certain game-crtical and/or dangerous files cannot be downloaded (ie: *.exe, *.vbs, etc)<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
Half-Life Fast HTTP Asset Downloading Instructions
V1.02 January 22, 2004
SUMMARY
-------
Half-Life now supports the download of custom content (maps, skins, sounds, and so on) from a HTTP server (ie: webserver) when connecting, instead of downloading directly from the game server itself.
HTTP downloading has three major benefits:
1) There is no impact on the game server when downloading custom content, as a completely separate HTTP content server does the transfer
2) Players will download custom content at their maximum transfer rate,resulting in *much* faster downloads
3) Players who are downloading custom content do not take up a player slot on the server while they wait
WHAT PLAYERS CONNECTING TO A SERVER WITH CUSTOM CONTENT WILL SEE
----------------------------------------------------------------
When a player connects to a server utilizing custom content, one of two
things will occur:
1) If the server is not configured for HTTP download, the game server will use the normal "trickle" download mechanism
2) If the server is configured for HTTP downloading, the player will see an enhanced download dialog, and much faster downloads. While this content is downloading, they are not connected to the game server. Once the download finishes, they are automatically reconnected to the game server, and ready to play.
CONFIGURING YOUR SERVER TO USE FAST HTTP ASSET DOWNLOADING
----------------------------------------------------------
1) Make a list of all the custom files (bsp, wav, mdl, etc) used on your server
2) Put these files on a HTTP server (ie: webserver), keeping the folder layout intact
3) OPTIONAL: To display a "banner image" to players that download content, place a 340x56 pixel image in the file <custom content directory>/gfx/banner.gif
4) Set the sv_downloadurl cvar to "http://yourserver/custom_content_directory/"
Example:
Your server uses the non-standard map "de_generic", which requires the following files:
C:\Program Files\Steam\SteamCache\your@email.address\Counter-Strike\cstrike\maps\de_generic.map
C:\Program Files\Steam\SteamCache\your@email.address\Counter-Strike\cstrike\de_generic.wad
C:\Program Files\Steam\SteamCache\your@email.address\Counter-Strike\cstrike\sound\ambience\de_generic_a.wav
C:\Program Files\Steam\SteamCache\your@emailaddress\Counter-Strike\cstrike\sound\ambience\de_generic_b.wav
C:\Program Files\Steam\SteamCache\your@email.address\Counter-Strike\cstrike\sound\ambience\de_generic_c.wav
You have web space (perhaps through your ISP) with the URL "http://www.turtlerockstudios.com/~matt" that you will use to host your custom content.
To do this, you copy the files needed for "de_generic" to your webspace,placing them in a folder called "my_cstrike" in your webspace top-level directory keeping their directory layout intact.
You now have the following files in your webspace:
http://www.turtlerockstudios.com/~matt/my_cstrike/maps/de_generic.map
http://www.turtlerockstudios.com/~matt/my_cstrike/de_generic.wad
http://www.turtlerockstudios.com/~matt/my_cstrike/sound/ambience/de_generic_a.wav
http://www.turtlerockstudios.com/~matt/my_cstrike/sound/ambience/de_generic_b.wav
http://www.turtlerockstudios.com/~matt/my_cstrike/sound/ambience/de_generic_c.wav
You now set the "sv_downloadurl" cvar on your game server to "http://www.turtlerockstudios.com/~matt/my_cstrike/". Now, players who connect to your server will automatically download the map "de_generic" and its required files from your webspace when they connect (unless they already have it, of course).
TECHNICAL DETAILS
-----------------
* The maximum length of the sv_downloadurl is 127 characters
* A username and password can be specified for the HTTP server by embedding them in the sv_downloadurl like so:
http://username:password@www.somewhere.com/
( Note - recent IE patches make disable this functionality )
* If a connecting player has an existing file of the same name, it will not be overwritten. The download file will be skipped.
* Certain game-crtical and/or dangerous files cannot be downloaded (ie: *.exe, *.vbs, etc)<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
Comments
great news, i wodner though if u can host the .ztmp files. As comrpessed fiels via http woudl be even faster than normal files via http...
<a href='http://www.scottandvanessa.com/graveyard' target='_blank'>http://www.scottandvanessa.com/graveyard</a>
Here is my server cvar:
sv_downlaodurl <a href='http://www.scottandvanessa.com/graveyard' target='_blank'>http://www.scottandvanessa.com/graveyard</a>
I think I may need to add my web space USERNAME and PASSWORD for ftp access. If so any idea how I do so?
In your case Scott
<a href='http://www.scottandvanessa.com/graveyard' target='_blank'>http://www.scottandvanessa.com/graveyard</a> (Wads)
<a href='http://www.scottandvanessa.com/graveyard/maps' target='_blank'>http://www.scottandvanessa.com/graveyard/maps</a> (maps/res)
<a href='http://www.scottandvanessa.com/graveyard/sprites/minimaps' target='_blank'>http://www.scottandvanessa.com/graveyard/sprites/minimaps</a> (minimaps)
ect...
The reason I spelled it out like that is because many people (including myself orginally) thought you had to have nsp/, nsp/maps, ect...
The banners do not work still.
Check HLSW and if you see it showing the variable and url, then you have it set right
The Custom Banner still seems to have some bugs in it. On the Steam Forums under Windows Support...too lazy to get the link...They say for some it works all the time, for Some it works randomly, and for some it doesn't work at all. NSarmslab got the banner working when downloading, but then i saw it only once when i downloaded from them. Some people say it is not fully implemented yet. I say make a banner and put it where they say it should be, and wait for the updates! <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html//emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /><!--endemo-->
I do find that this does also each alot of bandwidth.
I do find that this does also each alot of bandwidth. <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
did u have to do anythign specical tog et the banner working?
what size is it (kb/megabyte wise)?
I cant for the life of me get mine working and ive had redirection setup since it was announced <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html//emoticons/sad.gif' border='0' style='vertical-align:middle' alt='sad.gif' /><!--endemo-->
That would suggest there could be something wrong with the image. But I am absolutely certain I have the correct size image, GIF, 8 bit 256 colours.
I'm going to try replacing my banner with one of the content servers images to see if that gets displayed.
That would suggest there could be something wrong with the image. But I am absolutely certain I have the correct size image, GIF, 8 bit 256 colours.
I'm going to try replacing my banner with one of the content servers images to see if that gets displayed. <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
exactly the same here, it gets downloaded fine just doesnt get shown
2 new co maps I am hosting:
co_prime (works and downloads all files correctly)
co_level (only downloads the .bsp and not the .wad or the sound file)
I have the folder system set up correctly and all the files in the needed files
URL with a username and password defined.
.res files were created using unitedadmins.com resgen.exe and placed into the maps folder.
I dont know what Im doing wrong!
Help would be great!
Thanks,
Emanon
this is my co_level.res
<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->// co_level.res - created with RESGen v2.0 BETA 2.
// RESGen is made by Jeroen "ShadowLord" Bogers.
// For more info go to http://resgen.hltools.com
// or E-mail me at resgen@hltools.com.
// .res entries (18):
halflife.wad
liquids.wad
ns.wad
ns2.wad
co_level.wad
gfx/env/ayumiup.tga
gfx/env/ayumidn.tga
gfx/env/ayumilf.tga
gfx/env/ayumirt.tga
gfx/env/ayumift.tga
gfx/env/ayumibk.tga
sound/ambience/shaft.wav
sound/ambience/eng.wav
sprites/xsmoke1.spr
sound/ambience/steamjet1.wav
sprites/raindrop.spr
sound/ns_caged/drips.wav
sprites/stmbal1.spr
<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
The topic is pinned in the Steam Forums <a href='http://www.steampowered.com/forums/showthread.php?threadid=57066&highlight=svdownloadurl' target='_blank'>here</a>. I did find it sketchy though and continued reading the replies until I found one explaining it better.
1) In your root web folder, make a directory called the name of your game (nsp, tfc, cstrike etc)
2) in that diectory you need to have more directories named maps, sounds, gfx etc
3) You webserver has to be setup to read and allow file types such as .bsp and .wad (and sound files and other files the map needs)
4) sv_downloadurl needs to be set with just the name of the game folder (or whatever you named it). Example, my webserver is located at "http://www.dominantspecies.org/nsp/" and I named a folder nsp in the root. My sv_downloadurl needs to be
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->sv_downloadurl "http://www.dominantspecies.org/nsp/"<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
Your banner can only be 340x56 and goes into the gfx directory (mine works fine).
You will also find yourself creating additional sub-directories e.g. ambience in the sound directory.
I place all wad files in the nsp directory.
Although the above-mentioned topic recommends res files, I have yet to use them and <i>think</i> they're unnecessary (correct me if I'm wrong here... I have test downloaded 3 custom maps without res files and received all files fine).
Hope this all helps. Now I have a question . . When you play on a server and download maps and files via fast download on the webserver, they download so fast one cannot see which files have been downloaded. If I want to run this map on my server and it's unclear what files are included, how do I found out which files I've just downloaded?
<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
You most definitely need the res file (in your maps directory) so the client will download all necessary files. This was tested and confirmed on co_cs_italy which has 12 files: only the bsp and the wad file loaded from the http.
Could someone test this for co_level? Wondering if its a map problem?
Its almost like it doesnt read the .res files. Can someone confirm that the .res file for co_level should be called "co_level.res"???
co_level only has 2 files, .bsp and .wad
Damn this is annoying me.
Its so odd that co_prime can download everything just fine and co_level cant even though they are both setup in the correct/same places.
<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->co_level.wad<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
It doesn't have the .bsp file in there or anything, does it?
I forgot to put the .res files on the server. I was putting them on the HTTP folder system.
Thanks for the help guys.
Best guide!!!
<a href='http://the-kan.net/piiing!!!/piiing_tutorial.htm' target='_blank'>http://the-kan.net/piiing!!!/piiing_tutorial.htm</a>
The res file is designed for stuff that isnt going to be precached by the mod, for example, model, the wad file, minimaps and a few other things.
I see mappers putting the models, sounds, mapname.bsp in the res file, and its not needed. It doesnt hurt to have them in there though (cept for the mapname.bsp, its not needed!).
here it is "resgen" by unitedadmins.
<a href='http://forums.unitedadmins.com/index.php?showforum=35' target='_blank'>http://forums.unitedadmins.com/index.php?showforum=35</a>