Skip to main content

Woby Treat

Based on game build 714014 | Last updated: 2026-03-07

Overview

woby_treat defines a prefab for an in-game consumable item — specifically, a small meat treat that can be eaten by characters or fed to pets. It is implemented as a prefabricated entity with multiple components: edible, stackable, tradable, inventoryitem, and support components for burnable, propagator, and hauntable behavior. It carries tags indicating it is meat, monster meat, and pet-friendly, enabling specific feeding interactions and inventory behaviors.

Usage example

This prefab is not typically instantiated directly by mods; instead, it is referenced via its prefab name "woby_treat" when spawning items (e.g., via SpawnPrefab("woby_treat")). Modders can customize its properties by overriding the prefab or extending it, e.g.:

local treat = SpawnPrefab("woby_treat")
treat.components.edible.healthvalue = 10 -- override default negative value

Dependencies & tags

Components used: inspectable, inventoryitem, stackable, edible, tradable Tags: meat, quickeat, monstermeat, quickfeed, pet_treat

Properties

PropertyTypeDefault ValueDescription
maxsizenumberTUNING.STACK_SIZE_SMALLITEMMaximum stack size for the item.
ismeatbooleantrueIndicates the item is meat (affects spoilage and consumption rules).
foodtypeFOODTYPE enumFOODTYPE.MEATPrimary food classification.
secondaryfoodtypeFOODTYPE enum or nilFOODTYPE.MONSTERSecondary food classification (for mixed-type consumables).
healthvaluenumber-TUNING.HEALING_TINYHealth restored (negative = damage).
hungervaluenumberTUNING.CALORIES_TINYHunger restored.
sanityvaluenumber-TUNING.SANITY_TINYSanity change upon consumption.
goldvaluenumber0Value when sold to NPCs (e.g., Wilson's shop).

Main functions

Not applicable. This is a prefab definition, not a component class with custom methods.

Events & listeners

Not applicable. The prefab does not define custom event listeners or emissions in the provided source.