• The moderator of this forum is Austin.
  • Welcome to Smogon! Take a moment to read the Introduction to Smogon for a run-down on everything Smogon, and make sure you take some time to read the global rules.

Programming Showdex - An Auto-Updating Damage Calculator Built into Showdown!

such a cool project :) wondering if there's any functionality for updating spreads at the end of the turn. e.g. sometimes i check the calc to see what item or EVs a pokemon might have based on the damage they did on a certain turn, like if Kart does 35 to a Buzzwole w/Smart Strike you know it's banded, or if my Melmetal is EV'd to live jolly V-create from full but it dies then I know the Victini must be adamant. can showdex help with that at all ? amazing project regardless
 

Bobsican

Powerscaler at heart
is a Tiering Contributor
I've been playing NDBH for a while, and I've noticed that Showdex may be leaking "illegal" information.

Say, Core Enforcer suppresses abilities, if a Imposter mon switches into the suppressed mon afterwards, hovering on it will just say that its ability is "(suppressed)", however, while it effectively has no ability, the ability the user would have appears in Showdex, which is relevant as one of the main appeals of Imposter is scouting the opponent's set, and being able to see more than in normal circumstances with Showdex can easily raise red flags, unless the capability to see the ability the user would have in such cases is just a feature yet to be added to Pokémon Showdown.
Turns out the "information leak" was indeed a bug on the Showdown client, and an ability should indeed be still viewable even if suppressed, so yay, no changes needed on Showdex here, although the ability being suppressed should maybe be noted in Showdex while that's the case.
 
Last edited:
Loving this. One thing I'll say as an ADV player is that Showdex appears to have a habit of defaulting to less common, more niche sets. Defaults to Mix Zap when it's like the 4th or 5th most common set, SubSalac Pert which is probably 3rd or 4th most common set, and CB Tar which is probably the 4th or 5th most common set. And none of them are listed first on the Smog Dex either. Rest assured, this is rather nitpicky, and this is an amazing tool as is. But if you want feedback, that's what I've found.
 
such a cool project :) wondering if there's any functionality for updating spreads at the end of the turn. e.g. sometimes i check the calc to see what item or EVs a pokemon might have based on the damage they did on a certain turn, like if Kart does 35 to a Buzzwole w/Smart Strike you know it's banded, or if my Melmetal is EV'd to live jolly V-create from full but it dies then I know the Victini must be adamant. can showdex help with that at all ? amazing project regardless
Glad you've been enjoying it, we're really happy to see people using it :) we've had quite a few requests for that functionality, but unfortunately we feel like that crosses the line a bit too much. We still want the player to use their game sense to realize something's banded instead of having the computer do it for you. I answered this in more detail below.
And to answer your suggestion about the damage rolls, we do have plans to implement smarter Smogon set selection, but only based on what is revealed/obvious from the battle. Currently, we select the first set from the given format, so if Kartana has 3 OU sets, we just choose the first OU set from the list. Let's say the first set is Choice Scarf Kartana. Now if they end up taking Life Orb damage or using Swords Dance, then it's obvious that it should be the Life Orb Kartana set or a non-choice item set since you'd have to be crazy to put Swords Dance on a Choice Scarfed Kart. Our plan is to have the Pokemon's current set automatically update based on info that's revealed during the battle like what I described above.

However, we felt that just like 85percent said, it would be too much to switch the set based on calculated damage rolls, as we felt that was crossing the line from "helpful timesaver" to "unfair advantage". We think it's the player's responsibility to look at the damage, realize they must be choiced and adjust the calc accordingly, especially now since we've automated a lot of the manual work. A computer is really good at running calculations and it would feel like the computer is starting to play for you at that point. Essentially, we don't want to automate anything that requires intuition/game sense, that's on the player. We've considered arguments for both sides of this issue, but in this case, we would rather error on the side of maintaining competitive integrity at all costs, because that's really important to us.

