Skip to content

Server connector

The server connector is a .lua file that Orbiz generates for your project. You put the file on the game server (Crystal or Canary) and it starts counting, tile by tile:

  • deaths: where players died;
  • monsters killed: where players killed monsters;
  • presence: how many online players stood on each tile, sampled every 5 minutes.

Every 5 minutes it sends these counts to Orbiz, which stores them per day for the heat map. You don’t change the server code, recompile or edit any other script. Only the project Owner sets it up.

Server staff (groups with access) and anyone invisible are left out of the death and presence counts, so their position never shows up on the map.

  1. The Owner opens Share and goes to Server connector.
  2. Clicks Generate token and script.
  3. Clicks Download script. The browser downloads orbiz_heat.lua.
  4. Copies the file to a scripts folder on the server, for example data/scripts/orbiz_heat.lua. Any subfolder of data/scripts works.
  5. Restarts the server. The startup log shows a line like [Orbiz] mapa de calor v1 ativo (mortes, monstros, presença, envio a cada 5 min).
  6. Within 5 minutes, go back to Share: Server connector shows when the last packet arrived and how many packets came in.

The server sends a packet every 5 minutes even when there is nothing to count. If the last packet time stops moving, the server stopped sending.

The file carries the connector token, which is the password for sending. Don’t publish the file or put it in a public repository.

The game server’s sender can’t set headers, so the token travels in the address (/api/ingest/<token>). With the debug log level on, the game server’s log keeps that address, and Orbiz does not write that path to an access log of its own (Cloudflare, in front of Orbiz, may keep the URL). If the token leaks, Generate new token invalidates the old one.

The game server gets a success answer even when Orbiz refuses the packet (otherwise the server’s notice queue would get stuck), so the reason shows up in Share, under Server connector: “Último pacote recusado” (last packet refused). The possible reasons:

  • the packet doesn’t have the expected format (for example, the file was edited);
  • the packet time is out of range: Orbiz only accepts packets up to 2 days old and up to 1 day ahead. Check the game server clock;
  • the project’s daily count limit was reached (2 million a day, above the most the script can send).

The notice goes away once a packet is accepted again.

Each packet carries only the type (death, monster killed or presence), the floor, x, y and the count for that tile in the period. Orbiz stores the sum per tile and per day (UTC day) and deletes anything older than 90 days.

Not sent: player names, accounts, character ids, IPs, monster names, who killed whom, or the time of each event. Orbiz rejects any packet with an extra field.

Orbiz stores only a fingerprint of the token, not the token. That’s why Download script shows up only right after the token is generated. To download again, click Generate new token: the file already on the server stops working at once. Replace it on the server with the new one and restart.

  • Revoke makes the server stop sending. Counts already received stay until they turn 90 days old.
  • Generate new token also invalidates the current file.
  • Delete heat map data deletes every count in the project. The connector keeps working.

After revoking, remove orbiz_heat.lua from the server. Until then it keeps sending packets, and Orbiz drops them.

Checked against the source code on 10/20/2026, in the zimbadev/crystalserver and opentibiabr/canary repositories:

  • Crystal Server: sending through Webhook.sendMessage, the monster-killed hook (monsterOnDropLoot and the corpse owner) and the death, login and timer events.
  • Canary: the same, with the same rule for the corpse owner and for when the monster-killed hook runs.

The script adapts to what exists. If a hook is missing, the startup line lists only the ones that turned on. If it hits 20 errors, it turns itself off and writes one log line. The game runs normally in both cases.

Limits that come from the game server:

  • A killed monster counts only when it leaves a corpse with loot. Reward bosses, summons and servers with rateLoot = 0 don’t count.
  • When the server restarts, whatever wasn’t sent yet (up to 5 minutes) is lost.
  • Sending uses the same queue as the server’s Discord notices. If Orbiz is down, the server retries every second, logs an error on each try, and Discord notices wait in the queue until Orbiz is back. The script sends small packets (up to 100 counts, about 5 KB), so each try logs about 5 KB plus Orbiz’s answer: close to half a gigabyte of log per day of outage. Meanwhile the queue, which lives in the server’s memory, grows by at least one packet every 5 minutes. During a long outage (more than a few hours), take orbiz_heat.lua out of the scripts folder and restart; put it back when Orbiz is up.
  • On Crystal, a packet can rarely get lost or arrive twice when sending is slow. Orbiz ignores the repeated packet.

Sending uses Webhook.sendMessage, which Crystal and Canary have. On servers without it (TFS and other forks), the startup line warns Webhook.sendMessage não existe neste servidor, nada será enviado. The script keeps counting in memory, up to a cap, but nothing reaches Orbiz. This version has no other way to send: remove the file from the server.