Headcrab Frenzy!

Headcrab Frenzy!

Not enough ratings
Creating a Headcrab Frenzy dedicated server (+ AMXX/Metamod & fixes)
By Max Lagomorph
A simple guide about how to create a Headcrab Frenzy dedicated server
   
Award
Favorite
Favorited
Unfavorite
Introduction (and important points)
In this guide I will explain how to run a dedicated Headcrab Frenzy server for both Linux and Windows.

Before I begin, I would like to clarify a few points:
  • This guide expects you to already have basic knowledge in managing a server (either HLDS or in general).
  • Your server will not be listed on Internet due to how the mod works (the server list on this mod actually gets running servers if AppID is Half-Life's 70). The only way to know people you're running a Headcrab Frenzy server is either listing your server in websites like GameTracker[www.gametracker.com] or check the last section of this article for an alternative.
  • Achievements DOESN'T WORK IN MULTIPLAYER. It's even explained on the mod's manual lol.
  • If you're going to add custom content (such as custom maps), be aware that many files from the base game are missing in this mod (such as the halflife.wad textures), causing clients to be unable to join your server. You will have to upload all this content in a FastDL and use this precache AMXX plugin[forums.alliedmods.net] to solve these problems. For mappers, I highly recommend precompiling your WAD textures in your final BSP map (see this for more info[the303.org]).

I'm too lazy to make screenshots so sorry if this becomes confusing with the whole quantity of text.
Installing SteamCMD and HLDS
To start you will need to install SteamCMD which allows you to get server files of various Steam games from the command line (in this case HLDS and this mod).

If you're on Linux, use these commands:
sudo apt-get install lib32gcc-s1 -y sudo adduser gameserv sudo su gameserv mkdir steamcmd && cd steamcmd curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -

Else if you're on Windows, just download the SteamCMD ZIP from here, extract the ZIP and move the files to a new folder.

Before you can start using SteamCMD, you must be logged into a Steam account with Half-Life 1 purchased (or if you got it for free in 2023) along with this mod added, otherwise you will not be able to proceed if you use the anonymous account.

Now run the SteamCMD application using these commands to start downloading the mod and server content:

On Linux:
chmod +x steamcmd.sh # this only once ./steamcmd.sh +force_install_dir /home/gameserv/hlds_hcf/ +login anonymous +app_update 90 -beta steam_legacy validate +quit ./steamcmd.sh +force_install_dir /home/gameserv/hcf/ +login <YOUR_STEAM_USERNAME> +app_update 354900 validate +quit

On Windows (run a CMD window inside your SteamCMD folder):
steamcmd.exe +force_install_dir <INSERT_YOUR_DIR_HERE> +login anonymous +app_update 90 -beta steam_legacy validate +quit steamcmd.exe +force_install_dir <INSERT_YOUR_DIR_HERE> +login <YOUR_STEAM_USERNAME> +app_update 354900 validate +quit

After having all the files downloaded, make sure to move the "hcfrenzy" directory from where you downloaded Headcrab Frenzy to your HLDS directory.
Configuring and running the server
FIrst of all, make sure that the "steam_appid.txt" file (located inside the main HLDS directory) has the value "354900" written in it (it's the Headcrab Frenzy's Steam AppID), otherwise anyone who wants to play (including you!) will get a "STEAM validation rejected" error.
You will also have to make this file not writable by HLDS every time it's launched or else it will be replaced back again to 70.

On Linux:
rm steam_appid.txt echo "354900" > steam_appid.txt chmod -w steam_appid.txt
On Windows I guess it's from Properties > Read only.

Now modify the server.cfg file and add these CVARs on there:
// This CVAR is important, else the round will not start. hcf_mode 1 // 1: Easy | 2: Normal | 3: Hard skill 1 mp_flashlight 1 sv_allowupload 0 sv_allowdownload 1 // Add your FastDL below, if you have one. sv_downloadurl ""

Now to start running the server, go to your HLDS directory and execute this command:

On Linux:
./hlds_run +game hcfrenzy +map hcf_dungeon +exec server.cfg -noipx -tos +ip 0.0.0.0 +port 27015
On Windows:
hlds.exe -console +game hcfrenzy +map hcf_dungeon +exec server.cfg -noipx +ip 0.0.0.0 +port 27015

If the console window returns something like this:
Auto-restarting the server on crash Console initialized. Using breakpad crash handler Setting breakpad minidump AppID = 70 Forcing breakpad minidump interfaces to load dlopen failed trying to load: /home/gameserv/.steam/sdk32/steamclient.so with error: /home/gameserv/.steam/sdk32/steamclient.so: cannot open shared object file: No such file or directory Looking up breakpad interfaces from steamclient Calling BreakpadMiniDumpSystemInit Protocol version 48 STEAM Auth Server Server IP address 0.0.0.0:27015 [S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed. CAppInfoCacheReadFromDiskThread took 3 milliseconds to initialize dlmopen steamservice.so failed: steamservice.so: cannot open shared object file: No such file or directory dlopen failed trying to load: /home/gameserv/.steam/sdk32/steamclient.so with error: /home/gameserv/.steam/sdk32/steamclient.so: cannot open shared object file: No such file or directory Looking up breakpad interfaces from steamclient Calling BreakpadMiniDumpSystemInit Connection to Steam servers successful. VAC secure mode enabled.
It means that your server is now running.
If you get messages like "Your server needs to be restarted in order to receive the latest update." in the server console, just ignore them, that's because of the AppID change.

To join in your server, make sure to run your game with the -console launch parameter (Library > Right Click on Headcrab Frenzy! > Properties > Launch Parameters). Now in the console window, write "connect <YOUR_IP_ADDRESS>:27015" and there you go.
You can also use the Steam's server list on "View > Game servers" inside the Steam program and add your server IP from the Favorites tab. It should be appear on there after some seconds.

If you're on Linux, use also programs such as tmux to leave your server running in background (this prevents your server from shutting down after logging out from SSH).
sudo apt install tmux tmux # CTRL-B-D to deattach and going back to your normal shell tmux ls # list sessions tmux a # attachs a tmux session
Installing AMX Mod X and Metamod
In case you want to install AMXX and Metamod in your server, then grab a copy of Metamod-P from its official SourceForge website[metamod-p.sourceforge.net] (DON'T USE Metamod-R OR ANY OTHER VERSION, IT CRASHS WITH THIS MOD) and download AMX Mod X from their official website[www.amxmodx.org] (latest and dev versions works without issues).

After downloading your copies of AMXX and Metamod-P, go to your HLDS directory and inside "hcfrenzy", create a directory called "addons" and move the "metamod" and "amxmodx" directories to there.

Now go to your Metamod directory, create a "plugins.ini" file with your text editor and add these lines to load AMX Mod X:
linux addons/amxmodx/dlls/amxmodx_mm_i386.so win32 addons/amxmodx/dlls/amxmodx_mm.dll

After saving the file, proceed with these two options:

A. Loading Metamod from liblist.gam
Edit the "gamedll" and "gamedll_linux" lines to the following:
gamedll "addons/metamod/dlls/metamod.dll" gamedll_linux "addons/metamod/dlls/metamod.so"

B. Loading Metamod directly from HLDS (recommended)
Before launching your server, add also a "-dll" flag/launch parameter with the path to your Metamod directory. For example:
./hlds_run -game hcfrenzy +map hcf_dungeon +exec server.cfg +ip 0.0.0.0 +port 27015 -noipx -tos -dll addons/metamod/dlls/metamod.so hlds.exe -console -game hcfrenzy +map hcf_dungeon +exec server.cfg +ip 0.0.0.0 +port 27015 -noipx -dll addons/metamod/dlls/metamod.dll

If you have followed all these steps, you should see these messages in the console:
Metamod version 1.21p37 Copyright (c) 2001-2013 Will Day Patch: Metamod-P (mm-p) v37 Copyright (c) 2004-2013 Jussi Kivilinna Metamod comes with ABSOLUTELY NO WARRANTY; for details type `meta gpl'. This is free software, and you are welcome to redistribute it under certain conditions; type `meta gpl' for details. AMX Mod X version 1.8.2 Copyright (c) 2004-2006 AMX Mod X Development Team AMX Mod X comes with ABSOLUTELY NO WARRANTY; for details type `amxx gpl'. This is free software and you are welcome to redistribute it under certain conditions; type 'amxx gpl' for details.
Shouting on the Master Server list
If for some reason you insist on wanting to list your server in the master list, the only way is to download another fresh copy of HLDS, get the legacy 1.4 version of Headcrab Frenzy in ModDB and then create a dummy password-protected private server prompting people to do “connect [IP]:[PORT]” in the console as hostname. Make sure steam_appid.txt is set to 70 and the one in your normal server is set to 354900.

Outro
Congratulations, you managed to run a dedicated server for this dead and forgotten mod.
Have fun!