Skip to content

AMX Mod X – CSRetro

CSRetro ships a vendored AMX Mod X tree at 3rdparty/amxmodx/ and builds the Metamod module csr_amxmodx_x64.so for Linux x86_64 using AMBuild 2 from 3rdparty/ambuild/ (see Vendor table (VENDOR.md) and the repo-root VENDOR.md). Upstream-Module und -Plugins für andere Spiele (DoD, TFC, NS, TS, ESF, …) sind entfernt — nur Counter-Strike + ReGameDLL.

Setup

# Full pipeline: engine + game DLLs + Metamod + AMXX → game-test/
./tools.sh build:full

# After build:release — refresh CMake install + Metamod + AMXX only:
./tools.sh install:addons

Dependencies (host, Linux x86_64): python3, nasm, C/C++ toolchain, und AMBuild 2 aus 3rdparty/ambuild/ (tools/csretro-ambuild / PYTHONPATH — kein pip install -e). AMTL liegt unter 3rdparty/amxmodx/public/amtl/ (einziges AMTL im Repo).

Skip AMXX: ENABLE_AMXX_PIPELINE=0 ./tools.sh build:full (smoke checks skip the AMXX binary when this is set).

Start without AMXX: CSRETRO_ALLOW_NO_AMXX=1 ./tools.sh run:debug if a lazy install failed.

Layout after install

cstrike/addons/amxmodx/
├── dlls/
│   └── csr_amxmodx_x64.so   ← Metamod plugin
├── modules/
├── plugins/                   ← compiled .amxx
├── scripting/
├── configs/
│   └── cstrike/
│       └── plugins.ini        ← CSRetro + default AMXX plugins
└── ...

Metamod loads AMXX via cstrike/addons/metamod/dlls/plugins.ini (line appended by tools.sh when the .so exists).

CSRetro Pawn plugins

Add optional .sma files under 3rdparty/amxmodx/plugins/cstrike/ and list them in 3rdparty/amxmodx/plugins/AMBuilder if you want them compiled into plugins/*.amxx.

The bot menu (csr_botmenu / p) and the command menu (csr_commandmenu / h) are not AMXX plugins — they are implemented in the ReGameDLL game DLL; see CSR Bot & Navigation and Players.

Aim ping for CSR bots is also native (csr_aimping, csr_aimping_enemy, csr_aimping_bomb in the game DLL; see Players). Optional third-party AMXX “aim ping” plugins are unrelated; shipping or modifying such plugins may be restricted by their licenses — the native feature avoids a dependency on external Pawn sources.

HLSDK / Metamod paths

tools.sh runs:

python3 configure.py --no-mysql --enable-optimize --target-arch=amd64 --metamod=…/3rdparty/metamod --hlsdk=…/client/3rdparty/ReGameDLL_CS/regamedll

The vendored AMBuildScript uses the ReGameDLL regamedll tree (plus extra/cssdk where present) for HLSDK-style headers. Das klassische Upstream-Bundle 3rdparty/amxmodx/hlsdk/ ist in CSRetro entfernt (nur Counter-Strike + ReGameDLL_CS).

Maintainer reference mirror (offline)

Upstream HTML documentation is not committed. To fetch a local copy under docs/_upstream_mirror/ (gitignored), run:

./tools/fetch-amxx-reference-mirror.sh

Der Maintainer-Spiegel unter docs/_upstream_mirror/mirror/ lädt nur AMXX API und AlliedModders-Wiki (Kategorie AMX Mod X) per wget. AlliedModders-Foren werden nicht gespiegelt (weder jetzt noch geplant).

Warum nodemod-org-docs noch da war: Der gesamte Ordner docs/_upstream_mirror/ ist gitignored — nichts davon landet im Repo. Solange du ./tools/fetch-amxx-reference-mirror.sh nicht ausführst, bleibt ein alter NodeMod-Spiegel lokal stehen. Beim Lauf wird nodemod-org-docs standardmäßig gelöscht und durch die AMXX-/Wiki-Spiegel ersetzt (kein NodeMod in CSRetro). Nur behalten: CSRETRO_MIRROR_KEEP_LEGACY_NODEMOD=1 ./tools/fetch-amxx-reference-mirror.sh.

See Building and AMX Mod X component.