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

Baloor

Tigers Management
is a Community Contributoris a Team Rater Alumnusis a Forum Moderator Alumnusis a Tiering Contributor Alumnusis a defending SPL Champion
PUPL Champion
was playing CAP and noticed the move paleo wave (fake move made for the CAP stratagem) doesnt work. im guessing this was just forgotten about in development because these arent real moves. in a similar vein, im assuming shadow strike (another CAP move) isnt programmed either. suggesting to have these added as theres a big CAP tour coming up and would be good for quality of life when playing.
 
Last edited:
was playing CAP and noticed the move paleo wave (fake move made for the CAP stratagem) doesnt work. im guessing this was just forgotten about in development because these arent real moves. in a similar vein, im assuming shadow strike (another CAP move) isnt programmed either. suggesting to have these added as theres a big CAP our coming up and would be good for quality of life when playing.
Yeahh we tested it somewhat for CAP but didn't realize those moves were missing! We've fixed this in the latest patch which we're deploying today, so the patch should arrive sometime next week :) hopefully it'll be in time for the tournament!

Let me know if you have any other feedback or issues
 
Patch 1.0.2 is out now!
Read the full patch notes here.
Here's a quick summary of some notable changes:
  • You can now switch between a Pokemon's formes by clicking on it's name near its icon and HP bar. This works for Gmax and Mega evolutions in addition to forme changes like Aegislash-Blade/Shield [thanks Runoisch for the suggestion]
  • Added support for Gens 1 & 2 and further fixes for other older gens (finally!). This includes the mechanics for SPC and DVs, in addition to disabling options like terrain which aren't available in the older gens.
  • Added experimental support for CAP Pokemon & moves (in the next patch they will be officially supported, but for now we implemented a quick fix so it's ready for the upcoming tournament) [thanks Baloor for pointing this out]
  • Categorized items dropdown by popular, items, Pokémon-specific, usually useless, and useless (exactly like the Teambuilder)
    [thanks Furret4ssb for the suggestion]
  • Replaced the default system scrollbar on Windows with one that works like Mac's (saves space and looks nicer)
    • Unfortunately on Firefox, this isn't working as intended and the new scrollbar is overlayed on-top of the old one. We'll have this fixed in the next patch!
  • MANY bug fixes, thank you 85percent, Furret4ssb, Runoisch, Nails, orangelego21, jeffdaboss, May, and Baloor for your help finding them! :)
 
Last edited:
Hi! This project is insane i belive that this is an incredibly big help during battles! I dowloaded it manually, since i am on edge, for this exact reason i wanted to ask you, would it be possible to create an extention for edge too? For the rest insane project, very very usefull!
 

Maxouille

Gastrodon east sea <3
is a Tiering Contributor Alumnus
Hi! This project is insane i belive that this is an incredibly big help during battles! I dowloaded it manually, since i am on edge, for this exact reason i wanted to ask you, would it be possible to create an extention for edge too? For the rest insane project, very very usefull!
You can install extension through chrome store on edge as well just make sure to authorize it or smth in the settings, Google is your friend.
 
I am pretty certain that I am doing this the wrong way and its just me being dumb but when I select different pokemon manually to check which Pokemon can switch in safely, the program stops working outright sometimes and doesnt show pokemon fainted, doesnt deduct HP anymore etc.

I do think its just me doing something wrong but figured I might ask just in case.

Awesome work btw I really appreciate QoL Projects like this, beautiful stuff :D.
 

paolode99

Dammi what I want
is a Top Social Media Contributoris a Tiering Contributoris a Contributor to Smogonis a Smogon Media Contributor
i think this latest version has generated new bugs, as you can see from this screenshot the extension generated 2 barraskweda instead of a pelipper both with the wrong item, also tapu fini and crawdaunt were not automatically read and were assigned to them random sets taken from calc
 

Attachments

