SpongePEAKLib
Modding API for PEAK, and a Mods tab in the game's own settings menu for toggling any installed mod's features.
About this mod Author’s original text
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.
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: