Skip to content

Allows you to observe the status of your DotA 2 (Defense of the Ancients 2) match within the Discord, through the Rich Presence service. ๐ŸŽฎ

License

Notifications You must be signed in to change notification settings

andsfonseca/dota2-rpc-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

DotA 2 RPC (dota2-rpc-client)

GitHub release (latest SemVer) GitHub milestone Hits Website GitHub

Allows you to observe the status of your DotA 2 (Defense of the Ancients 2) match within the Discord, through the Rich Presence service.

You can access the project website by clicking here.

What is?

This is a service that allows you to show your Discord friends information about the matches you play and watch within DotA 2.

Share real-time information about what happens in your game with everyone.

Features

Feature Preview
Check what your friends are watching.

Show off your heroes with your favorite skins.

Show your skills of accumulating money in the game

Show your items and your buffs.

Modified map support.

See your instructors.

Multiple language support.

Installation (Windows only)

See instructions for Linux below

Follow the step-by-step below to install your version of DotA 2 RPC

  • Download the latest software version on the Releases page;
  • Unzip the file in a folder of your preference. (There are many files, then be careful!๐Ÿ™ƒ);
  • Open the file install.windows.bat and everything will be ready!

Uninstallation (Windows only)

  • Open the uninstall.windows.bat file to remove the installation of your computer;
  • If you want, you can delete all the files.

Advanced Users (Windows Only)

This software is registered as Windows service. If you are looking for other options, here are other ways to use the application.

dota2-rpc-client.exe <flag>
Flag Description
-i Install the DotA 2 RPC as a service.
-r Uninstall the service, if installed.
-s If installed, start the service.
-e If installed, stop the service.
-f Execute the DotA 2 RPC like a Console Application.

Running on Linux (Experimental)

Just as a warning it's just a experimental version. If you find any bugs in this version, please report them. The Discord API and other functions commonly used on Windows may not have the same effect on Linux.

Unfortunately, this service has not been adapted to work with daemon. So installing and running the application must be done manually from the terminal.

Make the file executable

chmod +x dota2-rpc-client 

Use this command to install

./dota2-rpc-client -i

And run the application using

./dota2-rpc-client

Known bugs:

  • A bug related to the discord SDK loop, sometimes returning a "panicked". Probably some problem related to threads. Still looking for a solution.

    Temporary solution: Try running until it works.

  • A failure to create files and folders, usually caused by missing permissions

    Temporary solution: Give the necessary permissions.

Settings

You can choose what can be displayed and other application settings.

Just modify the config.json file.

{
    "HOST": "127.0.0.1",
    "PORT" : 52424,
    "LOCALE" : "System",
    "DISPLAY_OPTIONS":
    {
        "AEGIS" : true,
        "AGHANIM" : true,
        "GOLD_AND_LAST_HIT": true,
        "KILL_DEATH_ASSIST" : true,
        "SMOKE": true
    },
    "STEAM_FOLDER": ""
}

Below is a brief description of each property.

Property Description
HOST The url the application will use. (Default: 127.0.0.1)
PORT The port the application will listen on. (Default: 52424)
LOCALE Language used. (Default: System, Avaiable options : LocaleString, System and Discord )
DISPLAY_OPTIONS Discord display options.
DISPLAY_OPTIONS:AEGIS Whether or not to display the Aegis effect (Default: true)
DISPLAY_OPTIONS:AGHANIM Whether or not to display the Aghanim effect (Default: true)
DISPLAY_OPTIONS:GOLD_AND_LAST_HIT Whether or not to display the Gold, last hits and denies (Default: true)
DISPLAY_OPTIONS:KILL_DEATH_ASSIST Whether or not to display the K/D/A (Default: true)
DISPLAY_OPTIONS:SMOKE Whether or not to display the smoke effect (Default: true)
STEAM_FOLDER Steam folder location (Optional, default: Default folder commonly used by steam)

If you installed the cfg file manually, when changing the host and port you will need to change them also in the gamestate_integration_rpc.cfg file. See this issue #1.

Compilation Instructions

Want to improve the project or compile a version outside the official channel?

See the Contribution Section to read more instructions or clone this repository.

This project mainly uses 4 libraries to work. Are they:

  • Discord SDK - A Library for Integration with the Discord application;
  • Drogon C++ - A web framework written with C++;
  • SrvLib - A library for creating services in Windows and Linux created by @tomenz.
  • NFD - A small C library with that portably invokes native file open, folder select and file save dialogs. Created by @btzy and @mlabbe.

This is a project made with CMake, these libraries are downloaded during the first compilation of the software and placed in a folder called third_party.

With the repository downloaded, run the command:

 cmake --build {folder} --config Debug --target dota2-rpc-client -j {threads}

This project uses Conan Package Manager to download Drogon C++ and jsoncpp packages. If you use a package manager like vcpkg or libs and dlls externally, feel free to modify CMakeLists.txt (Just comment out the references to conan ๐Ÿ˜…).

An installation guide for the Drogon C++ dependencies can be found on this page.

Web Page Compilation Instructions

Would you like to change the project webpage? You can access the files from the web directory.

The following frameworks and templates were used:

Instead of using static pages, a framework was used to create the site. So to compile, follow the instructions available here.

With everything configured, use the command below to run:

 ng serve

Language Contribution

Would you like to translate the app into your language? Create a translation file based on the en-us.json file. Then create an issue or a pull request to submit your modification.

Issues

Feel free to submit issues and enhancement requests.

Contribution

  1. Fork the project
  2. Create a branch for your modification (git checkout -b my-new-resource)
  3. Do the commit (git commit -am 'Adding a new resource...')
  4. Push (git push origin my-new-resource)
  5. Create a new Pull Request

Notes

Images, names, and any entities related to DotA 2 are copyrighted by Valve Corporation. This software only uses the data shared by the game, but it is not related to the original game.