slp-stats-tracker
v1.0.3
Published
Extract custom stats from .slp files
Downloads
4
Readme
Slp Stats Tracker
Usage example:
const Game = require('slp-stats-tracker');
const game = new Game('test.slp'); // initialize
if (game.is_valid()) { // returns true if the replay is valid
const port = game.get_ports("Ananas"); // finds the port of the main player and the opponent
console.log(port) // {port.player: 0, port.opponent: 1}
const neutral_wins = game.neutral_win_percent(port.player, port.opponent); // gets neutral win percentage
console.log(neutral_wins)
}