Dan-Shields / League-OCR-HUD

OCR-driven Node.js program to scrape data from League of Legends, useful for creating custom HUDs
31 stars 3 forks source link
league-of-legends nodejs

League OCR HUD

About

This program creates and updates several .txt files with the latest game state data available, including tower kills, gold, timers etc. These files can then be used in OBS or vMix to update a HUD graphic.

It takes as much data as possible from the League Game Client API, and supplements that with Optical Character Recognition (OCR) using Google's Cloud Vision API.

Right now, the available data is as follows:

The output filenames are the above values plus .txt.

Support Requests

If you're struggling to setup this program and want professional installation or are looking to get the program further developed, I'm available for hire. Please contact me at hello@danielshields.uk

Prerequisites

Installation

Option 1: From Release (recommended)

Download and unzip the latest release

Option 2: From Source

  1. Install Node.js >=15, Python 3, C++ Redistributable for x64
  2. Clone this repo to somewhere to your production PC
  3. Install dependencies: npm i --production

Usage

  1. Open a dedicated NDI output for the game feed (it must be 1920x1080)
  2. Copy the CV private key JSON file into the project directory and rename it to CV.keys.json
  3. Copy config.example.json to config.json and edit ndiFeed to match your game feed name
  4. Run the executable if present or run npm start
  5. Start spectating a game in League and the output files should populate

Future plans