From bb7d53bf756d78591205f75354394159d9931e50 Mon Sep 17 00:00:00 2001 From: atheop <133809614+atheop1337@users.noreply.github.com> Date: Wed, 13 Nov 2024 21:36:01 +0500 Subject: [PATCH] Update README.md --- README.md | 70 ++++++++++++++++++++++++------------------------------- 1 file changed, 31 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 1b66527..77276f6 100644 --- a/README.md +++ b/README.md @@ -1,80 +1,72 @@ -# EvaRPC-gmod +# DiscordRPC-gmod -**EvaRPC-gmod** is a specialized Discord Rich Presence (RPC) integration for WayZerRP, developed in C++. This project enables customized and dynamic Discord Rich Presence for Garry's Mod, displaying information about the server and other relevant details directly on your Discord profile. +**DiscordRPC-gmod** is a specialized Discord Rich Presence (RPC) integration for the WayZerRP server in Garry's Mod, developed in C++. This project allows real-time, customizable Discord Rich Presence displays, showing server and gameplay details on your Discord profile. You can use this code as a template for other games where Rich Presence modifications are allowed, and you may also adjust offsets and settings as needed. ## Features -- **Discord Rich Presence Integration**: Displays real-time server information on your Discord profile. -- **Dynamic Status Updates**: Automatically updates the Discord Rich Presence with information from Garry's Mod. -- **Server Information Retrieval**: Extracts and displays the server IP address and other details in Discord. -- **Logging**: Provides detailed logging of key events and errors for easier debugging and monitoring. +- **Real-Time Discord Rich Presence**: Display dynamic, up-to-date server and gameplay information directly on your Discord profile. +- **Customizable Status Updates**: Automatically syncs with Garry's Mod to show server details and status in real-time. +- **Server Info Display**: Shows server IP and other relevant details on your Discord profile, enhancing visibility. +- **Detailed Logging**: Provides extensive logs of events and errors for easy debugging and monitoring. ## Compatibility -- **Supported Version**: This program supports only the standard version of Garry's Mod. -- **Unsupported Version**: The program does **not** support the Chromium version of Garry's Mod. +- **Supported**: Works with the standard version of Garry's Mod. If it doesn't work that's means that offset is outdated. +- **Not Supported**: Does **not** support the Chromium version of Garry's Mod. ## Installation 1. **Clone the Repository**: ```sh - git clone https://github.com/yourusername/EvaRPC-gmod.git - cd EvaRPC-gmod + git clone https://github.com/atheop1337/DiscordRPC-gmod + cd DiscordRPC-gmod ``` 2. **Build the DLL**: - - Ensure you have a C++ compiler and necessary dependencies installed. - - Use CMake or your preferred build system to compile the project. For example, you can use the following commands if you are using CMake: + - Ensure a compatible C++ compiler and dependencies are installed. + - Use CMake or another build system to compile the project: ```sh mkdir build cd build cmake .. cmake --build . ``` - - **Note**: If you prefer not to build the DLL yourself or are unfamiliar with the process, you can download a precompiled DLL from the [RELEASE](https://github.com/TFZO/EvaRPC-gmod/releases/tag/Release) section of this repository. + - Alternatively, download a precompiled DLL from the [Releases](https://github.com/atheop1337/DiscordRPC-gmod/releases/tag/Release) section if you prefer not to build the DLL yourself. 3. **Inject the DLL**: - - Inject the compiled DLL into the Garry's Mod process. You can use tools like **DLL injectors** to achieve this. + - Use a **DLL injector** tool to inject the compiled DLL into the Garry's Mod process. ## Configuration -- **Log File Path**: By default, the logs are written to `C:\\TFZO\\TFZO_LOGS.txt`. If necessary, adjust this path in the `WriteToLogFile` function to suit your environment. - -- **Server Dictionary**: Modify the `serverDict` in the code to update the server IP-to-name mapping as needed. +- **Log Path**: Logs are written to `C:\RPC\RPC_LOGS.txt` by default. Adjust the path in the `WriteToLogFile` function if needed. +- **Server Dictionary**: Update `serverDict` in the code to match your server's IP-to-name mapping for accurate displays. ## Usage -1. **Run Garry's Mod**: Ensure that Garry's Mod is running and the DLL has been successfully injected. - -2. **Check Discord**: Your Discord profile should now display updated Rich Presence information, including server details. - -3. **Monitor Logs**: Check `C:\\TFZO\\TFZO_LOGS.txt` for detailed logs on the application's operation and any errors that may occur. +1. **Start Garry's Mod**: Launch Garry's Mod and inject the DLL. +2. **Verify on Discord**: Confirm that your Discord profile displays the Rich Presence with server details. +3. **Review Logs**: Check `C:\RPC\RPC_LOGS.txt` for detailed logs on the application’s operation and error reporting. ## Code Overview -- **`GetLargeImageKeyFromServer`**: Returns the image key associated with a server IP from the `serverDict`. - -- **`WriteToLogFile`**: Writes log messages to a specified log file, creating necessary directories if they don't exist. - -- **`GetProcessID`**: Retrieves the process ID of a specified process. - -- **`GetModuleBaseAddress`**: Retrieves the base address of a specified module within a process. - -- **`getStatus`**: Reads memory from the Garry's Mod process to extract the server IP address and updates the Discord Rich Presence. - -- **`MainThread`**: The main thread function that periodically updates the Discord Rich Presence with the current server status. - -- **`DllMain`**: Handles DLL attachment and detachment events. +- **`GetLargeImageKeyFromServer`**: Retrieves the Discord image key associated with the server IP from `serverDict`. +- **`WriteToLogFile`**: Logs messages to a specified file, creating directories if they don’t exist. +- **`GetProcessID`**: Fetches the process ID of the target application. +- **`GetModuleBaseAddress`**: Retrieves the base address of a module within the target process. +- **`getStatus`**: Reads memory to identify the server IP and updates Discord Rich Presence accordingly. +- **`MainThread`**: Main loop that periodically refreshes the Discord Rich Presence with current server information. +- **`DllMain`**: Manages DLL events for attachment and detachment. ## Authors -- **Author**: atheop1337 - [GitHub Profile](https://github.com/atheop1337) +- **atheop1337** - [GitHub Profile](https://github.com/atheop1337) ## Contributing -Contributions to EvaRPC-gmod are welcome! If you have suggestions or improvements, please open an issue or submit a pull request. +Contributions are encouraged! Feel free to open issues or submit pull requests to enhance EvaRPC-gmod. ## License -This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. +This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. + +This version is more concise and polished, with improved section organization and clearer instructions. Let me know if you want any additional customization!