Nightmarefuel
Based on game build 722832 | Last updated: 2026-04-21
Overview
nightmarefuel is a stackable inventory item prefab that serves multiple purposes in Don't Starve Together. It functions as high-tier fuel for structures requiring nightmare fuel, a repair material for specific items, and can be socketed into shadow socket equipment. The prefab includes server-side component initialization with client-side optimization tags for waterproofer functionality.
Usage example
-- Spawn nightmarefuel in the world
local inst = SpawnPrefab("nightmarefuel")
-- Access components after spawn
inst.components.stackable.maxsize = TUNING.STACK_SIZE_SMALLITEM
inst.components.fuel.fueltype = FUELTYPE.NIGHTMARE
inst.components.fuel.fuelvalue = TUNING.LARGE_FUEL
-- Check socket quality
inst.components.socketable:SetSocketQuality(SOCKETQUALITY.LOW)
Dependencies & tags
External dependencies:
prefabs/wx78_common-- provides MakeItemSocketable for WX78 character compatibility
Components used:
stackable-- enables stacking with maxsize set to STACK_SIZE_SMALLITEMinspectable-- allows player inspection of the itemfuel-- provides fuel functionality with NIGHTMARE fueltyperepairer-- enables item repair with NIGHTMARE material typewaterproofer-- set to 0 effectiveness, tagged for optimizationinventoryitem-- enables inventory storage and pickupsocketable-- allows socketing into shadow socket equipment
Tags:
waterproofer-- added for client-side optimization
Properties
| Property | Type | Default Value | Description |
|---|---|---|---|
| None | No class-level properties defined. Component configurations set in fn(): stackable.maxsize, fuel.fueltype, fuel.fuelvalue, repairer.repairmaterial, repairer.finiteusesrepairvalue, waterproofer.effectiveness, socketable.socketquality. |
Main functions
fn()
- Description: Constructor function that creates the nightmarefuel entity instance. Adds all components, sets up animations, and configures server-side logic. Returns the entity instance.
- Parameters: None
- Returns: Entity instance (
inst) - Error states: None
Events & listeners
None identified.