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

There seems to be a bug where it is not pulling sets for gen 8 random battle.I looked around to try and make sure I am not repeating what someone else has said I don't think anyone has mentioned this.
I am using chrome if that effects it
 
There seems to be a bug where it is not pulling sets for gen 8 random battle.I looked around to try and make sure I am not repeating what someone else has said I don't think anyone has mentioned this.
I am using chrome if that effects it
Hmm, we just spectated a Gen 8 Randoms on Showdex v1.1.0 (the latest release) and the sets seem to download just fine :o

Chrome is actually the recommended browser, so you're good on that front. Wondering if you possibly might have a similar problem as UpsideDownPants... is the type of Randoms you're playing just standard Gen 8 Randoms (as in gen8randombattle) or a non-standard one like Randoms Blitz (gen8randombattleblitz), Randoms No-Dmax (gen9randombattlenodmax), Unrated Randoms (gen8unratedrandombattle), etc.?
 

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
it doesnt seem the client is currently automatically updating tera types in battle, is there a way i can manually set this as the "tera" button next to the typing doesnt seem to affect my calc either
 

awyp

'Alexa play Ladyfingers by Herb Alpert'
is a Top Tutoris a Top Team Rateris a Community Leaderis a Community Contributoris a Tiering Contributor
RMT Leader
it doesnt seem the client is currently automatically updating tera types in battle, is there a way i can manually set this as the "tera" button next to the typing doesnt seem to affect my calc either
Yes I can confirm this is an issue I'm having as well, the type will change on the calculator but the calculations won't be affected or changed. For example if I have Corviknight out and I tera type into Dark the calculator will still be showing the same damage for Thunderbolt if I was Flying / Steel type rather then showing Corviknight being a Dark type. I just wanted to post so there's awareness regarding this issue.
 
About Tera, I agree that it would be nice if it were automated. It would also be useful to be able to put the zoroark and zoroark-hisui random set into the unfilled blank space in the calculator while it is not revealed. Sometimes it uses Nasty Plot and it's still transformed, or it just hits and doesn't take damage, and you have to use https://calc.pokemonshowdown.com/randoms.html to calculate because the automated calculator doesn't allow you to put the zoroark/zoroark-hisui until them reveal themselves.
 
it doesnt seem the client is currently automatically updating tera types in battle, is there a way i can manually set this as the "tera" button next to the typing doesnt seem to affect my calc either
There's a separate type next to the Pokémon's name and types that's meant for the Tera type. You can click on it to manually change the Pokémon's Tera type.

SCR-20221228-qvx.png


I know it's not super obvious, so we're planning on adding spikes around the edges of the Tera type (similar to how it appears in-game) to make it more clear.

Yes I can confirm this is an issue I'm having as well, the type will change on the calculator but the calculations won't be affected or changed. For example if I have Corviknight out and I tera type into Dark the calculator will still be showing the same damage for Thunderbolt if I was Flying / Steel type rather then showing Corviknight being a Dark type. I just wanted to post so there's awareness regarding this issue.
Ah, there's a second "TERA" toggle button next to the "Moves" heading, as shown below.

SCR-20221228-qwj.png


When Terastallized, the button should turn blue. (Side note: The button will be disabled if the Pokémon has no Tera type set, i.e., the type reads "???".) Additionally, the Pokémon's original types next to its name will be grayed and the Tera type will have a colored background.

We just tested this using a Corviknight with the Dark Tera type and Thunderbolt's damage (from the opposing Pokémon, a Ghouldengo in our case) changed accordingly when the "TERA" button was toggled on.

About Tera, I agree that it would be nice if it were automated.
It is (or should be, at least)! The Tera type and Terastallization state automatically update (if revealed) between battle syncs.

