SpongePEAKLib
Modding API for PEAK, and a Mods tab in the game's own settings menu for toggling any installed mod's features.
模組介紹 作者原文
SpongePEAKLib
Modding API for PEAK. This is a library — install it because something depends on it.
What it provides
| Type | Purpose |
|---|---|
| SpongePlugin | Plugin base handling logging, patch host and teardown; contains exceptions from your load path |
| GameEvents | Safe wrappers over PEAK's GlobalEvents. A throwing subscriber is contained rather than silently breaking the game's own handlers, and every subscription can actually be detached |
| NetRoleInfo | Runtime host / client / solo / offline role, so features can gate authoritative work without being switched off entirely |
| PlayerUtil | Stable player identity across reconnects, party position helpers, and the warp/revive calls |
| ModHandshake | Publishes loaded plugin GUIDs over Photon player properties, so host and clients can see what each other is running |
The handshake
Each client advertises its loaded mods in its Photon player properties. Photon replicates
those to everyone and re-sends them to late joiners, so there is no request/response protocol
to get wrong.
This lets a mod avoid sending something the host cannot act on, which otherwise leaves the
client waiting for an effect that never arrives. It is entirely optional: without it,
capability checks return false and callers fall back to local behaviour.
Mods tab in the settings menu
Adds a Mods tab to PEAK's own settings screen, next to General, Graphics, Audio and
Accessibility. It lists the on/off settings of every installed BepInEx mod, so individual
features can be switched off without hunting through config files.
- Looks native, because it uses the game's own settings rows and a clone of its own tab button.
- Changes save to each mod's own config file, so nothing is duplicated or fought over.
- Rows changed this session are marked [restart to apply]: mods apply their patches at
startup, so a toggle is saved immediately but takes effect on the next launch.
- SpongePEAKCore and SpongePEAKLib are marked [required] and cannot be switched off here,
since Lib is what draws the panel. Editing the config file by hand still works.
Requirements
BepInEx and SpongePEAKCore.
License
Free to use, free to include in modpacks, and free to build against. Writing a mod
that references this library requires no permission and no attribution: that is what it
is published for, and your mod stays entirely yours.
Attribution is only required if you decompile it and reuse the implementation itself.
Please do not reupload it elsewhere.
Full terms in LICENSE.
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。
下面這些內容需要先安裝,否則該模組不會生效: