This guide assumes you have a working local CS2KZ server installed (see https://docs.cs2kz.org/servers/lan).
- Install VS Code with the
C/C++extension - Install Visual Studio 2022 with atleast these invidual components (or just the whole editor):
- C++ core features
- MSVC v143 x64/86
- Windows 11 SDK
- Install Python 3.3+ and AMBuild.
- Clone the repo with submodules and symlinks enabled:
git clone -c core.symlinks=true --recursive https://github.com/KZGlobalTeam/cs2kz-metamod.gitFrom the repository root:
mkdir build
cd build
python ../configure.py
ambuildMake sure AMBuild detects MSVC/cl.exe.
- Re-run
ambuildafter code changes. - Copy files from
build/package/to your server'sgame/csgo/folder. - For debugging in VS Code, create a
.vscode/launch.jsonfile with a launch configuration like the following (alteast replace paths to match your setup):
{
"version": "0.2.0",
"configurations": [
{
"name": "(Windows) Launch",
"type": "cppvsdbg",
"request": "launch",
"program": "C:\\cs2-ds\\game\\bin\\win64\\cs2.exe",
"console": "externalTerminal",
"args": [
"-dedicated",
"-console",
"+map de_dust2",
],
"logging": {
"moduleLoad": false,
"trace": true
},
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
},
]
}- Before making a PR, run formatting (use Git Bash on Windows):
./scripts/format.sh