[Unit] Description=w3cs command-stream seat %i (relay + warm game) After=network-online.target w3cs-pulse.service Wants=network-online.target w3cs-pulse.service [Service] User=ubuntu WorkingDirectory=/home/ubuntu/w3cs-lab Environment=W3CS_LAB_ROOT=/home/ubuntu/w3cs-lab Environment=W3CS_PERSISTENT_SESSION=1 Environment=W3CS_WARM_REPLAY=default Environment=W3CS_WARM_PROFILE=native-1285 Environment=W3CS_NATIVE_RELAY=1 # On-demand catalog replays: a sha1 replay id not staged locally is # materialized from the R2 mirror through the public CDN (replay + exact # map, sha1-verified, content-addressed caches under replays/.content). # The index is refreshed by w3cs-catalog-index.timer. Environment=W3CS_CATALOG_INDEX=/home/ubuntu/w3cs-lab/catalog-serving.json Environment=W3CS_CATALOG_BASE_URL=https://cdn.war3replays.com # Cast-overlay descriptors (colours, races, APM, hero levels) parsed from # the replay on first play (native/ensure-cast-descriptor.sh). Environment=W3CS_CAST_DIR=/home/ubuntu/w3cs-lab/cast Environment=W3CS_CAST_TOOL=/home/ubuntu/w3cs-lab/app/tools/make-cast-descriptors.mjs Environment=W3_PARSER_ROOT=/home/ubuntu/war3-repo Environment=W3_D3D9_NO_RASTER=1 Environment=W3_D3D9_SOURCE_WIDTH=1024 Environment=W3_D3D9_SOURCE_HEIGHT=768 Environment=W3_D3D9_CAPTURE_FPS=40 # Render cap = capture cap: every present is captured (no 2-of-3 sampling # beat at 60), and the engine skips render work no viewer ever sees. The # relay derives its input-settle timing from this value (engine_poll_ms), # so change both sides together by changing only this line. Measured: the # CPU saving is ~5% at 8x replay speed (simulation dominates); it grows at # lower speeds where the render share is larger. Environment=W3_D3D9_MAX_FPS=40 # Adaptive command quality keeps the 40 FPS source cadence fixed. Q8 is the # normal profile. The relay can select Q6 or Q1 when measured path capacity # cannot carry the current command demand, then move back up after two clean # reports. These flags are encoder capabilities, not client controls. Environment=W3CS_ADAPTIVE_QUALITY=1 Environment=W3CS_QUALITY_LEVEL=8 Environment=W3CS_QUANT=1 Environment=W3CS_OCTA=1 Environment=W3CS_BLOBREF=1 Environment=W3CS_TEXDELTA=1 Environment=W3CS_COMPACT_DRAW=1 Environment=W3CS_TYPED_ATTR=1 Environment=W3CS_PACKED_POS=1 Environment=W3CS_RAIN_QUAD=1 # WebP work is asynchronous. All seats share the host-local cache and two # encoder slots. The relay never blocks the capture path on disk or encoding. Environment=W3CS_WEBP_RESOURCES=1 Environment=W3CS_WEBP_CACHE_DIR=/home/ubuntu/w3cs-lab/webp-cache-v2 Environment=W3CS_WEBP_HOST_SLOTS=2 Environment=W3CS_WEBP_QUEUE_BYTES=33554432 Environment=W3CS_WEBP_CACHE_BYTES=25769803776 ExecStartPre=+/usr/bin/env W3_CLASSIC_PREFIX_LOWER=/opt/war3-runtime/classic-131/prefix64 W3_CLASSIC_PREFIX_ROOT=/run/war3-prefixes/classic131 W3_CLASSIC_BUILDER_OVERLAY_ROOT=/run/war3-prefix-overlays/classic131 /usr/local/sbin/war3-prepare-classic-builder-prefix %i ExecStart=/usr/local/sbin/w3cs-seat-launch.sh %i Restart=always RestartSec=3 TimeoutStopSec=20 KillMode=mixed [Install] WantedBy=multi-user.target