It seems all the "Devs" on this site don't know much about the format of GPD Files,
You cant treat them like static saves.
(You should also stop treating STFS files like the base block is always the same, it rarely is)
The GPD(XDBF) format is the best documented and easiest Xbox format to handle.
It is made up of 3 sections:
The header,
The tables(2 tables),
And the raw binary data.
I'm not going to write out the format, as
free60 has it almost completely correct.
But I'm going to tell you stop to stop treating them like static files, show you how to handle them, and give you some basic code, for reading the tables and returning the offsets.
Games have only have direct access to the setting records, they can have a number of settings, but only upto 3 worth modding,
1676165119(0x63E83FFF)
1676165118(0x63E83FFE)
1676165117(0x63E83FFD)
They are the binary settings, they don't have to exist, and they cant be over 1024 bytes, but the first 24 bytes are not used by the game.
You can view this quick XDBF class that I made for 360 haven on
git hub,
Its just a lite class to read and get offsets for records,
init and reads the header and tables,
Code:
XboxClasses.XDBF.XDBF XDBF = new XboxClasses.XDBF.XDBF("C:\\Path\\To\\File\\.gpd");
Two exceptions
XboxClasses.XDBF.Exceptions.InvalidFileMagic - The file isn't valid, Its not a gpd
XboxClasses.XDBF.Exceptions.InvalidVersion - The gpd version is incorrect, the only public version is 65536
Get the setting offset
Code:
XDBF.IO.Postion = XDBF.GetSettingOffset(1676165119) + 24;//24 is the setting header, not used by the game
One exception in GetSettingOffset
XboxClasses.XDBF.Exceptions.SettingNotFound - the setting is not in the table.
Then you can just read the from the IO like normal
Code:
XDBF.IO.Reader.ReadInt32()
The IO is endian(big by default)
Code:
XDBF.IO.IsBigEndian = true;//>.< true = big, false = little
Write
Code:
XDBF.IO.Writer.WriteInt32(0);
Close
Code:
XDBF.IO.Stream.Close();
I really don't care if you use my code, It was quickly done, or if you give credit, but please, stop releasing the shitty tools that you just point a io to a static offset in GPDs