Author Topic: [FF7PC 2012]MetaData.xml  (Read 11437 times)

sithlord48

  • No life
  • *
  • Posts: 1520
  • Karma: 33
  • Dark Lord of the Savegame
    • View Profile
    • Blackchocobo
[FF7PC 2012]MetaData.xml
« on: 2012-08-22 02:43:47 »
the new FF7 Pc uses a cloud save feature that keeps you saves synced with the saves on the server. this causes an issue for people who want to edit their save files. while there is a workaround i think we can do better and just edit the control file for this the metadata.xml file.

here would be a good place to discuss how to do it

it looks like this
Quote from: squall8cloud7
Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<gamestatus>
  <savefiles block="1">
    <timestamp slot="1">1344992396295</timestamp>
    <timestamp slot="2"></timestamp>
    <timestamp slot="3"></timestamp>
    <timestamp slot="4"></timestamp>
    <timestamp slot="5"></timestamp>
    <timestamp slot="6"></timestamp>
    <timestamp slot="7"></timestamp>
    <timestamp slot="8"></timestamp>
    <timestamp slot="9"></timestamp>
    <timestamp slot="10"></timestamp>
    <timestamp slot="11"></timestamp>
    <timestamp slot="12"></timestamp>
    <timestamp slot="13"></timestamp>
    <timestamp slot="14"></timestamp>
    <timestamp slot="15"></timestamp>
    <signature>3b8a475ea39ac1ce0b63d6f4b84abbb5</signature>
  </savefiles>
  <savefiles block="2">
    <timestamp slot="1"></timestamp>
    <timestamp slot="2"></timestamp>
    <timestamp slot="3"></timestamp>
    <timestamp slot="4"></timestamp>
    <timestamp slot="5"></timestamp>
    <timestamp slot="6"></timestamp>
    <timestamp slot="7"></timestamp>
    <timestamp slot="8"></timestamp>
    <timestamp slot="9"></timestamp>
    <timestamp slot="10"></timestamp>
    <timestamp slot="11"></timestamp>
    <timestamp slot="12"></timestamp>
    <timestamp slot="13"></timestamp>
    <timestamp slot="14"></timestamp>
    <timestamp slot="15"></timestamp>
    <signature>cc3eee5cb5b1c7a08a776ffdfb6618c9</signature>
  </savefiles>
  <savefiles block="3">
    <timestamp slot="1"></timestamp>
    <timestamp slot="2"></timestamp>
    <timestamp slot="3"></timestamp>
    <timestamp slot="4"></timestamp>
    <timestamp slot="5"></timestamp>
    <timestamp slot="6"></timestamp>
    <timestamp slot="7"></timestamp>
    <timestamp slot="8"></timestamp>
    <timestamp slot="9"></timestamp>
    <timestamp slot="10"></timestamp>
    <timestamp slot="11"></timestamp>
    <timestamp slot="12"></timestamp>
    <timestamp slot="13"></timestamp>
    <timestamp slot="14"></timestamp>
    <timestamp slot="15"></timestamp>
    <signature>cc3eee5cb5b1c7a08a776ffdfb6618c9</signature>
  </savefiles>
  <savefiles block="4">
    <timestamp slot="1"></timestamp>
    <timestamp slot="2"></timestamp>
    <timestamp slot="3"></timestamp>
    <timestamp slot="4"></timestamp>
    <timestamp slot="5"></timestamp>
    <timestamp slot="6"></timestamp>
    <timestamp slot="7"></timestamp>
    <timestamp slot="8"></timestamp>
    <timestamp slot="9"></timestamp>
    <timestamp slot="10"></timestamp>
    <timestamp slot="11"></timestamp>
    <timestamp slot="12"></timestamp>
    <timestamp slot="13"></timestamp>
    <timestamp slot="14"></timestamp>
    <timestamp slot="15"></timestamp>
    <signature>cc3eee5cb5b1c7a08a776ffdfb6618c9</signature>
  </savefiles>
  <savefiles block="5">
    <timestamp slot="1"></timestamp>
    <timestamp slot="2"></timestamp>
    <timestamp slot="3"></timestamp>
    <timestamp slot="4"></timestamp>
    <timestamp slot="5"></timestamp>
    <timestamp slot="6"></timestamp>
    <timestamp slot="7"></timestamp>
    <timestamp slot="8"></timestamp>
    <timestamp slot="9"></timestamp>
    <timestamp slot="10"></timestamp>
    <timestamp slot="11"></timestamp>
    <timestamp slot="12"></timestamp>
    <timestamp slot="13"></timestamp>
    <timestamp slot="14"></timestamp>
    <timestamp slot="15"></timestamp>
    <signature>cc3eee5cb5b1c7a08a776ffdfb6618c9</signature>
  </savefiles>
  <savefiles block="6">
    <timestamp slot="1"></timestamp>
    <timestamp slot="2"></timestamp>
    <timestamp slot="3"></timestamp>
    <timestamp slot="4"></timestamp>
    <timestamp slot="5"></timestamp>
    <timestamp slot="6"></timestamp>
    <timestamp slot="7"></timestamp>
    <timestamp slot="8"></timestamp>
    <timestamp slot="9"></timestamp>
    <timestamp slot="10"></timestamp>
    <timestamp slot="11"></timestamp>
    <timestamp slot="12"></timestamp>
    <timestamp slot="13"></timestamp>
    <timestamp slot="14"></timestamp>
    <timestamp slot="15"></timestamp>
    <signature>cc3eee5cb5b1c7a08a776ffdfb6618c9</signature>
  </savefiles>
  <savefiles block="7">
    <timestamp slot="1"></timestamp>
    <timestamp slot="2"></timestamp>
    <timestamp slot="3"></timestamp>
    <timestamp slot="4"></timestamp>
    <timestamp slot="5"></timestamp>
    <timestamp slot="6"></timestamp>
    <timestamp slot="7"></timestamp>
    <timestamp slot="8"></timestamp>
    <timestamp slot="9"></timestamp>
    <timestamp slot="10"></timestamp>
    <timestamp slot="11"></timestamp>
    <timestamp slot="12"></timestamp>
    <timestamp slot="13"></timestamp>
    <timestamp slot="14"></timestamp>
    <timestamp slot="15"></timestamp>
    <signature>cc3eee5cb5b1c7a08a776ffdfb6618c9</signature>
  </savefiles>
  <savefiles block="8">
    <timestamp slot="1"></timestamp>
    <timestamp slot="2"></timestamp>
    <timestamp slot="3"></timestamp>
    <timestamp slot="4"></timestamp>
    <timestamp slot="5"></timestamp>
    <timestamp slot="6"></timestamp>
    <timestamp slot="7"></timestamp>
    <timestamp slot="8"></timestamp>
    <timestamp slot="9"></timestamp>
    <timestamp slot="10"></timestamp>
    <timestamp slot="11"></timestamp>
    <timestamp slot="12"></timestamp>
    <timestamp slot="13"></timestamp>
    <timestamp slot="14"></timestamp>
    <timestamp slot="15"></timestamp>
    <signature>cc3eee5cb5b1c7a08a776ffdfb6618c9</signature>
  </savefiles>
  <savefiles block="9">
    <timestamp slot="1"></timestamp>
    <timestamp slot="2"></timestamp>
    <timestamp slot="3"></timestamp>
    <timestamp slot="4"></timestamp>
    <timestamp slot="5"></timestamp>
    <timestamp slot="6"></timestamp>
    <timestamp slot="7"></timestamp>
    <timestamp slot="8"></timestamp>
    <timestamp slot="9"></timestamp>
    <timestamp slot="10"></timestamp>
    <timestamp slot="11"></timestamp>
    <timestamp slot="12"></timestamp>
    <timestamp slot="13"></timestamp>
    <timestamp slot="14"></timestamp>
    <timestamp slot="15"></timestamp>
    <signature>cc3eee5cb5b1c7a08a776ffdfb6618c9</signature>
  </savefiles>
  <savefiles block="10">
    <timestamp slot="1"></timestamp>
    <timestamp slot="2"></timestamp>
    <timestamp slot="3"></timestamp>
    <timestamp slot="4"></timestamp>
    <timestamp slot="5"></timestamp>
    <timestamp slot="6"></timestamp>
    <timestamp slot="7"></timestamp>
    <timestamp slot="8"></timestamp>
    <timestamp slot="9"></timestamp>
    <timestamp slot="10"></timestamp>
    <timestamp slot="11"></timestamp>
    <timestamp slot="12"></timestamp>
    <timestamp slot="13"></timestamp>
    <timestamp slot="14"></timestamp>
    <timestamp slot="15"></timestamp>
    <signature>cc3eee5cb5b1c7a08a776ffdfb6618c9</signature>
  </savefiles>