I am pretty certain that I am doing this the wrong way and its just me being dumb but when I select different pokemon manually to check which Pokemon can switch in safely, the program stops working outright sometimes and doesnt show pokemon fainted, doesnt deduct HP anymore etc.
i think this latest version has generated new bugs, as you can see from this screenshot the extension generated 2 barraskweda instead of a pelipper both with the wrong item, also tapu fini and crawdaunt were not automatically read and were assigned to them random sets taken from calc
It's funny—we do all this testing and find no issues. Then as soon as we deploy it, the bugs start appearing, even on our end LOL.

Think both you and Shiox are talking about the same bug, one I'm definitely aware of. I believe it's something to do with the "improved" Pokémon detection logic I added, but turns out it was pretty inconsistent, causing the occasional syncing issues and dupe Pokémon.

Reason for the detection is that each Pokémon has its own ID, but occasionally changes from something like "p1: Barraskewda" to "Barraskewda" (without the player ID "p1") to "p1: fishy boi" (if it has a nickname) to even blank IDs (e.g., ""). The logic attempts to reconstruct this ID if it's incomplete or missing, which sometimes can fail if the necessary info isn't provided by the server, leading to the syncing issues. Additionally, there was this one game with a shiny Moltres-Galar named "Moltres-Kanto" and another regular Moltres also named "Moltres-Kanto", resulting in two Pokémon with IDs "p1: Moltres-Kanto", hence why the detection was updated in v1.0.2.

Regardless, I improved the "improved" detection again for the next v1.0.3 release. Changes seemed to have fixed the issues, but I'll continue to keep a close eye on this one.

Sorry about that guys!
 
Well since i am here, i will ask for the abily to change font too! The default font is a bit hard to read.
Yeah, the UI is the same from day one pretty much, which was initially designed to fit on a 13" laptop. It's very small on bigger screens, for sure. Haven't cleaned it up since I wanted to focus on making sure it works right first. I'll see what I can do for the next v1.0.3 release (still prioritizing the bugs atm). In the meantime, if you have the screen real estate, you can try zooming in the page itself (Ctrl/Cmd+Plus) to see if it improves readability.

Just out of curiosity, can you let me know what OS (Windows/macOS/Linux), browser, and screen size (15" laptop, 27" monitor, etc.) you have? Thanks!
 
Hi! This project is insane i belive that this is an incredibly big help during battles! I dowloaded it manually, since i am on edge, for this exact reason i wanted to ask you, would it be possible to create an extention for edge too? For the rest insane project, very very usefull!
glad you like it :)
 
LOOKING FOR FEEDBACK :Smogjynx:
For patch 1.0.3, we plan to add a settings page so you can customize Showdex to your liking.
We’ve thought of a few options already, such as:
  1. Color-blind support (or maybe you just want to change the colors for the KO % text)
  2. Swap the position of Player 1 and 2 so you can always be shown as the top or bottom player
  3. Hide UI elements by default (such as the IVs/EVs on your side, screens when they’re inactive). Especially useful on smaller laptop screens where scrolling is currently required if you’re not full-screened in Chrome (and hiding your taskbar at the bottom if on Windows)
  4. Auto-close Calcdex tabs after a battle is over
  5. When a move is revealed in battle, automatically replace a move in the current set with the revealed move.
    We’ll choose a move to replace based on these criteria and in this order (1) Status (non-damaging) moves (2) Non-STAB moves (3) Any move (only if all the moves are STAB and damaging). It would go from top to bottom, so if there are two status moves, it will replace the first one then the second one in the list. [If anyone has a better idea for auto-selecting what move to replace, we’d love to hear it!]
    • We noticed it was a bit annoying having to replace one of the set’s moves with the revealed move everytime it happened. You can toggle this feature on and off in case it’s getting things wrong or you want to control it yourself.
  6. Show the possible damage rolls when you hover over the damage % range text (by default, we’ll only show the possible damage rolls in Little Cup)
  7. Display possible damage rolls as percent (25% 18 dmg, 69% 21 dmg, 6% 23 dmg) or raw values (18, 18, 18, 18, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 23). As you can probably tell, the raw value option will make the tooltip pretty huge and it might look a bit fugly lol but we won’t judge you.
    • Jk we might judge you, but that’s okay :)
  8. Change the default set to “Showdown Usage” instead of selecting the first Smogon set available in the given format
    • Wondering what the Showdown Usage set is? It’s a new set we’re adding for every Pokemon that shows you the Smogon Usage stats for a Pokemon’s ability, item, and moves. Here’s a sneak peak:
      Showdex Usage Set.png

