Skip to content

harrijin/slippi-set-stats

 
 

Repository files navigation

Slippi Set Stats

This fork of Slippi Set Stats adds an additional feature. Each neutral win's coordinates are tracked and mapped onto an image (.png) of the stage with a transparent background. This image is intended to be shown alongside post-set stats for tournament streams.

Example image 1 Mango vs Leffen Game 2 Losers Finals, The Big House 9

Example image 2 Zain vs Hungrybox Game 3 Grand Finals, Genesis 7

Example image 3 Example showing Sheik and Zelda transformation in the same game

Limitations

  • Only shows neutral wins, NOT counter-hits or trades
    • The images get really cluttered when you add everything in, I'm happy to take suggestions for how to represent these without just generating a separate image for each
  • Might be interesting to show which conversions led to a kill, not sure how to indicate this without adding clutter or being confusing though (applying a color filter might be confusing in dittos)

Original README

This is a tool used to compute post-set stats from slp files for Melee tournaments. It is intended to be used as part of a production workflow to display post-set stats such as what was done at Mainstage 2019.

image

Usage

  1. Download executable for your operating system from the Releases tab
  2. Move slp files from the same set to the folder containing the executable
  3. Run the executable, will generate an output.json file with the stats, as well as a .png file for each game.

Limitations

  1. Cannot know who the players were, the best that can be known is the nametag used
  2. If the players change ports during the set, the stats cannot be computed

Output

The output json file contains three fields: games, summary, and btsSummary

games

This field includes information about each individual game in the set. Example:

{ 
   "games":[ 
      { 
         "stage":{ 
            "id":2,
            "name":"Fountain of Dreams"
         },
         "players":[ 
            { 
               "port":1,
               "characterId":0,
               "characterColor":"Default",
               "nametag":"WIZY",
               "characterName":"Captain Falcon",
               "gameResult":"winner"
            },
            { 
               "port":4,
               "characterId":2,
               "characterColor":"Default",
               "nametag":"",
               "characterName":"Fox",
               "gameResult":"loser"
            }
         ],
         "startTime":"2019-06-16T19:02:32",
         "duration":"2:55"
      },
      { 
         "stage":{ 
            "id":32,
            "name":"Final Destination"
         },
         "players":[ 
            { 
               "port":1,
               "characterId":0,
               "characterColor":"Default",
               "nametag":"WIZY",
               "characterName":"Captain Falcon",
               "gameResult":"winner"
            },
            { 
               "port":4,
               "characterId":2,
               "characterColor":"Default",
               "nametag":"",
               "characterName":"Fox",
               "gameResult":"loser"
            }
         ],
         "startTime":"2019-06-16T19:05:41",
         "duration":"1:48"
      },
      { 
         "stage":{ 
            "id":8,
            "name":"Yoshi's Story"
         },
         "players":[ 
            { 
               "port":1,
               "characterId":0,
               "characterColor":"Default",
               "nametag":"WIZY",
               "characterName":"Captain Falcon",
               "gameResult":"winner"
            },
            { 
               "port":4,
               "characterId":2,
               "characterColor":"Default",
               "nametag":"",
               "characterName":"Fox",
               "gameResult":"loser"
            }
         ],
         "startTime":"2019-06-16T19:07:55",
         "duration":"2:06"
      }
   ]
}

summary

This field contains detailed post-set stat results. The output is too long to put here but feel free to browse the contents yourself.

btsSummary

This is a field added to help BTS by simplifying the data in the provided in the full summary. This summary includes:

  1. The two move related non-numeric stats at the start
  2. Openings per kill and total damage done
  3. Two random stats from the remaining available stats

Randomizing the bottom two stats was used to keep the post-game set stats a bit more fresh with each showing. Eventually the structure of this output might be configurable.

Example:

{ 
   "btsSummary":[ 
      { 
         "id":"killMoves",
         "name":"Most Common Kill Move",
         "type":"text",
         "results":[ 
            "fair (10)",
            "bair (3)"
         ]
      },
      { 
         "id":"neutralOpenerMoves",
         "name":"Most Common Neutral Opener",
         "type":"text",
         "results":[ 
            "bair (7)",
            "nair (11)"
         ]
      },
      { 
         "id":"openingsPerKill",
         "name":"Openings / Kill",
         "type":"number",
         "betterDirection":"lower",
         "recommendedRounding":1,
         "results":[ 
            3.0833333333333335,
            5.142857142857143
         ]
      },
      { 
         "id":"damageDone",
         "name":"Total Damage Done",
         "type":"number",
         "betterDirection":"higher",
         "recommendedRounding":1,
         "results":[ 
            1096.5400123596191,
            968.7389011383057
         ]
      },
      { 
         "id":"damagePerOpening",
         "name":"Damage / Opening",
         "type":"number",
         "betterDirection":"higher",
         "recommendedRounding":1,
         "results":[ 
            29.636216550259977,
            26.90941392050849
         ]
      },
      { 
         "id":"inputsPerMinute",
         "name":"Inputs / Minute",
         "type":"number",
         "betterDirection":"higher",
         "recommendedRounding":1,
         "results":[ 
            537.9477642112073,
            449.1630953343576
         ]
      }
   ]
}

Build Instructions

  1. Install node 10.15.3
  2. Install pkg using npm i pkg -g
  3. Install Jimp using npm i jimp -g
  4. Run npm run build from the root of the repo

About

Generate post-set stats from slp files

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%