• The moderator of this forum is jetou.
  • 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 Pokémon Showdown Damage Calculator

I noticed that when Loaded Dice is selected as the item on a mon using a multihit move that hits 2-5 times, it does not automatically adjust to 4 hits minimum. Would there be any chance that the calc adjusting automatically to remove 2 and 3 hits be possible? If that cannot be done then I think at least automatically shifting to 4 hits as the default?
View attachment 557805

Done. It will now default to four hits when a Pokemon has Loaded Dice.
 
Clicking to copy a calc with a visible boost like Power Spot or Battery adds an extra space between the boost, but the spaces are correct in the description shown otherwise. These are some examples I have copied directly.

Code:
252+ SpA Abomasnow  Battery boosted  Power Spot boosted Blizzard vs. 248 HP / 8 SpD Abomasnow: 298-352 (77.8 - 91.9%) -- guaranteed 2HKO

+1 252 Atk Pixilate Tera Fairy Altaria-Mega  Power Spot boosted Double-Edge vs. 252 HP / 252 Def Tera Ghost Heracross-Mega: 390-460 (107.1 - 126.3%) -- guaranteed OHKO
Fixed.
 
Palafin is a commonly used DOU mon (among other tiers) and the sample sets written for it only load for its base form, not the Palafin-Hero form it transforms into later in the match.

This is cumbersome when trying to run damage calcs for Palafin's targets, because you should almost always be in Palafin-Hero form by the time you're attacking foes for meaningful damage. Edit: and also Palafin-Hero has more bulk which has implications for calc'ing hits against it as well.

I know in past tiers Aegislash, a Pokemon that frequently alternates between Aegislash-Shield and Aegislash-Blade, just had the same sample sets duplicated for both formes in the calc. Can the same be done for Palafin?

View attachment 490549
Fixed, Palafin-Hero sets will get imported the next time the sets get updated.
 
Screenshot 2023-10-10 10.43.40 AM.png


Odd bug where the sample sets for SV appear to be taking from another, identical set from S/M

This appears to happen with some mythicals too, and includes mons that aren't even in RU or S/V at all (I.E Celebi apparently having an RU nasty plot set in S/V, the exact same one from S/S. It's important to note that Celebi is not in S/V)(Chandelure somehow having RU wallbreaking sets from S/S, despite being in UU)

I would hazard to guess that this bug is affecting some, but not all mons from previous gens. Something like Torterra don't have the bug, despite being in lower tiers than UU and OU at some point, so it appears to only be affecting a weird few mons that are niche in some way.
 
View attachment 560146

Odd bug where the sample sets for SV appear to be taking from another, identical set from S/M

This appears to happen with some mythicals too, and includes mons that aren't even in RU or S/V at all (I.E Celebi apparently having an RU nasty plot set in S/V, the exact same one from S/S. It's important to note that Celebi is not in S/V)(Chandelure somehow having RU wallbreaking sets from S/S, despite being in UU)

I would hazard to guess that this bug is affecting some, but not all mons from previous gens. Something like Torterra don't have the bug, despite being in lower tiers than UU and OU at some point, so it appears to only be affecting a weird few mons that are niche in some way.
It's an intended feature. If a Pokemon doesn't have an SV set, its SS sets will be used and if that doesn't exist then its SM sets will be used.
 
I am fairly sure this is a bug, but feel free to tell me to do one if it isn't.

If you have a Grass move being used in Grassy Terrain, but the recipient of the attack is benefiting from Flower Gift, the calc doesn't display "in Grassy Terrain". Screenshots show the calc text before and after adding Flower Gift.

Edit: in fact this seems to extend to all Terrains when the Terrain matches the move type whilst Flower Gift is active.
damage calc bug report 1.png
damage calc bug report 2.png
 
Last edited:
When calculating rolls of multi-hit moves, the calculator assumes that the total damage is made for 3 hits having the same rolls, for example :

1697229639483.png

1697229651576.png

(Changed waterfall BP to 25)

We can see here that the possible damage amounts of Surging strikes are just the single rolls multiplied by 3. They obviously should be intermediate values like 42 + 42 + 43. It's not necessary to show them all to the user tho.

