• 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!
  • It's time to vote for your favorite Pokémon Battle Revolution protagonist in our new weekly protagonist poll! Click here to cast your vote and let us know which PBR protagonist you like most.
  • 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.

[ASM & Hex] (Concept) Changing the cap on EVs and IVs.

  • 476
    Posts
    7
    Years
    • Seen Feb 26, 2020
    In short, I want to know if its possible to make the cap on EVs and IVs higher. I'd like to shoot for removing the 510 limit completely (can have up to 255 in each stat despite the fact that the 3 over 252 doesn't do anything bc you need 4 EVs to increase the stat lol) and I want IVs to go up to 63 instead of 31. I'd prefer to be able to do this with a few hex edits but if ASM is required then it would still be good to mention that so this thread can remain useful for others that want to do the same. :)
     
    That one answer isn't very helpful lmao
     
    That one answer isn't very helpful lmao

    EVs are stored as single bytes, so increasing beyond 0xFF (255) will require altering the pokemon data structure and every function that loads relevant data from it.

    Similarly, IVs are stored as bits, so increasing beyond 31 would require re-structuring the data structures and related functions.
     
    Last edited:
    EVs are stored as single bytes, so increasing beyond 0xFF (255) will require altering the pokemon data structure and every function that loads relevant data from it.

    Similarly, IVs are stored as bits, so increasing beyond 31 would require re-structuring the data structures and related functions.

    Ok, then what about increasing the cap on total IVs? ie, more than 510 total?
     
    Similarly, IVs are stored as bits, so increasing beyond 31 would require re-structuring the data structures and related functions.

    Tldr, raising the cap to either ev's or iv's would require major asm. Either rewriting the whole routine or hooking in and making your own. There is a routine that lowers evs, I'm sure that can be modified easily to lower even more but not raise.
     
    Tldr, raising the cap to either ev's or iv's would require major asm. Either rewriting the whole routine or hooking in and making your own. There is a routine that lowers evs, I'm sure that can be modified easily to lower even more but not raise.

    That seems like really unintuitive coding. You'd think they'd literally just have it hardcoded with "510" just *in the code*
     
    That seems like really unintuitive coding. You'd think they'd literally just have it hardcoded with "510" just *in the code*

    Of course they did as you said. The label MAX_TOTAL_EVS holds the value 510, which can be easily changed.

    However I suggest you to take another approach: change IVs and EVs by changing the formula for calculating pokemon stats. If you want more EVs, just make them increase stats for every 2 points instead of 4.

    You don't have to change the structure, just how the value is used by the game! :laugh-squinted:
     
    just make them increase stats for every 2 points instead of 4.

    You don't have to change the structure, just how the value is used by the game! :laugh-squinted:

    I feel like an idiot for not thinking of that sooner >_<

    So...how would I do that? I definitely should have mentioned I'm on FireRed, not Emerald.
     
    Last edited:
    Change with an hex editor the byte from 80 to 40 at following offsets:

    0x03E582 hp
    0x03E5CE atk
    0x03E614 def
    0x03E65A spd
    0x03E6A0 satk
    0x03E6E6 sdef

    This changes the EV division from 4 to 2.

    Nice! In theory, could I make those bytes 20, to make each 1 EV increase the stat by 1, or change it to 10, to make 1EV=2stats, or even 5, to make 1 EV=4, etc?
     
    Nice! In theory, could I make those bytes 20, to make each 1 EV increase the stat by 1, or change it to 10, to make 1EV=2stats, or even 5, to make 1 EV=4, etc?
    Unfortunately no, it would require to change the instruction with different bytes.
     
    Change with an hex editor the byte from 80 to 40 at following offsets:

    0x03E582 hp
    0x03E5CE atk
    0x03E614 def
    0x03E65A spd
    0x03E6A0 satk
    0x03E6E6 sdef

    This changes the EV division from 4 to 2.

    What would the offsets for these be in Emerald? Also, how would I remove the 510 cap in that game?
     
    Back
    Top