Skip to main content

Cave Base 1

Based on game build 714014 | Last updated: 2026-02-28

Overview

cave_base_1.lua is a static layout file that defines the pre-designed room layout for the initial cave entrance area in Don't Starve Together. It specifies the room's tile-based background layer (BG_TILES) and a set of placed game objects (e.g., firepits, chests, research labs) via an object group (FG_OBJECTS). This file is consumed by the world generation system to instantiate the physical layout and contents of the cave base during map initialization. It is not an ECS component and does not contain executable logic.

Usage example

Static layouts like this one are not used directly by modders in normal gameplay or mod development. They are loaded internally by the world generation system. For reference, the framework loads such layouts via:

-- Example of how worldgen system consumes static layouts (not a user-facing pattern)
local layout = require("map/static_layouts/cave_base_1")
inst:AddFromStaticLayout(layout)

Dependencies & tags

Components used: None — this is a data-only layout definition. Tags: None identified.

Properties

This file returns a Lua table with fixed static structure, not an ECS component, so public instance properties do not apply.

PropertyTypeDefault ValueDescription
versionstring"1.1"Tiled map version format
luaversionstring"5.1"Lua version used for encoding
orientationstring"orthogonal"Map orientation type
widthnumber24Room width in tiles
heightnumber24Room height in tiles
tilewidthnumber16Width of each tile in pixels
tileheightnumber16Height of each tile in pixels
propertiestable{}Global map properties (empty)
tilesetsarrayNon-emptyTileset definition with image path and metadata
layersarrayNon-emptyArray of layers: BG_TILES (tilelayer) and FG_OBJECTS (objectgroup)

Main functions

This file is a pure data container (a Lua table literal) and contains no functions.

Events & listeners

Not applicable — this file provides static layout data and does not participate in the event system.