All this is to say, you made a great suggestion which is certainly possible, but it's not the direction we want to take our extension in. I hope this doesn't sound like I hate your idea or anything, because honestly I could see it being really useful. Just maybe a lil too useful ya know :)
If someday the Showdown mods were to give us their blessing, then we would feel safe including it, but probably not until then!
Thank you for the feedback, we really appreciate it :)
 
Loving this. One thing I'll say as an ADV player is that Showdex appears to have a habit of defaulting to less common, more niche sets. Defaults to Mix Zap when it's like the 4th or 5th most common set, SubSalac Pert which is probably 3rd or 4th most common set, and CB Tar which is probably the 4th or 5th most common set. And none of them are listed first on the Smog Dex either. Rest assured, this is rather nitpicky, and this is an amazing tool as is. But if you want feedback, that's what I've found.
Happy to hear you're enjoying it!

:psyglad:

Thanks for the great feedback! Unfortunately, since the extension pulls sets from pre's pkmn API, we can't really distinguish the commonality of each set. We simply display the sets of a given format in the order that the API has them in. (Upon closer inspection, doesn't appear to be in ABC order, so I'm not entirely sure how the API orders them.) Then from the list of sets of closest matching format of your game, we apply the first set from that list.

We eventually hope to create our own API, so we can have more fine-grained control, such as letting people share and vote on sets, but this is something really far down-the-line.

In the meantime, we could potentially offer a favoriting feature so the extension can sort by and apply sets you've favorited first. This would be on a per-Pokémon basis, but would be a one-and-done thing for Pokémon that you come across frequently.

Let me know if this is something you'd be interested in!
 
is there a way to get this to work on safari
Would absolutely love to, but...

SCR-20221020-pwp.png


I'm a Mac user myself and have tried self-distribution on macOS, which turned out to be an absolute nightmare, so I can only imagine how many problems non-technical users would have trying to get it working.

Safari extensions are actually macOS apps under-the-hood. Apple provides a tool to convert a browser extension into an Xcode project (the IDE used to develop macOS/iOS/etc. apps), but the issue lies in the codesigning stage, where Apple uses their private certificate to sign the app, so that to the end-user, the app appears verified. That costs $100/year, even if your extension is free. (Compare that to Google charging us a one-time $5 fee and Mozilla charging us nothing!)

Additionally, to be on the Apple App Store itself, which is the primary way of distributing Safari extensions, apps must be signed by Apple. (They've received much backlash for this distribution process from the extension development community, but Apple being Apple, no fricks were given.)

The alternative is to sign the app with my own private certificate (aka. "self-signing" for self-distribution), but your macOS won't trust my certificate since it's not from Apple, so you'll have to jump through a lot of hoops to get that working. I believe macOS does everything in its power to stop you from installing self-signed or unsigned apps.

:pikuh:
 
Patch 1.0.4 is now live!
This was a much lighter patch that's mostly focused on bug fixes, but we also added a few cool features. You can read the full patch notes here, but I've listed some of the highlights below:
  • Psyshock, Psystrike, and Zoroark (Illusion) have been fixed! Phew, Zoroark was a huge pain in the ass, glad that's over! For now… Hopefully :)
  • Fixed gen4OU crashes (was caused by malformed set names)
  • Added a setting to automatically replace your opponent's moves with newly revealed moves, and it's done in the following order (status moves -> non-STAB moves -> Any STAB moves)
  • Added G-max detection, especially for random battles where some mon only have sets for their G-max formes
  • Added visual support for doubles/VGC by indicating the two active mon on each side
    • We'll be adding more doubles support like toggles for Helping Hand/Friend Guard in an upcoming patch
  • Choose when a Calcdex tab should auto-close (either when the battle ends or when the battle tab closes)
  • Added support for more than 6 mon on each side (for OMs & custom mods)
  • Added a setting for LC players to display damage rolls with percentages, i.e. instead of 11, 11, 12, 15, 15, 15, 17, it would be 11 - 15%, 12 - 5%, 15 - 45%, 17 - 5%)
  • Decreased tooltip delays for some buttons
  • Fixed incorrect base power for Hidden Power moves in gens 2-5
