Documentation Index
Fetch the complete documentation index at: https://mintlify.com/BunnyNabbit/celaria-formats/llms.txt
Use this file to discover all available pages before exploring further.
CelariaMap represents a finalized Celaria map — one that includes medal times on checkpoint and goal blocks and is ready to be played in-game. It extends BaseCelariaMap and adds the game mode property, checkpoint medal time handling, and version-aware serialization. Use EditableCelariaMap instead if you are working with maps opened in the in-game editor.
Inheritance
CelariaMap extends BaseCelariaMap and inherits all of its properties: instances, checkpointOrder, name, sunRotationHorizontal, sunRotationVertical, previewCamera, and version.
Static properties
fileSignature
.cmap file. parse checks this value and throws if the buffer does not begin with it.
gameModes
| Key | Value | Description |
|---|---|---|
freeRoam | 0 | No timer, no checkpoint requirements |
timeTrial | 1 | Timed run with checkpoint and goal ordering |
Instance properties
mode
CelariaMap.gameModes.timeTrial (1) on construction. Set this to CelariaMap.gameModes.freeRoam to produce a free-roam map.
Static methods
parse(buffer)
Parses a .cmap binary buffer and returns a populated CelariaMap instance.
A Node.js
Buffer containing the raw bytes of a .cmap file.CelariaMap
Checkpoints and the goal block are sorted by their priority value during parsing and assigned their medal times from the header. The resulting checkpointOrder reflects that sorted sequence.
instanceTypeIsSupported(instanceType, version)
Returns whether a given instance type is supported in a given file format version. Barriers (instance types 3 and 4) require version 2 or higher.
The instance type integer. Use the
instanceId property of a map object instance.The format version number to check against.
boolean
Instance methods
serialize(version?)
Serializes the map to a binary buffer suitable for writing to a .cmap file.
The format version to serialize to. Defaults to
2 if not specified.Buffer
Blocks that are in checkpointOrder are written after all other instances and have their type set to checkpoint or goal (the last entry) in place. Blocks that were already typed as checkpoint or goal but are not in checkpointOrder are downgraded to plain blocks during serialization.
Serialization modifies checkpoint and goal block
type values in place. If you need to preserve the original type values, work on a copy of the map data.Full example
Related
EditableCelariaMap
The editable map format for the in-game editor, without medal times.
BaseCelariaMap
Shared base class with all common properties and defaults.
Block
Block instance including checkpoint, goal, and medal time fields.
Types
Type definitions including
MedalTimes and Vector3.