FlagBrew / PKSM

Gen I to GenVIII save manager.
GNU General Public License v3.0
1.71k stars 173 forks source link

Bug Report - Geolocation and encounter data being mangled during transfers (gen 6) #1476

Open DrasticGray opened 1 month ago

DrasticGray commented 1 month ago

Describe the bug PKSM Is mangling the data of pokemon transferred between copies of omega ruby and alpha sapphire. I have wiped pksm's extdata completely to fix any potential bad settings. Every time a pokemon is placed on the destination game it has an extra entry in the geolocation data for japan with no subregion. It also apparently does something to the encounter data.

To Reproduce Steps to reproduce the behavior: Load a save of pokemon omega ruby, move a pokemon into the storage, save the storage, save the changes to game data. Load a save of pokemon alpha sapphire from the same ds, move the pokemon into the game's boxes, save everything again. Open the data in PKHeX, the pokemon will be illegal with the following errors:

Invalid: Encounter Type does not match encounter. Invalid: GeoLocation Memory: Gap/Blank present.

Expected behavior Moving pokemon into the storage makes no change, pulling pokemon back down to game adjusts data for handler and geolocation to match the target save data.

Screenshots image

If necessary to nail down the issue I can upload a couple of .pk6 files of affected pokemon.

Information about your environment

DrasticGray commented 1 month ago

Just to add, it appears that the geolocation data is being written by PKSM in reverse order as well. new data is appended to the list instead of bumping things down.