Skip to content
S4NDM4NNPublic

About

new mod, who this?

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

s4ndmod26

A self-hosted Return to Castle Wolfenstein server and client distribution. One docker compose up starts the game server and a web frontend that serves status, downloads, one-line installers, and a live/replay timeline viewer.


What's Inside

Component Source Notes
iortcw server + client iortcw/ 1.51d, all platforms
Bot AI library omnibot/ Omni-bot 0.93, CMake
Game interface (qagame/cgame/ui) mod/src/ bjam, all platforms
Bot scripts + waypoints assets/ 315 maps covered
Web frontend infra/web/ nginx + Go status API
Base game data gamedata/main/ Free RTCW MP demo pak; mounted at runtime; see Quick Start

Quick Start (Server)

git clone https://github.com/S4NDM4NN/s4ndmod26.git
cd s4ndmod26

# Populate gamedata/ on first run (copies server.cfg, pk3, game module):
docker build --target gamedata --output type=local,dest=./gamedata .

# Drop the free RTCW multiplayer demo pak into gamedata/main/ (or let the image
# download fallback handle it — slower first start):
#   gamedata/main/demopak0.pk3

docker compose up -d
  • Game server: udp/:27960
  • Web frontend: http://localhost — status, downloads, install instructions, timeline

The server writes replays and runtime state into gamedata/s4ndmod26/, which is bind-mounted into the container so it persists across restarts.


Quick Start (Pre-built Images)

If you don't want to build from source, you only need three things: the compose file, your retail paks, and a server.cfg.

1. Grab the compose file

mkdir s4ndmod26 && cd s4ndmod26
curl -O https://raw.githubusercontent.com/<your-repo>/main/docker-compose.yml

2. Create the directory structure and a minimal server.cfg

mkdir -p gamedata/main gamedata/s4ndmod26

cat > gamedata/s4ndmod26/server.cfg << 'EOF'
seta sv_hostname      "s4ndmod26"
seta sv_maxclients    20
seta sv_pure          1
seta sv_allowDownload 1
seta sv_dlURL         "http://<your-server-ip>/downloads"
seta rconpassword     "changeme"
seta g_gametype       5
seta timelimit        20
seta fraglimit        0
seta g_userAxisRespawnTime    15
seta g_userAlliedRespawnTime  8
seta g_OmniBotEnable  1
seta g_OmniBotFlags   0
seta omnibot_path     "/rtcw/omni-bot"
map mp_beach
EOF

3. Drop in the RTCW multiplayer demo pak

gamedata/main/demopak0.pk3

4. Pull and start

docker compose pull
docker compose up -d

The game module (qagame) and mod pk3 are baked into the server image and deployed automatically on each container start — no build step required. Update to a new release with docker compose pull && docker compose restart.


Playing (Client)

Linux

curl -sL http://s4ndmod.com/install.sh | bash
~/rtcw/iowolfmp.x86_64 +set fs_basepath ~/rtcw +set fs_game s4ndmod26 +connect s4ndmod.com

Windows (PowerShell)

iwr -useb http://s4ndmod.com/install.ps1 | iex
~\wolf\ioWolfMP.x64.exe +set fs_basepath ~\wolf +set fs_game s4ndmod26 +connect s4ndmod.com

Both installers download the iortcw client, base game paks, and the mod. Custom install path: set RTCW_DIR (Linux) or $env:RTCW_DIR (Windows) before running.

Note: The retail RTCW client is supported — the mod pk3 includes 32-bit cgame/ui modules so the original client can load the mod without iortcw.


Build Stages

The Dockerfile is multi-stage with full layer caching:

game-src-linux / game-src-windows   compiler base images
game-linux-64 / game-linux-32       qagame/cgame/ui .so (bjam)
game-win-64 / game-win-32           qagame/cgame/ui .dll (MinGW cross-compile)
omnibot-lib-builder                 omnibot_rtcw.x86_64.so (CMake)
pk3-builder                         s4ndmod26.pk3 (content + client modules)
iortcw-builder                      iowolfded.x86_64 (server binary)
iortcw-client-linux-64              iowolfmp.x86_64 + renderer .so
iortcw-client-windows-64            ioWolfMP.x64.exe + renderer .dll + SDL/OpenAL
status-api-builder                  Go status API binary
runtime                             final server image
web                                 nginx + status API + all downloads
gamedata                            scratch stage — seeds gamedata/ on first run

To seed gamedata/ on a fresh checkout:

docker build --target gamedata --output type=local,dest=./gamedata .

Configuration

Server — gamedata/s4ndmod26/server.cfg

This file lives in the bind-mounted gamedata/s4ndmod26/ directory so edits take effect on the next server restart without a rebuild.

Cvar Default Description
sv_hostname iortcw Omnibot Server Name shown in server browser
sv_maxclients 20 Max players + bots combined
sv_pure 1 Pure server check (see note below)
g_userAxisRespawnTime 10 Axis respawn time (seconds)
g_userAlliedRespawnTime 10 Allied respawn time (seconds)
rconpassword (empty) Set this before exposing to the internet

