kwsch / pkNX

Pokémon (Nintendo Switch) ROM Editor & Randomizer
https://projectpokemon.org/home/forums/topic/48647-pknx-nintendo-switch-rom-editor-randomizer/
GNU General Public License v3.0
338 stars 106 forks source link

Leveling Up Pokémon With Edited Stats Causes Them To Bug Out (Sword/Shield) #350

Closed RuinousPrincess closed 3 months ago

RuinousPrincess commented 8 months ago

I decided to edit the stats of Pokémon I use, but for some reason if you level them up to level 100 their stats have a +- sign then end up at 6 (any low number tbh). Like Falinks, I got 255 in HP, Sp.ATK and SPD, but going to lvl to 90-100 reverts the Sp.ATK to 6. This seriously happens with every Pokémon I use, so it seems like the game or PKNX can't handle to type of stats due to probably calculation issues with them being over 600 at that level. I even tried a Hatenna, her Special Attack went right to 0, didn't even change to a 6. All I done was use rare candies and tested it, it bugs out on any Pokémon with maxed/hacked IVs/EVs

And I found out what is actually causing it. It's due to EVs of a Pokémon being 252, and then leveling them up past 90-100 causes their stats to completely glitch out. Removing the EVs by using PKhax on whatever stat was edited in PKNX to 255 will work, but for some reason Speed isn't affected at all, leaving ATK and Special Attack being the only ones I notice to be revert to low numbers if maxed EVs are used. I'm not sure if any number below 252 will glitch it out since I haven't gotten that far in Sword to notice, but it's very clearly related to EVs period causing this odd behavior. I really hope it can be fixed, if possible.

Desktop Screenshot 2023 10 11 - 00 16 00 20 Desktop Screenshot 2023 10 11 - 00 16 09 01

duckdoom4 commented 8 months ago

That's because the stats are a byte value. It has a possible range from 0 to 255. Anything higher than 255 and it will loop back to 0.

Nothing we can do about this, that's hard coded in the game. Just don't put them so high