-
Notifications
You must be signed in to change notification settings - Fork 6
Server Setup
- Install dependendies.
Windows: Install Git, CMake, and Visual Studio
Debian:apt install git cmake build-essential gcc-multilib g++-multilib libc6-dev-i386 mesa-common-dev - Open a shell somewhere and clone the repo:
git clone --recurse-submodules https://github.com/wootguy/SevenKewp - Run
scripts/build_server_and_plugins.bat(Windows) orscripts/build_server_and_plugins.sh(Linux). - Intall the official Half-Life dedicated server from SteamCMD. The
steam_legacybeta is needed for ReHLDS compatibility:login anonymous app_set_config 90 mod cstrike app_update 90 -beta steam_legacy validate - Copy the contents of
SevenKewp/build/output/toHalf-Life/valve/in your Half-Life dedicated server. - Build and install my fork of ReHLDS. This is required for some maps.
- Windows users:
- Open
rehlds/msvc/ReHLDS.sln. SelectOKif asked to retarget. - Optional: If you're setting up a public server, right-click the
ReHLDSproject and selectProperties->Configuration Manager. Change theActive solution configurationtoRelease. This gives much better performance. - Right click
Solution 'ReHLDS'and selectBuild Solution - Copy the
.exeand.dllfiles fromSevenKewp/rehlds/msvc/Debug(orRelease) over the existing files in yourHalf-Life/folder on the dedicated server.Director.dllis special and goes intoHalf-Life/valve/dlls/instead.
- Open
- Windows users:
- Copy the contents of
SevenKewp/sevenkewp/toHalf-Life/valve/on your dedicated server. The.cfgfiles must be invalve/, but you can copy everything else tovalve_downloads/if you want. - Add
-dll dlls/server.dll(Windows) or-dll dlls/server.so(Linux) to the launch options of your dedicated server. If you use metamod, then addgamedll dlls/server.dll(or.so) to metamod'sconfig.iniinstead. - Try it out! Example launch command:
hlds.exe +map c1a1 -dll dlls/server.dll +maxplayers 32 +developer 1 -heapsize 65536 -num_edicts 4096 +servercfg "" +log on
Native plugins are tightly integrated with the mod code and have full access to its classes and utilities. This makes native plugins powerful but easily broken by mod updates. Here's how to build them.
- Set up the mod project as described in the previous section
- Open a shell in
SevenKewp/plugins/ - Clone all the plugin repos you want. Example:
git clone https://github.com/wootguy/HLCMapPlugins/ - Run the build script again:
scripts/build_server_and_plugins.bat(Windows) orscripts/build_server_and_plugins.sh(Linux) - Copy the contents of
SevenKewp/build/output/tovalve/on your dedicated server. - Repeat steps 4 and 5 whenever the mod updates.
Once you have built or downloaded a native plugin, you need to copy it to the right place and update the relevant config file. valve and valve_downloads are interchangeable. The plugin loader will search both paths.
- Copy the dll to the server plugins folder (Example:
valve/plugins/server/AntiBlock.dll) - Add the plugin file path to
valve/plugins.txtwithout the file extension (Example: writeAntiblockto load the path in step 1)
Plugin paths in plugins.txt start in valve/plugins/server/. That's why you only need to write AntiBlock instead of valve/plugins/server/AntiBlock in the above example.
These steps only apply to unreleased maps/ports. Ideally the map package will set this up for you so that you only need to extract the files.
- Copy the dll to the map plugins folder (Example:
valve/plugins/maps/pizza_ya_san.dll) - Add the plugin file path to the map cfg file(s) the plugin was made for (Example: add
map_plugin pizza_ya_santovalve/maps/pizza_ya_san1.cfgandvalve/maps/pizza_ya_san2.cfg).
Plugin paths in map cfg files start in valve/plugins/maps/.
Sven Co-op maps often need converting before they can be used in Half-Life. Not doing this will result in crashes. This section is here mostly as a warning not to install maps directly. Good luck actually following this. I plan to publish all my ports and ripents later so that this isn't needed.
- Create a folder and copy
scripts/convert_map.pyto the new folder. - Add modelguy, ripent, bspguy, and wadmaker to the same folder. modelguy and bspguy need to be built from source because the latest releases are missing features.
- Copy
resguy_default_content_hl.txtfrom resguy to the folder, and rename it toresguy_default_content.txt - Copy
skill.cfgto the folder. - Copy
titles.txtfrom the latest version of Sven Co-op to the folder. - Update
valve_pathin the script to point to yourHalf-Life/valvefolder. - Install imagemagick and ffmpeg. Make sure
magickandffmpegare usable from the command-line. - Extract a map package to the folder (
maps/should end up next to the script) - Run the script
Maps made for Sven Co-op 5.x often need special attention (map moving/splitting to fit in the +/-4096 grid, texture resizing, etc.). bspguy has porting tools to help with this.
So far, I've had the only server hosting sven maps so I don't bother renaming files that the script modifies. That's a horrible practice and will cause crashes once other server ops start hosting without reading this section.