CONTENT CONTRACT · VERSION 1
VillagerTaskDefinition
A task players give a villager from its conversation: with a tool of the task in its inventory and a sign anywhere on the map (or a station), it walks there, works, keeps the yield in its inventory and takes it to the nearest chest by the sign. Which signs suit a task follows from its work there (trees, fields, water). No tool, no work.
Signature
{ carry: PositiveCount, daily: (PositiveCount)?, description: TextKey, hours: {DayMinute}, id: ContentId, inputs: ({ItemStack})?, name: TextKey, outputs: {ItemId}, radius_mm: PositiveDistance, recipe_required: boolean, script: ScriptId, stations: ({TagId})?, store_radius_mm: PositiveDistance, suitability: (WorkQuery)?, tool: ItemId, when: ({StoryCondition})?, yields: ({ItemStack})? }Fields
| Name | Type | Meaning |
|---|---|---|
carry | PositiveCount | Items of yield the villager gathers in its inventory before it walks to the chest. Range: 1…2147483647; Unit: count |
daily | PositiveCount | Most rounds a day (crafts at a station); absent: no limit. Range: 1…2147483647; Unit: count |
description | TextKey | Localized line on what the villager does and what the player sets up for it. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: text |
hours | {DayMinute} | First and last minute of the day it works, from 06:00 like routine entries; outside them its routine runs and the task waits. Items: 2…2 |
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}$ |
inputs | {ItemStack} | Inputs consumed by an away or exchange instruction; without them its failure path runs. Items: 1…4 |
name | TextKey | Localized task label. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: text |
outputs | {ItemId} | All item types this task delivers; other belongings stay in the bag. Items: 0…256; Unique entries |
radius_mm | PositiveDistance | Work happens within this distance of the sign. Range: 1…2147483647; Unit: mm |
recipe_required | boolean | Whether assigning this task requires a known station recipe. |
script | ScriptId | Pure Luau script returning the task work plan. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: script |
stations | {TagId} | Station tags of the structures the task works at instead of a sign (a stove, a workshop); absent: it works at a sign. Items: 1…8; Unique entries |
store_radius_mm | PositiveDistance | The yield goes to the nearest chest within this distance of the sign. Range: 1…2147483647; Unit: mm |
suitability | WorkQuery | Target query required around a sign when assigning; absent allows waiting for work. |
tool | ItemId | Item the player gives the villager for the task (an axe, a basket, a lantern); taking it back ends the task. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: item |
when | {StoryCondition} | Story conditions required to assign this task; absent: always available. Existing assignments continue independently of the assigning player. Items: 1…16 |
yields | {ItemStack} | Outputs of away or exchange instructions; optional override for catch. World-resource actions derive their yields from the actual target. Items: 1…4 |