Getting started
s2script is a TypeScript plugin runtime for Source 2 games (Counter-Strike 2 first), loaded via Metamod:Source. The live runtime is CS2 on linuxsteamrt64 only.
Prerequisites#
- A Counter-Strike 2 dedicated server (Linux x86-64 /
linuxsteamrt64). - Stock Metamod:Source with plugin API (PLAPI) 18 support, installed under
game/csgo/addons/metamod/. No patched or custom Metamod host is required; a compatible official upstream release is fine if you confirm PLAPI for that release and every other native plugin on the server. - Custom Panorama HUD also needs MultiAddonManager v1.6.1 or later. v1.6 is stale for CS2 builds 25515854+: the addon-list offset does not match, so clients never mount the HUD addon. See HUD.
Install the runtime#
- Download the latest
s2script-cs2-linux-*.zipfrom the Download page (or GitHub Releases). - Extract into
game/csgo/soaddons/overlays in place. That creates a SHA-256–verified CS2 game package underaddons/s2script/:
addons/s2script/
bin/linuxsteamrt64/s2script.so
bin/linuxsteamrt64/libs2script_core.so
game-packages.json
game-packages/cs2/index.js
game-packages/cs2/gamedata.json
game-packages/cs2/trusted-functions.json
gamedata/core/
gamedata/sdkhooks/
plugins/game-packages.json is selected-package metadata plus artifact hashes. The native shim (s2script.so) and core (libs2script_core.so) must ship as a pair — replace the whole zip rather than mixing versions.
Operator overrides still live in addons/s2script/gamedata/cs2/custom/ and apply after the verified package data (acquire, HUD-click, and damage signature repairs included). Every repair is reported at boot. Shipped game files are no longer loaded from gamedata/cs2/ or js/pawn.js; there is no prelude-by-path fallback.
- Patch
gameinfo.giso Metamod is the first SearchPath:
Game csgo/addons/metamod- Ensure
addons/s2script/configsandaddons/s2script/dataare writable. - Restart the server and confirm with
meta list.
The native s2script shim stays resident during gameplay. .s2sp plugins still hot-reload inside s2script; stop and restart the server for native shim or Metamod updates.
Operators can bound native async admission with S2SCRIPT_ASYNC_LIMITS_JSON before starting the process — Async & networking.
Base plugins#
The release zip includes the SourceMod-parity suite (basecommands, basechat, playercommands, antiflood, adminhelp, basecomm, basebans, reservedslots, basetriggers, funcommands, clientprefs, adminmenu, basevotes, zones).
First adoption of the versioned cookie schema needs matched core and clientprefs artifacts installed with the server stopped, then a fresh process. Do not hot-load a newer clientprefs over an older generation with unversioned cookie writes still in flight. clientprefs is the sole cookie-table writer — see Cookies.
Opt-in plugins (nominations, rockthevote, nextmap, funvotes) live under plugins/disabled/ — the loader’s non-recursive scan skips that subdirectory. To enable one, move its .s2sp up one level into addons/s2script/plugins/.
Next#
- Coming from another framework: SourceMod, CounterStrikeSharp, ModSharp, Swiftly
- Authoring plugins
- Plugin lifecycle
- HUD (CS2 Panorama)
- Custom camera
- Browse plugins
- Package reference