Other user's assetsSome assets in this file belong to other authors. You will need to seek permission from these authors before you can use their assets
Upload permissionYou can upload this file to other sites but you must credit me as the creator of the file
Modification permissionYou are allowed to modify my files and release bug fixes or improve on the features so long as you credit me as the original creator
Conversion permissionYou can convert this file to work with other games as long as you credit me as the creator of the file
Asset use permissionYou are allowed to use the assets in this file without permission as long as you credit me
Asset use permission in mods/files that are being soldYou are allowed to use the assets in this file in mods/files that are being sold, for money, on Steam Workshop or other platforms
Asset use permission in mods/files that earn donation pointsYou are allowed to earn Donation Points for your mods if they use my assets
Author notes
This mod is open source on GitHub (https://github.com/Marco4413/CP77-DiscordRPC2) under the MIT LICENSE.
File credits
This mod was possible thanks to psiberx and his work: https://github.com/psiberx/cp2077-cet-kit Also thanks Discord for creating the Discord Game SDK.
Donation Points system
Please log in to find out whether this mod is receiving Donation Points
THE MOD WORKS ON PATCH 2.13: Please update RED4ext and CET.
About
This is a Cyberpunk 2077 mod which adds Discord Rich Presence to the game!
I had already made a mod which claimed to do the same thing, but it used CET and an external application (not convenient). This new version is self-contained!
Features
Large image based on character gender.
Level and Street Cred shown when hovering the large image.
Small image based on lifepath.
When hovering the small image:
Playthrough time (optional, experimental).
Lifepath.
Quest and Objective tracking (optional).
Driving activity (optional).
Combat activity (optional).
Radio activity (optional) with RadioExt integration (also optional).
Roaming activity (no quest selected) showing what district the player is in.
A Translation Template is now available within the Files tab!
Note: I don't accept PRs (on GitHub) that add other languages since it would be a nightmare for me to maintain. That's why this mod has support for other mods to provide translations (see below).
Other CET mods can register locales using the CP77RPC2.RegisterLocale function.
The following snippet of code can get you started: -- Name used for logging inside the "onTweak" event local langName = "Italian" -- A unique id for this locale local localeName = "it" local locale = { -- All loc keys and their meaning can be found at https://github.com/Marco4413/CP77-DiscordRPC2/blob/master/src/cet/locales/en.lua -- If a key was not translated, it can be omitted and a fallback to English will be made. ["Locale.Name"] = "Italiano (by Marco4413)", ... }
registerForEvent("onTweak", function() local CP77RPC2 = GetMod("CP77RPC2") if not CP77RPC2 then print("[CP77RPC2 - " .. langName .. " Translation]: CP77RPC2 is not installed.") return end
local ok, error = CP77RPC2.RegisterLocale(localeName, locale) if ok then print("[CP77RPC2 - " .. langName .. " Translation]: Translation registered!") else print("[CP77RPC2 - " .. langName .. " Translation]: Failed to register translation: ", error) end end)
Credits
Thanks to all contributors of RED4ext, redscript and CyberEngineTweaks for developing those projects, and to the people from the Cyberpunk 2077 Modding Community Discord Server for helping me understand some parts of RED4ext and redscript, I truly appreciate it!
Also thanks to WillyJL for making the original mod that inspired me to do this! And thanks to psiberx for developing cet-kit.