Giter Site home page Giter Site logo

kiwifruitdev / kcom Goto Github PK

View Code? Open in Web Editor NEW
43.0 4.0 2.0 4.2 MB

Half-Life: Alyx Co-Op - Kiwi's Co-Op Mod

Home Page: https://steamcommunity.com/sharedfiles/filedetails/?id=2739356543

License: Other

C# 31.14% Lua 68.86%
addon lua steam-workshop co-op csharp dotnet half-life-alyx multiplayer nlua winforms

kcom's Introduction

Kiwi's Co-Op Mod for Half-Life: Alyx

Releases

Downloads

Workshop Subscribers

Discord

License

Contributors


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_kiwitest for 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 message
    • persistent_set <key> <value> - Set a persistent Lua value
    • persistent_get <key> - Get a persistent Lua value
    • persistent_remove <key> - Remove a persistent Lua value
    • persistent_get_all - List all persistent Lua values
    • persistent_clear - Clear all persistent Lua values
    • script_refresh <script> - Refresh a Lua script
    • script_refresh_all - Refresh all Lua scripts
    • kick <username> - Kick a player from the server
    • ban <username> - Ban a player from the server
    • ipban <username> - Ban a player from the server by IP
    • unban <username> - Remove a player's ban from the server
    • lua <code> - Run Lua code
    • tp <username> (<username>/<x> <y> <z>) - Teleport a player to a location
    • tpall (<username>/<x> <y> <z>) - Teleport all players to a location.

Lua Scripting

Requirements

Instructions

  • Follow the instructions to install KCOM
  • Follow the server instructions to host a server
  • Open the scripts folder in the KCOM installation directory using a code editor

Configuration

  • Open base/_config.lua in the scripts folder using a code editor
  • Follow instructions within the file to configure base Lua settings

Plugins

  • Copy base/basic.lua to a new folder (or the root scripts folder) 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+B or by clicking "Build" > "Build Solution"
    • Note: You may need to build the KiwisCoOpModCore project first, this can be done by right-clicking the project and selecting "Build"
  • In Visual Studio, set KiwisCoOpMod as 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 cd into the command prompt and press space
  • Copy Half-Life: Alyx's game/hlvr_addons directory path and paste it into the command prompt, then press enter
    • Note: You can create these folders relative to the Half-Life Alyx folder if they don't exist
    • Note: You may need to "wrap" the path in quotes if it contains spaces
  • Type mkdir kiwimp_alyx into the command prompt and press enter
  • Type cd kiwimp_alyx into the command prompt and press enter
  • Type mklink /J scripts and 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\scripts at the end of the command prompt to complete the path and press enter
  • Type cd into the command prompt and press space
  • Copy Half-Life: Alyx's content/hlvr_addons directory path and paste it into the command prompt, then press enter
    • Note: You can create these folders relative to the Half-Life Alyx folder if they don't exist
    • Note: You may need to "wrap" the path in quotes if it contains spaces
  • Type mklink /J kiwimp_alyx and press space
  • Copy the KCOM repository directory path and paste it into the command prompt
  • Type \WorkshopAddon\content\hlvr_addons\kiwimp_alyx at 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 english into the launch options for Half-Life: Alyx in Steam before launching
  • Open VConsole by pressing the tilde (~) key
  • Type addon_enable kiwimp_alyx into 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.

kcom's People

Contributors

kiwifruitdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

creo13 rheaayase

kcom's Issues

KCOM Connecting players issue (Anti-Sync), screenshots on discord server(! gunslinger#9774)

im not one, who cant see his friend(brother or sister), its name ANTI-Sync, 1 player starting server with upnp, or opened ports manually, 2 player connecting (use random authid), console says index 1 and index 2 connected, friends trying to start lobby basement map, when its loaded, they cant find, player 1 cant see player 2 moves and actions, players are full invsible for each other, and player 2 cant see player 1 moves and actions, but dialog triggers are working(idk how it is working), kiwifruit fix it please, i cant send screenshots because im on phone and my time is 1 am

Chapter 1 - Entanglement

Map Report

Description

Official map included with Half-Life: Alyx.

This is the introduction chapter where a cutscene plays on initial load.


Attributes

Quick information related to this map.

Attribute Information
Series Official campaign
Episode Chapter 1 - Entanglement
Author Valve
Workshop URL N/A
KCOM Support No

Internal Map Names

The map names reported by VConsole when loading the map.

a1_intro_world
a1_intro_world_2

Progress

Current state of the map.

  • Map starts in KCOM
    • The map can be selected in KCOM and the VScript file starts without issue.
  • Map allows players to see each other
    • Players connected to a server running this map can view each other's head/hand models.
  • Map allows important named physics objects to sync
    • Named physics objects (targetname assigned through Hammer) are able to sync with grace periods properly without issue.
  • Map allows important unnamed physics objects to sync
    • Unnamed physics objects (Blank targetname value) that are relevant to the map are able to sync with grace periods properly without issue.
  • Map does not lag
    • No heavy amounts of lag or latency is caused by this map.
  • KCOM does not lag
    • No heavy amounts of lag or latency is present within the KCOM application.
  • Map logic is synced
    • Logical entities (including triggers and other map-specific logic) are synced across players when joining at the same time.
  • VR logic is synced
    • Logic specific to VR mode can be synced without issue.
  • Players in buddha mode are invincible
    • Players who have enabled the buddha command cannot die through map logic.
  • Template entities work as intended
    • See #11 for more details.
  • Player "state" is synced across map
    • The player's current "state" is synced, this is vague as maps can have different states depending on logic.

Known Issues

None so far.


Additional Information

Part of the Campaign Maps milestone.

Implement a player respawn mechanic

It is possible to prevent the player from dying using the buddha command, perhaps it could be used to respawn players when they reach 1% health. Respawning as of now results in a map reload, resulting in a broken map sequence.

Current player head model lacks direction

The current headset model used in KCOM does not give off direction very well. It should be replaced with one that would fit this criteria, ideally something that would fit the game's art style.

Unable to load addon, no "Detected map" string

Under different user configurations, players cannot load the addon when launching the software and loading a map.

This could be due to issue #1 but other factors can contribute as well.

If you are having this problem, please let me know what your configuration is using the template below:

Hosting a dedicated server? Yes/No
Connecting to a remote server? Yes/No
Self-hosting/hosting a listen server? Yes/No
Player count? 1-16
Can players connect? Yes/No
Does "Detected map" show up in the output? Yes/No
Do all players have the KCOM addon enabled? Yes/No
What is your launch options? [Paste from Steam]
Is your game's language set to English? Yes/No
Have you already tried troubleshooting steps? Yes/No

Thank you for helping with solving this issue!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.