Players statistics, servers list and more for the Running With Rifles (RWR) game and its Pacific DLC. Available at rwrstats.com.
- Players
- Support stats for both the official invasion (vanilla RWR) servers and official Pacific servers
- Search for a player
- View player stats (as well as next rank progression, unlocks, on which server he's playing on, etc)
- Compare two players stats
- Friends list (easily know on which server your friends are playing on. There's no need to create a user account or whatever)
- Players list (leaderboard)
- Public servers
- Real servers location
- Real maps name
- Official invasion (ranked) servers are highlighted
- Game mode (coop, PvPvE, etc) and type (vanilla RWR, Pacific DLC, etc)
- Public server details (players list with link to their profile, current map preview and minimap, etc)
- Filtering capabilities
- Online servers count (+ the active ones)
- Total players count (+ online ones + number of playing friends)
- Charts (for the past week)
- Number of online players
- Number of online servers (+ the active ones)
- Number of players on a server
- Root RWR servers status (online multiplayer)
- Discord bot able to give several kind of information. Available on the RWR Discord Server. Commands documentation
- Should work on any Python 3.x version. Feel free to test with another Python version and give me feedback
- A modern web browser (which optionally support localStorage)
- (Optional, but recommended) A uWSGI-capable web server
- (Optional) Running With Rifles, if you need to extract images
- Clone this repo somewhere
pip install -r requirements.txt
set FLASK_APP=rwrs.py
flask db upgrade
Copy the config.example.py
file to config.py
and fill in the configuration parameters.
Available configuration parameters are:
SECRET_KEY
Set this to a complex random valueDEBUG
Enable/disable debug modeSERVER_NAME
The IP or hostname where RWRS will be available
More informations on the three above can be found here.
BETA
Whether or not to enable the beta modeGAUGES_SITE_ID
A Gauges site ID used to track visits on RWRS (optional)CACHE_THRESHOLD
The maximum number of items the cache will store before it starts deleting some (see here for more configuration parameters related to Flask-Cache)SERVERS_CACHE_TIMEOUT
Cache duration of the servers list (in seconds)PLAYERS_CACHE_TIMEOUT
Cache duration of the players list as well as data for a single player (in seconds)GRAPHS_DATA_CACHE_TIMEOUT
Cache duration of the graphs data, both the players and the servers ones (in seconds)STEAM_PLAYERS_CACHE_TIMEOUT
Cache duration of the total number of players (in seconds)BETA_USERS
The credentials required to access the app when beta mode is enabled. You can specify multiple ones. It is highly recommended to serve RWRS through HTTPS because it uses HTTP basic authSTEAM_API_KEY
A Steam API keyPACIFIC_PLAYERS_RANKS_COUNTRY
Ranks image / name to show for the Pacific players stats (us
,jp
)DISCORD_BOT_TOKEN
Authentication token used by the RWRS Discord botDISCORD_BOT_CHANNEL_ID
The Discord channel ID the bot is allowed to talk in
I'll let you search yourself about how to configure a web server along uWSGI.
- Standalone
Run the internal web server, which will be accessible at http://localhost:8080
:
python local.py
Edit this file and change the interface/port as needed.
- uWSGI
The uWSGI file you'll have to set in your uWSGI configuration is uwsgi.py
. The callable is app
.
- Others
You'll probably have to hack with this application to make it work with one of the solutions described here. Send me a pull request if you make it work.
The Flask command flask extract_ranks
is used to extract and save all ranks data to a JSON file located at storage/data/ranks.json
.
It also retrieve, process (the actual images content isn't centered) and save all the RWR ranks images. They are saved
at static/images/ranks/{country}/{rank ID}.png
and static/images/ranks/{country}/{rank ID}_icon.png
.
pip install -r requirements-dev.txt
set FLASK_APP=rwrs.py
flask extract_ranks --steamdir="{path to the Steam root directory}"
This command requires the game to be installed.
The Flask command flask extract_maps_data
is used to extract and save all maps data to a JSON file located at storage/data/maps.json
.
set FLASK_APP=rwrs.py
flask extract_maps_data --steamdir="{path to the Steam root directory}"
This command requires the game to be installed.
The Flask command flask extract_minimaps
is used to extract minimaps (the ones displayed when pressing on
TAB). They are saved at static/images/maps/minimap/{map ID}.png
and static/images/maps/minimap/{map ID}_thumb.png
.
pip install -r requirements-dev.txt
set FLASK_APP=rwrs.py
flask extract_minimaps --steamdir="{path to the Steam root directory}"
This command requires the game to be installed.
set FLASK_APP=rwrs.py
flask cc
Data older than one week old will be deleted.
set FLASK_APP=rwrs.py
flask clean_players_count
Will save the current number of Steam players which have RWR running, and the current number of players playing online.
set FLASK_APP=rwrs.py
flask get_players_count
set FLASK_APP=rwrs.py
flask db upgrade
Will ping RWR root servers and store their status (up or down).
set FLASK_APP=rwrs.py
flask get_root_rwr_servers_status
set FLASK_APP=rwrs.py
flask run_discord_bot
sh scripts/geolite2_city_updater.sh
sh scripts/rwrs_updater.sh [DOMAIN, default=rwrstats.com]
This project is mainly powered by Flask (Python) for the backend.
Data is fetched from the official servers list page (which sucks) as well from the official players list page (which sucks, too). Data is cached so there isn't many requests sent to the server who hosts these lists.
As the provided servers location is most of the time either missing or invalid, RWRS makes its own look up using a GeoLite2 database.
- RWRS icon by goodware std. (CC BY 3.0)
- Font by Typesgal (freeware)
- Flag icons by Flag Sprites and GoSquared (freeware)
- Maps previews comes from the official RWR wiki
- This project uses GeoLite2 data created by MaxMind, available from www.maxmind.com
- All Running With Rifles assets © 2015 - 2018 Osumia Games
- This project is not affiliated with Osumia Games
If you have questions or problems, you can either:
- Submit an issue here on GitHub
- Post a message in this topic on the official RWR forums
- Post a message in this Steam topic