Git Product home page Git Product logo

its-haze / league-rpc Goto Github PK

View Code? Open in Web Editor NEW
23.0 1.0 6.0 1.17 MB

Just a better Rich Presence for League of Legends. Showcasing Live Game Stats, Summoner Icons, Rank Emblems and Champion Skins on Discord.

License: GNU General Public License v3.0

Python 97.49% Shell 2.51%
discord discord-rpc league-of-legends linux rpc league-of-legends-rpc teamfight-tactics league-of-legends-python presence-detection rich-presence

league-rpc's Introduction

GitHub All Releases Stargazers Issues MIT License

Windows Mac Python

A Better League of Legends Rich Presence For Discord!

Enhance your Discord experience while playing League of Legends! This project brings unique Discord Rich Presence integration for League players, including features not even available natively from the game!

Got questions already? Don't hesitate to join the Discord Community Server

Table of Contents

Showcase

Summoner Icons

Who let the Kitten and the Penguin out? I did ๐Ÿ˜Ž. Now you too, can show off your favorite summoner icon, righ there on Discord!

summoner-icon-1 summoner-icon-2

Ranked Games

You can show off your rank emblem right in your Discord Presence.

  • SoloQ/Flex: Shows off your Rank emblem + LP
  • TFT: Shows off your TFT rank emblem + LP
  • Arena: Shows off your Arena meddalion + Your rating

If you really don't want to show your rank, then add the --no-rank argument, to disable this feature. As it's enabled by default.

lobby-ranked lobby-ranked-2

Arena

To show these Arena ranked emblems, you will need to add the argument --show-rank when starting this application

Arena-rpc-example Arena-rpc-example-ranked-emblem

Base skin example

Yuumi-default-skin-league-rpc

Skin example

Aphelios-skin

TFT (Teamfight tactics)

Teamfight-Tactics-example

Swarm

Swarm PVE is now officially supported

image


Installation

Prerequisites

Download the latest version.

  1. Go to the Releases Page
  2. Find the latest version and download leagueRPC.exe located under the assets section.

Run the application.

  1. Locate the downloaded leagueRPC.exe file. Probably in your Downloads folder.
  2. Double-click the file to start leagueRPC. You will need to accept the windows popup, if one may appear.
  3. Done โœจ

Build from source (This is what the cool kids do!)

If you prefer using the command line, follow these steps:

  • Use the following command to clone the repository to your local machine:
    git clone https://github.com/Its-Haze/league-rpc.git
    cd league-rpc
  • A virtual environment helps to keep dependencies required by different projects separate, creating isolated python environments for them. This is highly recommended to avoid conflicts between project dependencies.
    python -m venv venv
    .\venv\Scripts\activate
  • With the virtual environment activated, install the required dependencies using:
    pip install -r requirements.txt
    
  • You will need pyinstaller for this to work
    pip install pyinstaller
  • Build
    # Assuming your current directory is "league-rpc"
    pyinstaller --onefile --name leagueRPC.exe league_rpc/__main__.py --clean --distpath .
  • Run
    .\leagueRPC.exe

Command Line Arguments

LeagueRPC supports various command-line arguments to enhance flexibility and user customization.

โœจ Means Recommended.

--launch-league <location> โœจ

The --launch-league argument allows you to automatically launch the League of Legends client alongside leagueRPC. This feature is designed to make your experience more seamless by integrating the game launch into the RPC setup.

By default, if --launch-league is specified without a path, the default installation path will be used:

C:\Riot Games\Riot Client\RiotClientServices.exe

This path is correct for the majority of installations. If your League of Legends client is installed in this location, you do not need to specify the path explicitly.

If you have installed League of Legends in a non-default location, you must provide the path to the RiotClientServices.exe file when using --launch-league. For example, if your game is installed on the D drive, you can start leagueRPC with the game like this:

.\leagueRPC.exe --launch-league "D:\Riot Games\Riot Client\RiotClientServices.exe"

This command tells leagueRPC to launch the League of Legends client from the specified location.

--client-id <discord-app-id> โœจ

