Code Monkey home page Code Monkey logo

Heroes Replay

The Heroes of the Storm Automated Spectator.

Future goals of the project

  • Improve the existing spectate logic.
  • Twitch integration for team win betting.
  • YouTube uploading of replays.

About

Heroes Replay is a project that automates spectating .StormReplay files.
It uses Heroes.ReplayParser to analyze replays for to know which heroes to focus during the game.
The software is running on a dedicated machine streaming on the Twitch Platform

Features

  • Running on http://twitch.tv/saltysadism.
  • Integrates with Heroes Profile Website to display an end of game report such as stats, graphs & talents.
  • Heroes Profile API integration for downloading replays & displaying MMR.
  • A customised UI Observer Interface by Ahli.

Settings

Various settings can be found in appsettings.json.

Commands

An easy to use cli with built in help and information on how to use heroesreplay.exe.

heroesreplay.exe spectate heroesprofile
heroesreplay.exe spectate directory
heroesreplay.exe spectate file

Loading

  • Load an individual replay file or provide a directory to many replay files.
  • Download replay files from an S3 Bucket (HotsAPI or HeroesProfile) by providing AWS credentials (S3 downloads are paid per request)
  • Launches the game from Battlenet and waits for the map loading screen and Timer to determine when the game load was successful.

State

  • Ensures the game is launched and validates the required game version matches the launched process version before moving onto the next step.
  • Home Screen detection by keywords, In-Game Paused/Running state by Timer detection.
  • Uses native Windows calls to get screen captures of the game (timer) to determine state: start, running, paused, end.
  • Detects the end of the game by finding out the death of the core and matching it to the timer.

Spectating

The spectate focus target is determined by a weighted point system. Kills are worth the most and roaming is worth the least. The weightings can be found in the appsettings.

  • Focuses on heroes that perform kills.
  • Focuses on heroes that will die or kill an enemy hero.
  • Focuses on heroes that are close to enemies.
  • Focuses on heroes doing team or map objectives. (gems and doubloons)
  • Focuses on heroes doing camps and bosses.
  • Focuses on heroes destroying structures.
  • Focuses on heroes that are roaming.

Information Panels

  • Selects the talent tree panel when a team has received new talents.
  • Selects all panels by cycling from left to right panels throughout the game:
    • Talents
    • DeathDamageRole
    • ActionsPerMinute
    • Experience
    • TimeDeadDeathsSelfSustain
    • CarriedObjectives (If the map supports it)
    • KillsDeathsAssists
    • CrowdControlEnemyHeroes

Dependencies

Building the application

From the command line

git clone http://github.com/HeroesReplay/HeroesReplay.git
cd ./HeroesReplay/src/HeroesReplay/
dotnet build HeroesReplay.sln

Running the application

There are a few ways to run the application explained below. You can use the --help option to find out more for each command.

From the bin output folder

cd ./src/HeroesReplay.CLI/bin/Debug/netcoreapp3.1/
heroesreplay.exe --help

From the project folder

cd ./src/HeroesReplay.CLI/
dotnet run heroesreplay --help

Debugging from Visual Studio 2019 or Visual Studio Code

You can hit Ctrl+F5 to launch the project from the IDE.
Arguments are set in the launch.json and launchSettings.json files.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

The MIT License (MIT)

Copyright (c) 2020 Patrick Magee

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Heroes Replay's Projects

blizztrack icon blizztrack

BlizzTrack monorepo, this contains all the systems that drive the website

heroprotocol icon heroprotocol

heroprotocol is a Javascript port of Blizzard/heroprotocol for Heroes of the Storm .StormReplay parsing

mbncsutil icon mbncsutil

Provides Battle.net authentication services for managed applications.

sc2-layouts icon sc2-layouts

Visual Studio Code extension adds support for SC2Layouts language.

tactlib icon tactlib

A C# library for reading Blizzard's CASC storage

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.