S9SourceNine Labs / CMAPI Docs 1.0
CMAPI / Migrations

Migrate from 0.4

Update a CMAPI 0.4 mod for the 0.5 API.

View source ↗
CMAPI 1.0.0Standalone runtimeWindows x64Tested with Planet Crafter 2.008

Migrate a CMAPI 0.4.x mod to 0.5.0

CMAPI 0.5.0 keeps the complete public player, event, logging, and console-command API from 0.4.x. A normal mod does not need a source-code change or a reference to the full game's assemblies.

Required manifest changes

Add a clear Description and the oldest CMAPI API version your build supports:

JSON
{
  "Name": "Example Mod",
  "Author": "Your Name",
  "Description": "Explains what the mod changes in one sentence.",
  "Version": "1.0.0",
  "MinimumApiVersion": "0.5.0",
  "UniqueID": "YourName.ExampleMod",
  "EntryDll": "ExampleMod.dll",
  "UpdateKeys": []
}

Description and MinimumApiVersion are required in 0.5.0. UpdateKeys is optional. Add GitHub:owner/repository only when that repository publishes stable releases with semantic-version tags such as 1.2.0 or v1.2.0.

CMAPI now rejects unknown manifest field names. This catches capitalization and spelling mistakes, but it also means old custom metadata must move into a mod's own configuration file.

Rebuild and test

  1. Reference the 0.5.0 CMAPI.API.dll; do not reference CMAPI.dll.
  2. Clean and rebuild the mod.
  3. Replace the old mod directory instead of mixing old and new DLLs.
  4. Run mods, modinfo <UniqueID>, and every mod-owned command.
  5. Enter a full-game world, return to the menu, and re-enter it.
  6. If the mod uses player events, test host and joining-client behavior before publishing.

Do not use a Steam ID or CMAPI ClientId as permanent player identity. ClientId remains scoped to the current multiplayer session.

Compatibility notes

  • helper.Players, helper.Events.Player, helper.ConsoleCommands, and helper.Monitor are unchanged.
  • CMAPI-owned WorldPosition and PlayerVitals remain unchanged.
  • Mods stay isolated from Unity, BepInEx, Planet Crafter, and Netcode types.
  • Mutation APIs are still intentionally absent until multiplayer authority behavior is proven against the full game.