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:
{
"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
- Reference the 0.5.0
CMAPI.API.dll; do not referenceCMAPI.dll. - Clean and rebuild the mod.
- Replace the old mod directory instead of mixing old and new DLLs.
- Run
mods,modinfo <UniqueID>, and every mod-owned command. - Enter a full-game world, return to the menu, and re-enter it.
- 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, andhelper.Monitorare unchanged.- CMAPI-owned
WorldPositionandPlayerVitalsremain 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.