Skip to content

Instantly share code, notes, and snippets.

@dumbmatter
Created May 9, 2018 20:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dumbmatter/c35630bd05c51dc954f4800f1d19d78b to your computer and use it in GitHub Desktop.
Save dumbmatter/c35630bd05c51dc954f4800f1d19d78b to your computer and use it in GitHub Desktop.
How to fix 0 ovr/pot ratings in some players in Basketball GM

First, open your league in Chrome. Then open a new tab and go to this URL: chrome://inspect/#workers - that should show something like "https://play.basketball-gm.com/gen/worker-2018.05.05.1163.js" with an "Inspect" link under it. Click "Inspect". That will open a new window where you can run commands. In that window, run this (copy/paste the whole block of code at once, and then press enter):

bbgm.idb.league.tx("players", "readwrite", tx => tx.players.iterate(p => {
    let update = false;
    for (const ratings of p.ratings) {
        if (isNaN(ratings.oiq) || isNaN(ratings.diq)) {
            update = true;
            break;
        }
    }
    if (update) {
        return bbgm.player.augmentPartialPlayer(p, 15.5, 26);
    }
}))
.then(() => bbgm.idb.cache.fill())
.then(() => console.log('done'));

Wait a few minutes until it displays "done". And then all should be good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment