latchZones
By Latch Labs, for Arcane MP, Kingdoms Connected, Mafia 2 Online, Fallout MP. Free to use. Version 1.0.0.
Named polygon, box, cylinder and sphere zones for Arcane MP: an in-game editor, enter and exit events, and a server API to query them.
About
latchZones Named zones for Arcane MP servers. Draw polygons, boxes, cylinders and spheres in the game, then let your scripts ask "is this player inside?" or react when someone walks in or out. Open source MIT : https://github.com/heylatch/latchzones In game editor. Walk to each corner and press a key; a live outline shows the zone as you draw it. Edit the name, shape, size and heights in a small side panel. Four shapes. Polygon prisms 3 to 64 corners, with a floor and a ceiling or no limit , rotated boxes, cylinders and spheres. Enter and exit events on the server, and optionally on each player's own client. A small server API to define, remove, list and query zones from other resources. No database. Zones are saved to data/zones.json with atomic writes. Safe by default. Nobody can edit until you allow them, by account or from the server console. Installation Get it one of two ways: From Latch. Add it for free at https://heylatch.app/explore/latch/latchzones, then download it from your Library or install it with npx y @heylatch/cli@latest pull latchzones to <server /resources . Running pull again later installs new versions. It runs with your Latch server key, which is free. From this repository. Download the code as a zip or clone it into your server's resources folder as latchZones . The built files are included, so there's nothing to build. Then: 1. Start the resource as you start the others. On the first start, a default config.json is written next to package.json . 2. Give yourself editing rights. Either type zones players in the server console to see your account id and add it to config.json see below , or type zones grant <your player id in the console for this session only. 3. In game, type /zones . The editor page is served from the resource folder fw://resources/<folder /web/index.html ; renaming the folder is fine. Configuration config.json json { "command": "zones", "editors": { "accounts": }, "consoleGrant": true, "clientEvents": true, "keys": { "point": "e", "undo": "backspace", "remove": "delete", "cursor": "f5", "close": "escape" }, "groupColors": { "default": " e5e7eb", "safe": " 4ade80" } } | Key | Meaning | | | | | command | Chat command for editors and the server console command. Default zones . | | editors.accounts | Account ids allowed to edit player.accountId , 32 hex characters . The server proves this id when the player connects, so it cannot be faked by a modified client. Empty by default: nobody can edit. | | consoleGrant | Allow zones grant <player id in the server console rights last until the player disconnects . | | clientEvents | Send each player's own enter and exit events to their client see Events . | | keys | Editor keys while the game has input. Any key name Key.bind accepts. | | groupColors | Outline colour per group rrggbb in the editor. Groups without a colour get a stable one from their name. | Restart the resource after changing the file. A file that cannot be read falls back to the defaults, so editing stays locked to the console. Editing zones Zone names look like group:name in lower case, for example safe:market or event:race start . The part before the colon is the group, which you can filter on in scripts. | Command | What it does | | | | | /zones | Opens the editor with the list of zones. | | /zones new <group:name | Starts drawing a new zone. | | /zones show <name | Opens a zone's details and draws its outline. | | /zones list group | Lists zone names in chat. | | /zones delete <name | Deletes a zone. | While the editor is open: | Key | Action | | | | | E | Polygon: add a corner where you stand. Other shapes: move the centre to where you stand. | | Backspace | Remove the last corner. | | Delete | Remove the corner nearest to you. | | F5 | Show the cursor to use the panel; press again or Esc to go back to the game. | | Esc | Cancel drawing, leave the details view, or close the editor. | The panel shows what is wrong while you draw too few corners, crossing edges, missing name .…