Skip to main content

Barracks

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

Overview

This file is a Tiled map export (barracks.lua) used to define the static layout of the Barracks level in Don't Starve Together. It contains tile layer data (BG_TILES) and an object group (FG_OBJECTS) specifying placements for ruins, broken walls, and spawner entities (e.g., chessjunk_spawner, rook_nightmare_spawner, bishop_nightmare_spawner). The component is not an ECS component—it is a static data file consumed by the world generation system to instantiate the level geometry and entities.

Usage example

This file is loaded and processed internally by the world generation system. It is not directly instantiated or manipulated by modders. However, a typical workflow would involve referencing the map in a level or task configuration:

-- Example: How this layout might be referenced in a level/task definition
return {
static_layout = "barracks",
spawn_points = {
player = { x = 320, y = 320 },
boss = { x = 256, y = 192 },
},
}

Dependencies & tags

Components used: None. This is a pure data file with no runtime component logic or component API calls. Tags: None identified.

Properties

The table returned by this file is a Tiled map export and contains no custom modder-facing properties or methods. Key structural fields include:

PropertyTypeDefault ValueDescription
versionstring"1.1"Tiled format version.
luaversionstring"5.1"Lua compatibility version.
orientationstring"orthogonal"Map orientation.
widthnumber40Map width in tiles.
heightnumber40Map height in tiles.
tilewidthnumber16Width of each tile in pixels.
tileheightnumber16Height of each tile in pixels.
tilesetstable(see source)Tileset definitions, including image and tile metadata.
layerstable(see source)Array of layers (tilelayer and objectgroup).

Main functions

This file contains no functions. It returns a static data table only.

Events & listeners

This file does not define or interact with any events or listeners.