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

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

476
Posts
6
Years
  • Age 23
  • 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. :)
 
88
Posts
7
Years
  • Age 34
  • Seen Jan 16, 2020
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:
476
Posts
6
Years
  • Age 23
  • Seen Feb 26, 2020
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?
 
82
Posts
6
Years
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.
 
476
Posts
6
Years
  • Age 23
  • Seen Feb 26, 2020
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*
 

Mr.Pkmn

Ordinary ASM Magician
53
Posts
15
Years
  • Seen Nov 17, 2023
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:
 
476
Posts
6
Years
  • Age 23
  • Seen Feb 26, 2020
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:

Mr.Pkmn

Ordinary ASM Magician
53
Posts
15
Years
  • Seen Nov 17, 2023
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.
 
476
Posts
6
Years
  • Age 23
  • Seen Feb 26, 2020
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?
 

Mr.Pkmn

Ordinary ASM Magician
53
Posts
15
Years
  • Seen Nov 17, 2023
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.
 

Snowka85

literally a ferret
17
Posts
4
Years
  • Age 23
  • Seen Mar 15, 2023
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