Skip to content

The map's file

Beside a map’s glTF lies a file you write by hand, <map>.jsonc: JSON with comments. The importer reads it with the map.

maps/yard/yard.jsonc
{
"title": "Yard",
"gametypes": ["tdm", "zom", "ctf", "sd", "zombies"],
"loadscreen": "yard_load",
"fog": { "color": "#8a96a3", "half_at": 60 }
}
Key What it is
title what players see the map called, as in the server list; up to 32 characters. Needed.
gametypes the game modes the map has the markers for. The first is played when the server names none; any other is refused. Needed.
loadscreen the image the loading screen shows, images/<loadscreen>.png.
fog the fog the map is seen through: a colour, #rgb or #rrggbb, and half_at, the metres, 0.01 or more, at which half of what lies there is hidden. The sky fades into it. A client script may set another.

A mod may hold code for one map in its maps/<map>/ layer: <map>.server.luau and <map>.client.luau. It runs in every game mode played on that map, after the modules and before the game mode. That is the place for a map’s own doors, lifts and traps.

-- maps/yard/yard.server.luau
triggers.buy_door_a:on("activated", function(e)
parts.door_a:move_by(vector.create(0, 3, 0), 1, { timing = "ease-in-out" })
end)