• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

[Other] Removing EVs and IVs from stat calculations?

  • 7
    Posts
    8
    Years
    • Seen Feb 10, 2025
    In the interest of simplicity, I wanted to remove EVs and IVs from the calculation of every Pokémon's stats so that they're only determined by their base stats, nature, and level.

    The fix seemed simple enough as I went into src/pokemon.c and changed the lines:
    Code:
    #define CALC_STAT(base, iv, ev, statIndex, field)
    {
        u8 baseStat = gSpeciesInfo[species].base;
        s32 n = (((2 * baseStat + iv + ev / 4) * level) / 100) + 5;
    to:
    Code:
    #define CALC_STAT(base, statIndex, field)
    {
        u8 baseStat = gSpeciesInfo[species].base;
        s32 n = (((baseStat / 2) * level) / 100) + 5;
    The problem is that when I look at a Pokémon with perfect IVs vs a Pokémon with no IVs in their summary screens, there is still a difference in the stats. Where else should I be looking? Thanks in advance.
     
    In the interest of simplicity, I wanted to remove EVs and IVs from the calculation of every Pokémon's stats so that they're only determined by their base stats, nature, and level.

    The fix seemed simple enough as I went into src/pokemon.c and changed the lines:
    Code:
    #define CALC_STAT(base, iv, ev, statIndex, field)
    {
        u8 baseStat = gSpeciesInfo[species].base;
        s32 n = (((2 * baseStat + iv + ev / 4) * level) / 100) + 5;
    to:
    Code:
    #define CALC_STAT(base, statIndex, field)
    {
        u8 baseStat = gSpeciesInfo[species].base;
        s32 n = (((baseStat / 2) * level) / 100) + 5;
    The problem is that when I look at a Pokémon with perfect IVs vs a Pokémon with no IVs in their summary screens, there is still a difference in the stats. Where else should I be looking? Thanks in advance.
    The modification looks correct to me.
    Did you remember to run CalculateMonStats on your party after performing the change?
    If you're using an existing savefile, that's a must.
     
    The modification looks correct to me.
    Did you remember to run CalculateMonStats on your party after performing the change?
    If you're using an existing savefile, that's a must.

    Thank you very much!
     
    Last edited:
    Back
    Top