If there’s a setting you’d like to see us add, please let us know in the comments :)

If someone asks for a setting option that you’d want as well, make sure to like it so we can know which ones people really want!

We’ll include some of the community suggested settings in Patch 1.0.4.
 
Was looking for something like this a month ago or so, remembering that the gen5 era had something similar. Looks like my timing was just a bit off lol.

Something useful this could have is to pull data from pages like this: https://www.smogon.com/stats/2022-08/moveset/gen8ou-0.txt

Besides being extremely helpful with showing the chance a certain move is on a Pokémon, it can also be useful for Pokémon who doesn't have a Smogon set yet by auto-filling the top 4 used moves.
This was an amazing suggestion, we just implemented it in our dev build and I'm super excited about it :) thanks!
 
Yeah, the UI is the same from day one pretty much, which was initially designed to fit on a 13" laptop. It's very small on bigger screens, for sure. Haven't cleaned it up since I wanted to focus on making sure it works right first. I'll see what I can do for the next v1.0.3 release (still prioritizing the bugs atm). In the meantime, if you have the screen real estate, you can try zooming in the page itself (Ctrl/Cmd+Plus) to see if it improves readability.

Just out of curiosity, can you let me know what OS (Windows/macOS/Linux), browser, and screen size (15" laptop, 27" monitor, etc.) you have? Thanks!
So i play on windows on a 17" laptop, at 110% zoom it looks fine but it's still very hard to read, mostly bc i think the letters themselves are a bit on the small side. Another thing is that i can see that this was made with dark mode in mind (i use light mode), since visibilty is much better with dark mode, more support for white mode would be cool i think! but like as you have said focus first on the more important parts of development. I also have a 32" monitor but i didn't install it on that pc, if you need some tests on a even bigger screen feel free to ask me!

One thing about the zoom is that it makes showdown look a bit pixelated, so it's not the best solution, but as i have said focus before on more important things. LOL

Since i am here i will ask this too, will this still be suported with manifest v3 or we will all need to escape to firefox? (will do anyway since no more adblock)
 
So i play on windows on a 17" laptop, at 110% zoom it looks fine but it's still very hard to read, mostly bc i think the letters themselves are a bit on the small side. Another thing is that i can see that this was made with dark mode in mind (i use light mode), since visibilty is much better with dark mode, more support for white mode would be cool i think! but like as you have said focus first on the more important parts of development. I also have a 32" monitor but i didn't install it on that pc, if you need some tests on a even bigger screen feel free to ask me!
Ah gotcha, thanks for letting me know!

Also, good eye! You're right—the UI was initially designed in dark mode (since I use Showdown in dark mode primarily haha). Actually, this was developed (and still is) using my tiny 13" 2019 MacBook Pro, so the small fonts look crispy on the Retina and colors pop with the True Tone. However, when it comes to my 27" gaming monitor on Windows (and Cam's 15" Windows laptop), fonts are fuzzy and colors are washed, especially on light mode, as you've pointed out. riiiiiiiip.

For now tho, I'll add some small tweaks to the fonts and colors for v1.0.3 (since they'll be quick to implement), so definitely me know what you think when that rolls out!

One thing about the zoom is that it makes showdown look a bit pixelated, so it's not the best solution, but as i have said focus before on more important things. LOL

Since i am here i will ask this too, will this still be suported with manifest v3 or we will all need to escape to firefox? (will do anyway since no more adblock)
Hahah heard about the Chrome scare regarding ad blockers and Manifest V3 (MV3). No worries though—Showdex on Chrome (and any other browser that natively supports Chrome extensions, like Opera and Edge) already uses MV3, while Firefox uses MV2 (as they only have experimental MV3 support). Plus, Showdex doesn't use any MV3-restricted WebExtension APIs that ad blockers depend on.

