Skip to content

Server Setup ​

server_config.lua holds what only the server needs: logging, the audit trail, export and import, and the limits. It is never sent to a client.

Restart the resource after editing.

Discord webhook ​

lua
ServerConfig.Webhook = {
    Enabled = true,
    Url = 'https://discord.com/api/webhooks/...',
    Username = 'Map Editor',
    Avatar = '',
    BatchInterval = 15000,
}

Off by default. Fill in the URL and set Enabled = true.

The webhook URL is a credential

It sits in plain text in server_config.lua. Anyone holding it can post into that channel. Redact it before sending your config to anyone, use a staff-only channel, and rotate it if it leaks.

What gets logged ​

Thirteen events, each switchable:

EventDefault
map_create✅A map was created
map_update✅A map was renamed or changed
map_delete✅A map was deleted
map_toggle✅A map was enabled or disabled
object_create❌Something was placed
object_update❌Something was moved or changed
object_delete✅Something was deleted
object_bulk✅A bulk operation
world_delete✅A game world prop was removed for everyone
export✅A map was exported
import✅A map was imported
editor_open✅Someone opened the editor
editor_close❌Someone closed it
permission_denied✅Someone was refused

The two that are off are off for a reason

object_create and object_update fire on every single placement and nudge. A builder working for an hour would produce thousands of messages. Leave them off unless you are investigating something specific.

Object messages are batched into one message every 15 seconds, so even the ones that are on do not flood a channel.

world_delete and permission_denied are the two worth watching. The first is the only action with server-wide consequences; the second tells you someone is hitting a wall they think they should not be.

Embed colours are configurable as decimals, as Discord wants them.

The audit log ​

lua
ServerConfig.Audit = {
    Enabled = true,
    RetentionDays = 45,
    LogObjectWrites = true,
}

Writes to rm_mapeditor_audit in your database. On by default, and independent of the webhook — you get the trail whether or not Discord is set up.

RetentionDays = 0 keeps everything forever. Forty-five days is a reasonable middle ground; a builder who broke something usually finds out inside a week.

LogObjectWrites = false keeps the map and permission events but drops the per-object rows, which is the bulk of the volume.

Export ​

lua
ServerConfig.Export = {
    Enabled = true,
    Directory = 'exports',
    Formats = {
        resource     = true,
        objectloader = true,
        json         = true,
        ymap         = true,
    },
    MaxBundleMaps = 50,
    ConfirmOverwrite = true,
    ConvertRotationOrderForObjectloader = false,
    YmapStreamingPadding = 400.0,
    YmapDefaultFlags = 1572865,
}

Enabled = false removes exporting entirely, whatever anyone's ACEs say. A format set to false disappears from the export window.

Exports are written to a folder on the server, not on the client of whoever pressed the button.

Full detail in Exporting.

Import ​

lua
ServerConfig.Import = {
    Enabled = true,
    Directory = 'imports',
    MaxBytes = 12 * 1024 * 1024,
    MaxObjects = 20000,
}

A file over either ceiling is refused rather than partially read.

On a production server, Enabled = false is worth considering — maps then only ever arrive through a deliberate deployment rather than through the editor.

Limits ​

lua
ServerConfig.Limits = {
    ObjectsPerMinute = 1500,
    BatchSize = 250,
    WorldBounds = {
        minX = -20000.0, maxX = 20000.0,
        minY = -20000.0, maxY = 20000.0,
        minZ = -1000.0,  maxZ = 5000.0,
    },
}
ObjectsPerMinutePer player. A very large Scatter can approach it
BatchSizeHow many objects go in one write
WorldBoundsAnything outside is refused

The bounds are a sanity check against a bad import or a coordinate typo putting objects somewhere the game cannot reach. They are generous — the playable map is well inside them.

Checking it ​

rm_mapeditor_diag

from the server console reports what the server sees: the permission configuration, the database, the export and import settings.

rm_mapeditor_stats

prints maps, objects and open editor sessions — the quickest way to see whether a build has grown beyond what you expected.

Backing up ​

Five tables, all small unless you have an enormous library:

bash
mysqldump --single-transaction DBNAME \
  rm_mapeditor_maps rm_mapeditor_objects rm_mapeditor_removed \
  rm_mapeditor_unavailable rm_mapeditor_audit \
  -u DBUSER -p > rm_mapeditor_backup.sql

Back up maps and objects together — objects without their map are orphans.

A JSON export is the better backup for one map

The database dump is the right tool for the whole installation. For a single map you care about, export it as JSON — that is portable, readable, and imports straight back into any server running the editor.

After restoring anything, run rm_mapeditor_reload so the running resource re-reads it.

Documentation for RedMorrow. Scripts are licensed per server — redistribution is not permitted.