sv_pure note: Now 1 — requires the iortcw build to use STANDALONE=1 so clients load cgame/ui from pk3s rather than loose files. Built with STANDALONE=1 in the iortcw Makefile flags for both iortcw-builder and iortcw-client-* stages.

Bot count — assets/scripts/rtcw_autoexec.gm

Server.MinBots = 0;        // bots may all leave when there are enough real players
Server.MaxBots = 12;       // fill to 12 players in total (6v6); a bot leaves for each real player who joins
Server.BalanceTeams = true; // move bots between teams so humans piling onto one side don't unbalance them

MaxBots is the total player count the server fills to, not a number of bots. Real players are never kicked, so with more than 12 of them there are simply no bots. Needs sv_maxclients above 12 (it is 20).

Bot count can't be set in server.cfg — Omnibot hasn't loaded yet when that file executes.


Adding Maps

Drop any map pk3s into ./gamedata/main/ — that directory is mounted directly into /rtcw/main/ inside the container, which is the standard RTCW search path. No rebuild or restart required beyond bringing the container up:

# drop pk3s into ./gamedata/main/, then:
docker compose up -d

The base game pak (demopak0.pk3 — the free RTCW multiplayer demo, covers mp_beach + mp_trenchtoast) goes in the same folder.


Updating iortcw

iortcw source is vendored in iortcw/. To pull upstream changes:

git clone --depth=1 https://github.com/iortcw/iortcw.git /tmp/iortcw-upstream
rsync -av --delete /tmp/iortcw-upstream/ iortcw/
git add iortcw/ && git commit -m "iortcw: sync from upstream"

Directory Layout

s4ndmod26/
├── iortcw/                          ← vendored iortcw source (server + client)
├── mod/
│   └── src/                         ← qagame/cgame/ui source (bjam)
├── omnibot/                         ← Omni-bot source (CMake)
├── assets/
│   ├── scripts/                     ← GameMonkey bot scripts
│   ├── nav/                         ← waypoints + goal files (315 maps)
│   ├── global_scripts/              ← shared Omni-bot utilities
│   └── game/ob_media.pk3            ← bot skins/sounds
├── third_party/
│   └── zlib/                        ← zlib source for replay compression + omnibot physfs
├── infra/
│   └── web/
│       ├── entrypoint.sh            ← web container entrypoint
│       ├── nginx/html/              ← index.html, install.sh, install.ps1, timeline.html, …
│       ├── status-api/              ← Go status + replay API; cmd/s4nd-agent = server container entrypoint
│       └── supervisord.conf
├── gamedata/                        ← bind-mounted host volume (persists across restarts)
│   ├── main/                        ← base game pak (demopak0.pk3, free RTCW MP demo)
│   └── s4ndmod26/
│       ├── server.cfg               ← server configuration (edit here)
│       ├── s4ndmod26.pk3            ← mod pk3 (rebuilt by Docker)
│       ├── qagame.mp.x86_64.so      ← server game module (rebuilt by Docker)
│       └── replays/                 ← replay files + pre-computed JSON analysis
├── Dockerfile                       ← all build + runtime stages
└── docker-compose.yml               ← two services: rtcw-server + web

Omni-bot's gmscriptex dependency is vendored directly in-tree under omnibot/dependencies/gmscriptex; there is no submodule bootstrap step.


Runtime Layout (server container)

/rtcw/
├── iowolfded.x86_64
├── main/
│   └── demopak0.pk3                 ← base game (free MP demo, ~65 MB)
└── s4ndmod26/
    ├── qagame.mp.x86_64.so          ← server game module (Omnibot hooks)
    ├── cgame.mp.x86_64.so           ← client module (for connecting Linux clients)
    ├── ui.mp.x86_64.so
    ├── s4ndmod26.pk3                ← mod content (shaders, sounds, HUD)
    ├── server.cfg                   ← bind-mounted from gamedata/s4ndmod26/
    └── replays/                     ← replay files + JSON, bind-mounted from gamedata/

The web container also mounts gamedata/s4ndmod26/ so the status API and nginx can serve replay files directly from the same directory the server writes into.


Web Frontend

  • / — server status and player list
  • /stats.html — find games (search by player or map, filter, sort); each game opens its stats page (/games.html redirects here)
  • /game.html?r=<name> — a game's stats, awards and event feed
  • /paths.html?live=1 — the running game in the 3D viewer, at least 90 s behind it (the site's Live button)
  • /paths.html?r=<name> — a finished game in the 3D viewer
  • /timeline.html?mode=replay&r=<name> — the classic timeline for a completed match (linked quietly from the stats page)
  • /timeline.html?mode=live — the classic live timeline (SSE stream, real time; not linked from the nav)
  • /downloads/ — client installers, mod pk3, base game paks

Known Limitations

  • No map rotation — server stays on mp_beach. Add a rotation to server.cfg or use a restart script.
  • sv_pure 1 — requires clients to run from pk3s; loose-file cgame/ui mods will be rejected.
  • Windows client — cross-compiled via MinGW and served for download; tested on Windows.
  • Incomplete navs — 315 maps have full waypoints; maps in assets/incomplete_navs/ have partial coverage and bots may not path correctly.
  • No rcon password — set one in gamedata/s4ndmod26/server.cfg before exposing to the internet.

About

new mod, who this?

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages