Neat New Feature On Steam Servers!

BonelessBoneless 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-->

Comments

  • BryBry Join Date: 2003-01-23 Member: 12609Members
    wow they finally added this despite Ut having it for like what 5 years? <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html//emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo-->

    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...
  • nopeace4unopeace4u Join Date: 2003-02-14 Member: 13553Members, Constellation
    edited February 2004
    do you disable allow downloads now with that?, cause i cant get it to work
  • DEADscottDEADscott Join Date: 2003-03-29 Member: 15022Members, Constellation
    Same here, cant get it to work. Here is my web space directory:

    <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?
  • Black_Hawk_VSBlack_Hawk_VS Join Date: 2003-03-13 Member: 14478Members, Constellation
    Make sure that your HLDS is up to date, then remember to include everything you would need on the server, including the .res file where needed and the following directory structure.

    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
  • DEADscottDEADscott Join Date: 2003-03-29 Member: 15022Members, Constellation
    I got it to work on one server, but not Graveyard#2. I think the first one may have taken just a bit to propergate the url and I think #2 is the hlds update. Thanks for your help.
  • Rotten_FleshRotten_Flesh Join Date: 2002-11-18 Member: 9203Members
    It works for me too, but the custom banner doesn't <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html//emoticons/sad.gif' border='0' style='vertical-align:middle' alt='sad.gif' /><!--endemo-->
  • registration2kregistration2k Join Date: 2004-06-01 Member: 29044Members
    Do you have to have .res files on your webserver for it to work?.
  • registration2kregistration2k Join Date: 2004-06-01 Member: 29044Members
    w*f, do i set sv_allowupload/sv_allowdownload to <!--emo&???--><img src='http://www.unknownworlds.com/forums/html//emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif' /><!--endemo-->
  • TheMunch8TheMunch8 Join Date: 2004-03-03 Member: 27080Members, Constellation
    <!--QuoteBegin-Rotten Flesh+Mar 21 2004, 10:28 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Rotten Flesh @ Mar 21 2004, 10:28 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> It works for me too, but the custom banner doesn't <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html//emoticons/sad.gif' border='0' style='vertical-align:middle' alt='sad.gif' /><!--endemo--> <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    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-->
  • KayomaniKayomani Join Date: 2003-05-17 Member: 16399Members, Constellation
    My banner is working <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo--> its a bit pants though lol =/

    I do find that this does also each alot of bandwidth.
  • BryBry Join Date: 2003-01-23 Member: 12609Members
    <!--QuoteBegin-Kayomani+Jun 15 2004, 10:23 AM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Kayomani @ Jun 15 2004, 10:23 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> My banner is working <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo--> its a bit pants though lol =/

    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-->
  • CheesyPetezaCheesyPeteza Join Date: 2002-11-24 Member: 9784Members, NS1 Playtester, Constellation
    edited June 2004
    The banner gets downloaded from our web site. I can see it in the logs. But it doesn't display. You can see the file it creates in your nsp folder called download.htm to display the image with, so therefore it must be trying to display it, otherwise banner.gif wouldn't get downloaded.

    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.
  • BryBry Join Date: 2003-01-23 Member: 12609Members
    <!--QuoteBegin-CheesyPeteza+Jun 15 2004, 04:23 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (CheesyPeteza @ Jun 15 2004, 04:23 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> The banner gets downloaded from our web site. I can see it in the logs. But it doesn't display. You can see the file it creates in your nsp folder called download.htm to display the image with, so therefore it must be trying to display it, otherwise banner.gif wouldn't get downloaded.

    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
  • EmanonEmanon Join Date: 2003-05-13 Member: 16254Members, Constellation
    edited July 2004
    Here is my problem:

    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-->
  • DepotDepot The ModFather Join Date: 2002-11-09 Member: 7956Members
    I have recently implemented this rapid download system on 66.177.128.235:27014 Depot's Nutz Combat&Customs RAPID DOWNLOAD but had a difficult time getting it right. It now works fine (including the banner) so I'll try to give some hints.

    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?
  • DepotDepot The ModFather Join Date: 2002-11-09 Member: 7956Members
    <!--QuoteBegin-kwikloader+Jul 20 2004, 08:47 AM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (kwikloader @ Jul 20 2004, 08:47 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->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).

    <!--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.
  • EmanonEmanon Join Date: 2003-05-13 Member: 16254Members, Constellation
    edited July 2004
    OK, I have the folders and files in the correct directories, my link is set up nicely, my .res files are in the maps folder but it still doesnt tell the clients to download the wad.

    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.
  • JHunzJHunz Join Date: 2002-11-15 Member: 8815Members, Constellation
    Your res file is named correctly...perhaps it is simply incorrect? It should just have a single line
    <!--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?
  • EmanonEmanon Join Date: 2003-05-13 Member: 16254Members, Constellation
    I have tried it both ways with and without the .bsp included in the .res
  • EmanonEmanon Join Date: 2003-05-13 Member: 16254Members, Constellation
    I figured out why the downloads werent working.


    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>
  • voogruvoogru Naturally Modified (ex. NS programmer) Join Date: 2002-10-31 Member: 1827Members, Retired Developer, NS1 Playtester, Contributor, Constellation
    Do not include .bsp in the res files, this will cause the map to be downloaded TWICE.

    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!).
  • odezzahodezzah Join Date: 2003-11-27 Member: 23630Members
    i search like forever for a program to make those res files.

    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>
  • Seraph1Seraph1 Join Date: 2004-08-02 Member: 30310Members, Constellation
    Just use notepad and enter the paths to other files needed by a map; try opening a .res up with notepad or something.
Sign In or Register to comment.