KCOM
KCOM copied to clipboard
Half-Life: Alyx Co-Op - Kiwi's Co-Op Mod
Kiwi's Co-Op Mod for Half-Life: Alyx
Kiwi's Co-Op Mod for Half-Life: Alyx (KCOM) is a cooperative experience for Half-Life: Alyx.
Features
- Simultaneous gameplay with up to 16 players
- VR hands are synced across clients
- Physics objects are synced across clients
- Trigger outputs are synced across clients
- Custom addon (gamemode/plugin) support
- Lua scripting support
- Support for Workshop maps
- Discord rich presence
- Public addon contents
Installation
- Subscribe to the Workshop Addon on Steam
- Download the latest release from GitHub
- Extract the contents of the zip file to a safe place (e.g. a new folder on your desktop)
- Set the following launch options for Half-Life: Alyx in Steam:
-console -vconsole -language english - Launch the game
- Open KCOM using
KiwisCoOpMod.exe - Follow instructions within the KCOM application
- KCOM is ready!
Connecting to a Server
- Follow the instructions to install KCOM
- Click on the "Client" tab in the KCOM application
- Check the "Enabled" box to allow your client to connect
- Set the IP address to the public IP address of the remote server
- Set the port to the port of the remote server
- (Optional) If provided, set the password to the password of the remote server
- Set a username for your client
- Click "Connect"
- KCOM will connect to the remote server and start playing!
Hosting a Server
- Follow the instructions to install KCOM
- (Optional) Follow the client instructions to create a listen server
- Note: Non-listen servers are not fully developed yet, please follow the above instructions for now
- Click on the "Server" tab in the KCOM application
- Check the "Enabled" box to host a server
- (Optional) Set a password for the server, make sure to provide it to peers
- Type in a map name to load initially (use
mp_kiwitestfor testing) - Ensure that the port is forwarded, try UPnP mapping via "File" > "Forward Port via UPnP"
- Click on the "Start" button to start the server
- KCOM is now hosting a server! You can now provide your public IP address to peers
Client Commands
- Type "/help" into the chat box as a client to view a list of commands
- Default commands:
/echo <message>- Echo a message/ping- Check your ping/help- This help menu/list- List all players on the server.
Server Commands
- As a server host, click on the "Chat" button in KCOM until it says "Server" to enter server operator mode
- Type "help" to view a list of server operator commands
- Default commands:
echo <message>- Echo a messagepersistent_set <key> <value>- Set a persistent Lua valuepersistent_get <key>- Get a persistent Lua valuepersistent_remove <key>- Remove a persistent Lua valuepersistent_get_all- List all persistent Lua valuespersistent_clear- Clear all persistent Lua valuesscript_refresh <script>- Refresh a Lua scriptscript_refresh_all- Refresh all Lua scriptskick <username>- Kick a player from the serverban <username>- Ban a player from the serveripban <username>- Ban a player from the server by IPunban <username>- Remove a player's ban from the serverlua <code>- Run Lua codetp <username> (<username>/<x> <y> <z>)- Teleport a player to a locationtpall (<username>/<x> <y> <z>)- Teleport all players to a location.
Lua Scripting
Requirements
- A code editor (such as Visual Studio Code)
Instructions
- Follow the instructions to install KCOM
- Follow the server instructions to host a server
- Open the
scriptsfolder in the KCOM installation directory using a code editor
Configuration
- Open
base/_config.luain thescriptsfolder using a code editor - Follow instructions within the file to configure base Lua settings
Plugins
- Copy
base/basic.luato a new folder (or the rootscriptsfolder) under a different name to create a new "plugin" script - Edit the script to your liking, pay attention to what is being "handled" as handling events will cancel out internal KCOM events and other scripts in alphabetical order
Lua Documentation
Coming soon!
Check out the Discord for Lua help if needed.
Script Redistribution
You are free to modify and redistribute KCOM's default ("base") Lua scripts without permission, however when it comes to others' scripts, please provide credit to the original author(s) and link to the original source.
Feel free to provide scripts to the KCOM community via the Discord as there is a dedicated channel for Lua scripting.
Debugging/Modding
Requirements
- Visual Studio 2022 or later
- Select ".NET desktop development" during installation
- 7-Zip
- Git
- Half-Life: Alyx - Workshop Tools
- You can find this under the DLC section of Half-Life: Alyx within your Steam library
Instructions
- Clone the repository within Visual Studio
- Build all projects for KCOM (x64) by pressing
Ctrl+Shift+Bor by clicking "Build" > "Build Solution"- Note: You may need to build the
KiwisCoOpModCoreproject first, this can be done by right-clicking the project and selecting "Build"
- Note: You may need to build the
- In Visual Studio, set
KiwisCoOpModas the startup project by right-clicking the project and selecting "Set as Startup Project" - Click on the green "Start" button to start debugging
- Visual Studio will automatically launch KCOM with debugging enabled
Symlinks
For addon development, you may want to "symlink" folders from this repository to your game:
- Open a command prompt as an administrator
- Type
cdinto the command prompt and press space - Copy Half-Life: Alyx's
game/hlvr_addonsdirectory path and paste it into the command prompt, then press enter- Note: You can create these folders relative to the
Half-Life Alyxfolder if they don't exist - Note: You may need to "wrap" the path in quotes if it contains spaces
- Note: You can create these folders relative to the
- Type
mkdir kiwimp_alyxinto the command prompt and press enter - Type
cd kiwimp_alyxinto the command prompt and press enter - Type
mklink /J scriptsand press space - Find the repository's directory, this is likely
C:\Users\{username}\source\repos\KCOM - Copy the KCOM repository directory path and paste it into the command prompt
- Type
\WorkshopAddon\game\hlvr_addons\kiwimp_alyx\scriptsat the end of the command prompt to complete the path and press enter - Type
cdinto the command prompt and press space - Copy Half-Life: Alyx's
content/hlvr_addonsdirectory path and paste it into the command prompt, then press enter- Note: You can create these folders relative to the
Half-Life Alyxfolder if they don't exist - Note: You may need to "wrap" the path in quotes if it contains spaces
- Note: You can create these folders relative to the
- Type
mklink /J kiwimp_alyxand press space - Copy the KCOM repository directory path and paste it into the command prompt
- Type
\WorkshopAddon\content\hlvr_addons\kiwimp_alyxat the end of the command prompt to complete the path and press enter - Launch Half-Life: Alyx with Workshop tools enabled
- Type
-console -vconsole -language englishinto the launch options for Half-Life: Alyx in Steam before launching
- Type
- Open VConsole by pressing the tilde (
~) key - Type
addon_enable kiwimp_alyxinto VConsole and press enter - Changes within the Workshop tools will now be reflected to the KCOM repository and vice versa
Help & Support
Join the Discord for support between users and developers.
