Package reference
Every capability is a separate @s2script/<name> package. Import the types at author time; the engine injects the runtime at load. Browse live module pages from the catalog.
Core platform
| Package | What it gives you |
|---|---|
@s2script/entity | EntityRef, create/spawn/teleport/remove, I/O |
@s2script/frame | OnGameFrame |
@s2script/timers | delay / nextTick / nextFrame / threadSleep |
@s2script/math | Vector, QAngle, forwardVector |
@s2script/console | Injected console |
@s2script/interfaces | publishInterface / consumer proxies |
@s2script/config | Typed config + raw file I/O |
@s2script/plugins | List loaded plugins |
Players & world
| Package | What it gives you |
|---|---|
@s2script/clients | Slot-backed Client + lifecycle events |
@s2script/events | Game events, pre-hooks, fire |
@s2script/damage | Damage.onPre |
@s2script/trace | Line / ray / hull traces |
@s2script/usermessages | Protobuf UserMessage builder |
@s2script/cs2 | Player, Pawn, GameRules, CS2 sugar |
Admin & chat
| Package | What it gives you |
|---|---|
@s2script/commands | register / registerAdmin / chat triggers |
@s2script/chat | Chat.toSlot / toAll / onMessage |
@s2script/admin | Admin cache + ADMFLAG |
@s2script/bans | Ban cache helpers |
@s2script/server | Server.command, cvars, onMapStart |
@s2script/menu | Interactive menus |
@s2script/topmenu | Aggregated admin menu registry |
@s2script/votes | Chat-ballot votes |
Persistence & network
| Package | What it gives you |
|---|---|
@s2script/db | Async SQLite |
@s2script/cookies | Client preference cookies |
@s2script/http | Off-thread fetch |
@s2script/ws | Client WebSocket |
Plugin-published
| Package | What it gives you |
|---|---|
@s2script/zones | Zone CRUD + enter/leave/stay events (published by the zones plugin) |
Game-specific facts stay in @s2script/cs2 (and future @s2script/<game>). Litmus test: would this still be true on another Source 2 game? If no → game package.