Container (CONT) Section - Troodon80/Summoner-Save-File-Editor GitHub Wiki
Container (CONT) Section
Contains data about containers in the world. This is a pre-allocated section consisting of 0x18B4 (6324) bytes. Basic layout as follows:
| Field | Offset | Size | Description |
|---|---|---|---|
| Signature | 0x00037EDB | 4 bytes | "CONT" ASCII string |
| Count | +0x04 | 4 bytes | Container count |
| Containers | +0x08 | (Containers + Contents) * Count | Containers, if any exist |
| Gold Piles Count | Container End | 4 bytes | If no containers exist, this will be in +0x08 else it will be immediately following the last container |
| Gold Piles | 0x04 | Gold Piles * Gold Piles Count |
Container structure
Following Count, if Count is not 0, Count * Containers:
| Field | Offset | Size | Description |
|---|---|---|---|
| Position | 0x00 | 3 * 4 bytes | Vector3 position of container in the world |
| Count | +0x04 | 4 bytes | Item count in the container |
| Flag | +0x08 | byte | Locked flag |
Container contents structure
This is the almost the same as the inventory item structure. Instead of a hash as per the INVT section, it uses the index of the item in the list similar to how the equipment items work in the LENT section. Containers can't have more than 16 items.
| Field | Offset | Size | Description |
|---|---|---|---|
| ID/Index | 0x00 | 4 bytes | Index of the item in the items list |
| Quantity | +0x04 | 2 bytes | Quantity of the item |
| Charges | +0x06 | 2 bytes | Charges the item has |
Gold Piles
If Count at 0x04 above is 0, then this will be the start of Gold Piles (gold on the ground, dropped as loot), else it will be immediately after Count*Containers. There will be a count for gold piles, then Count * Gold Piles will follow.
| Field | Offset | Size | Description |
|---|---|---|---|
| Position | 0x00 | 4 * 3 bytes | Vector3: X, Y, Z position in the world |
| Quantity | +0x04 | 4 bytes | Quantity of gold |
| Unknown | +0x06 | 4 bytes | Maybe flags? |
Game Bug
Note: there is a bug in the game that seems to not properly set up gold piles when reloading a game. Quantities are set to 1 regardless of the quantity in the save file, which makes editing this section pointless; however, it is included for completeness.