Other Seasonal (or any other tournament) Leaderboard that Automatically Updates

scpinion

Life > Monotype... unfortunately :)
is a Site Content Manager Alumnusis a Community Leader Alumnusis a Community Contributor Alumnusis a Tiering Contributor Alumnusis a Battle Simulator Moderator Alumnus
The Monotype metagame started up a seasonal circuit in the Circuit Tours forum earlier this year. Hooray! Then it came time to make the initial leaderboard, something I'm in charge of... :(

After about 2 minutes of manually collecting the results, I said: "screw this, I'm scripting it".

The result is a page/script that gets the contents of tournament threads here on the forums, parses the OPs to find matchups and who won them, stores all that information, then generates a leaderboard based on the threads it was told to parse.

It produces something like this: Monotype's Current Leaderboard

Tours like the seasonals are reasonably common around here, so I figured I'd share. It takes the tedium out of hosting such a large event.

The script should work for any existing seasonals if the hosts are interested. I'm not particularly familiar with the Tournaments community or the Grand Slam format, but I think it would work for those too?

I'll gladly help anyone that is interested in using it get set up. Also, if someone needs a slightly modified version I don't mind helping with that. Just drop a message here or shoot me a pm.

If you want to explore it yourself, just make a scms fork. It is under /old-scms-content/tiers/om/monotype/rankings.html

~~~~

How it Works
(I just c/p from the comments in the code, so sorry for the awkward format)

tl;dr: The tournament host runs the tournament just as they normally would (new thread for each round, bold the winners, etc.). The only thing required to update the leaderboard is the ability to c/p a 7 digit number into a list, scms access (a badge), and a friendly site staff member to merge the changes.

1. Hosts need to ensure the OPs are formatted so the script can recognize the matchups.
In general, it recognizes the standard format most people use on Smogon. The main caveat is how you bold the winners.
Code:
/* **************************************** */
/* Formatting the OPs for Tournament Rounds */
/* **************************************** */
// see this thread for an actual example: http://www.smogon.com/forums/threads/monotype-summer-seasonal-round-7.3581731/

// Intro stuff and text
//
// Winners Bracket
// player vs player
// player vs player

// Losers Bracket
// player vs player
// player vs player

// winners bracket should be excluded from the OP in losers only rounds

// Bold the players that win
// make sure to bold just the player's name, not the full "tag"
// This is ok: [USER=123456][B]scpinion[/B][/USER]
// This is NOT ok: [B][USER=123456]scpinion[/USER][/B]

// Handling a Round Robin Final (3 participants)
// List all three matches
// Once the matches are over, move the matchup between people that didn't win to the top and don't bold the winner (assuming they even played).
// Bold the other two as you normally would.
// example:
// player2 vs player3  <--don't bold a winner, player 1 won the round robin!
// [B]player1[/B] vs player2
// [B]player1[/B] vs player3

// Handling Activity Decisions
// Inevitiably, there are activity decisions. Many formats don't award points for rounds with activity
// decisions unless the player wins in a subsequent round. To identify matches that shouldn't be scored,
// mark the matchup with [*DNP]

// Example:
// [B]player[/B] vs player [*DNP]
2. Supply the script with the thread ids from the forums using the scms
All that entails is copying a 7 digit number and putting it into a list.
Code:
/* ********************************* */
/* Telling the script where to look! */
/* ********************************* */
// List the thread ids for each round of each seasonal below.
// As the tour progresses, edit in the new threads via the scms.

// Example thread: http://www.smogon.com/forums/threads/monotype-summer-seasonal-round-7.3581731/
// The thread id is the number after the period: 3581731

// Leave threadInfo as an empty object. The script will populate it.

// you must also specify the "scoring-type". This determines how points will be awarded.
// options:
// single: grand slam scoring for two finalists
// single-rr: grand slam scoring for 3 finalists (round robin finals)
// link to grand slam scoring format: http://www.smogon.com/tournaments/grandslam/rules#point

// double: 2 points for winner's bracket win, 1 point for loser's bracket win, 1 point for 1st round win.

// if tour is ongoing, make sure isComplete is set to false.
// isComplete is used to award an extra point to a player that goes undefeated in a double elim tour
// i.e. their final win should count as a "winner's bracket win", which awards two points, not one.
Ultimately, all you have to do is curate an object that looks like this:
Code:
seasonals = {
    "Summer 2016": {
        "threads":['3577625', '3578379', '3578947', '3579472', '3580306', '3581061', '3581731', '3582255', '3582770'],
        "threadInfo":{},
        "scoring-type": "double",
        "isComplete": false,
    },
    "Spring 2016": {
        "threads":['3571603', '3572713', '3573340', '3573918', '3574492', '3575054', '3575627', '3575849', '3576383', '3576601', '3576907', '3577211', '3577623'],
        "threadInfo":{},
        "scoring-type": "double",
        "isComplete": true,
    },
};
3. Maintain your threads just as you normally would.
The leaderboard/webpage will automatically update for any threads you've told it to check.


4. Other Stuff
– It can differentiate between activity wins and regular wins. The scoring systems can be adjusted to score these differently.
– It currently supports the Double Elimination format that Monotype uses and the Grand Slam scoring format. Adding a new scoring system is really easy.
– Matchups that aren't formatted correctly (e.g. the bold tags are wrong) are logged in the console, so things are easy to troubleshoot. Example
 
Last edited:

Users Who Are Viewing This Thread (Users: 1, Guests: 0)

Top