PEAKNetworkingLibrary
Network library for PEAK using Steam instead of PUN.
Screenshots 3 screenshots
About this mod Author’s original text
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
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.
Install these first, or the mod will not work: