Skip to content

AnkisCZ/HeroesReplay

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Heroes Replay

The Heroes of the Storm Automated Spectator

Goals of the project

  • Develop robust state detection for loading, playing, paused, ended states.
  • Improve the existing spectate logic
  • Add ping events to focus hero criteria, e.g select heroes who are pinged of danger or ping for assistance.
  • Add Twitch chat integration for several features (voting, game controls)
  • Intigration of HotsApi for limitless replays
  • Host a 24/7 stream similar to SaltyTeemo

About

Heroes Replay is a project that automates spectating .StormReplay files.
It uses Heroes.ReplayParser to parse the replay file and then using that information, it can decide which heroes and panels to select.

Features

Command line

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

cli

Loading

  • Load an individual replay file or provide a directory to many replay files.
  • Download replay files from the HotsApi database by providing AWS credentials (S3 downloads are paid per request)
  • Launches the game from Battlenet and waits for the map loading screen 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
  • Waits for the loading screen before determining the next step
  • Uses native Windows calls to get a screenshot of the game (timer & end screen) to determine current state: start, running, paused, end.
  • Detects the end of the game by checking for the MVP and awards screen and matching any awards given to players from the replay file exist on the end screen.

Spectating

There is currently a priority order to who is focused by the spectator, the list below is the current order of priority.

  1. Focuses on heroes that perform penta, quad, triple & multi kills.
  2. Focuses on heroes that will die or kill an enemy hero.
  3. Focuses on heroes doing team or map objectives. (gems and doubloons for example)
  4. Focuses on heroes doing camps and bosses.
  5. Focuses on heroes destroying structures.
  6. Focuses on heroes that have recently killed other players

Information Panels

  • Selects the talent tree panel when a team has received new talents.
  • Selects the objective panel when an objective has been taken.
  • Selects the KDA panel when a hero dies.
  • Selects all panels by cycling from left to right panels throughout the game:
    • Talents
    • DeathDamageRole
    • ActionsPerMinute
    • Experience
    • TimeDeadDeathsSelfSustain
    • CarriedObjectives
    • 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

From Visual Studio 2019 or Visual Studio Code

Ctrl+Shift+B can be used to build the project.

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.

About

The Heroes of the Storm Automated Spectator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%