CONTENT CONTRACT · VERSION 1
structure
A placeable building or furniture piece with health and repair.
Signature
{ authored_open: (boolean)?, blows_away: (boolean)?, broken: (TextKey)?, cut: (boolean)?, faction: (ContentId)?, fades_to_camera: (boolean)?, fends_off_animals: (boolean)?, fixed: (boolean)?, ["function"]: (StructureFunction)?, hook_post: (boolean)?, id: ContentId, ignite: (StructureIgnite)?, item: (ItemId)?, kind: "structure", max_health: PositiveHitPoints, name: TextKey, open_prefab: (PrefabId)?, prefab: PrefabId, prompt: (TextKey)?, repair_recipe: (RecipeId)?, ruin_prefab: (PrefabId)?, salvage: ({ItemStack})?, sealed: (boolean)?, see_through: (boolean)?, state_prefab: (StationPrefabs)?, station: (StationDefinition)?, switch: (StructureSwitch)?, tags: ({TagId})?, village: (boolean)? }Fields
| Name | Type | Meaning |
|---|---|---|
authored_open | boolean | True: only authored map conditions control opening; players and residents cannot toggle or plan through its closed geometry. Absent: false. |
blows_away | boolean | True: a gust of wind (tool action `gust`) blows it away like burning does (leaves, a web; its placement's `variable` becomes 1 and it stands only while that is 0). Absent: false. |
broken | TextKey | Notice for using it as a station while it is damaged (the broken workbench); absent: a general one. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: text |
cut | boolean | True: a player's melee blow cuts it away like burning does (a web; its placement's `variable` becomes 1 and it stands only while that is 0). Absent: false. |
faction | ContentId | Faction the building belongs to (a camp's palisades and huts): its enemies nearby answer whoever damages it. Absent: nobody's. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$ |
fades_to_camera | boolean | True: the renderer fades it out for a view while it stands between that view's camera and its player (tall walls of an open-air dungeon). Absent: false. |
fends_off_animals | boolean | True: while intact, wild animals keep their safe distance from it as from the camp, so they never pass it or its open gate (a palisade). Absent: false. |
fixed | boolean | True: it stands where the map placed it; no player or enemy dismantles or moves it, a repair still mends it, and struck down it falls to its own foundation (identity, home and contents kept) for the hammer to raise again. Absent: false. |
function | StructureFunction | What the structure does besides standing: defend, let one sleep or sit. |
hook_post | boolean | True: a hook post; a hook thrown at it pulls the wielder to it, over gaps, when the way is free. Absent: false. |
id | ContentId | Package-qualified identity; unique within its declaring namespace. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$ |
ignite | StructureIgnite | It catches fire (a fire bowl, a web). Absent: it does not burn. |
item | ItemId | Item the structure is built from and dismantled into; absent for structures the engine places (the stash). Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: item |
kind | "structure" | Discriminant |
max_health | PositiveHitPoints | Maximum hit points and upper healing cap. Range: 1…2147483647; Unit: hp |
name | TextKey | Localization key for the displayed name. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: text |
open_prefab | PrefabId | Alternative prefab while opened by interaction. Absent: the structure cannot be toggled. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: prefab |
prefab | PrefabId | Native prefab supplying geometry, collision, placement, door, interior and anchors. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: prefab |
prompt | TextKey | Localization key of the interaction prompt shown next to it. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: text |
repair_recipe | RecipeId | Repair recipe whose result names this structure. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: recipe |
ruin_prefab | PrefabId | Prefab it stands as while below full health: an authored ruin, whole and unweathered, without door or room; the last repair step raises the structure's own prefab. Absent: it weathers by its health. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: prefab |
salvage | {ItemStack} | What a hammer taking it down gives instead of its item (old ruins give stone). Absent: its item, or for a foundation its built-in materials. Items: 1…8; Unique entries |
sealed | boolean | True: it holds a way shut or is the shell of a place (a dungeon's facade, gate or room wall, a piece of a puzzle): no blow, foe or spell harms it, and one an older world struck down stands whole again when the room starts. Every placement with `closed_when` is of a sealed structure. Absent: false, a fixed structure falls to its foundation for the hammer. |
see_through | boolean | True: a look passes it (a web, a net): a watcher sees a body behind it, while bodies and shots are held as by any structure. Absent: false. |
state_prefab | StationPrefabs | Optional prefab substitutions for station state transitions. |
station | StationDefinition | Shared timed crafting capacity of this structure. |
switch | StructureSwitch | A switch: lever, floor plate or strike switch (its active look is `open_prefab`). Absent: none. |
tags | {TagId} | Tags it carries while intact (at full health): a recipe naming one as its station is crafted within reach of it. Items: 1…16; Unique entries |
village | boolean | True: it is built only inside the village circle of its map (`map.village`), which shimmers while one is placed. Absent: false. |
Validated example
{
"fixed": true,
"id": "core:barrel_stack_structure",
"item": "core:barrel_stack",
"kind": "structure",
"max_health": 100,
"name": "core:barrel_stack_name",
"prefab": "core:barrel_stack_prefab"
}