PEAKNetworkingLibrary

版本 v1.0.9·更新於 2026-04-28

Network library for PEAK using Steam instead of PUN.

截圖 共 3 張

模組介紹 作者原文

PEAKNetworkingLibrary -> Update

--

 

A library mod for networking specifically with Steam with other platform compatibility.

   PEAKNetworkingLibrary has its own NuGet package, you can find it here.

Update Info  •  FAQ  •  Features  •  Examples  •  Install  •  Security  •  Efficiency Guidance  •  Support

 

Update

Contains information related to the current update.

Details → (click to expand)

 

  • Implemented support for tables in the messages.
  • Patched issues with RPC not being sent or received.

 

FAQ

Contains commonly asked questions.

FAQ → (click to expand)

 

  • Q: Do I need to create or initialize the networking service?

No. The library auto-instantiates and initializes the correct service (Steam or Offline) on load and auto-creates a poller. Mod authors should access the service via Net.Service and do not call Initialize() or PollReceive() themselves.

 

Features

Contains information related to features that do function.

Feature list [DOES NOT INCLUDE EVERYTHING] → (click to expand)

 

AS OF VERSION 1.0.1:

  • Automatic initialization & poller. Library auto-creates service and runs receive poller; mod authors only consume Net.Service.
  • ModId helpers. ModId.FromGuid(string).
  • Wire-efficient keys. API accepts human-friendly strings but sends small 32-bit keys on the wire (local map + fallback).
  • All old functions are still usable and can be used, though it is recommended to swap over to new system.
  • Backend

INetworkingService provides one surface mods use. Swap Steam vs Offline without code changes.

  • Lobby key sync (host -> clients)

Host sets small authoritative strings via SetLobbyData. Clients read with GetLobbyData and LobbyDataChanged event.

  • RPC discovery & invocation

Discover methods marked [CustomRPC] with RegisterNetworkObject and call RPC, RPCTarget, or RPCToHost.

  • Message serialization

Message class supports: byte, int, uint, long, ulong, float, bool, string, byte, Vector3, Quaternion, CSteamID.

  • Reliable vs Unreliable

ReliableType enum supports Reliable, Unreliable, UnreliableNoDelay semantics.

  • Security (optional)

Optional HMAC signing, per-mod signer hooks, sequence numbers, replay protection.

  • Framing & priority

Per-message flags, msg-id, sequence, fragment metadata, priority queues.

  • Offline shim for CI

Full in-process simulator to run tests without Steam.

  • Incoming validation hook

IncomingValidator lets consumers drop or accept messages before handler invocation.

  • Poll-based receive loop

PollReceive() is required for Steam adapter; Offline shim is immediate.

API References [DOES NOT INCLUDE EVERYTHING] → (click to expand)

| Key | Type | Meaning |

|-------------------------|----------|-------------------------------------------------------------------------|

| NetworkingPhotonExtensions | Method | Dictionary MapPhotonActorsToSteam |

| ModId | Method | FromGuid(string guid) |

| NetworkingServiceFactory| Method | CreateDefaultService() – auto-chosen by runtime |

| INetworkingService | Info | Service is created & initialized automatically by the library. Mods should access via Net.Service and must not call Initialize() except for test harnesses. |

| | Method | bool IsHost() |

| | Method | ulong GetLocalSteam64() |

| | Method | ulong GetLobbyMemberSteamIds() |

| | Method | Initialize() |

| | Method | Shutdown() |

| | Method | CreateLobby(maxPlayers) |

| | Method | JoinLobby(lobbySteamId64) |

| | Method | LeaveLobby() |

| | Method | RegisterLobbyDataKey(string key) |

| | Method | SetLobbyData(string key, object value) |

| | Method | T GetLobbyData(string key) |

| | Method | RegisterPlayerDataKey(string key) |

| | Method | SetPlayerData(string key, object value) |

| | Method | T GetPlayerData(ulong steam64, string key) |

| | Method | IDisposable RegisterNetworkObject(object instance, uint modId, int mask = 0) |

| | Method | void DeregisterNetworkObject(ob

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

BepInEx-BepInExPack_PEAK

檔案與校驗

檔案名稱
PEAKNetworkingLibrary-1.0.9.zip
檔案大小
212.2 KiB