ArceDev-GameModeCore icon

GameModeCore

Developer API for registering, selecting, persisting, and synchronizing custom How to Fish game modes.

By ArceDev
Last updated 3 hours ago
Total downloads 9
Total rating 0 
Categories Mods
Dependency string ArceDev-GameModeCore-0.1.0
Dependants 2 other packages depend on this package

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

Game Mode Core

A developer API for adding game modes to How to Fish without duplicating menu, save, and multiplayer plumbing.

Game Mode Core provides a native-styled selector when creating a save, stores the selected mode beside that save, and validates that multiplayer clients have a compatible provider installed. Existing saves without mode metadata remain Classic.

For mod developers

Reference ArceDev.GameModeCore.dll, declare ArceDev.GameModeCore as a hard BepInEx dependency, and register during your plugin's Awake:

GameModeApi.Register(new GameModeDefinition(
    "YourTeam.YourMod.ModeId",
    "Your Mode",
    networkVersion: 1));

Gate the mode's own patches with GameModeApi.IsActive(...). Increment networkVersion only when two releases can no longer play together.

Modes which own their complete post-connection flow can opt out of the native opening and automatic player spawn:

GameModeApi.Register(new GameModeDefinition(
    "YourTeam.YourMod.ModeId",
    "Your Mode",
    networkVersion: 1,
    startupPolicy: GameModeStartupPolicy.Managed));

GameModeApi.ManagedStartupReady += ShowConnectionBasedLobby;
// Server-side lobby messages can confirm that their sender passed the mode handshake.
bool accepted = GameModeApi.IsClientValidated(connection.ClientId);
// The host calls this only after the mode is ready to create players.
GameModeApi.StartManagedGameplay();

Managed modes retain the native save, transport, Steam lobby, and compatibility handshake. They are responsible for their connection-based pre-spawn lobby and for deciding when gameplay starts. Code that needs a Player, such as initial loadout delivery, must wait until the player has spawned.

Installation

Game Mode Core is a library and adds nothing by itself. Install the game mode you want with a Thunderstore-compatible mod manager such as r2modman; it installs Game Mode Core automatically. For a manual install, place ArceDev.GameModeCore.dll in BepInEx/plugins together with BepInEx 5.

Multiplayer

Every player must install Game Mode Core and the same mode providers as the host. Players without a compatible provider are rejected before they spawn. Classic saves continue to work for players who have Game Mode Core installed.

Support

Join DevArce Mods on Discord for questions, feedback, and bug reports.

AI Disclosure

This mod was developed with assistance from generative AI for programming, documentation, and promotional artwork. The author reviewed, tested, and approved the final implementation and assets.