View Full Version : File corruption issue due to saving.
May 9th, 2009, 08:10 PM
So now I'm having issues with making the edits show up.
I tried editing a pokemon, but when I loaded the game it said save file was corrupted, loading previous file.
So it loads the previous files and my edits aren't there.
How do I remedy this?
Also, when I dump the .sav onto pokesav, sav reads it as if the changes have gone through(meaning I can see the edits I have made on pokesav, even though they haven't been recognized by the game because of the file corruption alert.)
May 10th, 2009, 07:27 AM
Allow me to explain.
A Pokémon DS save file (http://projectpokemon.org/wiki/Pok%C3%A9mon_DP_Save_File_Structure) is broken up into two halves. Each half is further broken into three blocks.
The first block is a general block, containing info about the trainer, events completed, party Pokémon, and more. The second block contains all of the information regarding the PC storage system (and the Pokémon stored therein). The third block contains info about the hall of fame entries (after you beat the Pokémon League).
That's one half of the save file. The other half is a backup... essentially, when you save your game, the backup information is overwritten with the current information, and what was current now becomes the backup. (It's actually more complicated than that though... see the article for more details (http://projectpokemon.org/wiki/Pok%C3%A9mon_DP_Save_File_Structure#Loading.2FSavi ng_A_Save_File).)
Each individual block also has its own checksum, to prevent editors from easily changing data. You must recalculate and edit the checksum before the game will recognize your data as not corrupt.
Pokésav was coded in a very lazy manner, as it only edits the "current" blocks of data, and not the backup blocks. It doesn't save the data back to the file in the same manner as the game does, and it doesn't verify checksums. Therefore, it is always looking at the "current" (but potentially corrupt) blocks of data.
Incidentally, how did you make your initial edits? Using a hex editor? Or using Pokésav all along?
Powered by vBulletin™ Version 4.0.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.