Skip to main content

Livinglog

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

Overview

livinglog is aPrefab that functions as both an edible item and a fuel source, while also serving as a boat repair material. It is designed to emit a distinctive "tormented scream" sound effect (SOUND_TORMENTED_SCREAM) when ignited, burned, or taken as fuel. ThePrefab integrates with several core components: edible (for consumption), fuel (for burning), repairer (for boat repair), and inventoryitem (for inventory handling).

Usage example

local inst = SpawnPrefab("livinglog")
if inst ~= nil and inst.components ~= nil then
-- Example: ignite it programmatically to trigger the sound
inst:PushEvent("onignite")
end

Dependencies & tags

Components used: edible, fuel, repairer, inspectable, inventoryitem, stackable, burnable, propagator, hauntable Tags: None identified.

Properties

PropertyTypeDefault ValueDescription
eatensoundstring"dontstarve/creatures/leif/livinglog_burn"Sound played when consumed.
incineratesoundstring"dontstarve/creatures/leif/livinglog_burn"Sound played when incinerated (same as eatensound).
pickupsoundstring"wood"Sound played when picked up.
components.edible.foodtypeFOODTYPEFOODTYPE.WOODFood category for compatibility with food-based systems.
components.edible.healthvaluenumber0Health restored on consumption (none).
components.edible.hungervaluenumber0Hunger restored on consumption (none).
components.fuel.fuelvaluenumberTUNING.MED_FUELFuel value (used in fire management).
components.fuel.ontakenfunctionFuelTakenCallback fired when fuel is consumed.
components.repairer.repairmaterialMATERIALSMATERIALS.WOODMaterial type used for repairs.
components.repairer.healthrepairvaluenumberTUNING.REPAIR_LOGS_HEALTH * 3Health points restored per repair action.
components.repairer.boatrepairsoundstring"turnoftides/common/together/boat/repair_with_wood"Sound effect played during boat repair.

Main functions

FuelTaken(inst, taker)

  • Description: Plays the "tormented scream" sound on the taker entity when the living log is consumed as fuel.
  • Parameters:
    • inst (Entity): The living log instance being used as fuel.
    • taker (Entity or nil): The entity consuming the log. If nil, no sound is played.
  • Returns: Nothing.
  • Error states: Only performs the sound if taker.SoundEmitter is not nil. No error is raised if missing.

allanimalscanscream(inst)

  • Description: Plays the "tormented scream" sound on the living log itself (via its own SoundEmitter).
  • Parameters:
    • inst (Entity): The living log instance.
  • Returns: Nothing.

onignite(inst)

  • Description: Event handler triggered when the log ignites; delegates to allanimalscanscream(inst).
  • Parameters:
    • inst (Entity): The living log instance.
  • Returns: Nothing.

Events & listeners

  • Listens to: onignite - triggers the scream sound via onignite(inst) when ignited (e.g., by fire or lightning).
  • Pushes: No events.