Skip to content

Erg patch (erg-patch/1)

Generated from docs/erg-patch-1.schema.json (https://melange.dev/schema/erg-patch-1.json). The guide is erg.md.

An edit against a pinned base level: the Erg project file, the payload of level.save and what a source map pack ships in src/. It holds only identifiers and the author’s own values. The server applies the ops in order and refuses a patch whose base hashes differ.

Property Type Required Default Description
format string Yes Must be "erg-patch/1".
stem string Yes <prefix>_<slug>; never a vanilla level stem. Pattern: ^[a-z0-9_]{1,48}$.
title string Yes Pattern: ^[ -~]+$. 1 to 40 characters.
base object Yes
databank object Only the keys that differ from the base.
water water
spawns spawns
hmp hmp
ops array of one of: op = “set”, op = “add”, op = “remove”, op = “voxels” Yes At most 20000 items.
Property Type Required Default Description
key string Yes 1 to 79 characters.
source string Yes One of: "game", "pack".
sha256 sha256 Yes

Only the keys that differ from the base.

Property Type Required Default Description
theme theme
timeOfDay string One of: "DAY", "EVENING", "NIGHT".
materialFile string A relative path that must exist in the install. Pattern: \.[tT][xX][tT]$. 5 to 120 characters.
heightmapBase string 1 to 64 characters.
heightmapSecond string 1 to 64 characters.

At least 3 properties.

Property Type Required Default Description
op string Yes Must be "set".
src index Yes
name label
resource label
pos vec3
rot rot3 Euler angles in radians.
scale vec3
voxelPos vec3
Property Type Required Default Description
op string Yes Must be "add".
frame index Yes A folder frame (1x1x1, identity rotation and scale).
detail object Yes
Property Type Required Default Description
op string Yes Must be "remove".
src index Yes

Terrain: runs of voxel words over the frame’s index order, at most 2000 per frame. Accepted only by servers with terrain sculpting. Every word written must be a carve, fill or paint of the base word: bits 8-23 (second material and blend) equal to the base word’s or zero.

Property Type Required Default Description
op string Yes Must be "voxels".
frame index Yes
runs array of array [integer, integer, integer] Yes 1 to 2000 items. Items: Exactly 3 items. Item 1: From 0 to 262143. Item 2: From 1 to 262144. Item 3: Bits 24-31 clear; bits 0-1 are 0 (empty) or 3 (solid). From 0 to 16777215.
Property Type Required Default Description
name label Yes
resource label Yes
pos vec3 Yes
rot rot3 Euler angles in radians.
scale vec3
voxelPos vec3

Type: string. Pattern: ^[ -~]+$. 1 to 63 characters.