</gamestatus>

now as you can see there are two parts to this first is adding a timestamp to a slot when editing it.. this is the easy part.
and the hard part would be the signature , how is it created (its not an md5sum of the save) it is 128 bit  and while the empty files are not created they do have a signature in the metadata.xml file , i have seen two files each had a different empty signature.  does anyone know how to create this signature?
« Last Edit: 2012-08-22 03:07:51 by sithlord48 »

omega res novae

  • Freak
  • *
  • Posts: 549
  • Karma: 2
  • previously known as squall8cloud7
    • View Profile
    • omegas mods google docs
Re: [FF7PC 2012]MetaData.xml
« Reply #1 on: 2012-08-22 02:55:30 »
quote from squallcloud87 who is that lol. the metadata updates with new information even if offline so wouldnt that mean one of the new files in the rerelease contain a hint?

myst6re

  • Freak
  • *
  • Posts: 515
  • Karma: 58
  • Light King of the Savegame - Field Master
    • View Profile
    • WikiSquare
Re: [FF7PC 2012]MetaData.xml
« Reply #2 on: 2012-08-22 10:22:29 »
This is an extended timestamp, the last three digits are maybe for the microseconds.

sithlord48

  • No life
  • *
  • Posts: 1520
  • Karma: 33
  • Dark Lord of the Savegame
    • View Profile
    • Blackchocobo
