Skip to content

API Compatibility

Macka edited this page Nov 29, 2025 · 6 revisions

All mods start with an ‘Undefined’ compatibility state and can declare their compatibility either through an Info.json entry or programmatically with an API call.

There are a handful of hard-coded states for some known mods, however, these can be overridden.

If a mod declares compatibility through more than one method, precedence is as follows:

  1. API declaration
  2. Info.json entry
  3. Hard-coded state
  4. Undefined

Hardcoded States

Current hard-coded compatibility states:

Info.json Method

Mods not requiring API usage should add a MultiplayerCompatibility entry to their Info.json. This entry and its value are case-sensitive. See Multiplayer Compatibility Enum for possible values and their meanings.

Example for a mod that does not work with Multiplayer:

{
    "Id":  "MyMod",
    "Version":  "1.0.0.0",
    "DisplayName":  "My Awesome Mod",
    "EntryMethod":  "MyMod.MyMod.Load",
    "MultiplayerCompatibility": "Incompatible"
}

Programmatically

Mods referencing the API should call IMultiplayerAPI.SetModCompatibility() and pass in the mod's ModEntry.Info.Id and compatibility state. See Multiplayer Compatibility Enum for possible values and their meanings.

Example for a mod required on the host and all clients:

public static class MyMod
{
    public static UnityModManager.ModEntry ModEntry;

    public static bool Load(UnityModManager.ModEntry modEntry)
    {
        ModEntry = modEntry;
        
        // Your mod initialisation here
        // ...
        if (MultiplayerAPI.IsMultiplayerLoaded)
        {
            MultiplayerAPI.Instance.SetModCompatibility(ModEntry.Info.Id, MultiplayerCompatibility.All);
        }

        return true;
    }
}
Installing
Hosting
Joining a Game
Mod Compatibility

API Overview
Getting Started
Guides
API Reference

Clone this wiki locally