Migrate a CMAPI 0.7.x mod to 0.8.0
CMAPI 0.8.0 keeps the 0.7.x player, event, item, Terra Token, notification, and existing console-command contracts. A 0.7.x mod does not need code changes just because the catalog exists, so keep its old MinimumApiVersion unless it uses the new metadata API.
Raise the manifest requirement when using ConsoleCommandOptions:
"MinimumApiVersion": "0.8.0"The existing overload still works and places a command in Mods:
helper.ConsoleCommands.Add(
"weather_report",
"Shows the current weather.",
"weather_report",
OnWeatherReport
);To add a category and aliases:
helper.ConsoleCommands.Add(
"weather_report",
"Shows the current weather.",
new ConsoleCommandOptions(
"weather_report [planet]",
"Weather",
"weather"
),
OnWeatherReport
);Aliases are not separate commands. They invoke the canonical handler, appear in help <command>, participate in collision checks, and are removed with their owner. IConsoleCommandContext.CommandName contains the canonical registered name even when the player entered an alias.
For console-facing instructions, replace doctor with health_check. The old name was removed before public release instead of being retained as a permanent alias. Use commands [search] for discovery and keep help <command> for full details.