• 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.

[Other] [pokeemerald] Completely remade how stats work but I still have an issue

McPaul

On my way to become a controversial and hated memb
  • 288
    Posts
    6
    Years
    Hello!

    I completely reworked the balance in my game and so the stats system is completely remade too. But I have one last issue in my refont.

    I need vitamins to raise EV up to 320. I modified #define EV_ITEM_RAISE_LIMIT 320 in Include\constants\pokemon.h but the problem is I think that now that EV are more than 255 the game doesn't accept that fact and as soon as they go past FF they reset to 0. I tried to change a few parameters but I still get that issue.

    Has someone already tried to do that?

    Thanks for your answer! I will update this thread if I find something myself.
     

    McPaul

    On my way to become a controversial and hated memb
  • 288
    Posts
    6
    Years
    I'm trying a new formula, which calculates the Pokémon's remaining levels until level 100 and the remaining EVs until 252 in a particular stat so that stat in question grows naturally from 0 to 255 until level 100.

    I've tried evIncrease = gnextLevel[(MAX_LEVEL - MON_DATA_LEVEL) / (MAX_PER_STAT_EVS - evs[i])] * multiplier; but it gets me errors. I'll try something else.
     
  • 118
    Posts
    4
    Years
    I'm not entirely sure on this, but I would assume that it has something to do with the variable they're stored in. If the variable only goes from 0 (00000000 in hex) to 255 (11111111 in hex), then no matter what limit is set, the variable will just overflow. Maybe see if you can find the variable that stores a pokemon's EVs and see if you can change the variable type. Just an idea.
     
  • 4
    Posts
    3
    Years
    • Seen Mar 11, 2021
    Did you change the struct for BoxPokemon in include/pokemon.h to have EVs as more than a single byte? Note that simply changing it from u8 to u16 will increase the size of every BoxPokemon in the game causing all sorts of problems, so you should rearrange the struct to save bytes. After this, you're also going to have to look at every reference in the src folder and make sure variables interacting with EVs are at least u16 (they are probably u8 everywhere).

    Do you need literally every point of the 320? I would strongly consider changing the max to 160 and doubling the effect of each EV.
     

    McPaul

    On my way to become a controversial and hated memb
  • 288
    Posts
    6
    Years
    Hello! Thanks for your answers!

    I wanted to make a system similar to GSC where stats grow a more balanced way, until every stat is maxed out. But not too early (even if Pokémon give only one EV in each stat your Pokémon will have max stats already before level 50, I'd prefer around 80's or 90's). Maybe there's another way with still 255 EV?
     
    Back
    Top