• Hi all. We have had reports of member's signatures being edited to include malicious content. You can rest assured this wasn't done by staff and we can find no indication that the forums themselves have been compromised.

    However, remember to keep your passwords secure. If you use similar logins on multiple sites, people and even bots may be able to access your account.

    We always recommend using unique passwords and enable two-factor authentication if possible. Make sure you are secure.
  • Be sure to join the discussion on our discord at: Discord.gg/serebii
  • If you're still waiting for the e-mail, be sure to check your junk/spam e-mail folders

Game Mechanics Issues

Sevans

Battle Subway Boss
Hey everyone on Serebii.
Because I lost power the other day, I decided to look and see if there was any way I could make an IV calculator not connected to the internet. I know I could download it, but I was able to make one on excel anyways. I found a correction to the problem of the inaccuracy of the IV formula shown.
My way involves two equations, one for the lowest possible IV and one for the highest. Disregard any minimum answers you get that are lower than 0 (they should be set equal to 0), and any maximums greater than 31 should be treated as 31.

For HP, the minimum equation is IV = MathCeiling(((100/Level)*(Stat-10-Level))-2*Base-MathFloor(EV/4))
The maximum is IV = MathFloor(((100/Level)*(Stat-9-Level))-2*Base-MathFloor(EV/4))

And for a stat other than HP, the minimum IV = MathCeiling((100/Level)*(MathCeiling(Stat/Nature)-5)-2*Base-MathFloor(EV/4))
Ant the maximum IV = MathFloor(((100/Level)*(((Stat+1)/Nature)-5))-2*Base-MathFloor(EV/4))

I tested my formulas and the used the IV calculator on Serebii and both provided the same range of values in multiple tests.

The only problem with the two maximum equations is that at level 100, the equation will usually produce a maximum IV of 1 higher than it should be. to fix this and get the more accurate formula, they should say this;

for HP: IV = MathFloor(((100/Level)*(Stat+.999999999999999999999999999-10-Level))-2*Base-MathFloor(EV/4))

for another stat: IV = MathFloor(((100/Level)*((Ceiling(Stat+.9999999999999999999999999)/Nature)-5))-2*Base-MathFloor(EV/4))

I hope this can be fixed.
 
Last edited:

Sevans

Battle Subway Boss
Here’s an explanation of my ideas (preceded by a background):
As you may or may not know, everything in the game has a formula that affects it. How you get your Pokémon, how their stats are raised, how much damage they do, etc. Individual Values, or IVs are a little harder to calculate.
These values cannot be viewed in the game, although we can determine them from their effects on the stats. An IV is a number 0-31, there is one per stat, and at level 100 with a neutral nature, an IV increases the stat by exactly the same amount as the IV. Meaning that at level 100 if your Pokémon has an IV of 31, it will be 31 points higher than if it had an IV of 0, if it had the same EVs. There are a few ways to influence IVs, but for the most part they are calculated at random, with an equal chance for any IV, whenever you catch the Pokémon.

So, if you plan to “be the best” then a 31-point increase to your stat should seem very important. Meaning, you will probably want to know the Pokémon’s IVs BEFORE you start training it, so you can get another Pokémon if the IVs of the one you have are disappointing. Because of this, you will want an IV calculator. Serebii has one under game mechanics, and it works great.

However, also in game mechanics, a formula for IVs is shown:
IV = ((Ceiling(Stat / Nature) - 5) * 100 / Level Value) - 2 * Base Stat –Floor(Effort Points / 4)
And another one for HP because the HP stat has a different formula:
Hit Point IV = ((Stat – Level Value - 10) * 100 / Level Value ) - 2 * BaseStat – Math.Floor(EV / 4)

“Floor” and “Ceiling” may seem foreign to you, but they’re pretty simple.
Floor means to round the number down. So, Floor(6.7)=6.
Ceiling, as you may have guessed, means round up. So, Ceiling(6.1)=7.

