You are viewing a potentially older version of this package. View all versions.
SpongeMods-SpongeCore-1.0.0 icon

SpongeCore

Shared plumbing for Sponge's mods. Install it only if another mod asks for it.

Date uploaded a day ago
Version 1.0.0
Download link SpongeMods-SpongeCore-1.0.0.zip
Downloads 715
Dependency string SpongeMods-SpongeCore-1.0.0

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2305 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2305

README

Sponge's Core

The shared plumbing behind Sponge's mods.

This mod does nothing on its own. It adds no features, changes no gameplay and patches nothing. Install it only because another mod lists it as a dependency — your mod manager will normally do that for you.

What it does

Several mods need the same three unglamorous things, and each is easy to get subtly wrong:

  • Their own messages between players. The game sends nothing of its own design that a mod can attach to, so a mod that needs players to agree on something has to bring its own channel — and attach it at the right moment, on both the host and every client, and reattach it after a reconnect.
  • A small file beside your save. For anything the game's own save has no room for. The rule that has to hold everywhere is that a mod's own bookkeeping failing must never disturb the game's file.
  • Doing something occasionally instead of every frame. For writes to disk and periodic sweeps.

Doing each once, in one place, means a fix reaches everything at once instead of being applied to some copies and not others.

When you want it

Only when something else asks for it.

Keys

None.

Why it is separate from the UI library

A mod that needs to send a message but draws nothing on screen should not have to ship a canvas, and one that draws but never talks to other players should not have to ship networking. They are split so each mod carries only what it uses.

Compatibility

It patches nothing and touches no game behaviour, so it cannot conflict with anything.

For mod authors

Declare the dependency so you are refused a load rather than failing later with a missing-type error:

[BepInDependency(CorePlugin.Id, CorePlugin.Version)]

The version is a contract, bumped whenever the shared surface changes in a way a dependent could notice.

License

See LICENSE in the package.