Skip to content

Matchzy Overtime Manager (MOM) is an extension for the MatchZy CS2 plugin. It runs as an Express server in TypeScript, listens for get5 events, and enforces custom overtime rules to prevent excessive overtimes in tournaments. ๐Ÿš€

Notifications You must be signed in to change notification settings

sivert-io/matchzy-overtime-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

28 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Matchzy Overtime Manager (MOM) โšก

MOM is an extension for the MatchZy CS2 plugin. It runs as an Express server in TypeScript, listens for get5 events, and enforces custom overtime rules to prevent excessive overtimes in tournaments. ๐ŸŽฎ๐Ÿ†

Table of Contents ๐Ÿ“–

Features โœจ

  • ๐ŸŽง Listens for CS2 match events via get5
  • โš™๏ธ Automatically handles overtime scenarios
  • ๐Ÿ“ Written in TypeScript for type safety
  • ๐Ÿš€ Simple and lightweight Express server

Installation ๐Ÿ› ๏ธ

Prerequisites ๐Ÿ“Œ

  • Node.js (latest LTS recommended)
  • TypeScript
  • A CS2 server with get5 (Matchzy) installed

Setup ๐Ÿ”ง

  1. Clone the repository:

    git clone https://github.com/sivert-io/matchzy-overtime-manager.git
    cd matchzy-overtime-manager
  2. Install dependencies:

    npm install
  3. Build the project:

    npm run build
  4. Start the server:

    npm start

Environment Configuration ๐ŸŒ

Before running MOM, you need to configure your environment variables:

  1. Copy the example environment file:
    cp .env.example .env
  2. Open .env and replace the values with your server configuration:
    # Use server-id as prefix. e.g. server1_<variable_name>
    server1_rcon_host="127.0.0.1"
    server1_rcon_port="27016"
    server1_rcon_password="your_rcon_password"
    
    # Maximum number of rounds allowed before calculating the winner
    max_rounds=30

Running with Docker ๐Ÿณ

To start MOM using Docker:

  1. Build the Docker image:

    docker build -t matchzy-overtime-manager .
  2. Run the container:

With .env:

docker run -d -p 3000:3000 --name matchzy-overtime-manager matchzy-overtime-manager

Without .env:

docker run -d \
--name matchzy-overtime-manager \
-p 3000:3000 \
-e NODE_ENV=production \
-e server1_rcon_host="127.0.0.1" \
-e server1_rcon_port="27015" \
-e server1_rcon_password="your_rcon_password" \
-e server2_rcon_host="127.0.0.1" \
-e server2_rcon_port="27016" \
-e server2_rcon_password="your_rcon_password" \
-e max_rounds=30 \
--restart unless-stopped \
matchzy-overtime-manager

Alternatively, you can use Docker Compose:

docker-compose up -d

CS2 Server Configuration โš™๏ธ

To make get5 send match events to MOM, update your CS2 serverโ€™s matchzy_remote_log_url parameter:

Add this line to your /game/csgo/cfg/MatchZy/live.cfg file at the top:

matchzy_remote_log_url "http://127.0.0.1:3000/events"
matchzy_remote_log_header_key "server-id"
matchzy_remote_log_header_value "server1"

Replace 127.0.0.1 with the actual IP address of your MOM server (if running on a different host).

Update field matchzy_remote_log_header_value with a unique ID for your server.

Development ๐Ÿ—๏ธ

To add new features or modify existing functionality:

  1. Start the TypeScript compiler in watch mode:
    npm run dev
  2. Modify the source code in the src/ directory.
  3. Ensure changes work by running:
    npm run build && npm start

Contributing ๐Ÿค

We welcome contributions! Feel free to open issues or submit pull requests. ๐ŸŽ‰

Thanks ๐Ÿ™Œ

A special thanks to:

  • ๐ŸŽฏ get5 developers for the original tournament framework.
  • ๐Ÿ”ฅ The CS2 and LAN tournament community for testing and feedback.

About

Matchzy Overtime Manager (MOM) is an extension for the MatchZy CS2 plugin. It runs as an Express server in TypeScript, listens for get5 events, and enforces custom overtime rules to prevent excessive overtimes in tournaments. ๐Ÿš€

Topics

Resources

Stars

Watchers

Forks