So yeah, whether you choose to jump ship to Firefox or stay on Chrome, this extension will still work! c:
 

dex

Hard as Vince Carter’s knee cartilage is
is a Site Content Manageris an official Team Rateris a Top Social Media Contributoris a Forum Moderatoris a Community Contributoris a Top Contributoris a Smogon Media Contributoris a CAP Contributor Alumnus
I've noticed an issue that's caused me to remove it from my browser. I use Chrome if that matters. When I am spectating multiple games, the showdex automatically opens a calc for each game. If I have more than 4ish calcs open, PS begins to lag, and eventually my browser crashes. Could there be some way to implement an option where spectating games doesn't open a calc?
 
For suggestions, an indicator for when a move is revealed would be nice, though it could be redundant since Showdown does track this already.

I tried throwing some edge cases at it and found a few bugs.

A few Pokémon crashes the app when viewed:
Xerneas Neutral Mode - Xerneas starts in this forme, at least on the opponent side.
Unown - Any letter besides A
Floette - Both Eternal and White
Enamorus - Both base and Therian
Pokestar mons - They're common in the Metronome formats

Floette can have its name be clicked to change formes.

Pokémon who starts in their 2nd forme yet can revert can't have their name clicked. Cramorant before it was banned in Balanced Hackamons is the only relevant example I can think of, but Gen9 can always bring a new Pokémon with a Zen Mode like ability who becomes popular for Hackmons.

Refreshing a page after a disconnect really messes up if the active Pokémon is Transformed, especially on tracking who's out when switching.

Primal Reversion works on the opponent side, but not on the player's side. It also stops tracking HP and the active Pokémon once this happens.

Mega Pokémon hides the item icon. I know this was a feature you guys added, but Hackamons formats should be excluded.

I also checked for stuff like for the special moves used in the custom Super Staff Bros 4, or if Maganium had any issues with having "Mega" in the name, and with those two there wasn't any problems
 
I've noticed an issue that's caused me to remove it from my browser. I use Chrome if that matters. When I am spectating multiple games, the showdex automatically opens a calc for each game. If I have more than 4ish calcs open, PS begins to lag, and eventually my browser crashes. Could there be some way to implement an option where spectating games doesn't open a calc?
Oh no, sorry to hear that! Yes we'll be adding a settings page to the next update, and we'll definitely include an option to disable the calc when you're spectating. We've also found some other ways to optimize how/when we're loading data like the Smogon sets, so that should help a lot with performance in addition to some other fixes.

Definitely would love to hear if it fixes the problem for you in the next patch!
 
  • Like
Reactions: dex
actually ive had this issue too, but rather it lags my games horribly every turn after roughly game four-six. i want to say this has persisted since 1.0.0, but honestly couldnt tell you as ive been running 1.0.2 much longer. opera gx with chrome extension if it helps.
Huh, that's really weird! Would you mind sharing your PC specs? We're curious as we've never encountered that before.
We're adding a lot of optimization fixes to help solve the lag problems in the next patch, so I'm hopeful that will fix the problem for you.
 
  • Like
Reactions: dex
For suggestions, an indicator for when a move is revealed would be nice, though it could be redundant since Showdown does track this already.

I tried throwing some edge cases at it and found a few bugs.

A few Pokémon crashes the app when viewed:
Xerneas Neutral Mode - Xerneas starts in this forme, at least on the opponent side.
Unown - Any letter besides A
Floette - Both Eternal and White
Enamorus - Both base and Therian
Pokestar mons - They're common in the Metronome formats

Floette can have its name be clicked to change formes.

Pokémon who starts in their 2nd forme yet can revert can't have their name clicked. Cramorant before it was banned in Balanced Hackamons is the only relevant example I can think of, but Gen9 can always bring a new Pokémon with a Zen Mode like ability who becomes popular for Hackmons.

