pokemario0411 Posted October 9 Posted October 9 Hello, I tried opening my Japanese Crystal save as I've done many times before without issue, but this time instead of opening my save its showing a corrupted US save with the name "JUI" and a bunch of random illegal Pokemon in a box of only 20 slots. My old saves still open just fine, but any saves I backup now open as this. I backed up the save using a GB operator and never had this issue before, and the save still plays normally on my cartridge and on any emulator. I don't have any other way of backing up GB games so I'm stumped trying to find a fix. Any idea if it's a save file issue or a PKHex issue?
Kaphotics Posted October 9 Posted October 9 File type detection briefly inspects the data to guess what game/language it belongs to. Seems it passed the English Crystal heuristic and was therefore assumed as such. Does this still happen if you save in a different map, after changing boxes to another box in game? If that isn't a valid workaround, I can possibly add a branch of code where if it passes both, then it checks the checksums too, but that would be a compromise that impacts manually edited files to no longer being recognizable (if they also end up clashing) hence maybe needing a more detailed detection heuristic.
Soul DS Posted October 9 Posted October 9 Quote If that isn't a valid workaround, I can possibly add a branch of code where if it passes both, then it checks the checksums too, but that would be a compromise that impacts manually edited files to no longer being recognizable (if they also end up clashing) hence maybe needing a more detailed detection heuristic. A bit off-topic but I was wondering, seeing this post and the Black save file being recognised as an HeartGold save file from a few weeks ago in another post, but why isn't there a manual game selection option in PkHex for such cases? Bugs if incorrect types were to be selected/not easily accessible for users? (in addition to ultimately not solving the heuristic issue?)
pokemario0411 Posted October 9 Author Posted October 9 1 hour ago, Kaphotics said: File type detection briefly inspects the data to guess what game/language it belongs to. Seems it passed the English Crystal heuristic and was therefore assumed as such. Does this still happen if you save in a different map, after changing boxes to another box in game? If that isn't a valid workaround, I can possibly add a branch of code where if it passes both, then it checks the checksums too, but that would be a compromise that impacts manually edited files to no longer being recognizable (if they also end up clashing) hence maybe needing a more detailed detection heuristic. Changing the map didn't work but changing the box worked! Might happen again though so a permanent fix would be appreciated. Thanks for your work as always.
Kaphotics Posted October 9 Posted October 9 28 minutes ago, Soul DS said: A bit off-topic but I was wondering, seeing this post and the Black save file being recognised as an HeartGold save file from a few weeks ago in another post, but why isn't there a manual game selection option in PkHex for such cases? Bugs if incorrect types were to be selected/not easily accessible for users? (in addition to ultimately not solving the heuristic issue?) The double-game savefile issue is moreso an emulator issue, as it will never happen on actual hardware. The currently implemented heuristics have been "good enough" for years... I did recently rewrite the save detection logic a couple months ago to have a spot where it can be manually overridden: PKHeX/PKHeX.Core/Saves/Util/SaveUtil.cs at master · kwsch/PKHeX With a new game releasing in a week, I can try to fit in something. Maybe something like "hold alt when opening a file; if a save is what you loaded, it will open an override UI where you can change the detected type => load". 1
Soul DS Posted October 9 Posted October 9 Quote The double-game savefile issue is moreso an emulator issue, as it will never happen on actual hardware. Wouldn't have fully suspected that, as I would have more expected the save file being "altered" this way leading to the game itself consider it as corrupted, the more you know. Quote The currently implemented heuristics have been "good enough" for years... That's a bit the thing with heuristics, especially in Pokémon where games are made out of a bunch of unique game data varying by save file, it's hard to narrow down elements so that's not that surprising. Quote Maybe something like "hold alt when opening a file; if a save is what you loaded, it will open an override UI where you can change the detected type => load". As long as the command to access it either makes sense or is explained in advance (can be checked by users without discovering the comment on a forum post), it could work.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now