Summoner SAV File Format - Troodon80/Summoner-Save-File-Editor GitHub Wiki
I will note an important piece of information that will be useful in reading the structure further down; anywhere it says "ID" or "Hash", it's usually referring to the string-to-hash function that Summoner uses extensively. I've tried to make it as faithful to how the game does it, and you can see the breakdown here:
Click for details...
My
SummonerHash
class is a static utility class that implements CRC32 hash calculations used by Summoner in various functions used throughout the game. In this specific instance, however, we're using it mostly for character/creature (uint) and item names (int). Since the game uses these specifically, I've made two methods for signed and unsigned.
- Pre-calculated 256-entry table for polynomial
0xEDB88320
(you can see the full table in SummonerHash.cs)- Stored as a private static readonly array
ComputeHash(string)
: Calculates CRC32 hash for strings, returning auint
(used for characters/creatures)ComputeHashSigned(string)
: Returns the hash as a signedint
(used for item names)ComputeHash(byte[])
: Computes CRC32 hash for byte arraysNormalize(string)
: Converts strings to lowercase for consistent hashing
- Uses standard CRC32 algorithm with table lookups
- Processes each character/byte by updating the hash value
- String normalization is performed by converting to lowercase
- The normalisation isn't quite how the game does it, C/C++ looping over one character at a time; I'm using C#'s ToLowerInvariant() for ease/simplicity
This is the overall layout of the SAV structure. Most sections have their own identifier/signature/header (e.g. INVT, ITEM, LENT), but not all do. For example, there's a section that I believe is related to area data stored at the end of INVT. Maybe it's related to area container inventories? I don't know, so I'm just keeping it intact. There's also a section immediately following the main character/creature section with varied lengths that I'm not yet sure how to read. Could be hidden script NPCs, out of party characters (e.g. Flece before you meet her, or Joseph when you first go to the Tower of Eleh as Flece), summoned creatures, or other such. I don't know yet and I'm not too worried about it since, likewise, I'm keeping those intact.
Here's what is known, though section names or descriptions may be off due to being guesswork/provisional:
Section Name | Signature | Offset | Description |
---|---|---|---|
Save Game Header | "SAVg" | 0x0000 | Contains basic game information including version and area names |
Time Value | - | 0x00AC | Game time in seconds (float), calculate total time played |
Description | - | 0x00B0 | Save description (null-terminated string) |
Metadata | - | 0x01B0 | Contains metadata with sizes for every section within the save file |
Thumbnail Pixel Data | - | 0x00000200 | Contains raw RGB565 image pixel data |
Level Data | - | 0x0000EF1E | Level Data |
Inventory | "INVT" | 0x000150E9 | Contains player inventory items and gold |
Conversation Block Data | - | 0x00017189 | Contains area-specific data blocks |
Item Flags | "ITEM" | 0x00026DF9 | Contains item identification bitflag data |
Character Data | "LENT" | 0x00027667 | Contains character and creature data |
Camera | "CMRA" | 0x00037EB3 | Contains camera position and settings |
Container Data | "CONT" | 0x00037EDB | Contains container data |
Quest Data | - | 0x0003978F | Quest visibility bitflags |
Level Item Data | - | 0x000397A8 | Contains data about items the player can pick up; usually things like quest items, e.g. glass sword shards, loot, mirror, etc. These do not appear under the Container section |
Two-stage Checksum | - | 0x00039FAC | |
Auto-map labels | - | 0x000406EB | |
Hot buttons | - | 0x000420EF |