Giter VIP home page Giter VIP logo

andsfonseca / dota2-rpc-client Goto Github PK

View Code? Open in Web Editor NEW
37.0 3.0 8.0 2.94 MB

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

Home Page: https://andsfonseca.github.io/dota2-rpc-client/

License: MIT License

CMake 14.73% C++ 82.76% Batchfile 2.51%
discord discord-rich-presence discord-rpc-client dota-gsi dota2 rich-presence rpc

dota2-rpc-client's Introduction

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.

dota2-rpc-client's People

Contributors

altqx avatar andsfonseca avatar aoisensi avatar iamquoz avatar jafu0 avatar leamare avatar n0tsirjordy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dota2-rpc-client's Issues

[Feature]: Razor Arcana Support

Are you on the latest version?

  • I'm on the latest version

Is there a fix in progress related to your proposal?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

No response

Describe the solution you'd like

Add Razor Arcana Support

Dota 2 Patch

No response

Anything else?

No response

[Feature]: Use discord language instead of system language

Are you on the latest version?

  • I'm on the latest version

Is there a fix in progress related to your proposal?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

As explained in the title, the application should use the language provided by discord instead of using the system language.

Describe the solution you'd like

The discord SDK has a function to retrieve the language.

Dota 2 Patch

No response

Anything else?

No response

[Bug]: Service fails to run

Are you on the latest version?

  • I'm on the latest version

Is there a fix in progress related to your proposal?

  • I have searched the existing issues

Describe the bug

D2RPC Client service either

  • fails to install (on a new machine)
  • runs for a while and crashes (on a machine which had previous installation of D2RPC)

Expected Behavior

Service installs and runs.

Dota 2 Patch

No response

Steps To Reproduce

Try to run the install and run the service

Anything else?

This only happened with 1.0.4 version.
1.0.3 doesn't have this issue.

[Feature]: Make DotA 2 RPC on Main Menu is also displayed or when the Search Game is in progress

Are you on the latest version?

  • I'm on the latest version

Is there a fix in progress related to your proposal?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

No response

Describe the solution you'd like

Сделать так, чтобы и в главном меню тоже отображалось, или когда поиск игры идёт

Dota 2 Patch

No response

Anything else?

No response

[Bug]: libdiscord_game_sdk.so

Are you on the latest version?

  • I'm on the latest version

Is there a fix in progress related to your proposal?

  • I have searched the existing issues

Describe the bug

when I run the command ./dota2-rpc-client -i or ./dota2-rpc-client , this appears: ./dota2-rpc-client: error while loading shared libraries: libdiscord_game_sdk.so: cannot open shared object file: No such file or directory

Expected Behavior

I know it's in experimental state but it should work normally

Dota 2 Patch

the error is not in dota

Steps To Reproduce

on linux, try running the command ./dota2-rpc-client -i or ./dota2-rpc-client

Anything else?

I don't know if it's just me that has this bug

[Bug]: Unable to update discord activity

Are you on the latest version?

  • I'm on the latest version

Is there a fix in progress related to your proposal?

  • I have searched the existing issues

Describe the bug

Described by @phola123 in issue #1.
Unable to update discord state

Expected Behavior

No response

Dota 2 Patch

No response

Steps To Reproduce

No response

Anything else?

No response

[Feature]: Disabling smokes/Aghs indicators

Are you on the latest version?

  • I'm on the latest version

Is there a fix in progress related to your proposal?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

Smokes and aghs indicators might compromise your team, especially when playing competitive games or being a part of public discord server.

Describe the solution you'd like

Some kind of config wizard to disable showing these states (for all matches or only for tournament lobbies) or adding a delay.
Disabling KDA/LH/DN counters would be nice as well.

Dota 2 Patch

No response

Anything else?

No response

[Feature]: Botmatch detection

Are you on the latest version?

  • I'm on the latest version

Is there a fix in progress related to your proposal?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

