EGGOXdevelopers

Rooms

room.json holds a room's settings, its rules, and every thing standing in it.

Each room is a folder under rooms/, named like the room, with a room.json and its script files.

room.json

{
  "id": "room:tpi_room_…",
  "name": "Skybound",
  "root": true,
  "width": 48, "height": 48,
  "view": "iso", "view_height": 1, "camera": "fit",
  "chat": "line", "watch": "off", "capacity": 8,
  "rules": [
    { "kind": "rounds", "seconds": 90, "min": 2, "countdown": 5, "results": 8 },
    { "kind": "winner", "by": "points" }
  ],
  "things": [
    { "id": "placed_…", "thing": "Guardian", "x": 24, "y": 20 },
    { "thing": "Skybound Sign", "x": 20, "y": 26, "bricks": [{ "kind": "sign", "text": "Strike the guardian." }] },
    { "thing": "Spawn Pad", "x": 24, "y": 30, "rotation": 90, "bricks": [{ "kind": "spawn", "team": "red" }] },
    { "door": "Belt Island", "x": 40, "y": 10 }
  ]
}

Settings

fieldvaluesmeaning
roottrue on one roomthe game's own room, where its door leads
width, height12 to 48the room in tiles
viewiso, topthe world's own view, or a board from above
view_height0, 1, 2seen from above: a plan, three-quarter, tall fronts
camerafit, followthe whole board, or the player
chatline, open, offEnter opens one line; the bar stays open; no chat
watchoff, quiet, openwhether a copy can be watched, and whether watchers talk
capacity1 to 1000people per copy

A room folder with no matching room on the server is created on push. A room on the server with no folder is left as it is, and the push says so.

Rules

rules is the list of bricks on the game for this room: rounds, winner, teams, lives, score, welcome. No rounds makes a hangout. Every brick and its fields: Bricks.

Things

Each entry in things is one placed thing:

fieldmeaning
thingthe name of a thing in the game's stock
doorinstead of thing: another room of the game; the door stands here
x, ythe tile
idwritten by a pull; a thing that keeps its id and its tile stays as it is, everything else is placed anew
bricksbricks on this one placed thing, on top of the thing's own
rotation0, 90, 180, 270
heightits lift, in voxels
looka filter name, as the placement panel offers
hiddentrue for a thing a script shows later

Things are placed in the order listed; a tile another thing already covers refuses, and the push names the entry.

Script files

rooms/<Room>/<file>.lua are the room's files, each compiled as its own block, in name order (name them 1-main.lua, 2-shop.lua if it matters). Globals are shared between files and with the scripts on things. Up to 8 files of 16 KB each. A room with no .lua file has no script.

This page as markdown: /project/rooms.md