Specify a custom Discord client ID for the RPC connection. Defaults to League of Legends Example .\leagueRPC.exe --client-id 1230607224296968303 - This will show League of Kittens

  • League of Kittens: 1230607224296968303
  • League of Linux: 1185274747836174377

You can create your own here: Discord Developer Portal. Then use the APPLICATION ID

--no-stats

Opt out of displaying in-game KDA and minion (creep score) statistics in your Discord Rich Presence. By default, these stats are shown.

Example: .\leagueRPC.exe --no-stats

--no-rank

Hide your League rank on Discord (SoloQ/Flex/TFT/Arena) By default, this will be enabled.

Example: .\leagueRPC.exe --no-rank

--show-emojis โœจ

Do you want to show your Online/Away status with a emoji, then add this argument. By default, this will be hidden.

Example: .\leagueRPC.exe --show-emojis

Online Away

--add-process <process-name>

Add custom Discord process names to the search list. This is useful if your Discord client is running under a different process name.

Example: .\leagueRPC.exe --add-process CustomDiscord AnotherProcess

--wait-for-league <seconds>

Specify the time (in seconds) the script should wait for the League of Legends client to start. Use -1 for infinite waiting. This is particularly useful for auto-launch scenarios like with Lutris or other launchers, ensuring the script does not error out if League is not immediately detected. Default is -1

Example: .\leagueRPC.exe --wait-for-league 30

--wait-for-discord <seconds>

Similar to --wait-for-league, specify the time (in seconds) to wait for Discord to start. Use -1 for infinite waiting. This ensures that the script waits for Discord to fully start, avoiding premature errors. Default is -1

Example: .\leagueRPC.exe --wait-for-discord 15

Combine arguments

Each of these arguments can be combined to tailor the Discord RPC to your preferences.

.\leagueRPC.exe --client-id 1194034071588851783 --launch-league --no-stats --no-rank --add-process CustomDiscord --wait-for-league -1 --wait-for-discord 15 --show-emojis

๐Ÿ›‘ All of these arguments are optional. No extra argument is needed for the script to function properly. But in case you want to change something, you now can.

Features

  1. Dynamic Champion Skin Display: If a skin is active, it will display the artwork of that skin, and it's name on Discord!
  2. Live KDA Stats: Keep track of your Kills, Deaths, and Assists updated live during the game.
  3. Creep Score: Your minions (creep score) are displayed, providing a comprehensive view of your in-game performance.
  4. Ranks: Show your rank detailes on SoloQ/Flex, TFT, and Arena!
  5. Precise In-Game Time Tracking: The in-game time is calculated with precision. Even if the script stops, when restarted, it will display the correct in-game time, ensuring continuous and accurate representation of your game status.
  6. Discord Reconnection Window: While the script only works while Discord is up and running. There are instances where discord could crash. This program will attempt to reconnect to Discord's RPC even if the app is not running. For a period of time, and only exit when too much time has passed. Default is (50) seconds to restart/reconnect Discord.
  7. Disables Native League Presence: This application is able to detect, and disable the built in rich presence coming from league, leaving only this one active as your main Presence on discord. This was a huge issue before since it's not easy to disable. And now all you have to do is just start this application before launching the league client, and you will be good to go.
  8. Launches League of legends for you: To avoid forgetting to start this application before league all the time, you can let the application start league for you. Please read about the --launch-league argument to learn more.

Tips for Running

  • Windows Security Warning: Depending on your Windows settings, you might see a warning about running downloaded software. If you trust the source, you can allow the app to run.
  • Adding to PATH: If you prefer to run leagueRPC.exe from any location in the command prompt without navigating to the specific folder, you can add its folder to your system's PATH environment variable. Instructions for modifying the PATH are outside of the scope of this readme, but i can link a good guide on How to add a folder to Path environment variable in Windows.
  • Add Arguments while not running in the Terminal: If you prefer double clicking, instead of running it from a terminal, then you can still add arguments to the execution.
    • Right click on leagueRPC.exe -> Select Create shortcut
    • Right click on the Shortcut -> Select Properties
    • In the Target field, you can add all your arguments after leagueRPC.exe
    • Then just double click the shortcut to launch the program.

