Skip to content
Contractsv1.7.0

Cook

⭐ Premium

Requires the player to cook specified items in an oven.

Cook covers every oven conversion with one mechanic, because that is how the game itself models it: smelting ores in a furnace, refining crude oil in an oil refinery, and cooking raw food in a campfire or grill are all the same objective type.

{
"type": "Cook",
"title": "Smelt metal ore",
"description": "",
"amountRequired": 500,
"conditions": {},
"items": ["metal.ore"]
}
FieldTypeDescription
typestringExactly 'Cook'
titlestringShort, human-readable name. Must not be empty.
descriptionstringA blurb of 1 to 3 sentences. May be empty if the title is self-explanatory.
amountRequiredinteger (≥ 1)How many units of input items must finish cooking for the player.
cooldownobject | nullOptional pacing limit on how fast progress adds up: at most maxAmount units of progress count in any sliding window of windowSeconds. Absent means progress adds up freely. While the window's budget is used up, further progress is ignored and the player sees a countdown to the next available moment.
burstobject | nullOptional clustering requirement: actions only count when they arrive clustered, at least amount units within one trailing window of windowSeconds forming one burst. When present, amountRequired counts completed bursts instead of raw actions. Actions that age out of the window without completing a burst never count. Absent means no clustering.
conditionsmapOptional conditions that restrict when progress counts. Progress is recorded only when the objective's main requirement and all of these conditions are met. Use an empty map for none.
hideDetailsbooleanWhen true, hides this objective's in-game condition strip and details popup, so the description is the only explanation players get. Title, description and progress still show. Absent means false.
itemsstring[]Input item shortNames to cook, lowercase dotted (e.g. metal.ore, sulfur.ore, crude.oil, bearmeat). Empty = any cookable item.

Progress comes from cooking, but only on the units the player deposited. In other words, a unit counts the moment it finishes converting in the oven, and the credit goes to whoever deposited that unit. Depositing on its own earns nothing: it only stakes your claim on those units, and the claim pays out when they actually convert.

  • Shared furnaces work the way you’d hope: teammates each get credit for the ore they deposited themselves, no matter who lit the furnace or who empties it.
  • Progress keeps incrementing while the depositor is offline. Deposit items into a furnace, log off, and the objective advances (and can complete) as the ore converts.
  • Items inserted by an industrial conveyor credit nobody, since no player deposited them. The plugin does not track which player placed the item that ended up in the conveyor.

The Cook objective persists in-memory cache data across server restarts and plugin reloads. When either happens, the plugin will save the state of oven conversion progress inside the cache_data.json file, and restore it when the server is back online or the plugin is reloaded.

This mechanic aims at satisfying long smelting quests that may be started before a server restart, and completed after the server is back online.

Because of the lifecycle of all the events the Cook objective relies on and the uncertainty of player state, conditions are checked once against the depositor at the instant the items are deposited, not when they convert (cook). Depositing is the action you actually perform, so that is when your state is measured. By the time the items finish cooking you may be across the map or logged off.

  • A Monument condition effectively pins where the oven must be: the player has to be at the monument when depositing the items.
  • A TimeOfDay condition means “load the oven at night”, not “the items must convert at night”.
  • Only cookable conversions count. Burning fuel does not: wood turning into charcoal is the furnace consuming fuel, not cooking a target item.
  • The cooking workbench only counts through its furnace, not its mixing table. The name “Cook” follows the game’s own internal classification, and the mixing table is a separate mechanic the game calls “Mix”, covered by the Mix objective. If you want prepared dishes like Hunter’s Pie, the Mix objective is the type you want.
  • Counts the number of input units cooked: “smelt 500 metal ore” means 500 ore go in and finish converting, regardless of how many metal fragments come out.