Skip to main content

Two

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

Overview

This file defines a static map layout (two.lua) used in the game's world generation system for Don't Starve Together. Specifically, it describes a 32×32 tile-based room layout for a residential hallway, stored in Tiled Map Editor format. It includes a background tile layer (BG_TILES) with numeric tile IDs and an empty foreground object layer (FG_OBJECTS). The layout is part of the static_layouts module, which is consumed by the worldgen system to construct deterministic room layouts.

Usage example

This file is not instantiated as an entity component; instead, it is returned as a data structure by the worldgen system when constructing a hallway room. Modders would reference this format when creating custom static room layouts.

-- Example of loading and inspecting the layout (not executable in mod context without worldgen internals)
local hallway_layout = require("map/static_layouts/rooms/hallway_residential_two/two")
print(hallway_layout.width, hallway_layout.height) -- 32, 32

Dependencies & tags

Components used: None identified
Tags: None identified

Properties

PropertyTypeDefault ValueDescription
versionstring"1.1"Tiled format version
luaversionstring"5.1"Lua engine version target
orientationstring"orthogonal"Tilemap orientation
widthnumber32Map width in tiles
heightnumber32Map height in tiles
tilewidthnumber16Width of each tile in pixels
tileheightnumber16Height of each tile in pixels
tilesetstable(see source)Array of tileset definitions
layerstable(see source)Array of map layers (tile and object groups)
propertiestable{}Global properties (empty)

Main functions

Not applicable — this is a data-only module returning a static table.

Events & listeners

Not applicable — this module does not define or respond to events.