These formulas, as Serebii has mentioned, are inaccurate. I found a way to make them more accurate. Here is why they are inaccurate (in a spoiler because I am sure that not everyone cares about the math behind it;

This is the formula for a stat (other than HP)
Stat=(((IV+2*Base+ Floor(EV/4))*Level/100)+5)*Nature
However, because the game always rounds stats down, the real formula is this;
Stat= Floor((((IV+2*Base+ Floor(EV/4))*Level/100)+5)*Nature)

So, how did Serebii get its formula? Well if you took algebra, you should be able to guess, but here it is:

Stat=Floor((((IV+2*Base+Floor(EV/4))*Level/100)+5)*Nature)
Do the inverse of Floor, which seems to be ceiling

Ceiling(Stat)=(((IV+2*Base+Floor(EV/4))*Level/100)+5)*Nature
Divide by Nature

Ceiling(Stat/Nature)=((IV+2*Base+Floor(EV/4))*Level/100)+5
Subtract 5

Ceiling(Stat/Nature)-5=(IV+2*Base+Floor(EV/4))*Level/100
Multiply by 100/Level (which is the same as dividing by Level/100)

(Ceiling(Stat/Nature)-5)*100/Level=IV+2*Base+Floor(EV/4)
Subtract 2*Base, and Subtract Floor(EV/4)

(Ceiling(Stat/Nature)-5)*100/Level)-2*Base-Floor(EV/4)=IV

Also, to get the HP formula, you can follow the same general process. Here is the HP formula for anyone who cares:
Stat=Floor(((IV+2*Base+Floor(EV/4))*Level/100)+10+Level)

^These are Serebii’s formulas, and it seems like the math is pretty accurate, right?
Wrong.
Here is where logic comes into play. Why would the IV Calculators on the internet show a range of answers if these formulas shows that only one works? It is because more than one works, and this formula is incorrect.
Floor and Ceiling don’t actually do anything mathematical, they just truncate, or change, the number. Because of this, multiple answers are possible. If an IV of 0 gets a stat of 6.1 at level 1, then your game will show you the same thing as if you had an IV of 31 that gets a stat of 6.8 at level 1. Because they both round down.

To legitimately undo the operation Floor, it is necessary to provide 2 equations to show the range of values, a minimum and a maximum.

Through experimenting (but mostly logic), I found that these are the accurate formulas;
Ceiling((Ceiling(Stat/Nature)-5)*100/Level)-2*Base-Floor(EV/4))=Minimum IV
Floor((Ceiling(Stat+.999999999999999/Nature)-5)*100/Level)-2*Base-Floor(EV/4))=IV

Figuratively speaking, the .9999… should continue on forever, but I figure that 15 nines provides accurate enough results.

And for HP;
Ceiling(((Stat-10-Level)*100/Level)-2*Base-Floor(EV/4))=Minimum IV
Floor(((Stat-10+.999999999999999-Level)*100/Level)-2*Base-Floor(EV/4))=Maximum IV

My reasons for these formulas are in another spoiler...

This may be a little hard to understand...
I will be using the following as an example, as this is hard to explain without one.
A Pokémon has the base HP of 100
It’s level 11
It’s HP stat is 45.
(And yes, this is a legitimate stat combination, you can check with Serebii’s IV calculator if you want and it will not give you an error.)
Using Serebii’s IV Formula, I got that this Pokémon has an HP IV of 18.181818, etc, so approximately 18. For those of you that plugged my example in to Serebii’s IV calculator, you will see that 18 IS NOT A POSSIBILITY!!! So the formula is definitely off. However, if you look at my formula for the minimum HP, the only difference is that I used the Ceiling of 18.181818… And, what do you know, that gets an answer of 19! Which is a possibility in this case. If you plugged the info into the calculator correctly, it should also be the lowest value possible.
So where does the .999999… come from in my formula? Well, in removing Floor, you are making it so that the answer is not rounded down. In the most extreme case possible, you are providing a potential difference of just under 1.
(For example; Floor(6.0)=6, and Floor(6.99999999999999…)=6 as well)
Because it is being rounded down, by adding 1 (or .999999999999…) you show the MAXIMUM result possible. The .99999999… goes where it is because the Stat is the number that may vary by up to .99999999999999…. Using my formula;

Floor(((Stat-10+.999999999999999-Level)*100/Level)-2*Base-Floor(EV/4))=Maximum IV
Floor(((45-10+.999999999999999-11)*100/11)-2*100-Floor(0/4))=Maximum IV
Floor(((24.9999999999999)*100/11)-200)=Maximum IV
Floor((227.2727272727)-200)=Maximum IV
Floor(27.27272727)=Maximum IV
27=Maximum IV

I got 27. The same as on the IV calculator.

My changes to the formula for other stats can be explained in pretty much the same way, and you can test them if you want. (but who is motivated enough to do that ;))

I would like to see Serebii add in my formulas which provide a completely accurate way to calculate IVs (if a calculator isn’t available)
 
Top