Skip to content

zpchavez/towerfall-slack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TowerFall Slack Integration

Easily post TowerFall session stats and replay gifs to Slack.

tf-stats-screenie

Not tested on Windows or Linux, but might work.

Requirements

  1. Familiarity with the command line
  2. Node.js installed

Installation

  1. npm install -g towerfall-slack
  2. run tf-configure and follow the prompts. Press enter to keep the default or existing value shown in parentheses.

Emojis

You will also need to add custom emojis for all the archers. Each one should follow the format :tf-color:.

tf-bluetf-cyantf-greentf-orangetf-pinktf-purpletf-redtf-whitetf-yellow

CLI commands

  1. tf-watch-stats

    Start watching for changes to your tf_saveData file. If all you want to do is post stats to Slack, you'll be fine running the script with no options. For more advanced usage, the following options are supported:

    • -f or --save-to-file - Save match data and accumulated summary data to a file. This file is the source of the stats posted to Slack.
    • -d or --save-to-db - Save match data to a database. This is optional, and not necessary for posting to Slack.
    • -a or --append - If using the -f option, append to the existing file instead of overwriting it

    If no options are provided, the script will save changes to a file, overwriting it if it already exists. If you wish to save match data to a database, you must first run tf-db-configure.

  2. tf-post-stats

    This will post all the stats you've accumulated since running tf-watch-stats. It will then delete the session stats file, making way for the next session's stats. If there has been no activity, it will not post anything.

  3. tf-watch-replays

    This will start watching the replay directory and upload any new replays that appear in it.

  4. tf-post-replays

    This will post your existing replays. It takes two optional arguments which define a range of replays to upload e.g. tf-post-replays 22 33 will upload replays 22 through 33 inclusive. Omit the second argument to keep uploading until there are no more replays. Omit both to upload everything.

  5. tf-db-configure

    Set database configuration. Only necessary if using the -d option with tf-watch-stats.

  6. tf-configure

    Set required configuration options.

Shortcomings

You may notice that the posted stats differ slightly from those that can be viewed in game. The main reason for this seems to be that the tf_saveData file counts a self kill as both a death and a kill. Although total self kills are tracked, they are not tracked per archer, so there is no way around this.

About

Easily post TowerFall session stats and replay gifs to Slack.

Resources

Stars

Watchers

Forks

Packages

No packages published