Skip to content

Latest commit

 

History

History

sm_downloader

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Description | 內容

SM File/Folder Downloader and Precacher (Client will download custom files when connecting server)

  • Video | 影片展示
    None

  • Image | 圖示

    • client connecting server and downloading custom files (玩家連線伺服器時下載自製的檔案)
      sm_downloader_image
  • Require | 必要安裝
    None

  • Notice

  • ConVar | 指令
    • cfg/sourcemod/map-decals.cfg
       // 0=Plugin off, 1=Plugin on.
       sm_downloader_enabled "1"
      
       // If 1, Enable normal downloader file (Download & Precache)
       sm_downloader_normal_enable "1"
      
       // If 1, Enable simple downloader file. (Download Only No Precache)
       sm_downloader_simple_enable "0"
      
       // (Download & Precache) Full path of the normal downloader configuration to load. 
       // IE: configs/sm_downloader/downloads_normal.ini
       sm_downloader_normal_config "configs/sm_downloader/downloads_normal.ini"
      
       // (Download Only No Precache) Full path of the simple downloader configuration to load. 
       // IE: configs/sm_downloader/downloads_simple.ini
       sm_downloader_simple_config "configs/sm_downloader/downloads_simple.ini"
  • Command | 命令

    None

  • How to make the client download custom files
    1. Preparation of custom files

      • Prepare your custom files.
      • Put them in your server folder
        • If L4D1, Left 4 Dead Dedicated Server/left4dead
        • If L4D2, Left 4 Dead 2 Dedicated Server/left4dead2
      • Add the path of each files to the downloader configuration addons/sourcemod/configs/sm_downloader/downloads_normal.ini or addons/sourcemod/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
      • Allow HTTP(Port 80), not HTTPPS
    2. Setup server to work with downloadable content

      • Write down in your cfg/server.cfg:
        • If you are L4D1
           sm_cvar sv_allowdownload "1"
           sm_cvar sv_downloadurl "http://your-content-server.com/left4dead/"
        • If you are L4D2
           sm_cvar sv_allowdownload "1"
           sm_cvar sv_downloadurl "http://your-content-server.com/left4dead2/"	


      sm_downloader_1

    3. Uploading files to server.

      • Upload all your custom files to content-server

        • If you are L4D1, your-content-server.com/left4dead/
        • If you are L4D2, your-content-server.com/left4dead2/
          sm_downloader_2
      • Upload all your custom files to your dedicated server

        • If you are L4D1, Left 4 Dead Dedicated Server/left4dead
        • If you are L4D2, Left 4 Dead 2 Dedicated Server/left4dead2
          sm_downloader_3
    4. Start the server and test

      • Launch your game, Options-> Multiplayer -> CUSTOM SERVER CONTENT -> Allow All
        sm_downloader_0
      • Connect to server.
      • Open console to see if the game is downloading custom files
        • Note: It does not display in l4d1
          sm_downloader_4
      • Browse your game folder, check if files are there, done.
        sm_downloader_5
  • Apply to | 適用於

     L4D1
     L4D2
     Any Source Game
    
  • Changelog | 版本日誌
    • v2.2 (2024-11-21)

      • Fix downloads_normal.ini not working
    • v2.1 (2024-10-28)

      • Update cvars
      • Rename downloader configuration file
    • v2.0 (2023-12-6)

      • Fixed not downloading custom files on the first map after server startup
    • v1.9 (2023-9-27)

      • Fixed custom sound not Precache
    • v1.8 (2023-5-4)

      • Fixed custom spray blocked and fail to download
    • v1.7 (2022-11-16)

      • Remake Code
      • Auto-generate cfg
    • v1.4


中文說明

SM 文件下載器 (玩家連線伺服器的時候能下載自製的檔案)

  • 原理

    • 什麼是自訂伺服器內容?
    • 🟥 將你自己的自製檔案(貼圖、音樂、模組等等)準備好,上傳到自己準備的網空支援Fastdl,玩家連線的時候會從網空伺服器上下載自製的檔案
      • 不知道什麼是FastDL請自行Google
      • 安裝FastDL教學請自行Google
  • 指令中文介紹 (點我展開)
    • cfg/sourcemod/map-decals.cfg
       // 0=關閉插件, 1=啟動插件
       sm_downloader_enabled "1"
      
       // 為1時,啟用正常版的檔案下載設定文件 (下載並緩存)
       sm_downloader_normal_enable "1"
      
       //  為1時,啟用簡單版的檔案下載設定文件 (只下載不預緩存)
       sm_downloader_simple_enable "0"
      
       // (下載並緩存) 設定正常版下載的文件檔案路徑
       // IE: configs/sm_downloader/downloads_normal.ini
       sm_downloader_normal_config "configs/sm_downloader/downloads_normal.ini"
      
       // (只下載不預緩存) 設定簡單版下載的文件檔案路徑
       // IE: configs/sm_downloader/downloads_simple.ini
       sm_downloader_simple_config "configs/sm_downloader/downloads_simple.ini"
  • 玩家如何下載檔案?
    1. 準備你的自製檔案

      • 準備好你的所有自製檔案(貼圖、音樂、模組等等)
      • 文件名
        • 確保沒有文件有空格或特殊字符,如“長破折號”(–) 等。
        • 不能有中文
      • 將它們放在伺服器資料夾中
        • 如果你是 L4D1,Left 4 Dead Dedicated Server/left4dead
        • 如果你是 L4D2,Left 4 Dead 2 Dedicated Server/left4dead2
      • 將每個檔案的路徑添加到檔案下載設定文件addons/sourcemod/configs/sm_downloader/downloads_normal.iniaddons/sourcemod/configs/sm_downloader/downloads_simple.ini
        • 如果你是 L4D1,路徑必須相對於"left4dead" 資料夾,必須要寫上副檔名。
        • 如果你是 L4D2,路徑必須相對於"left4dead2" 資料夾,必須要寫上副檔名。
      • 準備好你的網空並可以支援FastDL, 不知道什麼是FastDL請自行Google
    2. 設置伺服器以處理可下載的內容

      • 寫入以下內容到cfg/server.cfg
        • 如果你是 L4D1
           sm_cvar sv_allowdownload "1"
           sm_cvar sv_downloadurl "http://your-content-server.com/left4dead/"
        • 如果你是 L4D2
           sm_cvar sv_allowdownload "1"
           sm_cvar sv_downloadurl "http://your-content-server.com/left4dead2/"	


      sm_downloader_1

    3. 上傳文件到伺服器

      • 所有自製的檔案上傳到網空伺服器。

        • 如果你是 L4D1,your-content-server.com/left4dead/
        • 如果你是 L4D2,your-content-server.com/left4dead2/
          sm_downloader_2
      • 所有自製的檔案複製到您的遊戲伺服器資料夾上。

        • 如果你是 L4D1,Left 4 Dead Dedicated Server/left4dead
        • 如果你是 L4D2,Left 4 Dead 2 Dedicated Server/left4dead2
          sm_downloader_3
    4. 啟動伺服器並測試

      • 打開你的遊戲,選項->多人連線->自訂伺服器內容->全部允許
        zho/sm_downloader_0
      • 連線到伺服器
      • 打開控制台查看是否下載自製的檔案 (此處圖片顯示正在下載音樂)
        • 註: L4D1 不會顯示
          sm_downloader_4
      • 再去你的遊戲資料夾查看檔案是否已經下載
        sm_downloader_5