Refreshing a page after a disconnect really messes up if the active Pokémon is Transformed, especially on tracking who's out when switching.

Primal Reversion works on the opponent side, but not on the player's side. It also stops tracking HP and the active Pokémon once this happens.

Mega Pokémon hides the item icon. I know this was a feature you guys added, but Hackamons formats should be excluded.

I also checked for stuff like for the special moves used in the custom Super Staff Bros 4, or if Maganium had any issues with having "Mega" in the name, and with those two there wasn't any problems
For the revealed moves, we're putting in a system for auto-replacing one of the moves in the set with the revealed move, so hopefully that helps with that issue. In terms of the Pokemon that crash it, this has mostly been solved in the new patch already, except for the Primal formes. We're going to look into fixing this, but it's not our biggest priority at the moment.

In terms of refreshing the page, this is an issue we're still looking into, it's a bit tough to resolve since it's caused by how Showdown the client sends us data, which is somewhat out of our control.

We can definitely make that change for Hackmons, thanks for letting us know! And shocker honestly that it works with Super Staff Bros LOL I'm actually surprised to hear that.

Thanks for doing all this testing, we really appreciate it!!
 

Maxouille

Gastrodon east sea <3
is a Tiering Contributor Alumnus
Actually it doesn't depend on your pc spec. Just load some games then try to skip turn you will get massive lags, I managed to crash my browser watching stall games as well, the issue isn't the UI because even after closing the Calc rooms I still have the lags so it's probably because there are too many task in the background.
(I have a 2020's ryzen 5 gpu 8go ram, and a Nvidia gtx1080 same problem on Firefox and chromium browser on both windows 10 and Ubuntu)
 
Last edited:
its a 10yo laptop so that might be why lol, although i never lagged ever before this (also its more like after game 10)
Actually it doesn't depend on your pc spec. Just load some games then try to skip you will get massive lags, I managed to crash my browser watching stall games as well, the issue isn't the UI because even after closing the Calc rooms I still have the lags so it's probably because there are too many task in the background.
(I have a 2020's ryzen 5 gpu 8go ram, and a Nvidia gtx1080 same problem on Firefox and chromium browser on both windows 10 and Ubuntu)
Interesting :pika: The reason I asked about your specs is because I actually tried opening up a ton of games at one time and it didn't lag for me, so I'm not sure what's different on our end. But since it doesn't seem to be an issue with specs, we think it might have to do with loading the Smogon sets into RAM, which we've optimized a lot in Patch 1.0.3 in addition to other fixes. We'll also have a setting to clear games from memory when you close their Calc tab, though you won't be able to reopen the game if you do that, this will help a lot with the lag I think.

The new patch will be out soon, so we're hopeful that it'll fix the issue!
 

Maxouille

Gastrodon east sea <3
is a Tiering Contributor Alumnus
When I mean lag I mean that when you click buttons you have to wait like 1 or 2 sec before the action happen like skip turn or switch room ect
 

Runo

Blehhhhhoooooouughhh.....
is a Forum Moderatoris a Community Contributoris a Tiering Contributor
camboi said:
Fixed stage hazards always being present in damage calculations even after the Pokémon is active on the field.
This is still not working, stage hazards are still present after the initial switch in.
This game showcases how it's still not working (skip to turn 8).

Here's is the calc that the damage calculator produced:
+1 252 SpA Kommo-o Boomburst vs. 0 HP / 4 SpD Victini: 190-224 (55.7 - 65.6%) -- guaranteed OHKO after Stealth Rock

This is despite the fact that Victini was already in the game and thus doesn't need to account for rock damage.

This should've been the actual calc:
+1 252 SpA Kommo-o Clanging Scales vs. 0 HP / 4 SpD Victini: 223-264 (65.3 - 77.4%) -- 12.5% chance to OHKO

When I mean lag I mean that when you click buttons you have to wait like 1 or 2 sec before the action happen like skip turn or switch room ect
I'm also having this issue.
 

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

Top