Save File Offsets Reference - M1CR0H4CK3R/FKSE GitHub Wiki
FK saves are either 0x6040 (24,640 decimal) bytes (.gci files) or 0x6150 (24,912 decimal) bytes (.gcs files). Actual save data starts at 0x4440 (0x4550 for .gcs files) and ends at 0x55A0 (0x56B0 for .gcs files). For .gcs files, there is a 0x110 byte header applied to the beginning of the save, so add 0x110 to the Offset column values if your save is 0x6150 bytes.
Region Name | Offset | Data Type | Section Length |
---|---|---|---|
Padding | 0x4440 | Array of bytes | 0x50 |
Items | 0x4490 | Array of bytes | 0x200 |
Gold (Money) | 0x4690 | 32-bit value | 0x4 |
Static Values | 0x4694 | 32-bit value | 0x4 |
Options | 0x4698 | 32-bit value | 0x4 |
Story Data | 0x469C | 32-bit value | 0x4 |
Monster Data | 0x46A0 | Array of 177 0x14 byte values | 0xDD4 |
Yugi’s Story Character Data | 0x5474 | Array of 10 0x8 byte values | 0x50 |
Kaiba’s Story Character Data | 0x54C4 | Array of 10 0x8 byte values | 0x50 |
Joey’s Story Character Data | 0x5514 | Array of 10 0x8 byte values | 0x50 |
Current Monster Assignments? | 0x5564 | Array of 10 0x4 byte values | 0x28 |
Some sort of assembly? | 0x558C | Array of 5 0x4 byte values | 0x14 |
Story data is preceded by a 2 things: a static value (0x0000040B), followed by the Options. Options are 32-bit, and are expressed as 3 bytes, with a zero placed beforehand. The first 2 values after the zero are, in order, for the current Background Music (BGM) volume level, and the Sound Efects (SFX) volume level. The last byte is for the ‘Swap Mode’ option, with 0 being On (default), and 1 being Off.
The actual story data is only 3 bytes, plus an added zero for padding afterwards. The first byte is for how many stories (Yugi, Kaiba, or Joey) you have fully completed. The second byte is to tell whose story is currently being played: 0 = Yugi, 1 = Kaiba, and 2 = Joey. The last byte is the chapter number of the current story. It is zero-based, so Kaiba’s Chapter 1, ‘Hand of Fire’, is actually enumerated as chapter 0.
A simple table can be found below for reference.
Region Name | Structure |
---|---|
Static Values | Always 0x0000040B |
Options | 00aabbcc, where a= BGM level, YY= SFX level, ZZ= Swap Mode On/Off |
Story Data | XXYYZZ00, where XX= # stories done; YY= Story#; ZZ= Level# (zero-based) |
Each monster’s data is 0x14 bytes long. It starts with the Availability/Selectability byte, which is formatted like 0x?#, where ‘?’ is 0 (? icon, not unlocked), 4 (unlocked, but not selectable; needs unlocked again in its story, or is a fusion), or C (normal), and # is the character it is assigned to in the current story, from top left to bottom right (0xCA means it isn’t assigned; this number is zero-based, so in Kaiba’s story, 0xC0 means it is assigned to Kaiba, where 0xC8 means it is assigned to Marthis). Next is the number of Action Points (Stars) that the monster has, expressed as one byte (see Note 1 for more info on this byte). The third byte is the ‘Speed byte’, which determines how fast the monster moves in the field and in battle (only certain values are accepted - if an invalid value is encountered, then the default value is reapplied from the ISO; I need to research exactly what values are valid). The fourth, fifth, and sixth bytes are the RGB values of the monster’s orb color. The seventh and eighth bytes are the monster’s max health, the ninth and tenth bytes are it’s base ATK, the eleventh and twelfth bytes are it’s base DEF, and the thirteenth and fourteenth bytes are it’s EXP. Finally, the last 6 bytes are for the items currently equipped; they are organized into 3 groups of 2 bytes, with the first in each set being the ItemID, and the second being the quantity (note: if an item is not consumable, the quantity is always zero).
Another table summarizing this info can be found below.
Offsets | Type of Data | Description |
---|---|---|
0x00 | Flags | Determines assignment and availability |
0x01 | Monster AP | Max is 12 (0xC) |
0x02 | Unknown | Monster movement speed, possibly? |
0x03 - 0x05 | RGB Color of Orb | If Orb matches character’s, stat boost given |
0x06 - 0x07 | Monster Max HP | Max is 9999 (0x270F) |
0x08 - 0x09 | Monster Base ATK | Max is 9999 (0x270F) |
0x0A - 0x0B | Monster Base DEF | Max is 9999 (0x270F) |
0x0C - 0x0D | Monster EXP | Max is 65535 (0xFFFF) |
0x0E, 0x10, 0x12 | ItemID | Last used ID is 0x39 - Shock Shell |
0x0F, 0x11, 0x13 | Item Quantity | Is zero if item isn’t consumable |
Note 1: No monster can have more than 12 AP total.
Note 2: I originally thought that the 3rd byte is for the ‘strobe’ effect intensity of the orb, but that does not appear to be the case. For most monsters it’s 0x82, but never seems to change; it might be the monster’s movement speed in the field.
Each character’s data starts with 0x?#, where ? is 0, 4, or C. The upper nibble determines the availability and selectability, just like monsters. The lower nibble is the slot number, which goes from left to right, top to bottom. The next byte is the number of Battle Points and/or Action Points the character has, and the 3 bytes after that are the Orb RGB color. Finally, the last 2 bytes are the character’s EXP.
A table summarizing this can be found below:
Offsets | #/bytes | Description |
---|---|---|
0x00 | 1 | Owned/Selectable bits and Slot # |
0x01-0x02 | 2 | Nibbles are 0/# of Battle Points/Life Points/Action Points |
0x03-0x05 | 3 | Character Orb RGB color |
0x06-0x07 | 2 | Character EXP |