You are viewing a potentially older version of this package. View all versions.
ArceDev-GameModeCore-0.1.0 icon

GameModeCore

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

By ArceDev
Date uploaded 4 hours ago
Version 0.1.0
Download link ArceDev-GameModeCore-0.1.0.zip
Downloads 10
Dependency string ArceDev-GameModeCore-0.1.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

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.

CHANGELOG

Changelog

All notable changes to this project will be documented in this file.

[0.1.0] - 2026-11-23

Added

  • Game mode registration and active-mode queries.
  • Native-styled mode selection for new saves and mode display for saved games.
  • Per-save sidecar persistence with Classic compatibility for existing saves.
  • Host-authoritative multiplayer compatibility checks before player spawning.
  • Managed startup policy for modes that replace the native opening and defer player creation until the host starts gameplay.
  • A public validation query for rejecting pre-spawn lobby messages from clients that did not pass the active mode handshake.

Fixed

  • The new mode row now fits inside the native creation panel without moving the Create button outside its frame.
  • Saves whose game mode provider is missing now disable Load without hiding the menu.