However, it seems that Showdown has recently updated their Tera implementation (e.g., Tera types now show up in the Pokémon's tooltip), which may have broken the Tera type detection. I'll look into this and provide a fix with the upcoming patch.

Thanks everyone!
 
It would also be useful to be able to put the zoroark and zoroark-hisui random set into the unfilled blank space in the calculator while it is not revealed. Sometimes it uses Nasty Plot and it's still transformed, or it just hits and doesn't take damage, and you have to use https://calc.pokemonshowdown.com/randoms.html to calculate because the automated calculator doesn't allow you to put the zoroark/zoroark-hisui until them reveal themselves.
Great suggestion! In terms of what we can detect automatically, we could check to see if the mon uses a move that's outside of their learnset, like Nasty Plot or Bitter Malice, and that would let us automatically set the mon as Zoroark. Of course there are two formes now, so we can't determine which Zoroark it is (unless they used Bitter Malice or something like that), but you'll be able to click on the name to change it's forme manually so that shouldn't be a problem. Obviously this implementation isn't perfect, bc if the mon they're transformed into can learn Nasty Plot, then it would fail to detect it, but I think it's better than nothing!

Zoroark is a huge pain to deal with on the tech side of things, so we can only do so much sadly. Since the code for handling Zoroark is a bit fragile, it might take us a little bit to get this implemented and ensure that we don't break anything else (like Ditto, the other demon).
 

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
There's a separate type next to the Pokémon's name and types that's meant for the Tera type. You can click on it to manually change the Pokémon's Tera type.

View attachment 478728

I know it's not super obvious, so we're planning on adding spikes around the edges of the Tera type (similar to how it appears in-game) to make it more clear.
yeah this is the button in particular that doesn't seem to work for me that I was referring to
 
I seem to remember it updating the tera types and calculating everything correctly, but then today I had to do it manually
You're totally right, as Keith mentioned, Showdown just updated their implementation of Tera types (so that's it visible in the tooltip), and that broke our automatic detection. But it'll be fixed with the next patch, and thankfully now the Tera types for your side will automatically be filled in at the start of the battle (whereas currently it only happens once you send them out).
 

awyp

'Alexa play Ladyfingers by Herb Alpert'
is a Top Tutoris a Top Team Rateris a Community Leaderis a Community Contributoris a Tiering Contributor
RMT Leader
Oh! Do you have the "TERA" toggle button enabled as well (as mentioned in my reply to AndViet)?
Thank you Keith, I appreciate the clarification and I'll be using the TERA toggle button (Is there any plans to automate this in the future in terms of Tera selection)?
 
Thank you Keith, I appreciate the clarification and I'll be using the TERA toggle button (Is there any plans to automate this in the future in terms of Tera selection)?
No problem! :woo:

It was originally automated, but Showdown recently changed how Tera is stored in the data layer (confirmed this just now), which breaks the detection used in the current version of Showdex.

A fix will be pushed out in the upcoming patch (coming soon!).
 
just tried it in a randbats game, the button next to moves works but I'd suggest putting that toggle somewhere more obvious because that one is kinda hidden. thanks!
Glad to hear that it's working, phew!

Understandably the "TERA" toggle button isn't that apparent, but given our UI constraints (many users have really small screens or use Showdown in Left-Right Panel mode, making our workable area even smaller), we couldn't find a better place to put it without cutting off more of the Pokémon's name or making users scroll more by adding another line for both players.

Additionally, for formats like National Dex AG, you can both Tera and Z (and originally in Gen 8 National Dex AG, both Z and Max), so we put the "TERA" button next to those existing toggles to keep the UI consistent for those players.

But once the upcoming patch is deployed with the Tera detection fix, the automated Tera mechanic should be back to working order.

Thanks for the feedback though! We're always open to suggestions if you have ideas about how we can represent the Tera type and Terastallization state in the UI more intuitively.
 
Two things, the first, probably already known. Flutter Mane's tera type was not automatically changed to electric in the calculator (see image below).

Second thing: It would be very useful for the calculator to update items according to the damage received (the same would apply if the opposing Pokémon takes less damage because it is holding the item Eviolite, Assault Vest, etc).

For example. Look at this turn:

Turn 13

Wugtrio, come back!
Go! Tatsugiri (Tatsugiri-Droopy)!

The opposing Gallade used Leaf Blade!
(Tatsugiri lost 59% of its health!)


We know that Gallade's possible items are:
Items: Life Orb (55%), Choice Band (23%), Choice Scarf (22%)

He is not choice banded because if it were, it would take more hp from Tatsugiri-Droopy:
Lvl 84 84 Atk Choice Band Sharpness Gallade Leaf Blade vs. Lvl 82 84 HP / 84 Def Tatsugiri: 214-252 (86.9 - 102.4%) -- 18.8% chance to OHKO

