Skip to content

Latest commit

 

History

History

l4d_unreservelobby

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Description | 內容

Removes lobby reservation when server is full, allow 9+ players to join server

Note
🟥Dedicated Server Only
🟥只能安裝在Dedicated Server

  • Image | 圖示
    l4d_unreservelobby_1

  • Apply to | 適用於

     L4D1
     L4D2
    
  • How does it work?
    • (Before)
      1. If server is lobby reserved and full in gamemode (8 for versus/scavenge lobby, 4 for survival/coop/realism lobby)
        • New players can't join the server even if server still has remaining slots, they can't connect via the console or server browser
      2. If server is lobby reserved and empty (No one in server)
        • Unable to connect server from lobby
    • (After)
      1. Automatically removes lobby reservation once server is full in gamemode (8 for versus/scavenge lobby, 4 for survival/coop/realism lobby)
        • New players is allowed to join the server, they can connect via the console or server browser
        • Set sv_allow_lobby_connect_only 0
      2. Automatically restores the lobby reservation when there is a vacancy
        • Send heartbeat to steam master, not guarantee match system is still working well
      3. Automatically Removes lobby reservation once all players have disconnected
        • Players can connect from a lobby again
        • Set sv_allow_lobby_connect_only back to default
    • In short, if you want multi slots server, must install
      1. This l4d_unreservelobby plugin
      2. And l4dtoolz (see Require below)
  • Require

    1. left4dhooks
    2. To open more server slots, you must install l4dtoolz
  • ConVar | 指令
    • cfg/sourcemod/l4d_unreservelobby.cfg
       // Automatically unreserve server after all playes have disconnected
       l4d_unreservelobby_empty "1"
      
       // Automatically unreserve server after server lobby reserved and full in gamemode (8 in versus/scavenge, 4 in coop/survival/realism)
       l4d_unreservelobby_full "1"
      
       // When player number reaches the following number, the server unreserves.
       // 0 = 8 in versus/scavenge, 4 in coop/survival/realis.
       // >0 = Any number greater than zero.
       l4d_unreservelobby_trigger "0"
  • Command | 命令
    • sm_unreserve - manually force removes the lobby reservation (Adm required: ADMFLAG_ROOT)
       sm_unreserve
  • Changelog | 版本日誌
    • v1.4h (2024-12-28)

      • Update cvars
    • v1.3h (2024-12-20)

    • v1.2h (2024-12-17)

      • Fixed unreserved delay error
    • v1.1h (2024-10-26)

      • Add sv_allow_lobby_connect_only 0 when unreserved
      • Update cvars
    • v1.0h (2024-10-3)

      • Remake code, convert code to latest syntax
      • Fix warnings when compiling.
      • Replace Gamedata with left4dhooks
      • Automatically unreserve server after all playes have disconnected
    • v1.1.1


中文說明