Re: [FF7PC 2012]MetaData.xml
« Reply #3 on: 2012-08-22 14:56:47 »
This is an extended timestamp, the last three digits are maybe for the microseconds.
i think they are using something similar to QDateTime::CurrentMSecsSinceEpoch() to make the timestamp.

DLPB

  • No life
  • *
  • Posts: 9635
  • Karma: 320
  • For I realized that God's a young man, too.
    • View Profile
Re: [FF7PC 2012]MetaData.xml
« Reply #4 on: 2012-08-22 15:52:41 »
This is an extended timestamp, the last three digits are maybe for the microseconds.

The time stamp is the number of milliseconds since 1970.  That doesn't help with the hash though.

I would have thought the hash was just some sort of checksum on the actual save files.  One for each save file. 
« Last Edit: 2012-08-22 17:22:16 by DLPB »

Erzfreund

  • Fast newbie
  • *
  • Posts: 26
  • Karma: 1
    • View Profile
Re: [FF7PC 2012]MetaData.xml
« Reply #5 on: 2012-08-22 17:24:33 »
Maybe they are using salt?

What happens if you restore the meta data of a save file like Ā»last time modifiedĀ«, etc.?

bloodygood

  • Fast newbie
  • *
  • Posts: 11
  • Karma: 0
    • View Profile
Re: [FF7PC 2012]MetaData.xml
« Reply #6 on: 2012-08-22 21:21:49 »
*snip*
removed for not being useful to users who updated their client after the pre-release build.
« Last Edit: 2012-08-22 23:42:02 by bloodygood »

DLPB

  • No life
  • *
  • Posts: 9635
  • Karma: 320
  • For I realized that God's a young man, too.
    • View Profile
