Skip to main content

Preparedfoods Warly

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

Overview

preparedfoods_warly.lua defines a table of special prepared food recipes intended for use with Warly's portable cookpot. Each entry specifies validation criteria (test function), nutritional stats (health, hunger, sanity, perishtime), and optional consumption-side effects (oneatenfn). Effects include swapping health and sanity (e.g., nightmarepie), granting debuffs (voltgoatjelly, frogfishbowl), spawning permanent light sources (glowberrymousse), and modifying body temperature (dragonchilisalad, gazpacho). These foods are designated with the "masterfood" tag and are made accessible through the "portablecookpot" cookbook category.

Usage example

-- Sample usage: add to a pot recipe system
local preparedfoods = require("prepreparedfoods_warly")
for name, data in pairs(preparedfoods) do
-- Typically registered in a larger cooking table or validated via data.test()
print("Food:", name, "Priority:", data.priority)
end

Dependencies & tags

Components used: health, sanity, spell, oldager
Tags added per food: "masterfood", "unsafefood" (nightmarepie only), "monstermeat" (monstertartare only), "fooddrink" (gazpacho only). Individual foods may specify "primaryfood" or "secondaryfoodtype" based on foodtype and secondaryfoodtype.

Properties

PropertyTypeDefault ValueDescription
namestringRecipe key (k)Internal recipe identifier assigned at runtime.
weightnumber1Relative weighting for random selection (used by the cooking system).
prioritynumber0Higher-priority recipes take precedence during conflict resolution.
foodtypeFOODTYPE enumRequiredClassification (e.g., VEGGIE, MEAT, GOODIES).
secondaryfoodtypeFOODTYPE enumnilSecondary classification (e.g., MONSTER).
healthnumberRequiredChange to eater's health on consumption.
hungernumberRequiredChange to eater's hunger on consumption.
sanitynumber0Change to eater's sanity on consumption.
temperaturenumbernilBonus temperature applied on consumption.
temperaturedurationnumbernilDuration (in seconds) of the temperature bonus.
perishtimenumberRequiredTime until the prepared food spoils.
cooktimenumberRequiredTime required to cook the recipe (seconds).
potlevelstring or nil"low"Required pot tier ("low", "high", or "high").
nochillboolean or nilnilIf true, prevents chilling while held.
prefabstable{}Prefab names to spawn or attach to eater on consumption (e.g., debuff or light entities).
tagstable{}Tags applied to the food item itself (e.g., "masterfood").
floatertable or nil{nil, 0.1}Position offset for the food item's floating animation.
oneat_descstring or nilnilLocalization key for in-ui description of consumption effect.

Main functions

This file returns a table of recipes; it does not define any stand-alone functions beyond recipe validators (test) and consumption callbacks (oneatenfn). All per-recipe logic is contained in the oneatenfn handlers.

Events & listeners

None. The component itself does not listen for or emit game events directly. Side effects are implemented via component methods (DoDelta, AddDebuff, Spell APIs) called within oneatenfn.