It is also not Life Orb, for two reasons: If it were, it would also take more hp from Tatsugiri-Droopy:
Lvl 84 84 Atk Life Orb Sharpness Gallade Leaf Blade vs. Lvl 82 84 HP / 84 Def Tatsugiri: 185-218 (75.2 - 88.6%) -- guaranteed 2HKO
And also for not losing HP from Life Orb (in Gen 8 for example, Magic Guard users normally wouldn't lose HP from Life Orb)

So it's 100% Choice Scarf by elimination and also because of the damage taken:
Lvl 84 84 Atk Sharpness Gallade Leaf Blade vs. Lvl 82 84 HP / 84 Def Tatsugiri: 142-168 (57.7 - 68.2%) -- guaranteed 2HKO
-----------------

Then the calculator would automatically change the item to a Choice Scarf. This would save time in terms of manually checking each time. Yes, some situations are more complex than others, which is why I suggest the following. Let's take any example.

A pokémon X has 3 possible items. Choice Specs (50%), Leftovers (30%) and Heavy-Duty Boots (20%). By default, the calculator always shows the most recurring item, in this case Choice Specs. But, upon receiving damage, it is noted that it is not Choice Specs. In this case, the Calculator would switch to the second most recurring item: Leftovers.




 
Last edited:
Two things, the first, probably already known. Flutter Mane's tera type was not automatically changed to electric in the calculator (see image below).

Second thing: It would be very useful for the calculator to update items according to the damage received (the same would apply if the opposing Pokémon takes less damage because it is holding the item Eviolite, Assault Vest, etc).

For example. Look at this turn:

Turn 13

Wugtrio, come back!
Go! Tatsugiri (Tatsugiri-Droopy)!

The opposing Gallade used Leaf Blade!
(Tatsugiri lost 59% of its health!)


We know that Gallade's possible items are:
Items: Life Orb (55%), Choice Band (23%), Choice Scarf (22%)

He is not choice banded because if it were, it would take more hp from Tatsugiri-Droopy:
Lvl 84 84 Atk Choice Band Sharpness Gallade Leaf Blade vs. Lvl 82 84 HP / 84 Def Tatsugiri: 214-252 (86.9 - 102.4%) -- 18.8% chance to OHKO

It is also not Life Orb, for two reasons: If it were, it would also take more hp from Tatsugiri-Droopy:
Lvl 84 84 Atk Life Orb Sharpness Gallade Leaf Blade vs. Lvl 82 84 HP / 84 Def Tatsugiri: 185-218 (75.2 - 88.6%) -- guaranteed 2HKO
And also for not losing HP from Life Orb (in Gen 8 for example, Magic Guard users normally wouldn't lose HP from Life Orb)

So it's 100% Choice Scarf by elimination and also because of the damage taken:
Lvl 84 84 Atk Sharpness Gallade Leaf Blade vs. Lvl 82 84 HP / 84 Def Tatsugiri: 142-168 (57.7 - 68.2%) -- guaranteed 2HKO
-----------------

Then the calculator would automatically change the item to a Choice Scarf. This would save time in terms of manually checking each time. Yes, some situations are more complex than others, which is why I suggest the following. Let's take any example.

A pokémon X has 3 possible items. Choice Specs (50%), Leftovers (30%) and Heavy-Duty Boots (20%). By default, the calculator always shows the most recurring item, in this case Choice Specs. But, upon receiving damage, it is noted that it is not Choice Specs. In this case, the Calculator would switch to the second most recurring item: Leftovers.




The Tera problem will be fixed with the next patch we're releasing today (hopefully it'll get approved quickly by Chrome).

As for having the calc automatically update items according to damage received, while we agree that it would be useful, it's something we feel strongly against implementing. We've had a few people ask for this already, so to avoid rehashing everything again, you can read this and this and this. If sometime in the future we get the green light from the mods/community that we should go ahead with this feature, then I'd be all for it. But for right now, we want to preserve some of the game sense required to check whether a mon is choice banded based on the damage, and having the computer do it would remove that. I love Showdown and would hate it if we did anything to hurt the competitive integrity of the game I love.

Anyways, happy New Years, and thanks for your feedback, we appreciate it!
 
The Tera problem will be fixed with the next patch we're releasing today (hopefully it'll get approved quickly by Chrome).

