SpongePEAKLib
Modding API for PEAK, and a Mods tab in the game's own settings menu for toggling any installed mod's features.
By SpongeMods
| Last updated | 7 hours ago |
| Total downloads | 137 |
| Total rating | 0 |
| Categories | |
| Dependency string | SpongeMods-SpongePEAKLib-1.0.0 |
| Dependants | 6 other packages depend on this package |
This mod requires the following mods to function
BepInEx-BepInExPack_PEAK
BepInEx pack for PEAK. Preconfigured and ready to use.
Preferred version: 5.4.75301SpongeMods-SpongePEAKCore
Shared foundation for Sponge PEAK mods: logging, config, reflection caching and patch hosting. Not a standalone mod.
Preferred version: 1.0.0README
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.