TF2 Rich Presence

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, maybe more) coming soon™

(The actual program is nowhere near as nice looking as this, v2 will be though)


With 7-Zip's built-in extractor: tf2_rich_presence_v1.15_self_extracting.exe (8.8 MB)
Extract it yourself: (11.9 MB)
Alternatively, get the latest autobuild (may be buggy):

Installation and running

  1. Extract OR run tf2_rich_presence_v1.15_self_extracting.exe, whichever you downloaded.
  2. Run Launch TF2 with Rich Presence.exe.
    • OR run Launch Rich Presence alongside TF2.exe. This one doesn't automatically start Team Fortress 2.
    • Both require Discord and Steam to be running as well and will wait until the game and both programs are running.

For faster launching, you can add the first EXE to your taskbar/start menu/desktop/etc or to Steam as a non-Steam game. Note that having Python installed is not required.

Malware detection

A minority of antivirus vendors see the launcher EXEs as trojans for some reason, which is a problem I haven't been able to solve. Assuming the batch to EXE converter I'm using is safe, these are entirely false positives. See #126 for more information.

Building from source

For making and testing changes, or simply always running the most up-to-date code.

  1. Either clone the repo or download the source.
  2. Copy the entire source to another location (sorry) and put the files outside of TF2 Rich Presence into that folder.
  3. Make sure the python and pip commands point to Python 3.9.x (future versions should work too).
  4. 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.
  5. From within TF2 Rich Presence, run pip install -r requirements.txt.
  6. Either run python to compile and build, or python to launch in debug mode.

Version 2 goals

  • 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
  • Map-specific images, instead of gamemodes (Done, currently at 150/150 assets though)
    • 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
    • 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