Re: [FF7PC 2012]MetaData.xml
« Reply #7 on: 2012-08-22 21:23:17 »
sithlord will be pleased ;)

dziugo

  • No life
  • *
  • Posts: 1474
  • Karma: 3
    • View Profile
    • A new copy of FF7 thanks to Salk. Pack (zip/rar/etc) your saved game before sending it to me.
Re: [FF7PC 2012]MetaData.xml
« Reply #8 on: 2012-08-22 22:05:57 »
Incase anyone is still wondering. I have tested this a few times and have had no saves deleted.
First I opened one of the save files I already had unaltered in a hex editor and ran an MD5sum.
Code: [Select]
4FF3FAFCAC649E3DB00751545B4221BBthen I opened up the metadata.xml and looked for that save slot number
Code: [Select]
<signature>4ff3fafcac649e3db00751545b4221bb</signature>starting to look familiar? Apparently all they do is .tolower() the output md5sum of the .ff7 file per save slot. I did not have to adjust the <timestamp> at all when I modified my save file.
Original/Unmodified Files
http://www.mediafire.com/?hvd900ghthvack7
Modified files +gil +all items +1 of each maxed materia (bottom of the list) using Black_Chocobo of course.
http://www.mediafire.com/?6nev03g18ife9y9
Are you using some sort of... *No-CD* patch?

Covarr

  • Covarr-Let
  • Administrator
  • No life
  • *
  • Posts: 4049
  • Karma: 121
  • Just Covarr. No "n".
    • View Profile
Re: [FF7PC 2012]MetaData.xml
« Reply #9 on: 2012-08-22 22:21:21 »
That'd be impressive, considering the 2012 release doesn't even use CDs.

DLPB

  • No life
  • *
  • Posts: 9635
  • Karma: 320
  • For I realized that God's a young man, too.
    • View Profile
Re: [FF7PC 2012]MetaData.xml
« Reply #10 on: 2012-08-22 22:22:17 »
probably means "no securom" etc...

dziugo

  • No life
  • *
  • Posts: 1474
  • Karma: 3
    • View Profile
    • A new copy of FF7 thanks to Salk. Pack (zip/rar/etc) your saved game before sending it to me.
Re: [FF7PC 2012]MetaData.xml
« Reply #11 on: 2012-08-22 22:34:49 »
The metadata.xml is created by the FF7_Launcher, FF7 uses a mutex to synchronize the process. The crypto used is in fact MD5, but it doesn't consist of the saved game only (well, not in my version, and definitely not in squall8cloud7's version). As Erzfreund said, the salt is added to the mix (let's call it UserId, as that's what it most likely is).

The routine starts here:
Code: [Select]
00414540   6A FF            PUSH -1
The reason bloodygood worked it out so easily is because his FF7_Launcher for some reason doesn't append the said Id to the end of the data, thus resulting in clean MD5 of the saved game. Also, empty entries result in empty MD5 hash (d41d8cd98f00b204e9800998ecf8427e). Notice how empty entries from squall8cloud are different? That'd be MD5 of the Id itself (since no save data exists for that slot).

Where is the UserId? Look at the path of the saved game:
C:\Users\{user-name}\Documents\Square Enix\FINAL FANTASY VII\user_123456\save00.ff7
In that case, that would be 123456.

So, append the said UserId at the end of the saved game, and MD5-sum it. Voila!

That'd be impressive, considering the 2012 release doesn't even use CDs.
I probably shouldn't use the word i was about to use, and you're trolling ;p

dziugo

bloodygood

  • Fast newbie
  • *
  • Posts: 11
  • Karma: 0
    • View Profile
Re: [FF7PC 2012]MetaData.xml
« Reply #12 on: 2012-08-22 23:03:18 »
I do run my game in a virtual machine that does not access the internet. Could this perhaps be a reason why it is having no trouble with the files? Since it never has a chance to access the internet the files only save locally and therefore never sync.
I should also mention that I got in on that first day of the early release where you entered your code and it said "error connecting" and if you clicked 'activate' without a key it auto accepted, this might mean it somehow affected the original files.