移除伺服器的大廳人數限制,簡單講就是解鎖伺服器,讓第九位以上的玩家可以加入伺服器

  • 原理
    • (裝插件之前)

      1. 當伺服器有大廳reserved cookie且模式滿人時(對抗/清道夫: 8人已滿, 戰役/生存/寫實: 4人已滿)
        • 其他玩家均不能再加入伺服器,即使有設置伺服器30個位子依然無法加入
      2. 當伺服器有大廳reserved cookie且沒人時(所有玩家已離開)
        • 無法從大廳匹配到伺服器
    • (裝插件之後)

      1. 當伺服器有大廳reserved cookie且模式滿人時(對抗/清道夫: 8人已滿, 戰役/生存/寫實: 4人已滿)
        • 自動移除動態大廳reserved cookie
        • 設置指令sv_allow_lobby_connect_only 0
        • 其他玩家可透過IP直連或是伺服器瀏覽加入遊戲
      2. 當伺服器總人數還有位子時(對抗/清道夫: 低於8人, 戰役/生存/寫實: 低於4人)
        • 恢復動態大廳reserved cookie
        • 傳送命令 heartbeat 給Steam master,不保證大廳匹配機制還能持續運作
      3. 當伺服器所有玩家離開沒人時,自動移除大廳reserved cookie,不再恢復
        • 玩家可以再次從大廳匹配到伺服器
        • 指令 sv_allow_lobby_connect_only 恢復預設
    • 總結白話講: 當你想開多人伺服器時,需要安裝

      1. 此插件
      2. l4dtoolz (查看下方"必要安裝")
  • 必要安裝

    1. left4dhooks
    2. l4dtoolz: 解鎖伺服器人數限制
  • 問題Q&A
    • 怎麼開多人房?

    • 什麼是大廳匹配?

    • 什麼是大廳reserved cookie?

      1. 中文是預定的餅乾(X),類似去飯店預設房間,已經被訂走的房間無法給其他人入住
      2. 不用想太多這名詞,直接看有無大廳reserved cookie的差別
    • 有大廳reserved cookie時

      1. 模式滿人時 (對抗/清道夫: 8人, 戰役/生存/寫實: 4人),其他玩家均不能再加入伺服器,即使伺服器設置30個位子依然無法加入
        • 無法直連
        • 無法加入好友房間
        • 無法從伺服器瀏覽加入
        • 伺服器停止吸路人匹配進來
      2. 無人時 (所有玩家已離開)
        • 無法從大廳匹配
        • 伺服器停止吸路人匹配進來
      3. 模式沒有滿人時
        • 伺服器會吸路人匹配進來
    • 無大廳reserved cookie時

      1. 模式滿人時(對抗/清道夫: 8人, 戰役/生存/寫實: 4人),其他玩家可以加入伺服器
        • 可直連
        • 可加入好友房間
        • 可從伺服器瀏覽加入
        • 伺服器停止吸路人匹配進來
      2. 無人時(所有玩家已離開)
        • 可從大廳匹配
        • 伺服器停止吸路人匹配進來
      3. 模式沒有滿人時
        • 如果第一個玩家是從大廳匹配,伺服器會吸路人匹配進來
        • 如果第一個玩家不是從大廳匹配,伺服器停止吸路人匹配進來
    • 何時會有大廳reserved cookie?

      1. 設置指令sv_allow_lobby_connect_only 1,且第一位玩家透過以下方式加入伺服器

        • 直連connect
        • openserverbrowser列表steam群組伺服器瀏覽加入
        • 大廳匹配
      2. 設置指令sv_allow_lobby_connect_only 0,且第一位玩家透過以下方式加入伺服器

        • 大廳匹配
    • 怎麼知道伺服器有大廳reserved cookie?

      1. 遊戲控制台或伺服器後台輸入status,如果看到reserved xxxxx,那就是有,反之亦然
    • sv_allow_lobby_connect_only與大廳之間的關係圖, 圖來源: Hatsune-Imagine/l4d2-plugins/l4d2_unreservelobby
      l4d_unreservelobby_2

    詳細功能依然有很多未解之謎,問就是Valve的鍋,我們吃瓜就好

  • 指令中文介紹 (點我展開)
    • cfg/sourcemod/l4d_unreservelobby.cfg
       // 當所有玩家離開伺服器且伺服器沒人時,自動移除大廳reserved cookie
       l4d_unreservelobby_empty "1"
      
       // 當伺服器有大廳reserved cookie且模式滿人時(對抗/清道夫: 8人已滿, 戰役/生存/寫實: 4人已滿),自動移除動態大廳reserved cookie
       l4d_unreservelobby_full "1"
      
       // 當伺服器內玩家人數達到以下數值, 則移除動態大廳reserved cookie.
       // 0 = 對抗/清道夫下8人, 戰役/生存/寫實下4人
       // >0 = 任何大於0的自定義人數
       l4d_unreservelobby_trigger "0"
  • 命令中文介紹 (點我展開)
    • sm_unreserve - 輸入此指令手動移除大廳reserved cookie (權限: ADMFLAG_ROOT)
       sm_unreserve