Event Deps
Based on game build 722832 | Last updated: 2026-04-18
Overview
event_deps.lua is a data configuration file that defines asset dependencies for Don't Starve Together seasonal and festival events. It contains three primary static tables: LOADING_IMAGES maps event types to loading screen image atlas/texture pairs, SPECIAL_EVENT_DEPS maps special event types to frontend/backend asset dependencies, and FESTIVAL_EVENT_DEPS maps festival event types to frontend/backend asset dependencies. Only LOADING_IMAGES is a true global table accessible by other systems; SPECIAL_EVENT_DEPS and FESTIVAL_EVENT_DEPS are file-local tables used internally for prefab registration.
Usage example
-- This file is automatically required by the game's prefab system
require('prefabs/event_deps')
-- It returns multiple prefab instances via unpack(ret), not a table
-- Only LOADING_IMAGES is a global table accessible externally.
-- SPECIAL_EVENT_DEPS and FESTIVAL_EVENT_DEPS are file-local tables
-- used internally for prefab registration.
-- Access loading images for a specific event (as global)
local hallowed_images = LOADING_IMAGES[SPECIAL_EVENTS.HALLOWED_NIGHTS]
-- The prefabs registered by this file (returned as multiple values):
-- - [event]_event_global, [event]_event_frontend, [event]_event_backend
-- - [festival]_fest_global, [festival]_fest_frontend, [festival]_fest_backend
Dependencies & tags
External dependencies:
SPECIAL_EVENTS-- event type enumeration for seasonal eventsFESTIVAL_EVENTS-- event type enumeration for festival eventsAsset()-- global function for defining asset dependenciesPrefab()-- global function for registering prefabsCreateEntity()-- global function for entity creation
Components used: None identified
Tags: None identified
Properties
| Property | Type | Default Value | Description |
|---|---|---|---|
LOADING_IMAGES | table | --- | Maps event types to loading screen image atlas/texture pairs. |
LOADING_IMAGES[SPECIAL_EVENTS.HALLOWED_NIGHTS] | table | --- | Hallowed Nights loading images (2). |
LOADING_IMAGES[SPECIAL_EVENTS.WINTERS_FEAST] | table | --- | Winter's Feast loading images (3). |
LOADING_IMAGES[SPECIAL_EVENTS.YOTG] | table | --- | Year of the Gobbler loading images (2). |
LOADING_IMAGES[SPECIAL_EVENTS.YOTV] | table | --- | Year of the Varg loading images (1). |
LOADING_IMAGES[SPECIAL_EVENTS.YOTC] | table | --- | Year of the Carrat loading images (1). |
LOADING_IMAGES[SPECIAL_EVENTS.YOT_CATCOON] | table | --- | Year of the Catcoon loading images (1). |
LOADING_IMAGES[SPECIAL_EVENTS.NONE] | table | --- | Default loading images (8, with spiral flag). |
LOADING_IMAGES[n].atlas | string | --- | Image atlas XML path (e.g., "images/bg_spiral_fill1.xml"). |
LOADING_IMAGES[n].tex | string | --- | Image texture path (e.g., "bg_image1.tex"). |
LOADING_IMAGES[n].spiral | boolean | --- | Optional flag indicating spiral animation (present on NONE event images). |
SPECIAL_EVENT_DEPS | table | --- | File-local table mapping special event types to frontend/backend asset dependencies. Structure: [event] = { frontend = { assets = {...} }, backend = { assets = {...}, prefabs = {...} } }. |
FESTIVAL_EVENT_DEPS | table | --- | File-local table mapping festival event types to frontend/backend asset dependencies. Structure: [festival] = { frontend = { assets = {...} } }. |
Main functions
fn()
- Description: Local prefab function that creates an empty entity. This prefab is never instantiated at runtime — it exists solely to carry asset dependencies for the loading system.
- Parameters: None
- Returns: Entity instance created via
CreateEntity() - Error states: None
AddLoadingAssets(deps, special_event)
- Description: Adds loading screen image assets to the deps table for a given event. Iterates through
LOADING_IMAGESfor the event type (or falls back toNONE) and insertsDYNAMIC_ATLASandPKGREFassets. - Parameters:
deps-- dependency table to modify (must haveglobal.assetsor be initialized)special_event-- event type constant fromSPECIAL_EVENTS
- Returns: None
- Error states: Errors if any atlas path in
LOADING_IMAGESdoes not end with ".xml" (assert failure onv.atlas:sub(-4)check).
AddDependencyPrefab(name, env)
- Description: Creates and registers a prefab with the given name and environment (assets/prefabs). Appends to the
rettable for final return. - Parameters:
name-- string prefab nameenv-- table containingassetsand/orprefabsarrays
- Returns: None
- Error states: None
Events & listeners
None identified