FAQ

Q: Will this get my account banned?

  • No, it uses Riot's local API at 127.0.0.1:2999, so it will not cause any bans. And Vanguard will not ban you for using it.

Q: League's native RPC is still running. how do i turn it off?

  • To Disable the native league presence, it requires that this program is ran before the League Client starts up.
    • You can start this application whenever you like. But the native league presence can only be disabled during the launch of the League Client.

Q: Does Riot approve this?

  • This is an independent project, not affiliated with Riot Games. This project is Open Source (as you can tell), mainly to protect your Privacy and Security. Running executables from strangers on the internet is never safe, so this is why the source code is open for you to read.

Q: Does it support TFT?

  • Yes! TFT is supported. leagueRPC will also display your current level in game. I tried adding the gold amount, but riot does not have that feature ready yet.

Q: Does it support Arena?

  • Yes! Arena is supported. A cool emblem will be shown on your Discord Presence. Stats (K/D/A), the level, and gold amount will also be displayed!

Q: Does it support ARAM?

  • Yes, ofcourse!

Q: Can it run on Windows?

  • Yes, Even though league already has a built in Presence, it's not as customizable and feature rich as this one. It's also very outdated, and some champions just won't show you any images. Really disappointing RIOT, step up your game!

Q: Why doesn't the minnions (cs) update live?

  • Trust me it's annoying for me as well. This is thanks to Riot Games not updating their API for every minnion killed, but rather updates every (10th) minnion killed. So this is sadly out of my control.

Contact and Support

Got questions? Join the Discord Server Feel free to open up Help tickets, or contact me directly on Discord (@haze.dev).

For issues related to the code, or project as a whole, please open an issue on GitHub.

History

This project was previously called league-rpc-linux, but since RIOT introduced Vanguard, and broke League on linux. I wanted to rename this project to league-rpc, and continue maintaining it for Windows users.

league-rpc's People

Contributors

bloodiko avatar davispuh avatar its-haze 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

Watchers

 avatar

league-rpc's Issues

After running, minimize to taskbar

This is a continuation of the previous feature request I had #50

If it's possible to make this a taskbar icon, then maybe also have an option to minimize it to the taskbar once running so it can be one less window on screen

image

Discord RPC Showing is wrong if the game's language is not English

I played on Japanese Server and with Japanese Language, and if I used league-rpc-linux, the champion's icon display is not working, as it's searching for an image of a champion with Japanese name and not English.

Reproduce steps:

  • Change game client's language to Chinese, Japanese or Korean
  • Get into a game, wait for the RPC to load image
  • Click onto it in Discord
  • See the image to not be the champion's, but just a blank png

Make the flags configs you can edit

Could the flags be made into a config option ? It might be easier for users to edit their settings that way if they aren't too familiar with file systems and stuff in general

Another idea I had was we could also have a toolbar icon like shown below. Right clicking could have edit settings as an option too.

image

error discord running

If discord is already open before opening the program it displays this error attached, for it to work perfectly you need to close discord and only open it after the program is running

356785740-0beba533-ff64-4668-99a5-cf03d3ec43d4

Doesn't seem to run with League of legends

It appears you have to open the game separately entirely, which is a bit of a shame.

Is this intended behavior for this app? Or is it supposed to open the League of Legends game along with it?

It's such a great feature, what your custom RPC does, that if this isn't already in I'd like it to be considered.

Suggestion: Be able to override league RPC after it's already open

โ†[33mThe Native League Presence is still active. Please start this application before launching League of legends to fully disable it.โ†[0m

This message comes up sometimes when I launch the app and I'm not sure why because I set in flags to launch with league itself too; could there be a way to eliminate the league rpc in as many cases possible

the future of this project

riot has announced that vanguard will be added to LoL in the next season update (2024). that means LoL will be permanently unplayable on linux as soon as the update drops.
as a result, i am wondering what this project will become once league of linux is dead

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.