Theme
server.json
game-server/server.json is read once at start-up. Example (the file shipped with the repository, plus a placeholder key):
json
{
"name": "WildM LAN",
"desc": "Serveur de test WildM en réseau local",
"tags": ["roleplay", "dev"],
"locale": "FR",
"maxPlayers": 32,
"httpPort": 30120,
"gamePort": 30121,
"masterUrl": "http://127.0.0.1:7777",
"spawn": { "x": -3112.6, "y": 5535.8, "z": 956.0 },
"svKey": "wfx_<your key from the Portal>"
}| Field | Type | Used for |
|---|---|---|
name | string | Server name in /info and in the TCP welcome message. The public list uses the Portal's name instead. |
desc | string | Description in /info. |
tags | string[] | Tags in /info. |
locale | string | Locale in /info. |
maxPlayers | number | Enforced: a hello beyond this count gets {"t":"error","msg":"Serveur plein"} and is disconnected. Also sent in the heartbeat. |
httpPort | number | HTTP port for /info and resources. This is the port players use for direct connect, and the port announced to the master. |
gamePort | number | TCP port for player sync. Players learn it from /info. |
masterUrl | string | Base URL of the master server; heartbeats go to <masterUrl>/heartbeat. |
spawn | {x,y,z} | Sent to clients in welcome. Metres: x east, y north, z up. |
svKey | string | Your server key from the Portal. Optional; without it the server is not listed. |
resources | string[] | Resources to start, in order (dependencies first). All resources when absent. See Scripting (Lua). |
permissions | string[] | ACE directives (add_ace …, add_principal …), applied at start-up, before permissions.cfg next to server.js. See Entities, state bags & permissions. |
entityRange | number | Distance (metres, 2D) within which a player receives network entities. Default 400. |
stateBagClientWrite | boolean | false forbids every state bag write from clients. Default: players may write their own player: bag and entities they own. |
requireAccount | boolean | true refuses players without a WFX.re account verified by the master (needs svKey). Default false. |
Name, description, tags and locale are also sent in each heartbeat, but the master ignores them for listed servers and uses the Portal's values.
Environment variables
| Variable | Effect |
|---|---|
WILDM_SV_KEY | Replaces svKey from server.json. Recommended, so the key is not stored in a file. |
WILDM_HOST | The address announced to the master and returned in /info.host. By default the server uses its first private LAN IPv4 address (10.x, 172.16–31.x, 192.168.x), or 127.0.0.1 if none. Set it to your public IP or hostname for an internet server. |
powershell
$env:WILDM_SV_KEY = "wfx_…"; $env:WILDM_HOST = "play.example.org"; node server.jsSpawn point and the launcher
/info does not currently include spawn. The launcher therefore takes the spawn written into wildm_connect.json from the first resource.json in your resources that has a spawn field (today wildm-base/resource.json). Keep the two values consistent. The current client does not move the player to the spawn point.