EverambleGAME API / 1

CONTENT CONTRACT · VERSION 1

MapStructure

A structure the map places in a new world: on the ground at a position, or inside the room of an earlier placement; with `when`, it stands while world variables hold.

Signature

{ closed_when: ({VariableCondition})?, contents: ({ItemStack})?, counters: ({ZoneCounter})?, door: (Name)?, ground: (StructureGround)?, health_permille: Permille, id: Name, inside: (Name)?, lock: (PlacementLock)?, position_mm: {Millimeters}, room: (Name)?, structure: StructureId, variable: (VariableId)?, when: ({VariableCondition})?, yaw_mdeg: Millidegrees }

Fields

NameTypeMeaning
closed_when{VariableCondition}Authored opening control: closed while all these world-variable conditions hold, open otherwise. Requires a fixed ground structure with authored_open and open_prefab. Identity is retained across changes.
Items: 1…8
contents{ItemStack}What a storage structure holds when placed (an old seed box); absent: empty.
Items: 1…16; Unique entries
counters{ZoneCounter}Counter chips the HUD shows while a local player stands in this structure's room (the keys of a dungeon).
Items: 1…4
doorNameWith inside: the gate of this room door (its id in the room named by room); it stands at the door on the side towards the entrance and holds the way further in shut by closed_when or lock, never the way out. Its position is the door's; position_mm and yaw_mdeg are 0.
Length: 1…96; Pattern: ^[a-z][a-z0-9_]{0,95}$
groundStructureGroundLevel ground the valley generator lays under a building on the map, the same for every world seed: its footprint with a metre's margin and a forecourt before its front stand at one height, dry even past the coast's cliff, without trees, rock or plants; the land around, the coast's terraces and sea bed too, eases back at most a block per two metres, or rises round the building as a hillside (`rise_mm`).
health_permillePermilleHealth at placement as a share of the maximum; below the maximum it stands damaged and can be repaired.
Range: 0…1000; Unit: permille
idNameLocal placement identifier, unique within the map.
Length: 1…96; Pattern: ^[a-z][a-z0-9_]{0,95}$
insideNameEarlier placement of a structure with a room; this one stands in that room.
Length: 1…96; Pattern: ^[a-z][a-z0-9_]{0,95}$
lockPlacementLockA lock on this gate (a fixed ground structure with authored_open and open_prefab): it stays closed until a player spends the keys.
position_mm{Millimeters}Position as x, z in millimetres: on the map, or relative to the room centre with inside.
Items: 2…2
roomNameWith inside: the building's room it stands in (an id of its interior's rooms). Absent: the entrance room.
Length: 1…96; Pattern: ^[a-z][a-z0-9_]{0,95}$
structureStructureIdStructure placed; it needs an item.
Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: structure
variableVariableIdWorld variable (bool) the placed structure writes: a switch's state, a fire's burning, a lock's unlocking, a burnable's or cuttable's being gone. Required for switches, fires, burnables, cuttables and locks; absent otherwise.
Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: variable
when{VariableCondition}World variables it stands by: present (also in an older world) while all hold, gone while one does not (a gate closed until a raid, a drain found, an abandoned camp); several placements of one structure at one spot stand while any holds; it must be a fixed structure on the ground without contents. Absent: placed once in a new world.
Items: 1…8
yaw_mdegMillidegreesRotation around the vertical axis.
Range: 0…359999; Unit: mdeg