Skip to content

Vleerian/FattKATT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FattKATT

GitHub GitHub issues


A fancy C# port of Khron and Atagait's Trigger Tool

About

FattKATT is a simple script that takes a list of NationStates regions, sorts them by update order, and informs the user when the game API reports they have updated.

Usage

DO NOT RUN TWO INSTANCES OF FATTKATT AT THE SAME TIME.

FattKATT requires a list of regions to trigger on in trigger_list.txt - if this file does exist, the program will create it and prompt you to fill it out. Each trigger should be on it's own line.

FattKATT first will prompt you for your main nation - this is used exclusively to identify the current user of the script to NS' admin.

It will then ask how often it should request data from the NationStates API - it will not allow values beneath 600ms as that is the maximum speed permitted by the rate limit (One request every 0.6 seconds)

750ms is the default value (shown in green) and is recommended by the developer. While FattKATT will permit 600ms, it is not recommended, as that can run over the NS API rate limit and result in a 15 minute timeout.

CLI Usage

FattKATT runs in interactive mode by default, however all user-provided inputs can be given when run with the terminal

  • -n or --nation, the nation used for the User-Agent
  • -t or --triggers, a comma-separated listed of triggers the program will use instead of trigger_list.txt
  • -p or --poll-speed, the poll speed used by the program when requesting lastupdate
  • -b or --beep, sets whether or not the terminal will beep when a trigger updates For example
./FattKATT -n testlandia -t banana,NordFerretTon -p 750 -b false

Will identify FattKATT as being used by testlandia, poll for lastupdate changes every 750ms, will not beep when run, and will await updates for the regions Banana and NordFerretTon.

Note that not all of these parameters need to be supplied, if -triggers is excluded it will still use trigger_list.txt, and if the others are excluded it will still prompt the user to supply them.

Running FattKATT

I suggest running The latest release

If you want to run directly from source, you will need the Dotnet 6.0 SDK in order to build the script.

To build FattKATT you require NSDotNet cloned to the same directory as FattKATT

git clone https://github.com/Vleerian/NSDotNet.git

Clone FattKATT

git clone https://github.com/Vleerian/FattKATT.git

Because FattKATT publishes single-file executables, it must be buiilt using dotnet publish For Linux:

dotnet publish --runtime linux-x64 --self-contained -p:Configuration=Release /p:DebugType=None /p:DebugSymbols=false -o builds/

For Windows:

dotnet publish --runtime win-x64 --self-contained -p:Configuration=Release /p:DebugType=None /p:DebugSymbols=false -o builds/

For OSX:

dotnet publish --runtime osx-x64 --self-contained -p:Configuration=Release /p:DebugType=None /p:DebugSymbols=false -o builds/

Acknowledgments

The following people provided key contributions during the initial development process:

  • The original version of KATT was programmed by Khronion

The following people also helped review and test KATT:

  • Koth and Aav tested the multiplatform builds on Linux and Mac (respectively)
  • Khron provided bug reports, as well as reviewing the code for NS legality issues

Disclaimer

The software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Any individual using a script-based NationStates API tool is responsible for ensuring it complies with the latest version of the API Terms of Use. KATT is designed to comply with these rules, including the rate limit, as of April 21, 2019, under reasonable use conditions, but the authors are not responsible for any unintended or erroneous program behavior that breaks these rules.

Never run more than one program that uses the NationStates API at once. Doing so will likely cause your IP address to exceed the API rate limit, which will in turn cause both programs to fail.