VoltMod is a C++23 framework for Counter-Strike 2 server plugins. The engine loads it as server_valve, with or without Metamod, and one process-wide host, voltmod.dll / voltmod.so, loads your plugins from addons/voltmod/plugins/<name>/. Each plugin gets one VoltMod::Runtime per load cycle with commands, players, menus, messages, engine access, HTTP and an optional database.
Public APIs may change between versions.
Start here
- Getting started - create a plugin, build it, install it, load it
- Writing a plugin - the plugin entry point,
plugin.json, the load report, logging, install layout
- Running the host - the
volt commands, dependencies, refusals, troubleshooting
- Architecture - modules, the host/plugin model, lifetimes and boundaries
- CS2 plugin frameworks - compare languages, runtimes and tooling with other CS2 frameworks
Writing a plugin
- Configuration -
Options<Settings>, validation, reloading, translations
- Commands - chat and console commands, typed arguments, targeting
- Players, targeting, and actions - the roster, permissions and immunity, actions and effects
- Messages and chat colors - messages, replies and chat colors
- Menus - menus and multi-step flows
- Custom UI layouts - Panorama
custom_hud_layout panels and their button presses
- Workshop addons - making clients download workshop addons
- HTTP - the async HTTP client and JSON endpoints
- Database - Postgres, MariaDB and SQLite with migrations
Game API
- SDK wrappers - what each SDK aggregate header brings in, and availability
- Gamedata and schema - the gamedata file, typed bindings, baked schema fields
- Entities and players - entity lookup, the player wrapper, pawn operations
- Rendering and visibility - render tricks, per-recipient visibility, glow vision
- Messaging and chat input - messages, sticky panels, chat input, the vote panel
- ConVars and game events - typed convars, game event listeners, level changes
- Movement, teleports, damage, weapon drops, and server commands - movement and teleport hooks, custom vtable hooks, console commands
- Client telemetry - the server clock, latency, client convar queries
Tooling
License
VoltMod is released under the MIT License.