Where is the UserId? Look at the path of the saved game:
C:\Users\{user-name}\Documents\Square Enix\FINAL FANTASY VII\user_123456\save00.ff7
In that case, that would be 123456.

So, append the said UserId at the end of the saved game, and MD5-sum it. Voila!
I probably shouldn't use the word i was about to use, and you're trolling ;p

dziugo
So the empty slots for everyones files should be their userid? Very interesting, and nice find on how the save files md5 sum properly.
« Last Edit: 2012-08-22 23:22:19 by bloodygood »

omega res novae

  • Freak
  • *
  • Posts: 549
  • Karma: 2
  • previously known as squall8cloud7
    • View Profile
    • omegas mods google docs
Re: [FF7PC 2012]MetaData.xml
« Reply #13 on: 2012-08-22 23:22:55 »
even if you edit a save offline. if the signature isnt right for it then it will still be deleted

bloodygood

  • Fast newbie
  • *
  • Posts: 11
  • Karma: 0
    • View Profile
Re: [FF7PC 2012]MetaData.xml
« Reply #14 on: 2012-08-22 23:27:08 »
even if you edit a save offline. if the signature isnt right for it then it will still be deleted
Sorry, my point was not about whether or not it syncs. I was saying that my files might be the reason I don't have a proper userid. Since I got the first build that was a supposed pre-release according to SquareEnix's PR. and didn't update it.

dziugo

  • No life
  • *
  • Posts: 1474
  • Karma: 3
    • View Profile
    • A new copy of FF7 thanks to Salk. Pack (zip/rar/etc) your saved game before sending it to me.
Re: [FF7PC 2012]MetaData.xml
« Reply #15 on: 2012-08-23 07:44:58 »
Sorry, my point was not about whether or not it syncs. I was saying that my files might be the reason I don't have a proper userid. Since I got the first build that was a supposed pre-release according to SquareEnix's PR. and didn't update it.
Did you get the promised refund and a new version for free? Also, don't scrap that old prerelease version. It might contain precious info.

Files are signed for the release, what's the signing date of the ff7_en.exe and FF7_Launcher? Right click it -> Properties, and somewhere there should be a tab with that info.

dziugo

sithlord48

  • No life
  • *
  • Posts: 1520
  • Karma: 33
  • Dark Lord of the Savegame
    • View Profile
    • Blackchocobo
Re: [FF7PC 2012]MetaData.xml
« Reply #16 on: 2012-08-23 15:25:49 »
The metadata.xml is created by the FF7_Launcher, FF7 uses a mutex to synchronize the process. The crypto used is in fact MD5, but it doesn't consist of the saved game only (well, not in my version, and definitely not in squall8cloud7's version). As Erzfreund said, the salt is added to the mix (let's call it UserId, as that's what it most likely is).

The routine starts here:
Code: [Select]
00414540   6A FF            PUSH -1
The reason bloodygood worked it out so easily is because his FF7_Launcher for some reason doesn't append the said Id to the end of the data, thus resulting in clean MD5 of the saved game. Also, empty entries result in empty MD5 hash (d41d8cd98f00b204e9800998ecf8427e). Notice how empty entries from squall8cloud are different? That'd be MD5 of the Id itself (since no save data exists for that slot).

Where is the UserId? Look at the path of the saved game:
C:\Users\{user-name}\Documents\Square Enix\FINAL FANTASY VII\user_123456\save00.ff7
In that case, that would be 123456.

So, append the said UserId at the end of the saved game, and MD5-sum it. Voila!
I probably shouldn't use the word i was about to use, and you're trolling ;p

dziugo

so it is just a simple md5sum ? and do i need to append just the numbers. if thats the case i should be able to get 1.9.7 writing the file before i release it . only problem is that i can't test since i don't have a working copy. if you can varify this foe me i will provide you with a test copy to see if its working before release.

