S9SourceNine Labs / CMAPI Docs 1.1
CMAPI / API reference

API reference

Browse 69 documented public CMAPI types.

CMAPI 1.1.4Standalone runtimeWindows x64Tested with Planet Crafter 2.008

The public API is deliberately independent from Unity and Planet Crafter implementation assemblies. Normal mods reference only CMAPI.API.dll; keep CMAPI.API.xml beside it for editor descriptions.

Interfaces

IConsoleCommandContextDescribes one invocation of a registered console command.IConsoleCommandManagerRegisters console commands owned by the current mod.IEnvironmentManagerProvides safe current-planet environment information and actions.IGameLoopEventsProvides safe, main-thread game-loop events.IInventoryExtensionManagerProvides owner-scoped inventory virtualization. CMAPI supplies no slot rules by default; normal game behavior remains unchanged until a mod registers a provider.IInventorySlotProviderSupplies optional virtual-slot rules. Returning null preserves the game's normal one-item-per-slot behavior for that item.IItemDefinitionDescribes one Planet Crafter inventory item.IItemManagerProvides item discovery and host-safe local-backpack mutations.IModEventsProvides the event groups exposed by CMAPI.IModHelperProvides the CMAPI services available to one mod.IModRegistryProvides safe feature and loaded-mod discovery.IModSchedulerQueues mod-owned work for safe execution on Unity's main thread.IModStorageProvides paths and JSON storage isolated to the current mod.IMonitorWrites messages attributed to the current mod.INotificationManagerShows short messages through Planet Crafter's native HUD.IPlanetDefinitionDescribes one installed Planet Crafter planet.IPlanetManagerProvides safe, read-only information about installed planets.IPlayerRepresents one player visible to the current Planet Crafter session.IPlayerEventsProvides normalized player lifecycle events.IPlayerInventoryManagerProvides read-only local backpack and equipment state.IPlayerManagerProvides read-only access to players in the active session.IPlayerPlacementManagerProvides host-safe, same-planet placement for the local player.IRecipeDefinitionDescribes one recipe defined by Planet Crafter.IRecipeIngredientDescribes one distinct ingredient and its required quantity.IRecipeManagerProvides read-only discovery of Planet Crafter recipes.IScheduledActionRepresents work queued through IModScheduler.ITerraTokenManagerProvides the shared Terra Token balance and host-safe additions.IUnlockDefinitionDescribes the live unlock state and rules for one game group.IUnlockManagerProvides read-only content unlock rules and live state.IWeatherEventDefinitionDescribes one weather or meteor event available on a planet.IWeatherManagerProvides current-planet weather discovery, status, and host-safe starts.IWorldEventsProvides loaded-world, planet, save, and weather lifecycle events.IWorldStateManagerProvides read-only terraformation values, rates, and stage progress.

Classes

CMAPIFeaturesStable feature identifiers exposed by IModRegistry.ConsoleCommandOptionsDescribes how a console command appears in CMAPI's command catalog.EnvironmentActionResultContains the complete result of an environment mutation request.EnvironmentSnapshotContains current-planet day/night and local water information.GameLoopTickDescribes one CMAPI game-loop event.GameplayActionResultContains the complete result of a gameplay mutation request.InventoryContextRead-only native inventory metadata supplied to slot providers.InventoryItemDescriptorStable item metadata supplied to an inventory slot provider. CMAPI does not expose or transfer the game's mutable world-object instance.InventoryItemSnapshotContains an aggregated count of one item in an inventory.InventoryLayoutSnapshotRead-only virtual and native capacity information.InventorySafetyIssueDescribes an inventory which is not currently vanilla-safe.InventorySafetyReportReports whether loaded inventories can be opened safely without virtualization.InventorySlotRuleDescribes one virtual slot family returned by a mod.ModThe base class for every CMAPI mod entry point.PlanetChangedEventDescribes a completed transition between loaded planets.PlayerInventoryChangedEventDescribes one native local-player inventory modification.PlayerInventorySnapshotContains a point-in-time view of one local-player inventory.PlayerPlacementResultContains the complete result of a player-placement request.TerraformStageSnapshotDescribes one current-planet terraformation stage.WeatherSnapshotContains a point-in-time view of the current planet's weather.WorldContextIdentifies the loaded save and current planet at an event boundary.WorldStateSnapshotContains current terraformation measurements for one planet.WorldUnitSnapshotContains a point-in-time value and production rates for one world unit.

Structures

Enumerations

Delegates