Save-Game File Format

advanced scripting

Voxel Play 3 · Scripting / API

Overview

The current format version is 21. Games can be saved through scripting or the console command /save.

The format uses binary files with RLE compression for chunk data and Deflate compression for custom data sections.

File Structure

Version 21 stores world data across three file types:

  • Main file - Header data and region file names
  • Region files - Chunk and voxel data (each covers a 256x256 area)
  • Extra data file - Optional user-defined data

Only affected region files update when world contents change. The main and extra data files load at startup; region files load on demand.

  • Format number (1 byte)
  • Chunk size specification (1 byte)
  • Character controller position (X, Y, Z as floats)
  • Controller rotation angles (3 floats)
  • Camera rotation angles (3 floats)
  • Stage number (Int16)
  • Region IDs (variable-length string)

Region Data Format

Region files contain:

  • Voxel definition count and names
  • Item definition count and names
  • Chunk count
  • Per-chunk data: position, generation status, timestamps, and voxel data
  • Light sources with position and attachment info
  • Items with positions and quantities
  • Custom voxel data
  • Microvoxel occupancy masks
  • GameObjects with VoxelPlaySaveThis component
  • Custom prefab data including transform and rotation values

Extra Data File Format

Contains custom data sections with key-value pairs where data is compressed using Deflate algorithm.

Was this page helpful?