rowin1 / Pokemon-Showdown-Enhanced-Tooltips

Chrome Extension that enhances Pokemon Showdown tooltips
21 stars 10 forks source link

List likely moves before opposing Pokemon attacks #15

Open karllhughes opened 4 years ago

karllhughes commented 4 years ago

Porydex does a great job listing probabilities of what moves an opposing Mon is likely to have: https://porydex.quinlancircle.com/stats/2019-09/gen-7-ou/1695/pokemon/kartana

This info would be really helpful during a battle, especially if you're playing random battles or a new tier.

The challenges are (1) how do we get this data, and (2) how could we best display it?

Porydex gets it from the raw data dumps that Smogon releases, but parsing those is quite an effort. We could scrape Porydex, but obviously that's brittle as Porydex could change their HTML at any time.

Displaying a large list of attacks presents a challenge too. Some mons have a diverse move pool and we're working with limited space in the UI.

I held off on this issue because it's more of a pipe dream. Maybe a better solution is just linking to Porydex?

rowin1 commented 4 years ago

Perhaps we could have a key-modifier when hovering over a Pokemon to show their move probabilities. Besides scraping, I don't know of another way we could get this detailed info.

From the looks of it, Porydex seems to still be on SM and not SS.

bkirikoglu commented 4 years ago

Any chance we can revive the random battle tool tip? https://github.com/nikhilreddy6547/random-battle-tooltip

karllhughes commented 4 years ago

@bkirikoglu that would be sweet!

It looks like they hard-coded a lot of the data into the extension, which makes it really hard to deconstruct their code, but I would be interested in brainstorming a better way to do this.

rowin1 commented 4 years ago

Hmm... could we scrape data and statistics from a reliable source?

bkirikoglu commented 4 years ago

I believe it’s all in the Pokémon showdown github page it’s all open source

Get Outlook for iOShttps://aka.ms/o0ukef


From: Chris Schalago notifications@github.com Sent: Sunday, June 7, 2020 11:35:19 PM To: rowin1/Pokemon-Showdown-Enhanced-Tooltips Pokemon-Showdown-Enhanced-Tooltips@noreply.github.com Cc: bkirikoglu bkirikoglu@outlook.com; Mention mention@noreply.github.com Subject: Re: [rowin1/Pokemon-Showdown-Enhanced-Tooltips] List likely moves before opposing Pokemon attacks (#15)

Hmm... could we scrape data and statistics from a reliable source?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/rowin1/Pokemon-Showdown-Enhanced-Tooltips/issues/15#issuecomment-640275856, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACKCRDOHETK4DBDA5VZRQUTRVP2YPANCNFSM4JAPCHZA.

karllhughes commented 4 years ago

Yes, the data is open source, thanks for pointing this out @bkirikoglu!

Here it is: https://www.smogon.com/stats

So, we'd just have to build a scraper that gets the latest movesets for the generation in play. For example, here's June's data for Gen 8 OU: https://www.smogon.com/stats/2020-06/moveset/gen8ou-0.txt

This would be a significant project, but I'm interested in trying it out if I can get a day or two of free time to work on it. Will keep y'all updated. 👍

karllhughes commented 4 years ago

I have a first version of this working locally: https://github.com/karllhughes/Pokemon-Showdown-Enhanced-Tooltips/tree/likely-moves

likely-moves-and-abilities

Right now I have to refresh before each battle to get the latest data from the stats API, but when I have time I'll figure that out and make a PR here.