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
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:
| Event | Default | |
|---|---|---|
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
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
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
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
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,
},
}ObjectsPerMinute | Per player. A very large Scatter can approach it |
BatchSize | How many objects go in one write |
WorldBounds | Anything 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_diagfrom the server console reports what the server sees: the permission configuration, the database, the export and import settings.
rm_mapeditor_statsprints 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:
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.sqlBack 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.