For the complete documentation index, see llms.txt. This page is also available as Markdown.

Layouts

A layout is a saved build: the props, and the pieces of the map that went to make room for them. This page is about the library this resource keeps for itself, which is what /map_editor opens onto.

None of this exists with cfg.layouts = false. That turns the resource into an editor other scripts call, and they store what comes back. The handlers aren't even registered, so nothing on a client can reach them.

The Browser

/map_editor opens the list rather than the editor: what is saved, who saved it, how many props each holds and how big it is. From a card:

Open

edit it. Done saves back over it

Activate

stand it up for every player on the server

Export

write it out, see Import & Export

Rename, Copy, Delete

the record, not the world

New layout starts empty. Import brings one in from a file.

The filters down the left are all layouts, the active ones, and by whoever saved them.

Who Sees What

A builder, somebody with the editor permission but not the admin one, sees their own layouts and only those. They can't read, rename, overwrite or delete anybody else's, and they can't activate one.

That is decided by identifier rather than by name: two players can carry the same name, and one player can change theirs between saving a layout and coming back to it.

An admin sees everything and can activate. See Configuration for the two aces.

A guest invited into somebody's session reaches none of this. The layout is the host's, and saving it is the host's press.

Activating One

Activate stands the layout up for everybody: props spawn on each client, hidden pieces go out of view, lights are drawn while it is on. It survives a restart: what was standing comes back up when the resource starts.

While you're editing a layout that is standing, your own copy of it is held back. Two copies of the same build in one place is every prop doubled, and the session already has one.

Where It Is Stored

One table, created on the first save:

It holds the name, the author's name and identifier, the rows, the hidden pieces, whether it is active, and when it was made and last touched.

A layout is saved as both halves, the props and the hides, because it isn't reproducible from the props alone: some of them stand where the map's own geometry used to. Reopening a layout without its hides stands a copy of a wall inside the wall it replaced.

The Boundary and Saving

A session is held to an area, and the server filters a save against it rather than trusting the client. Rows outside are dropped, and the save says how many. That is the same rule whether the boundary came from the config, from the host widening it, or from a caller's own zone.

Backing Up

The table is ordinary MySQL: back it up the way you back up everything else. If you want a copy outside the database, the Export button writes a layout file that comes back in through Import.