Skip to main content

Max Puzzle2

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

Overview

This file defines a static world layout used in a Max-themed puzzle area. It is not a Lua component in the traditional ECS sense (i.e., it does not define a class or attach to an entity via inst:AddComponent), but rather a data-only Tiled map export (MAX_puzzle2.lua) that specifies tile-based environment geometry. The layout includes:

  • A 40×40 tile background layer (BG_TILES) with repeating tile IDs to form ground patterns.
  • An object layer (FG_OBJECTS) containing placed in-game assets like rock1, rock2, wall_stone, and wall_wood.

It serves as level data consumed by the world generation or level loading systems to instantiate prefabs and tiles, not as an active runtime component with behavior or logic.

Usage example

This file is returned as a Lua table and loaded by the engine during world generation. Modders do not directly instantiate or call functions on it. An example of how such data may be loaded (not modder-facing, but for context) is:

local layout = require("map/static_layouts/MAX_puzzle2")
-- The layout table is passed to level-building systems, e.g.:
-- worldbuilder:AddStaticLayout(layout)

Dependencies & tags

Components used: None identified — this is a pure data file with no component interactions.

Tags: None identified — no entity tags are added, removed, or checked.

Properties

This file does not define any runtime properties or class variables. It is a static table export of a Tiled map. The structure is:

PropertyTypeDefault ValueDescription
versionstring"1.1"Tiled export version.
luaversionstring"5.1"Lua version used for export.
orientationstring"orthogonal"Map orientation type.
widthnumber40Map width in tiles.
heightnumber40Map height in tiles.
tilewidthnumber16Width of each tile in pixels.
tileheightnumber16Height of each tile in pixels.
propertiestable{}Map-level custom properties (empty here).
tilesetsarraysee sourceArray of Tiled tileset definitions (1 entry: ground).
layersarraysee sourceArray of layers: BG_TILES (tile layer) and FG_OBJECTS (object layer).

tilesets structure

FieldTypeDescription
namestringTileset name ("ground").
firstgidnumberFirst global tile ID (1).
filenamestringRelative path to .tsx file.
imagestringRelative path to tileset image.
imagewidth/imageheightnumberDimensions of tileset image.
tilewidth/tileheightnumberSize of tiles in tileset (64×64 here).

layers structure

  • BG_TILES (type = "tilelayer"):
    • data: 1600-element array of tile IDs (row-major order).
    • Tile IDs: 0 = empty, 2, 3, 9 = distinct ground tile types.
  • FG_OBJECTS (type = "objectgroup"):
    • objects: array of placed prefabs.
    • Each object has type (prefab name), x/y (position in pixels), and width/height (0 = default size).
    • Includes single rock2, multiple rock1, wall_stone, and wall_wood placements.

Main functions

This file defines no functions. It is a data structure only.

Events & listeners

This file defines no event handlers or listeners.