Author Topic: basic savegame format FFVII (FF7) PC  (Read 3827 times)

Demarest

  • *
  • Posts: 39
    • View Profile
basic savegame format FFVII (FF7) PC
« on: 2007-04-13 14:09:32 »
My goal: Make my Chocobuckle do 2222 damage in FFVIIPC.

Method: Certainly not fleeing from battle 2222 times ;) I chose to use a hex editor.

Issue: Save edited cannot be loaded. FFVII says "Data is ruined." Other Games within Save 2 still load okay.

Method: Take a save where I had not yet fled from any battle (Save 2 Game 07, verified by the casting of a zero point Chocobuckle), save it to a "to be altered" slot (Save 2 Game 08), flee 10 times, save into a fresh slot (Save 2 Game 09), open in hex editor, get a feel for general format, isolate Game sections, scan for #0A and go from there.

If I missed a simple savegame editing howto/FAQ, by all means point the way.

Through process of elimination, I was able to determine that in save01.ff7, offset #8273 was a WORD containing times fled from battle for Game 08. Altering that to 2222 (#08AE, appears as AE 08 in Winhex) corrupts the file.

I compared the blocks that were the Game sections (with padding on either side since I've not tried to determine where the actual files begin and end). There were some variances towards the beginning and end, which I presumed to be header or footer info changing. While in my initial testing, I ran 10 times, this comparison was based on a pair of test files where the actual flees were 0 and 1. And in that time of fleeing, I was fortunate to escape before being struck, so things such as HP totals, limit levels, etc should be identical. All that should be different is game time and overworld position. I discount the discrepencies in the blocks towards the beginning and end as being exactly these variances.

The only other difference I noticed was the WORD just before the WORD that stored battles fled from. It too had gone up by exactly one. Total battles? I'm skeptical as I highly doubt that a WORD (even unsigned) would be used to denote total battles in a game where a person could easily fight more than 65k times. Nevertheless, while trying to make total battles fled from 2222, I incremented (what I presume to be) total battles fought by 2222 as well. Still, the file comes up as if it is ruined.

So I was wondering what I am missing. Does the file have a checksum of sorts? How does the game know that the save is different from when it wrote it to when it reads it?

For what it's worth, I'm both proficient and accomplished using WinHex and (I hope) smart enough to not have the game running while making the alterations (despite it being possible that doing so would be harmless) and other such basics. Nevertheless, if you feel it's something simple I may have overlooked, ask away. I hope somebody has an answer because I REALLY don't want to have to flee 2222 times and I've dedicated this quest to lucky 7's hunting ;)

dziugo

  • *
  • Posts: 1470
    • View Profile
    • A new copy of FF7 thanks to Salk. Pack (zip/rar/etc) your saved game before sending it to me.
Re: basic savegame format FFVII (FF7) PC
« Reply #1 on: 2007-04-13 14:23:41 »
Use this to recalculate the checksum, and this if the offset you found wasn't the one you were looking for (which i highly doubt :P).

Demarest

  • *
  • Posts: 39
    • View Profile
Re: basic savegame format FFVII (FF7) PC
« Reply #2 on: 2007-04-13 15:12:58 »
THANK YOU!

Thank you for writing that code.

Thank you for providing the source for it.

Thank you for linking me to that wiki.

Thank you for the speed of your reply.

Now write a program that considers the average time waiting for an encounter in the Grasslands Area and the average time to evade such a battle. Multiply that by 2222 and that's how much time you've saved me and the measure of my gratitude 8-) (In other words, it worked. I had the right offset. Just needed the checksum modified.)

« Last Edit: 2007-04-13 15:23:50 by Demarest »