Skip to main content

Royal Jelly

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

Overview

royal_jelly is a food item prefab that functions as a high-value consumable providing significant healing, moderate sanity recovery, and small caloric value. It is implemented as a stackable, perishable inventory item with network synchronization and tradability. The prefab relies on core DST components—edible, perishable, stackable, tradable, inventoryitem, and inspectable—to define its gameplay behavior. It also receives the honeyed tag and supports being floated on water.

Usage example

local inst = SpawnPrefab("royal_jelly")
-- The item is ready to use: it automatically perishes after TUNING.PERISH_MED
-- and has its edible, stackable, and perishable components configured
inst.components.edible.healthvalue -- yields TUNING.HEALING_LARGE (default 30)

Dependencies & tags

Components used: edible, perishable, stackable, tradable, inventoryitem, inspectable Tags: honeyed is added via inst:AddTag("honeyed").

Properties

PropertyTypeDefault ValueDescription
healthvaluenumberTUNING.HEALING_LARGEHealth restored on consumption (30).
hungervaluenumberTUNING.CALORIES_SMALLHunger restored on consumption (15).
sanityvaluenumberTUNING.SANITY_MEDSanity restored on consumption (25).
maxsizenumberTUNING.STACK_SIZE_SMALLITEMMaximum stack size (typically 20).
onperishreplacementstring"spoiled_food"Prefab name to spawn when item spoils.
perishtimenumberTUNING.PERISH_MEDTime (in seconds) before the item spoils.

Main functions

Not applicable. This is a prefab definition, not a component. Its behavior is implemented via attached components (edible, perishable, etc.).

Events & listeners

Not applicable. Event handling occurs in the attached component classes (edible.lua, perishable.lua, etc.), not in this prefab definition.