EverambleGAME API / 1

CONTENT CONTRACT · VERSION 1

villager_task

A task players give a villager: its tool, what it does at the task's sign and where the yield goes.

Signature

{ carry: PositiveCount, daily: (PositiveCount)?, description: TextKey, hours: {DayMinute}, id: ContentId, inputs: ({ItemStack})?, kind: "villager_task", 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

NameTypeMeaning
carryPositiveCountItems of yield the villager gathers in its inventory before it walks to the chest.
Range: 1…2147483647; Unit: count
dailyPositiveCountMost rounds a day (crafts at a station); absent: no limit.
Range: 1…2147483647; Unit: count
descriptionTextKeyLocalized 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
idContentIdPackage-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
kind"villager_task"Discriminant
nameTextKeyLocalized 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_mmPositiveDistanceWork happens within this distance of the sign.
Range: 1…2147483647; Unit: mm
recipe_requiredbooleanWhether assigning this task requires a known station recipe.
scriptScriptIdPure 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_mmPositiveDistanceThe yield goes to the nearest chest within this distance of the sign.
Range: 1…2147483647; Unit: mm
suitabilityWorkQueryTarget query required around a sign when assigning; absent allows waiting for work.
toolItemIdItem 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

Validated example

{
  "carry": 3,
  "description": "core:task_berries_hint",
  "hours": [
    120,
    660
  ],
  "id": "core:task_berries",
  "kind": "villager_task",
  "name": "core:task_berries_name",
  "outputs": [
    "core:blueberries"
  ],
  "radius_mm": 12000,
  "recipe_required": false,
  "script": "core:task_berries_plan",
  "store_radius_mm": 12000,
  "tool": "core:basket"
}