Half-Life mod to facilitate Half-Life physics and NPC AI research.
- Easy and fast set up. No CMake or bespoke toolchains to mess with.
- Ability to hook custom
hl.dll
andclient.dll
compiled yourself in Debug mode, by reading debug information in PDB files and allow Visual Studio debugger to attach. This tends to break standard hooking based mods built for speedrunning purposes. - Writing features in the higher level and simpler language of Go.
- Ability to write logs to debug output viewable with Microsoft's DebugView. No installation of custom or bespoke viewing tools.
- Only supports Windows
- Speedrunning features
Currently, HLInspect doesn't come with an injector. You can use any general DLL injector to inject and start Half-Life, or even write your own. There are plenty of open source DLL injectors on Github, and do choose wisely. In the future, a custom injector may be included.
Currently, this is the easiest to build on Linux using cross compilation.
Set up WSL in Windows or use a Linux system.
Install Go 1.18 or above.
Install gcc-mingw-w64
to get i686-w64-mingw32-gcc
or similar for cross compilation.
Install protobuf-compiler
or similar to get protoc
.
Run the following to get protoc-gen-go
:
go install google.golang.org/protobuf/cmd/protoc-gen-go
Make sure protoc-gen-go
can be found in PATH
, which is needed by protoc
. If not, set
export PATH="$PATH:"$(go env GOPATH)/bin
Install Cap'n Proto compiler with the capnproto
package or similar for HLRPC.
Install Golang plugin for Cap'n Proto
go install capnproto.org/go/capnp/v3/capnpc-go@latest
Suggested environmental variables in WSL:
export CC=i686-w64-mingw32-gcc
export CGO_ENABLED=1
export GOOS=windows
export GOARCH=386
Run the following to build:
cd hlinspect/modlib
go generate ./...
make
If this does not work, you may be able to get some hints from the Github workflow file.
See ARCHITECTURE.