Skip to content

Discord Rich Presence for Genshin Impact (aka. Anime Game)

License

Notifications You must be signed in to change notification settings

Artprozew/GenshinRichPresence

Repository files navigation

GenshinRichPresence

pypresence

Overview

Show your friends on Discord what you're up to in Genshin Impact!

This is a Discord Rich Presence program for Genshin Impact that works by analyzing GIMI's log file in real-time to determine the current game status, updating your Discord game activity accordingly.

image image

Why do it this way?

You're right, accessing game information through GIMI's log file might not be the most elegant solution. Ideally, Genshin Impact would directly share your activity with Discord. But this method is currently one of the few ways to get in-game information like this without changing the game files itself. Since it works as expected and doesn't alter the game, it's a practical solution.

Is it safe?

Yes, this program is considered safe. It just reads a log file generated by GIMI, and does not modify any game files, so there's no risk of harming your game or your computer.

Running the Executable

The pre-built executable is a convenient option for users who want to avoid installing Python. However, anti-virus might flag the .exe incorrectly as a "virus", you can check the Anti-Virus Disclaimer

Prerequisites

  • Download and extract the zipped file from Releases
  • Install GIMI
  • Older version only: You will need to use Region.ini on your game if you want it to display your region

Instructions

  1. Move the RichPresenceData folder into the "mods" folder in your GIMI (contains nothing but .ini files, doesn't affect/modify at all your game/mods. Instructions on readme.txt)
  2. Run GIMI alongside Genshin Impact
  3. Run the executable
  4. You will see a screen to setup your presence
  5. Your activity must now be visible on your Discord profile, have fun!

Running from Source Code

This method is suitable for users familiar with Python or encountering issues with the executable.

Prerequisites

Installation

Tip

(Optional) If you want to install the developer dependencies, you can append --group=dev to the poetry install command

  1. Download and extract the repository (or just clone it)
  2. Open the project folder, right click on a blank space and click "open Command Prompt/Terminal"
  3. Install dependencies using the command for either pip (python -m pip install -r requirements.txt) or Poetry (poetry install)

Instructions

  1. Run the main.py file inside the src folder by double-clicking it. (or open a command prompt on the downloaded project's root directory and run the command python src/main.py)
  2. See above Instructions (ignore step 3)

Known issues

Although still under development, this method is not perfect and may have limitations. But keep in mind that it does work as expected most of the time. Some of the issues described here may be fixed or worked around in the future. The problems observed are:

  • When you first launch the program, it might not detect your current character/region until you switch your character or walk/teleport to another place. (Probably fixed)
  • Occasionally, especially during teleports, the program might display an incorrect character. This issue can also be fixed when you switch characters. (#17)
  • When there's more than one playable character on screen, the program can also struggle to detect your character (e.g.: Multiplayer or cutscenes).
  • Some regions might not be displayed correctly. (#27)
  • Due to the program relying on analyzing hashes, some information might be incorrect at times. These hashes may be wrong or outdated. (WIP to partial fix)
  • Character mods for GIMI are currently required for the program to detect your characters. (Fixed for versions above v0.1.1-beta)

Disclaimer

GenshinRichPresence is an unofficial third-party application and is not affiliated with HoYoverse in any way. It is developed and maintained independently.

Anti-Virus Disclaimer

Some anti-virus software (Windows Defender or similar) might flag the executable as a potential threat due to overly cautious heuristics. This is a known issue called "false positive", especially considering the program is built from Python code.

Python is a widely used and well-established programming language known for its security. However, anti-virus software might sometimes misinterpret the behavior of programs created with Python. See: Windows Defender false positives

If you're confident the program is safe, you can add an exclusion for the program's executable file in your anti-virus software settings. This will prevent it from being flagged in the future.

We assure you that the program is entirely safe and does not contain any malicious code. If you encounter any issues running the program from the downloaded executable file, you can try running from source code

Contributing

I had to push hard to get this pre-release out (gotta meet that deadline!), so the code might not be as polished as I'd like. There's still a lot to do, if you want to contribute, fork the repo, submit pull requests, or share any bug fixes or feature ideas you have, you're much welcome!

Licensing

This project is licensed under MIT license; Refer to: LICENSE

Credits

  • Region data/hashes extracted from golanah921's Region.ini
  • Temporary app icon image (used as a placeholder icon) by @KisekiHikari on Twitter