Artprozew / GenshinRichPresence

Discord Rich Presence for Genshin Impact (aka. Anime Game)
MIT License
7 stars 0 forks source link
discord discord-rich-presence discord-rpc genshin-impact genshin-impact-tools pypresence python

GenshinRichPresence

GitHub top language pypresence GitHub branch check runs Downloads Release

Check it out on GameBanana:

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, the game 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. Additionally, this method doesn't use OCR (Optical Character Recognition) at all, which makes it potentially even more performant.

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.

Features

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

Instructions

Read Considerations for more info.

Running from Source Code

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

Prerequisites

Installation

[!TIP] (Optional) For Poetry: 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

See above Instructions, for step 2 you can instead:

Considerations

If you install and launch the program while your game is still running, press F10 to reload it.
Make sure the game is running with 3DMigoto.

For now, the program also creates a "RichPresenceData" folder inside your GIMI's Mods folder when you launch it. This is required for it to work.

You can always install the program on the same folder, if you would want to update it, for example. The settings at your config.ini are going to be preserved and applied when you run the program.

If you play on the Chinese servers, your game executable must be named YuanShen.exe, in this case, run the installer in the Chinese language.

If you want to customize or change something, read and edit the config.ini file, and then restart the program.

This program is not fully tested yet and may have some problems. Any feedback is appreciated.

When the program starts, it will stay hidden on your system tray, and will wait your game to open within 60 seconds, if it doesn't find it or if you close your game, the program will also close itself.

If any error occurs, the program may exit by itself, and will write the error on the traceback.txt file.

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:

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

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