AlyxLib provides a set of useful Lua libraries for scripting with Half-Life: Alyx, making your code development process smooth and efficient.
Your addon is linked to AlyxLib via symbolic links, ensuring that every addon uses the same source and gets updated automatically whenever AlyxLib is updated. Plus, since your workshop item uses AlyxLib as a requirement, it will also receive any fixes without you having to reupload.
📚Library overview
- Full VScript code completion using Lua Language Server
- Save/Load most data types easily to any entity.
- Custom class implementation for entities, including inheritance and automatic variable saving.
- Player interaction simplification and tracking of items.
- Panorama panel interaction, allowing sending and receiving data with Lua.
- Easy controller input tracking with function callbacks.
- Lots of useful debugging functions and console commands.
- A fully customizable in-game debug menu.
See the Components section for a more detailed overview.
Code completion
AlyxLib uses the HLA-VScript definition files to provide full VScript code completion. It can be installed using the Lua Language Server addon manager
🚀Quick setup guide
For in-depth setup, see the Installation guide.
-
Download or clone the AlyxLib GitHub repository to your hlvr_addons content folder
-
Run
alyxlib.pyfrom the root folder -
Select your addon from the list of addons shown
-
Select the type of installation you want for your addon (can be changed later)
-
Before uploading to the workshop, run the
on_upload.batthat was created in your addon content folder to temporarily remove symlinks, but do not exit the program -
Upload your addon to the workshop and set AlyxLib as a required item
-
Rename the
0000000000.luafile inscripts/vscripts/mods/init/to have the same number as your new workshop item (this is the same process outlined in Scalable Init Support) -
Finish the instructions shown in the running
on_upload.batprogram to restore the symlinks for further development
❓Need help?
Please feel free to create an issue (requires GitHub account) with your problem, question or suggestion.
You can also join the Discord server to get faster responses.