SM File/Folder Downloader and Precacher (Client will download custom files when connecting server)
-
Video | 影片展示
None -
Image | 圖示
-
Require | 必要安裝
None -
ConVar | 指令
- cfg/sourcemod/map-decals.cfg
// (Download & Precache) Full path of the normal downloader configuration to load. // IE: configs/sm_downloader/downloads.ini sm_downloader_config "configs/sm_downloader/downloads.ini" // 0=Plugin off, 1=Plugin on. sm_downloader_enabled "1" // If 1, Enable normal downloader file. sm_downloader_normal "1" // If 1, Enable simple downloader file. sm_downloader_simple "0" // (Download Only No Precache) Full path of the simple downloader configuration to load. // IE: configs/sm_downloader/downloads_simple.ini sm_simple_downloader_config "configs/sm_downloader/downloads_simple.ini"
- cfg/sourcemod/map-decals.cfg
-
Command | 命令
None
-
Data Example
-
configs\sm_downloader\downloads.ini, this is normal downloader configuration
//Don't modify or remove the Comment Lines ( // ) //Can not download .VPK files //Files (Download Only No Precache) path/anymap.ext path/anymap2.ext //Decal Files (Download and Precache) materials/decals/anymap.vmt materials/decals/anymap.vtf //Sound Files (Download and Precache) sound/misc/Anymap.wav sound/misc/Anymap3.wav //Model Files (Download and Precache) models/parachute/parachute_green.mdl
-
configs\sm_downloader\downloads_simple.ini, this is simple downloader configuration (Download Only No Precache)
path/anymap.ext path/anymap2.ext materials/decals/anymap.vmt materials/decals/anymap.vtf sound/misc/Anymap.wav sound/misc/Anymap3.wav models/parachute/parachute_green.mdl
Note If you don't know which file should use, just enable and use configs\sm_downloader\downloads.ini
-
-
How to make the client download custom files
-
Preparation of custom files
- Prepare your custom files.
- Put them in your game folder
- If L4D1,
Left 4 Dead Dedicated Server\left4dead
- If L4D2,
Left 4 Dead 2 Dedicated Server\left4dead2
- If L4D1,
- Add the path of each files to the downloader configuration "configs\sm_downloader\downloads.ini" or "configs\sm_downloader\downloads_simple.ini".
- If L4D1, the path has to be put relative to the "left4dead" folder, and with the file extension.
- If L4D2, the path has to be put relative to the "left4dead2" folder, and with the file extension.
- Prepare your content-server for FastDL, if you don't know what "FastDL" is, please google it
-
Setup server to work with downloadable content
- ConVars in your cfg/server.cfg should be:
- If you are L4D1
sm_cvar sv_allowdownload "1" sm_cvar sv_downloadurl "http://your-content-server.com/game/left4dead/"
- If you are L4D2
sm_cvar sv_allowdownload "1" sm_cvar sv_downloadurl "http://your-content-server.com/game/left4dead2/"
- If you are L4D1
- ConVars in your cfg/server.cfg should be:
-
Uploading files to server.
- Upload all your custom files to content-server
- If you are L4D1,
your-content-server.com/game/left4dead/
- If you are L4D2,
your-content-server.com/game/left4dead2/
- If you are L4D1,
- Upload all your custom files to your game server
- If you are L4D1,
Left 4 Dead Dedicated Server\left4dead
- If you are L4D2,
Left 4 Dead 2 Dedicated Server\left4dead2
- If you are L4D1,
- Upload all your custom files to content-server
-
Start the server and test
-
-
Apply to | 適用於
L4D1 L4D2
-
Changelog | 版本日誌
-
2.0 (2023-12-6)
- Fixed not downloading custom files on the first map after server startup
-
1.9 (2023-9-27)
- Fixed custom sound not Precache
-
1.8 (2023-5-4)
- Fixed custom spray blocked and fail to download
-
1.7 (2022-11-16)
- Remake Code
- Auto-generate cfg
-
v1.4
-
SM 文件下載器 (玩家連線伺服器的時候能下載自製的檔案)
-
原理
- 將你自己的自製檔案(貼圖、音樂、模組等等)準備好
- 請自備網空,玩家連線的時候會從網空伺服器上下載自製的檔案
- 下載自訂伺服器內容
-
Data設定範例
-
configs\sm_downloader\downloads.ini, 這是正常版的檔案下載設定文件
//不要移除任何原有的符號 ( // ) //不能傳輸.vpk檔案 //Files (只下載不預緩存) path/anymap.ext path/anymap2.ext //Decal Files (下載並預緩存) materials/decals/anymap.vmt materials/decals/anymap.vtf //Sound Files (下載並預緩存) sound/misc/Anymap.wav sound/misc/Anymap3.wav //Model Files (下載並預緩存) models/parachute/parachute_green.mdl
-
configs\sm_downloader\downloads_simple.ini, 這是簡單版的檔案下載設定文件 (只下載不預緩存)
path/anymap.ext path/anymap2.ext materials/decals/anymap.vmt materials/decals/anymap.vtf sound/misc/Anymap.wav sound/misc/Anymap3.wav models/parachute/parachute_green.mdl
Note 如果你不知道這兩設定文件有捨差別, 建議你一律使用configs\sm_downloader\downloads.ini
-
-
玩家如何下載檔案?
-
準備你的自製檔案
- 準備好你的所有自製檔案(貼圖、音樂、模組等等)
- 文件名
- 確保沒有文件有空格或特殊字符,如“長破折號”(–) 等。
- 不能有中文
- 將它們放在遊戲伺服器資料夾中
- 如果你是 L4D1,
Left 4 Dead Dedicated Server\left4dead
- 如果你是 L4D2,
Left 4 Dead 2 Dedicated Server\left4dead2
- 如果你是 L4D1,
- 將每個檔案的路徑添加到檔案下載設定文件"configs\sm_downloader\downloads.ini"或"configs\sm_downloader\downloads_simple.ini"。
- 如果你是 L4D1,路徑必須相對於"left4dead" 資料夾,必須要寫上副檔名。
- 如果你是 L4D2,路徑必須相對於"left4dead2" 資料夾,必須要寫上副檔名。
- 準備好你的網空並可以支援FastDL, 不知道什麼是FastDL請自行Google
-
設置伺服器以處理可下載的內容
- 寫入以下內容到cfg/server.cfg
- 如果你是 L4D1
sm_cvar sv_allowdownload "1" sm_cvar sv_downloadurl "http://your-content-server.com/game/left4dead/"
- 如果你是 L4D2
sm_cvar sv_allowdownload "1" sm_cvar sv_downloadurl "http://your-content-server.com/game/left4dead2/"
- 如果你是 L4D1
- 寫入以下內容到cfg/server.cfg
-
上傳文件到伺服器
- 所有自製的檔案上傳到網空伺服器。
- 如果你是 L4D1,
your-content-server.com/game/left4dead/
- 如果你是 L4D2,
your-content-server.com/game/left4dead2/
- 如果你是 L4D1,
- 所有自製的檔案複製到您的遊戲伺服器資料夾上。
- 如果你是 L4D1,
Left 4 Dead Dedicated Server\left4dead
- 如果你是 L4D2,
Left 4 Dead 2 Dedicated Server\left4dead2
- 如果你是 L4D1,
- 所有自製的檔案上傳到網空伺服器。
-
啟動伺服器並測試
-