Professor-Redwood-Team / Professor-Redwood

Pokemon Go Discord Bot
MIT License
34 stars 21 forks source link

Revamp Counters command to use images #142

Open Alterraia opened 4 years ago

Alterraia commented 4 years ago

I'm currently creating images that give the same data as the !counters command gives. We use it enough in Sequoia.

From what I understand, if I use GitHub to store the images and have a public URL for them, then the counters.json just needs to have the URL in it so when the Prof is told to retrieve counters for Mega_Charizard_X, she will pull the URL which should convert to an image once posted.

I don't want to completely abandon the info I've written into the counters.json file. I mean, it could do both the text and the image or also it could do an "if use URL, else use text" for the ones I do not have the graphic complete.

I spoke to Slackey briefly about it, but figured I'd put it here, too. Trainwrecked suggested it as he's teaching me how to use GitHub more and more. There's one of the images I made for context.

06) Mega_Charizard_X

Alterraia commented 4 years ago

I have a repo with the files so far. It's public. To not lose data that we may need some day, like the stats that !counters shows, which pulls from pokemon.json, we can just do a line at the bottom for "graphic" or something, and then have the URL for each one.

I see where it would need to go in counters.js, but I wouldn't know what to put. Individual URLs will work fine.

Also, in constants.js, we'd need it to be something like "if there is a URL, it will snag it", but if there's not, then it just posts the regular text and maybe a "no graphic available at this time" message.

This way the other Pokemon counters still work. Eventually I'll have them all, but only focusing on stuff that needs groups right now.

Alterraia commented 3 years ago

Update. I have finished all of them from gens 1 - 5. Waiting on more info for gen 6. But this is ready to be implemented. I just have to upload the files.

Alterraia commented 3 years ago

I've finished it and I've significantly improved upon counters from the version that Redwood has. This would actually make counters viable and I update it CONSTANTLY. When a new gen is added, I update ALL pokemon that share a type or type combo with one of the pokemon from the new gen. Gen 6 has a lot of fairy-only types, so ALL pokemon that are fairy-only get the updated counters. When I say updated, I update which pokemon are being used, and in some cases Pokemon from the newest gen are included.

The graphic is also updated to match the text from the bot. Also, I fixed the stats output as it was calling up boss stats. That information is useless and not really predictable. I removed the moves from counters.js as that info is also useless as in most cases, you don't need to know the moves, just overpower it with top DPS. However, the graphics do have the moves.