It looks like Chrome is starting to approve our patches faster, which means we can push out smaller fixes more rapidly if needed (yay!).
Thank you again to everyone for the support and feedback!
 
I am using Brave browser and I got the extension from the Chrome store, but when I am in battle I don't see the button anywhere. The plugin is definitely installed, any advice on how to fix this?
 
I am using Brave browser and I got the extension from the Chrome store, but when I am in battle I don't see the button anywhere. The plugin is definitely installed, any advice on how to fix this?
Are you referring to the "Open Calcdex" button? Does Hellodex show up?
 

ChrisPBacon

Lucky and bad
is a Tiering Contributor
Hey, this is a really cool extension, although id like to point something out. Correct me if i'm mistaken, but I dont think the calc factors in eviolite when running?
Screenshot 2022-10-23 192513.png

The image here says double iron bash should be an OHKO, when it isnt. Heres the calc the damage calc website gives:
252+ Atk Choice Band Iron Fist Melmetal Double Iron Bash (2 hits) vs. 248 HP / 252+ Def Eviolite Chansey: 552-650 (78.5 - 92.4%) -- approx. 2HKO
 
Hey, this is a really cool extension, although id like to point something out. Correct me if i'm mistaken, but I dont think the calc factors in eviolite when running?
View attachment 460190
The image here says double iron bash should be an OHKO, when it isnt. Heres the calc the damage calc website gives:
252+ Atk Choice Band Iron Fist Melmetal Double Iron Bash (2 hits) vs. 248 HP / 252+ Def Eviolite Chansey: 552-650 (78.5 - 92.4%) -- approx. 2HKO
You aren't mistaken at all actually! This is actually a bug that had to have been present since v1.0.3, but guess nobody noticed (including myself) or pointed it out until now. Nice find!

I just fixed this and will be available on the next update.

Sorry about that! :o

(Also, the Calcdex's UI looks a little funky in your screenshot, so I'll fix the overflowing text and adjust some column widths in the next update as well. If you don't mind, could you share what resolution you're running on? Thanks!)
 
would it be possible to enable some sort of mega-form toggle? playing natdex and gens 6&7 formats suggests the sets for non-megas when they're clearly going to be megas.

edit: freaking amazing tool btw
 
Don't know if this was said or not, but I noticed two issues.
The first one is the innacuracy of damage calculation in Little Cup, it looks like it struggles with Eviolite, which is unfortunate
And then, even when Silvally's form is revealed, it keeps a Choice Scarf as its automatic item
Great tool tho, I love it
 
would it be possible to enable some sort of mega-form toggle? playing natdex and gens 6&7 formats suggests the sets for non-megas when they're clearly going to be megas.

edit: freaking amazing tool btw
We actually do have a toggle for that, click on the Pokemon's name to toggle thru their formes, such as their Mega form, like you see below. Does that fix it for you? Glad you've been liking it :)
1666658368128.png
 
Don't know if this was said or not, but I noticed two issues.
The first one is the innacuracy of damage calculation in Little Cup, it looks like it struggles with Eviolite, which is unfortunate
And then, even when Silvally's form is revealed, it keeps a Choice Scarf as its automatic item
Great tool tho, I love it
Yess we just fixed the Eviolite glitch and we'll have the patch out soon for that (probably sometime this week).
Also we hope to include better item prediction at some point, but it's really complicated actually so we're still trying to figure it out. For now though, we can fix the Silvally problem as that's a pretty simple fix, we just need to reapply the set once the Silvally form is revealed in battle. In the meantime, you can change the Silvally form by clicking on it's name, and that should change the item as well.
 

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

Top