CONTENT CONTRACT · VERSION 1
structure
A placeable building or furniture piece with health and repair.
Signature
{ ["function"]: (StructureFunction)?, id: ContentId, item: (ItemId)?, kind: "structure", max_health: PositiveHitPoints, model: Name, name: TextKey, prompt: (TextKey)?, repair_recipe: (RecipeId)? }Fields
| Name | Type | Meaning |
|---|---|---|
function | StructureFunction | What the structure does besides standing: defend, let one sleep or sit. |
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}$ |
item | ItemId | Item the structure is built from and dismantled into; absent for village buildings. 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 |
model | Name | Engine prefab kind supplying geometry, placement and interior until native prefabs replace it. Length: 1…96; Pattern: ^[a-z][a-z0-9_]{0,95}$ |
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 |
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 |
Validated example
{
"kind": "structure",
"structure": "core:barrel_structure"
}