As for having the calc automatically update items according to damage received, while we agree that it would be useful, it's something we feel strongly against implementing. We've had a few people ask for this already, so to avoid rehashing everything again, you can read this and this and this. If sometime in the future we get the green light from the mods/community that we should go ahead with this feature, then I'd be all for it. But for right now, we want to preserve some of the game sense required to check whether a mon is choice banded based on the damage, and having the computer do it would remove that. I love Showdown and would hate it if we did anything to hurt the competitive integrity of the game I love.

Anyways, happy New Years, and thanks for your feedback, we appreciate it!
Firstly, happy new year!

Good to hear about Tera's fix in the next patch. On the other question, fair enough.

Actually, I just thought of something similar, but I believe this time it's something that can be approved, since we already have an existing precedent: The extension of Pre. I will explain better in the following example:

With the Pre extension enabled (you can find its Extension here https://www.smogon.com/forums/threads/pok%C3%A9mon-showdown-randbats-tooltip.3686306/), it also works on replay (in case it is interesting, you can check the veracity of what I will say in the replay that I make available below) that on turn 26, when we hover over Dragapult, we are given these possibilities of his movements:

Moves: Draco Meteor (54%), Shadow Ball (54%), U-turn (38%), Thunderbolt (36%), Fire Blast (81%), Dragon Dance (46%), Dragon Darts (46%) , Tera Blast (46%)

However, soon after, as soon as Dragapult uses Dragon Dance, on turn 27, the possibilities automatically change:

Moves: Dragon Dance, Dragon Darts, Fire Blast, Tera Blast

My suggestion is to do the same with the Showdex extension and make the movement suggestions possible to change in the Showdex according to what the pokémon uses. What do you think? I believe that the fact that this exists in the Pre extension makes my suggestion more grounded this time.

https://replay.pokemonshowdown.com/gen9randombattle-1759493231
 
Last edited:
Patch 1.1.1 is now live!
This is a pretty light patch mostly focused on bug fixes such as tera type & terastallization syncing with the battle, in addition to adding spiky borders around the Tera type for improved distinction from normal typings. We also added support for factoring in Salt Cure residual damage into the KO % (e.g. 2HKO after Salt Cure damage) and a new setting for choosing whether you want Calcdex to open in the left or right panel (thanks Kirigon for the suggestion). Lastly, we improved Hidden Power implementation, importing of Tera types from Smogon sets, fixed issues when importing PokéPaste sets, and fixed SPC boosts/reductions not applying correctly in Gen 1. To see a full list of changes, be sure to check out the full patch notes!

Known Issues
Unfortunately when we were building this patch, there was a bug with smogon/calc where Snow wasn’t implemented properly. They’ve fixed the bug now but we didn’t realize it, and thus Snow isn’t correctly applying the 1.5x Defense boost for Ice type mon. While the final stat number will be green and indicate that it’s being accounted for, sadly that’s just an illusion as the actual calcs don’t change. We plan to deploy a quick fix this week to address this issue, but for now, you can fix the issue by applying a +1 stage boost to Defense manually.
 
Firstly, happy new year!

Good to hear about Tera's fix in the next patch. On the other question, fair enough.

Actually, I just thought of something similar, but I believe this time it's something that can be approved, since we already have an existing precedent: The extension of Pre. I will explain better in the following example:

With the Pre extension enabled (you can find its Extension here https://www.smogon.com/forums/threads/pok%C3%A9mon-showdown-randbats-tooltip.3686306/), it also works on replay (in case it is interesting, you can check the veracity of what I will say in the replay that I make available below) that on turn 26, when we hover over Dragapult, we are given these possibilities of his movements:

Moves: Draco Meteor (54%), Shadow Ball (54%), U-turn (38%), Thunderbolt (36%), Fire Blast (81%), Dragon Dance (46%), Dragon Darts (46%) , Tera Blast (46%)

However, soon after, as soon as Dragapult uses Dragon Dance, on turn 27, the possibilities automatically change:

Moves: Dragon Dance, Dragon Darts, Fire Blast, Tera Blast

My suggestion is to do the same with the Showdex extension and make the movement suggestions possible to change in the Showdex according to what the pokémon uses. What do you think? I believe that the fact that this exists in the Pre extension makes my suggestion more grounded this time.

https://replay.pokemonshowdown.com/gen9randombattle-1759493231
Great idea! That was actually a feature we planned to implement (that's what the greyed out Auto button above Set is supposed to do). We could definitely do it for randbats where it's a lot more clear, but it's a lot trickier in other formats like OU, so it'll take us some time to build that.

But either way, I agree that it's a fair idea and we're down to implement it at some point. Thanks for the suggestion!
 
and a new setting for choosing whether you want Calcdex to open in the left or right panel (thanks Kirigon for the suggestion).
Thanks for the suggestion!
Np! Maybe it's possible to speed it up a bit in random and further in OU (about automating the information in the calculator)? I don't know, just thinking and sharing.

Another thing worth noting is that the random sets don't seem to be 100% accurate in covering all moves for all pokemons. Some may be missing, I will show an example but I think there may be more cases. Note that the Pool doesn't even feature Toxicroak's special side like Focus Blast, Nasty PLot, etc. I have my doubts about this happens to other pokemons as well, so maybe it's worth reviewing random pokemons in general. Is this a known issue?

 
Last edited:
Np! Maybe it's possible to speed it up a bit in random and further in OU (about automating the information in the calculator)? I don't know, just thinking and sharing.

Another thing worth noting is that the random sets don't seem to be 100% accurate in covering all moves for all pokemons. Some may be missing, I will show an example but I think there may be more cases. Note that the Pool doesn't even feature Toxicroak's special side like Focus Blast, Nasty PLot, etc. I have my doubts about this happens to other pokemons as well, so maybe it's worth reviewing random pokemons in general. Is this a known issue?

Ahhh no actually the reason the moves are missing is because there are multiple Random sets in Gen9, so you have to switch the set in order to see the other moves. As you can see in your screenshot, Toxicroak has the "Fast Attacker" set applied currently, but there might be another set available if you click into that dropdown. The other set will have different moves, Tera types, and %'s associated with it, so it's smart to check those as well. We pull all of our data from pre's API, so we shouldn't be missing anything.
 
This tool is wonderful for battling and I love it. One suggestion though, would it be possible to add a damage calc in the teambuilder that can sync during teambuilding? for example, if I put in a clodsire set in my teambuilder, that set automatically pops up in the hellodex on the right and then it is possible to change the opposing pokemon (like in the default showdown damage calc). This would be really helpful for those who likes to make calcs during teambuilding. Regardless, this an amazing tool wonderful job :D
 
This tool is wonderful for battling and I love it. One suggestion though, would it be possible to add a damage calc in the teambuilder that can sync during teambuilding? for example, if I put in a clodsire set in my teambuilder, that set automatically pops up in the hellodex on the right and then it is possible to change the opposing pokemon (like in the default showdown damage calc). This would be really helpful for those who likes to make calcs during teambuilding. Regardless, this an amazing tool wonderful job :D
Yesss we totally agree, creating a damage calc for the teambuilder is definitely something we want to add in the future. Currently we're working on reading data from the teambuilder and inputting it into the damage calc (which will introduce some exciting new features in the next patch). After that, the biggest roadblock is really thinking out the UI/UX and how we want to lay everything out. Our initial idea is to create an improved version of the One vs All, All vs One modes from the PS damage calc. The idea is to make it quick to add sets and filter the list of mon you want to run calcs against, and then laying them all out in an easy to scan list so you can quickly check calcs against the metagame threats while you're building the team. We'd also have filtering options, so for example, you could choose to only see calcs for mon that are faster than you.

Really the biggest thing is figuring out what players would want to see and use while teambuilding, like for example, I could see it being really useful to see a speed tier list that you can calc against, or other features that could help with setting the optimal EVs to live a certain attack from a certain mon. If you have any ideas, I'd love to hear them! We're still in the prototyping phase, and to be honest, it'll be a while before this gets released, as it's definitely going to require a lot of work! And not to mention, I think the PS damage calc still works really well and gets the job done, so we're not in a huge rush to get this released :)
 
hello! are there any plans to implement automatic updating with the !showteam command/Open Team Sheets?

what i mean is: are there plans to have the calc automatically update the opponent's team (or both players' teams if you are a spectator) if they use the !showteam command, or if open team sheets are on (only relevenat in vgc i believe)?
 

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

Top