Steam RPC has separate status for botmatches (#DOTA_lobby_type_name_bot_match), but dota2-rpc-client doesn't really detect it as a botmatch (just as a regular one).

Describe the solution you'd like

Would be nice to add botmatch support.

It would also be nice to have a robot icon in the corner of hero portrait (similar to smoke status) for botmatches as an additional indicator.

Dota 2 Patch

No response

Anything else?

No response

[Bug]: Service fails to install

Are you on the latest version?

  • I'm on the latest version

Is there a fix in progress related to your proposal?

  • I have searched the existing issues

Describe the bug

The install script fails to install a service (it doesn't show up in the services list) or add the gamestate_integration_rpc config.
Output looks completely normal.

Expected Behavior

Service installs and runs

Dota 2 Patch

No response

Steps To Reproduce

It happens just while executing the install script as usual.

Anything else?

Hard to specify the exact reason.
My main PC has two users setup (both have admin privileges), this might be the issue.
Alternatively, I suspect there is some kind of access issue.

Might need to try a debug build with verbose output to figure out what's happening there.

[Feature]: Add Team names for watching DPC matches

Are you on the latest version?

  • I'm on the latest version

Is there a fix in progress related to your proposal?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

No response

Describe the solution you'd like

I am not sure it is possible to do. Add Team names in the discord for watching DPC matches when spectating a DPC game. Since TI is coming soon, it is a nice discord status to show if you are watching TI.
e.g.
Watching OG vs PSG.LGD | TI 2022
Radiant 3k | Dire
20:00 elapsed

or

The International 2022
Watching OG vs PSG.LGD
Radiant 3k | Dire
20:00 elapsed

Just a suggestion. Not sure it is possible to do.

Dota 2 Patch

No response

Anything else?

No response

[Bug]:

Are you on the latest version?

  • I'm on the latest version

Is there a fix in progress related to your proposal?

  • I have searched the existing issues

Describe the bug

i followed these steps

  1. Uninstall the service, if you have it installed;
  2. Manually copy the cfg file to your Dota 2 folder;
  3. Run the program using the command (Do not close the terminal);
  4. Open dota and enter the hero demo

and got this in console
image

Expected Behavior

No response

Dota 2 Patch

7.31d

Steps To Reproduce

No response

Anything else?

No response

[Feature]: Crownfall update

Are you on the latest version?

  • I'm on the latest version

Is there a fix in progress related to your proposal?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

Add assets to Vengeful and Sky Arcana

Describe the solution you'd like

Update strings and assets

Dota 2 Patch

No response

Anything else?

No response

[Feature]: Choose default language in config.json

Are you on the latest version?

  • I'm on the latest version

Is there a fix in progress related to your proposal?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

Related to a language selection problem demonstrated in #4

Describe the solution you'd like

Allows the user to choose their default language instead of using the OS language by changing a setting in config.json

Dota 2 Patch

No response

Anything else?

No response

[Bug]: Still showing as playing Dota 2 on Discord - SOLVED

Are you on the latest version?

  • I'm on the latest version

Is there a fix in progress related to your proposal?

  • I have searched the existing issues

Describe the bug

Followed steps of installation still just shows me as Playing Dota 2. Tried manually putting cfg file in cfg folder still doesn't work.

Expected Behavior

No response

Dota 2 Patch

7.31d

Steps To Reproduce

No response

Anything else?

No response

[Bug]: Wont show

Are you on the latest version?

  • I'm on the latest version

Is there a fix in progress related to your proposal?

  • I have searched the existing issues

Describe the bug

After running " insta.windows.bat " it installed, can even see in the task manager and its running, but it still wont appear on my discord rich presence.

Expected Behavior

No response

Dota 2 Patch

7.33c

Steps To Reproduce

No response

Anything else?

No response

[Feature]: Aegis item effect

Are you on the latest version?

  • I'm on the latest version

Is there a fix in progress related to your proposal?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

No response

Describe the solution you'd like

I think it is neat to have Aegis item effect f you are holding Aegis. The priority of the status should be:

  1. Smoked
  2. Aegis
  3. Aghanim and Shard

Dota 2 Patch

7.31d

Anything else?

No response

[Bug]: Not working as intended - SOLVED

Are you on the latest version?

  • I'm on the latest version

Is there a fix in progress related to your proposal?

  • I have searched the existing issues

Describe the bug

Did all the steps mentioned in the website, But Discord is not showing Game Activity,
Its Not working.

Expected Behavior

No response

Dota 2 Patch

7.31d

Steps To Reproduce

No response

Anything else?

No response

[Bug]: The application doesn't perform as expected

Are you on the latest version?

  • I'm on the latest version

Is there a fix in progress related to your proposal?

  • I have searched the existing issues

Describe the bug

Installed following steps but nothing happened

Expected Behavior

Expected it to show hero in discord activity status

Dota 2 Patch

No response

Steps To Reproduce

uh just installed it by double clicking install.windows.bat and pressing space once it said press any key in the cmd window

Anything else?

No response

[Feature]: Linux Support

Are you on the latest version?

  • I'm on the latest version

Is there a fix in progress related to your proposal?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

No response

Describe the solution you'd like

Trying to generate a linux version of the repository

Dota 2 Patch

No response

Anything else?

Original issue from reddit.

[Feature]: Muerta Support

Are you on the latest version?

  • I'm on the latest version

Is there a fix in progress related to your proposal?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

No

Describe the solution you'd like

I would like Muerta Support

Dota 2 Patch

7.32e

Anything else?

Discord_M2KGwwHRh5

[Bug]: The service shuts down after the match/test lobby is started

Are you on the latest version?

  • I'm on the latest version

Is there a fix in progress related to your proposal?

  • I have searched the existing issues

Describe the bug

Yesterday everything just worked. But idk, maybe just because the new patch just came out today, when I try to start the match or test lobby, the service just shuts down.

Before starting the match/test lobby:

Снимок экрана 2024-03-22 181945

Снимок экрана 2024-03-22 182020

After starting the match/test lobby:

Снимок экрана 2024-03-22 182409

Снимок экрана 2024-03-22 182417

It seems that this problem is due to the new patch, but everything is possible, maybe it is just because I doing something wrong.

Expected Behavior

No response

Dota 2 Patch

7.35d

Steps To Reproduce

No response

Anything else?

  1. I tried to uninstall the service by using uninstall.windows.bat and reinstall it again by using install.windows.bat, but that didn't help.
  2. By executing dota2-rpc-client.exe, the console pops up and disappears immediately in like 0.1 seconds.
  3. Yesterday, I just downloaded and installed it, and the only issue was the language. It didn't change to my default "Russian" language.

[Bug]: Dont show overlay

Are you on the latest version?

  • I'm on the latest version

Is there a fix in progress related to your proposal?

  • I have searched the existing issues

Describe the bug

During installation, I selected the folder where Steam is located, after that I went back into the game and restarted Discord, but the overlay did not appear in Discord

Expected Behavior

No response

Dota 2 Patch

No response

Steps To Reproduce

  1. Install
  2. Choose folder for steam
  3. Restart game
  4. Restart discord
  5. Play match

Anything else?

No response

[Bug]: Zeus Arcana does not appear

Are you on the latest version?

  • I'm on the latest version

Is there a fix in progress related to your proposal?

  • I have searched the existing issues

Describe the bug

Zeus arcana is not recognized by the app

Expected Behavior

No response

Dota 2 Patch

No response

Steps To Reproduce

Select Zeus and play with bots

Anything else?

No response

[Feature]: Faceless Void Arcana

Are you on the latest version?

  • I'm on the latest version

Is there a fix in progress related to your proposal?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

No response

Describe the solution you'd like

Add Image to Faceless Void Arcana

Dota 2 Patch

7.32b

Anything else?

No response

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.