Skip to content

A tool to view notifications of active player counts for various games hosted on the valve master server.

License

Notifications You must be signed in to change notification settings

rna88/valvePlayerQuery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Valve Player Query

This python script will show notifications of increasing online player count for multiplayer games hosted with the valve master server. This is useful for games with a low player count that have sporadic activity; you can be informed when and how many people are playing without leaving the game running or needing to check a website.

Usage for Linux

Dependencies

You will specifically need libnotify, python-valve, and psutil. The other modules that are used should come with a default python install:

sudo pacman -S libnotify (use your distro's package manager)
sudo pip install python-valve
sudo pip install psutil

Running

Basic usage:

python valvePlayerQuery <gamedir> <minPlayers> <refreshRate> <retries>

<gamedir> The ID string of the game, found by searching https://steamdb.info for the game, and looking under "Information"
<minPlayers> Minimum player count before we display notification
<refreshRate> Minutes before querying the master server again
<retries> Number of times to retry connecting to the master server on timeout

Optionally you may place a small image called "<gamedir>.png" in the same location as the script. This image will appear on the notification, allowing you to easily identify different notifications for different games.

Example

Demonstrating "daemonized" usage for Fistful of Frags where we are only alerted if the current player count exceeds 20, the player count is retrieved on a 10 minute cycle, and if our initial query fails we try again 3 times before waiting for the next cycle:

setsid python valvePlayerQuery.py fof 20 10 3 >/dev/null 2>&1

Usage for other OS's

Everything besides the notification library is cross-platform. The notification lib could be replaced with pyQT to make it completely cross-platform, otherwise you'll have to settle for looking at the output in a terminal.

License

This repository is licensed under the MIT License

About

A tool to view notifications of active player counts for various games hosted on the valve master server.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages