Skip to content
 
 

Repository files navigation

DrunkHook

Drunkhook is a Team Fortress 2 Linux internal DLC.

BETA FORK WARNING

This fork is used incase of melody or pupnoodles updates crashes the game or lags the game too much. this fork is much more stable and doesn't crash upon loading different map.

Installing, Building, Attaching

Officially supported Linux distros are Debian, Ubuntu, Linux Mint, Debian-close distros, and Manjaro. Other distros may work if the dependency installer has a matching package script, but they are not officially supported.

Install build dependencies for your distro:

./install-deps

Install dependencies, build Cat, install runtime files, and prepare the bundled botpanel:

./setup.sh

Build Cat and choose the mode from the first-run terminal menu:

sudo ./build.sh

The saved mode is reused by build.sh, inject.sh, preload, debug.sh, and the Docker build wrappers. Remove ~/.config/cathook/mode or set CATHOOK_MODE_FILE to choose a different preference file.

Build an explicit mode:

sudo ./build.sh --default
sudo ./build.sh --textmode
sudo ./build.sh --both

For a local build without installing to /opt/cathook, use ./build.sh --no-install.

For local development, use dev mode to skip repository update checks and avoid reset paths:

sudo ./build.sh --dev
sudo ./inject.sh --dev
./setup.sh --dev

You can also set CATHOOK_DEV_MODE=1 for build.sh, inject.sh, setup.sh, or botpanel/update. --no-update is accepted as an alias for --dev.

Attach to a running TF2 process:

sudo ./inject.sh

Use the textmode binary when attaching, overriding the saved mode:

sudo CATHOOK_MODE=textmode ./inject.sh
sudo TEXTMODE=1 ./inject.sh

inject.sh refreshes /opt/cathook/assets and clears old cathook/exception logs before loading the library. It stages the temporary dlopen copy through /proc/<pid>/root, checks that the target process can read it, and retries alternate runtime directories when Ubuntu/Steam Runtime path isolation hides a staged file. It also copies any bundled /opt/cathook/bin/libGLEW.so.* next to the temporary library.

Container Build

To build in the repo's Linux container:

./docker_build.sh

On PowerShell hosts:

./docker_build.ps1

Preload

Use ./preload before launching TF2 when the library needs to be loaded before game modules are ready. It uses the saved mode unless CATHOOK_MODE, TEXTMODE, CATHOOK_TEXTMODE, or CATHOOK_BINARY overrides it.

Repository Layout

  • src/cathook.cpp - unity build entry point
  • src/core/ - shared runtime systems, hooks, logging, config, diagnostics
  • src/features/ - gameplay, automation, visual, movement, combat, and menu features
  • src/games/tf2/sdk/ - TF2-facing entities, interfaces, materials, and SDK types
  • src/external/ - bundled third-party code such as ImGui, MD5, libsigscan, and funchook headers
  • assets/ - runtime fonts, sounds, and textures copied from upstream cathook data
  • botpanel/ - bundled catbot IPC server and web panel
  • packages/ - distro dependency installers used by install-deps

Contributing

Do you want to submit code to Cathook? Open a pull request and keep changes focused.

Currently, pupnoodle is the only maintainer, so reviews and issue responses may take time.

Keep code simple, direct, and consistent with the existing style:

  • Use snake_case.
  • Prefer small focused functions and POD-style data where practical.
  • Keep platform-specific behavior isolated.

Community

Discord: https://discord.gg/sARNsbvBps

Credits

This project is based on TeamFortress2-Linux-Internal.
nullworks - original cathook creators
DrCoomer - cheat i based the "cathook" on
GatoPotato658 - Unibox. without him there would be nothing
Salmon - Salmonpaste.

About

Fork used to maintain super stability and no crashing

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages