Optional compatibility starts from the feature that is active in the current game and session. Keep the base path usable when a DLC module, Jolly Co-op, or a separate multiplayer mod is absent.

Read module activation, not installation

Build 22785462 ships manifests for rwremix, moreslugcats, jollycoop, expedition, devtools, and watcher. Their presence on disk does not establish ownership, enablement, or session availability.

global::ModManager.RefreshModsLists(RainWorld) clears module flags, builds the active mod list, and then sets flags from enabled active mod IDs. Relevant fields include MMF, MSC, JollyCoop, CoopAvailable, Expedition, and Watcher. Use the specific active module flag required by a feature, then validate the current process and session objects before entering module code.

These flags report the mod manager state established by this build. They are not entitlement checks. Indexed methods such as global::RainWorld.DLCOwnershipCheckConsole and DLCOwnershipCheckSwitchPC show that ownership handling exists, but their names alone do not define a public ownership API for mods.

Declare a module in modinfo.json only when the whole package requires it. A feature that can be disabled cleanly may remain conditional instead. Mod manifests explains Rain World requirements and their limits.

Index Jolly players through game state

The bundled jollycoop manifest describes local cooperative play for up to four players. In the inspected global::Player source, IsJollyPlayer returns whether playerState.playerNumber differs from zero. JollyOption indexes options.jollyPlayerOptionsArray with that same number. Other game code uses the number to select player session records and character statistics.

Treat global::PlayerState.playerNumber as an index into the particular game-owned collection being accessed. Before indexing:

  1. Confirm that Jolly is active when the code depends on Jolly data.
  2. Confirm that the current process has the expected game and session.
  3. Check that the relevant collection exists and that playerNumber is within its bounds.
  4. Apply the feature to the Player passed to the hook rather than assuming game.Players[0] is the intended player.

Player zero and additional Jolly players have different meaning in IsJollyPlayer. Preserve that distinction instead of turning player zero into a universal rule. Store transient data per Player as described in Per-instance state, and read each player’s own packages as described in Player input.

The source inspection did not run a four-player session. It does not establish join timing, camera behavior, safe mutation points, or how every game-owned collection changes during a session.

Test local cooperative play

Use a small matrix that identifies which assumption failed:

CaseCheck
Jolly disabledBase behavior works without Jolly data
One playerPlayer zero gets only intended behavior
Two or more playersState and input remain separate by Player instance
Player transitionBounds and session checks still hold after death, respawn, or process change
Multiple camerasVisual behavior uses the intended camera and room context

Record the active module list, player numbers, process, room, and exact action. Keep frequent hooks free of per-update log lines. See Debugging and performance.

Keep Rain Meadow behind an optional boundary

At maintainer commit f5c0c7031663417676528764f7d9b425258dd488, the Rain Meadow README says the mod provides online play through lobbies, supports hot join and independent cameras, and can use Steam API lobbies or local network lobbies. It also reports remaining bugs and no release schedule.

That README does not define an integration API for other mods. A normal mod needs no Rain Meadow reference merely because both may be installed. If a feature needs direct integration, isolate it in optional code that is reached only when the provider is detected. Avoid loading or referencing provider types while it is absent. Use only an interface that Rain Meadow’s maintainers document for the exact revision being supported.

Do not infer synchronization, authority, serialization, lobby membership, or remote player identity from the README. Those subjects need separate provider documentation and network tests. Check the maintainers’ repository and supplied license before distributing copied code or assets. This article makes no legal conclusion about a particular integration.

Sources