FastDL:zh-cn

From Valve Developer Community
Jump to: navigation, search
English

起源引擎游戏服务器支持运行自定义内容 (例如:地图,皮肤等) 当玩家连接到服务器时,起源引擎会自动从HTTP服务器下载装载的自定义内容。这个功能被成为FastDL

使用FastDL有三个好处:

  • 在玩家下载自定义内容时对游戏服务器性能没有任何影响,因为FastDL可以架设在独立服务器上(也可以FD与游戏服务器共存)。
  • 玩家将以最大的传输速率下载自定义内容,从而获得更快的下载(这取决于您的www服务中间件设置).
  • 下载自定义内容的玩家在等待时不会占用服务器上的玩家位置.

服务器自定义内容: 用户体验

当玩家连接服务器并开始校验自定义内容时, 这些事情将会发生:

  • 如果FastDL服务器未被设置,引擎将会使用游戏服务器本身下载(此特性在:《反恐精英起源》中损坏,引擎会始终向FastDL发送下载请求).
  • 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.
Note.png Note: If any of the custom content is not present on the HTTP content server or the case of the file name does not match then the player will disconnect from the HTTP and fall back and download any remaining content via trickle download from the server.

Set Up FastDL Server

Use Web program(such as XAMPP,Apache,Nginx) set up a webpage,Then make sure the webpage is accessible,Then find a way(Use FTP or another way) to put the files player need to download to wwwroot(Website root directory Not necessarily wwwroot)

Configuring your server to use fast HTTP Downloading

1.Make a list of all the custom files (bsp, wav, mdl, etc) used on your server.

2.Put those 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.(only Goldsource Maybe other Source games also support But CS:S and CS:GO are definitely not supported)

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\[account name]\Counter-Strike\cstrike\maps\de_generic.map

C:\Program Files\Steam\SteamCache\[account name]\Counter-Strike\cstrike\de_generic.wad

C:\Program Files\Steam\SteamCache\[account name]\Counter-Strike\cstrike\sound\ambience\de_generic_a.wav

C:\Program Files\Steam\SteamCache\[account name]\Counter-Strike\cstrike\sound\ambience\de_generic_b.wav

C:\Program Files\Steam\SteamCache\[account name]\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.

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/

Players who then 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.


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:[email protected]/

  • 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, *.src script dll etc)


summary

The command you enter into the server is: sv_downloadurl "http://<yoururl>/valve/" use quotemarks on either side of the string and include the final "/". (valve = hldm, cstrike = counterstrike, csgo = counter-strike Global Offensive )


Then you create folders for gfx/env, maps, overviews, sound, sprites and models and populate them with the respective resource and in the "valve" directory exactly the way you would populate your server normally, including the WAD files.

If the client has ANY of the files already (including the WAD) it will not be overwritten, there is no way to do that, the client must delete the out of date or offending resource himself.

Note.png Note: You must make .res files for all the maps and make sure all resource names listed (and placed at the http) are spelled exactly the same. If the bsp has all lower-case letters for the entity then the .res file must be all lower-case and the file name itself must be all lower-case.