Discord Rich Presence for Team Fortress 2
- Detects current game state, queue info, playtime, and more
- Configurable, reliable, and performance-efficient
- Version 2 (GUI, map images, and more): out now!
Installer: TF2RichPresence_v2.1.11_setup (18.8 MB)
Alternatively, get the latest autobuild (may be untested/buggy): TF2RichPresence_v2.1.11_setup
Note that having Python installed is not required. Requires Discord and Steam to be running as well, and will wait until the game and both programs are running.
At the moment, both are considered unsupported. They probably work since Jan200101 did some work on Linux a while ago, but the release builds are formatted for Windows. Contributors are very welcome! Also check out cyclowns/tf2-discord, which is confirmed to work on both Windows and Linux, or EmeraldSnorlax/TF2-RPC, which is a much less mature program but is built on Linux and theoretically cross-platform too. Alternatively, following most or all of the "building from source" instructions might work, or possibly running python resources/launcher.py
in a --nocython build.
Almost certainly. If you don't want to risk it then fair enough, but I've run this on my main account for years and feel comfortable with it. The game's runtime and memory are never touched in any way to read its state. For transparency, here's the complete list of external files that are read from and/or written to: \tf\console.log
, \tf\cfg\*class*.cfg
and steam_appid.txt
in TF2's install, and \userdata\*id*\config\localconfig.vdf
and \steamapps\libraryfolders.vdf
in Steam's. The game process is also queried for its start time and install path, and the server you're playing on is queried for player count, server name, or kill counts. RCON is not used.
For making and testing changes, or simply always running the most up-to-date code.
- Either clone the repo or download the source.
- Copy the entire source to another location (sorry) and put the files outside of
TF2 Rich Presence
into that folder. - Make sure the
python
andpip
commands point to Python 3.9.x (future versions should work too). - Install a C compiler (see Installing Cython). I personally use MinGW, but it's a pain on Windows. Alternatively, use the
--nocython
flag when building to disable compiling. - From within
TF2 Rich Presence
, runpip install -r requirements.txt
. - Either run
python build.py
to compile and build, orpython launcher.py
to launch in debug mode.
A GUI(Done, ended up using discoIPC still)- I'm fairly confident I know how to implement this (it's a bit of work though)
- Would require doing RPC with pypresence due to a bug in discoIPC
- Would also have the benefit of not requiring two (slow) Python interpreter launches
- This is the only criteria I'll require for release v2.0, any of the others could be in later versions
Run as a service(Abandoned because "launch TF2" button OP)- Idea basically stolen from cyclowns/tf2-discord
- Alternatively, minimize to taskbar (if possible)
Map-specific images, instead of gamemodes(Done, also Discord increased the limit to 300)- Would cause all sorts of problems, including removing the class icon style option
- Discord art asset limit is 150, the rest of the program uses 47, and there are 118 vanilla maps in the game
- So won't be able to get every map, can just limit to the most popular though
A proper installer(Done with Inno Setup, no autoupdater though)- Also maybe store DB.json and settings in AppData\Roaming
- Make a Chocolatey package as well, ideally would need to fix antivirus detection
- Possibly include an autoupdater, either Squirrel or rolling my own