Skip to content

Configuration

killerboyyy777-agent edited this page Sep 21, 2026 · 6 revisions

Configuration

Delete a key (or the whole file) to fall back to the built-in default. Both files are optional; per-key type coercion warns and keeps the default on failure.

server_config.json (game server)

Sections and keys (see file for current values):

  • Scoring/economy/leveling/dungeon/quest constants (XP curve, level bonuses, tax rate + minimum, market slots, dungeon scaling, quest rewards/inputs).
  • Capacity: MAX_TOTAL_CONNECTIONS, MAX_PLAYERS_PER_ROOM, SCORES_SAVE_SECONDS, SCORE_ENTRY_MAX, SCORE_ENTRY_TTL_SECONDS.
  • Commissions/market/party: COMMISSION_MAX_XP, COMMISSION_MAX_KILLS, COMMISSION_MAX_OPEN_PER_POSTER (5), COMMISSION_COLLAB_CAP, COMMISSION_TTL_SECONDS, MARKET_ORDER_TTL_SECONDS, PARTY_INVITE_TTL_SECONDS. Boolean values accept "true"/"1"/"yes"/ "on" (anything else is false) — a string "false" never enables a gate.

--config overlays

python server.py --config <path> re-applies configuration from another file, leaving the prod server_config.json untouched. The soak overlay (ml/conductor/soak_server_config.json, never auto-loaded) compresses only time — market/invite/terminal-commission TTLs in minutes, caps at prod values — so expiry and prune paths fire inside a run. Never point a prod or training server at the overlay.

ml/ml_config.json (agent reward shaping)

  • reward_shaping: SOCIAL_PER_ALLY, FORMATION_BONUS, FORMATION_COOLDOWN_STEPS, XP_LEVEL_BONUS, ECON_INV_LAMBDA.
  • curriculum: CURRICULUM_THRESHOLDS (score cutoffs for stages 1–3).

Scores backups

Every save rotates scores.json → scores.json.1 → scores.json.2 (SCORES_BACKUP_GENERATIONS). Load prefers the primary file and falls back with a warning when it is missing or corrupt — one torn write can never lose the world.

Environment variables

Variable Effect
TEXTMMO_GM_SEED Seed GM treasury gold at startup (tests use 700)
TEXTMMO_REQUIRE_TOKEN 1 requires a token on every login
TEXTMMO_MAX_CONNECTIONS Override connection cap (default 1000)
TEXTMMO_MAX_ROOM_PLAYERS Override per-room cap (default 12)
TEXTMMO_OUTBOUND_QUEUE Per-player outbound queue (default 64)
TEXTMMO_VERBOSE 1 logs every command/HTTP/connect event
TEXTMMO_LOG_FILE Append server stdout/stderr to a file
TEXTMMO_GM_HOST GM bind (default 127.0.0.1; compose sets 0.0.0.0 for intra-network reachability)

Ports

  • 8765 game WebSocket · 8766 dashboard HTTP · 8767 GM stream (loopback-only). Override via flags: python server.py --host 127.0.0.1 --port 8775 --http-port 8776 --gm-port 8777 (--host covers game + dashboard; GM stays loopback-only by default). See Troubleshooting on conflicts.

Docker Compose (compose.yaml)

  • server — the engine; publishes host ports 8765 + 8766. The GM port 8767 stays inside the compose network (ws://server:8767 for the soak service); publish it on the host only on trusted machines (the stanza is commented in the file).
  • botfarm — 4 mixed-policy training bots (BOTFARM_BOTS: -4) against the composed server.
  • soak profile (docker compose --profile soak up soak) — 6 agents / 120s / min 4, writing to /tmp/soak_run.
  • torch-farm profile — 2-agent PyTorch farm (builds with the INSTALL_TORCH arg).
  • scores.json is ephemeral in compose (the volume line is commented out); healthcheck hits /health. TEXTMMO_GM_HOST is 0.0.0.0 inside the network so containers can reach each other.

Clone this wiki locally