• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Question] What's the actual formula for Pokemon stats?

  • 4
    Posts
    7
    Years
    • Seen Feb 9, 2023
    I'm making a Pokemon game in Java and am just finishing up the original 151, but I can't figure out the stat formula.

    I assumed the "Gen III and onward" formula on the Statistics page of Bulbapedia would work, but it doesn't.

    For testing purposes I set all their base stats and made them level 50 by default since that's what I'm most used to comparing stats by (ORAS online battles).
    But their stats are just...wrong.

    Here's an example of what I mean. Everything is correct in the printout except the level 50 stats:
    Code:
    #25 - Pikachu @ Lv.50 [Electric/Electric] 
          Base Stats: [[35,55,40,50,50,90]]
          Current Stats: [[60,6,6,6,6,7]]
          Egg: Pikachu - Evolves into Raichu with Thunder Stone.
    #26 - Raichu @ Lv.50 [Electric/Electric] 
          Base Stats: [[60,90,55,90,80,110]]
          Current Stats: [[61,7,6,6,6,7]]
          Egg: Pikachu - Doesn't evolve.

    See how Current Stats is wayy off? I don't think I messed the equation up...
    Code:
    HP:		i = ((2 * hp + ivs[statId] + (evs[statId] / 4) * level) / 100) + level + 10;
    Other stats:	i = ((2 * stat + ivs[statId] + (evs[statId] / 4) * level) / 100) + 5;
     
  • 1,403
    Posts
    10
    Years
    • Seen Apr 29, 2024
    Surely you must have messed up the math somewhere?

    You can work through Pikachu by hand and even with 0 IVs and EVs you get something bigger, for example attack:
    2 * base + IV + EV / 4 * level / 100 + 5
    = 2 * 55 + 0 + 0/4 * 50/100 + 5
    = 110 / 2 + 5
    = 60

    Your answer of 6 looks to me like you've missed off the multiplication by level, and so 110 / 100 is truncated to 1, 1 + 5 = 6?

    EDIT: Sorry, I found the mistake (my math is obviously wrong too).

    i = ((2 * stat + ivs[statId] + (evs[statId] / 4) * level) / 100) + 5;

    You want an extra pair of parens:

    i = (((2 * stat + ivs[statId] + (evs[statId] / 4)) * level) / 100) + 5;

    Otherwise with 0 EVs you'll multiply the level by zero and lose that whole thing.
     
    Last edited:
    Back
    Top