dziugo

  • No life
  • *
  • Posts: 1474
  • Karma: 3
    • View Profile
    • A new copy of FF7 thanks to Salk. Pack (zip/rar/etc) your saved game before sending it to me.
Re: [FF7PC 2012]MetaData.xml
« Reply #17 on: 2012-08-23 15:40:25 »
The problem is, the save syncing doesn't work for me since I digged into the problem yesterday. Not seeing any other comments about cloud saves not working, so I might have been blacklisted ;p Or everyone is busy modding and don't play anymore ;p

Edit:
But sure, send it!

sithlord48

  • No life
  • *
  • Posts: 1520
  • Karma: 33
  • Dark Lord of the Savegame
    • View Profile
    • Blackchocobo
Re: [FF7PC 2012]MetaData.xml
« Reply #18 on: 2012-08-23 19:07:35 »
if anyone would like to donate their userid's (via pm might be best) it would be very helpful to see how they are made.

AegisKleais

  • Guest
Re: [FF7PC 2012]MetaData.xml
« Reply #19 on: 2012-09-08 00:33:06 »
Hey guys, I was hoping someone could expound on this, cause I'd really like to play Black Chocobo-modified saves with this remake.

So I started a new game, saved into SAVEGAME00 (Slot1) and saved in each game slot.  So a file save00.ff7 is there.  I opened my metadata.xml file and saw the 3 timestamp entries using Epoch time as well as the signature.

In the Save Slots 2-10 area of the file, I noticed that the <signature> tags had a hashed value of my customer ID, but no entries in the <timestap> nodes.

So, I followed the steps here http://na.square-enix.com/go/thread/view/139235/29336877/Here_is_how_to_completely_disable_remote_sync to Disable Cloud Save Syncing, but it seems even before you press PLAY, the launcher does an evaluation on the data, and if things aren't right, it deletes the .ff7 file and resets the metadata.xml to blank.

I used http://md5sum.it to generate the checksum value of my .FF7 files.

So basically, I do this:

1. Create a new game and save, creating base save00.ff7 file.  Exit out of game.
2. Open Black Chocobo, opening the save00.ff7 file in Step 1 and modifying it to the stats I want.
3. At this point I'm confused whether I can just press CTRL+S to save the file or if I have to do an EXPORT > PC SAVE and replace it.  For now I do the former.
4. I now use the md5sum.it site on the updated/modified .ff7 file and put that number into the metadata.xml <signature> line.
5. Upon starting up FF7, I note that the .ff7 file disappears, (and the .xml gets modified)  Sure enough I enter the game and there is no CONTINUE OPTION (because the file is gone)

So obviously, I'm messing up on the checksum process.  Can someone explain what I'm doing wrong?

sithlord48

  • No life
  • *
  • Posts: 1520
  • Karma: 33
  • Dark Lord of the Savegame
    • View Profile
    • Blackchocobo
Re: [FF7PC 2012]MetaData.xml
« Reply #20 on: 2012-09-08 01:06:46 »
you can try the Black chocobo 1.9.7 pre release we have out for testing.. http://forums.qhimm.com/index.php?topic=9625.msg189736#msg189736   it has support for updating the metadata.xml file

AegisKleais

  • Guest
Re: [FF7PC 2012]MetaData.xml
« Reply #21 on: 2012-09-08 02:41:45 »
Hey!  Worked PERFECTLY!!!  That's some smoov code you got there! :)

sithlord48

  • No life
  • *
  • Posts: 1520
  • Karma: 33
  • Dark Lord of the Savegame
    • View Profile
    • Blackchocobo
Re: [FF7PC 2012]MetaData.xml
« Reply #22 on: 2012-09-08 03:21:04 »
Hey!  Worked PERFECTLY!!!  That's some smoov code you got there! :)

very good just check back since 1.9.7 will be out and will most likley contain fixes and maybe a feature or two not in the preview release.