EverambleGAME API / 1

CONTENT CONTRACT · VERSION 1

StructureView

A building or placed structure as the snapshot saw it: players' structures (`actor/s<id>`) and the map's village buildings (`actor/b<owner>`) alike.

Signature

{ definition: StructureId, finished: boolean, health: HitPoints, inside: {StructureContent}, max_health: PositiveHitPoints, owner: (StructureOwner)?, position: Position, ref: ActorRef, residents: {NpcId}, stored: {ItemStack} }

Fields

NameTypeMeaning
definitionStructureIdIts structure definition.
Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: structure
finishedbooleanFalse while it is a foundation still being raised by the hammer.
healthHitPointsCurrent hit points; below max_health it is damaged (a broken building has 0).
Range: 0…2147483647; Unit: hp
inside{StructureContent}What stands in its room (a tent's sleeping bag, a house's chest), in reference order.
Items: 0…64
max_healthPositiveHitPointsHit points of the intact structure.
Range: 1…2147483647; Unit: hp
ownerStructureOwnerWho owns it (`claim_structure`): an NPC or `players`; absent: free.
Length: 1…129; Pattern: ^(?:players|[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95})$
positionPositionWhere it stands (its anchor point).
refActorRefThe structure as an actor reference.
Length: 1…256; Pattern: ^[\s\S]+$
residents{NpcId}The NPCs whose home it is (`set_home`), in reference order; it is theirs.
Items: 0…64
stored{ItemStack}What its storage holds (a chest), by item.
Items: 0…64