The nerd-of-now simulator seems to have a different chance of killing with surging strikes :
1697229794047.png


It seems to me that the showdown calculator just looked at the possible damage output that killed and calculated the odds, that should be false here

Thanks to Hera Dit Cation (RandomDuVGCFR) for pointing that out !
 
The nerd-of-now simulator seems to have a different chance of killing with surging strikes :
1697229794047.png
Could be due to the differing attack investment, but your point of having intermediate rolls is still good to consider:

196+ Atk Urshifu-Rapid-Strike Surging Strikes (3 hits) vs. 108 HP / 164 Def Flutter Mane on a critical hit: 135-162 (93.7 - 112.5%) -- approx. 75% chance to OHKO (from Showdown calc, assuming levels are both 50)

Comparing to the other calc that you gave, it seems to be giving different probabilities of OHKOing, which I think is your main point.
 
Oh I sent the wrong calc on the other calculator, the odds aren't the same nonetheless :
(Got the screen on mobile I'm not yet home)
 

Attachments

  • Screenshot_2023-10-14-10-53-25-26_40deb401b9ffe8e1df2f1cc5ba480b12.jpg
    Screenshot_2023-10-14-10-53-25-26_40deb401b9ffe8e1df2f1cc5ba480b12.jpg
    758.7 KB · Views: 79
Last edited:
Not really a bug, more of a request:

Could Booster Energy only factor in base stat totals and not factor in stat changes? Since the item works on switchin there are next to zero cases where you'll be able to activate it after using a boosting move. This would only really occur in formats where baton pass is legal.

This is mainly due to the way it interacts with CM or SD Iron Valiant or Fiery Dance Iron Moth, having to disable the ability every time you apply an attack boost is unnecessary
 
This would only really occur in formats where baton pass is legal.
this is a common occurrence with Calm Mind Booster Energy Flutter Mane in sun; since sun procs before the Booster Energy, you'll get the Speed boost, but if you Calm Mind, once sun stops being active you'll get a SpA boost.
 
I recently found out that when u tera for example in a fire type and that the fire type move is under 60 BP the move will go to 60 BP but when i tried to calc damage with a set i made with :pawmot: i gave it nuzzle so that should go up to 60 BP after tera which it does but then you would have normal stab and stab from tera on top of it but in that case a tera electric nuzzle should be as strong as a normal double shock but that isnt the case

1697755531203.png


so as you can see it says 60BP but it should be 120BP
 
I recently found out that when u tera for example in a fire type and that the fire type move is under 60 BP the move will go to 60 BP but when i tried to calc damage with a set i made with :pawmot: i gave it nuzzle so that should go up to 60 BP after tera which it does but then you would have normal stab and stab from tera on top of it but in that case a tera electric nuzzle should be as strong as a normal double shock but that isnt the case

View attachment 563099

so as you can see it says 60BP but it should be 120BP

I think you're forgetting that if you Tera your Pawmot to Electric, then the STAB boost on Nuzzle gets boosted to 2x, not 1.5x, while an unTera'd Pawmot doesn't get this extra boost to its STAB. So, the proportional damage for each attack should be:

2 STAB Boost x 60 BP of Nuzzle = 120
1.5 STAB Boost x 120 BP of Double Shock = 180

Therefore, we expect the damage output for Double Shock to be 1.5 times that of Tera Electric Nuzzle. If we verify using the screenshot you gave:

42.7 / 28.4 = 1.503 ~ 1.5
50.1 / 33.8 = 1.482 ~ 1.5
 
I think you're forgetting that if you Tera your Pawmot to Electric, then the STAB boost on Nuzzle gets boosted to 2x, not 1.5x, while an unTera'd Pawmot doesn't get this extra boost to its STAB. So, the proportional damage for each attack should be:

2 STAB Boost x 60 BP of Nuzzle = 120
1.5 STAB Boost x 120 BP of Double Shock = 180

Therefore, we expect the damage output for Double Shock to be 1.5 times that of Tera Electric Nuzzle. If we verify using the screenshot you gave:

42.7 / 28.4 = 1.503 ~ 1.5
50.1 / 33.8 = 1.482 ~ 1.5

i forgot about that part LOL I should have thought about this when it wasnt 12:45 am
 
Zacian's intrepid sword, and presumably Zamazena's dauntless shield are bugged, In gen 8's calculator, it does work, applying the damage boost for Zacian naturally, but not in SV's calculator for some reason.

1698949303880.png 1698949348395.png 1698949460976.png
 
I'm not sure if this is the right place, but according to the forum dex on the Clefable set in ORAS the 24 EV's in SpD are to fit Zard-Y's FBlast and then paralyze. According to 'Damage calculator', this is the result:
Screenshot-20231103-061437-Chrome.jpg

But if you add 28 in SpD / 252 HP, this comes out:
Screenshot-20231103-061640-Chrome.jpg

Screenshot-20231103-061703-Chrome.jpg
Again, I'm not sure if I should post this here, since this is my first time doing so. I just wanted to clarify that FBlast can eliminate Clefa or that there is a small % of her surviving.
 
Last edited:
hello jetou I noticed that the Smogon/calc unpkg method does not work without any workarounds
1699059897348.png

it fails to generate gen789_1
 
Last edited:
Unsure if this has been reported yet but the calc isn't pulling BH sets properly. For Pokemon where the base is "in the game" (in the normal sense) but the forme isn't (such as Mega Diancie and Primal Kyogre), the calc reads these sets as for the base Pokemon only, when (despite the dex not showing the alternate forme) the set export gives the correct forme.
View attachment 547733
View attachment 547734
For Pokemon that aren't "in the game" in the normal sense altogether, like Mega Steelix, their sets just aren't showing up in the calc period (for reference my Mega Steelix analysis was uploaded on the 22nd and according to github the last refresh was well after that). IDK if this is a weird interaction with National Dex stuff, but ND mons seem to have perfectly fine importables.
bumping this and am wondering if it's a fixable issue, as almost all non-arceus meta-relevant mons like mega mewtwo x, mega diancie, primal kyogre, kartana, mega steelix, ho-oh, and more are either not importing in the calc correctly or are simply missing altogether.
 
bumping this and am wondering if it's a fixable issue, as almost all non-arceus meta-relevant mons like mega mewtwo x, mega diancie, primal kyogre, kartana, mega steelix, ho-oh, and more are either not importing in the calc correctly or are simply missing altogether.
I'm currently re-writing the set importer. I'll try to correctly accommodate for BH sets there.
 
The damage calculator is bugged for generation 4 when calculating pursuit damage from technician scizor.

When 'switching out' is selected, the damage for pursuit is actually reduced when scizor has technician, compared to when it has a different ability. The damage on showdown is the correct (higher) damage.
Additionally, the 'switching' message is not displayed in the output of the calculation.


Example: (switching out was selected in both cases)
252+ Atk Choice Band Technician Scizor Pursuit vs. 64 HP / 0 Def Gengar: 326-384 (117.6 - 138.6%) -- guaranteed OHKO
252+ Atk Choice Band Scizor switching boosted Pursuit vs. 64 HP / 0 Def Gengar: 438-516 (158.1 - 186.2%) -- guaranteed OHKO

Relevant Screenshots:
technician.png not technician.png
 
Multi-hit attacks work incorrectly in the "One vs All" and "All vs One" mode in the calculator, returning a much higher damage percentage than expected yet the KO chance is the same as usual. The apparent cause of this bug is that the damage total is multiplied again by the number of hits.
Multi-hit moves still show correct behavior in the "One vs One" and "Random Battles" modes, however.
Below there are some images to showcasing this bug:

1 vs 1 mode:
Breloom vs Cresselia 1v1.PNG


All vs 1 mode:
Breloom vs Cresselia All vs 1.PNG


1 vs 1:
Mamoswine vs Buzzwole 1v1.PNG


1 vs all mode:
Mamoswine vs Buzzwole 1vsAll.PNG

I am surprised nobody else has reported this bug yet. As someone who creates fakemon for fun but tries to balance them somewhat (unlike many fakemon creators), it's specially annoying for me because i use the Damage Calculator to know how well they would perform competitively.

These screenshots were taken from Google Chrome on Windows 10, because this info might be helpful.
(Sorry if this post has any grammar mistakes)
 
Back
Top