HeroQuest Savegame Format
The QUEST.SAV file in HeroQuest contains the saved character data. Characters can be saved between quests.
Format type | Saved game |
---|---|
Save locations | Hub location between levels |
Elements saved | Character names, stats, gold, quest object, inventory. various stats |
Games |
Format
The file holds the 8 slots for each of the four characters of the game, split into two sections. The first section are the (in-game editable) names of all the characters, the second half contains all the characters' actual information and inventories.
Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.
This is how a default savegame looks like in an hex editor:
The internal format is the following:
Offset | Data type | Repeats | Default value | Description |
---|---|---|---|---|
0x000 | char[17] | 8 | SIGMAR | Name of the Barbarian |
0x088 | char[17] | 8 | GRUNGI | Name of the Dwarf |
0x110 | char[17] | 8 | LADRIL | Name of the Elf |
0x198 | char[17] | 8 | ZOLTAR | Name of the Wizard |
0x220 | BYTE[26] | 8 | Zeroes | Inventory of the Barbarian |
0x2F0 | BYTE[26] | 8 | Zeroes | Inventory of the Dwarf |
0x3C0 | BYTE[26] | 8 | Zeroes | Inventory of the Elf |
0x490 | BYTE[26] | 8 | Zeroes | Inventory of the Wizard |
Name sections
The names are in typical zero-terminated format, and can be a maximum of 16 characters in length. If a savegame is edited to have data in the remaining name part, it will not be read, and the space will be cleared to zeroes when re-saved.
The name normally only accepts uppercase characters. If lowercase characters are edited into the savegame file, it becomes clear that the lowercase range of the font is used for special accented characters. Some characters in the range are completely empty, but they still offer clickable space.
If the first byte in a name is set to a 00 byte, the entry becomes unclickable in the user interface, effectively making it permanently unusable. There is a bug in the game where this can occur when you change the name of a character and confirm without filling in anything, and then save the character data.
Inventory sections
Offset | Data type | Default values | Description | |||
---|---|---|---|---|---|---|
BAR | DWA | ELF | WIZ | |||
0x00 | BYTE | 00 | 00 | 00 | 00 | Character game status: 00=in menu FF=in quest |
0x01 | UINT8[2] | 0000 | 0000 | 0000 | 0000 | Placeholder for Hero's position on the map XXYY. See Rooms Layout |
0x03 | UINT8 | 00 | 00 | 00 | 00 | Placeholder for Hero's current room. See Rooms Layout |
0x04 | UINT16LE | 0000 | 0000 | 0000 | 0000 | Placeholder for Memory location of Hero's position on the Walls Layout in memory at [0B6B:546F] |
0x06 | UINT8 | 08 | 07 | 06 | 04 | Body points, 0-9 shows a figure, higher values work but the game shows the rest of the fonts. |
0x07 | UINT8 | 02 | 03 | 04 | 06 | Mind points, same as above. |
0x08 | UINT8 | 26 | 2C | 38 | 44 | Placeholder for Hero's facing sprite. See Hero Positions |
0x09 | UINT16LE | 0000 | 0000 | 0000 | 0000 | Amount of gold coins in stash (bytes "88 13" = 5000 coins) |
0x0B | BYTE | 00 | 00 | 38 | 07 | Placeholder for spells bit mask during the game (Water and Air); see Spells |
0x0C | BYTE | 00 | 00 | 00 | 3F | Placeholder for spells bit mask during the game (Fire and Earth); see Spells |
0x0D | BYTE | 00 | 00 | 00 | 00 | Owned special items bit mask; see Special Items. |
0x0E | BYTE | 00 | 00 | 00 | 00 | Owned weapons bit mask; see Weapon Items. |
0x0F | BYTE | 00 | 00 | 00 | 00 | Owned armour bit mask; see Armour Items. |
0x10 | BYTE | 00 | 00 | 00 | 00 | Owned potions bit mask; see Potions |
0x11 | BYTE | 00 | 00 | 00 | 00 | Equipped weapon. Same values as owned weapons, but only one weapon (or special weapon) can be active. |
0x12 | BYTE | 00 | 00 | 00 | 00 | Equipped special items. Same values as owned special items. Combines any equipped special weapon and armour. |
0x13 | BYTE | 00 | 00 | 00 | 00 | Equipped armour. Same values as owned armour. |
0x14 | UINT8 | 03 | 02 | 02 | 01 | Base attack dice number |
0x15 | UINT8 | 02 | 02 | 02 | 02 | Base defence dice number |
0x16 | BYTE | 00 | 00 | 00 | 00 | Placeholder for casted Spells (caster) bit mask during the game |
0x17 | BYTE | 00 | 00 | 00 | 00 | Placeholder for used Potions effect bit mask during the game |
0x18 | BYTE | 00 | 00 | 00 | 00 | Placeholder for Spells effects (target) bit mask during the game |
0x19 | UINT8 | 00 | 01 | 02 | 03 | Character id used for attack animation and map icon (04=Sir Ragnar/Manfred) |
Upon loading a slot the equipment is copied in memory at these locations:
0B6B:4663 Barbarian 0B6B:467D Dwarf 0B6B:4697 Elf 0B6B:46B1 Mage
Equipment
The equipment is saved in bits, which are combined into full values. So a value of 0x00 means completely empty, and 0xFF means all are enabled. The equipment bits are used for both ownership and to store which items are currently equipped.
There are three classes of equipment: weapons, armour, and special quest items. In terms of equipped items, there are limitations on which bits can effectively be combined together. The player can only equip one helmet on their head and one armour on their body, and can have a light weapon in their primary hand and a shield in their secondary hand, or the Battle Axe taking up both hands. These rules are enforced when the game evaluates the equipped item bits, taking both normal and special items into account.
Weapon Items
The Weapons follow the order of the equipment on the screen, with the lowest bit indicating the first item, but since they do not include the armour, and the Tool Kit is equipped as weapon, that one takes up the eighth weapon value.
Weapon items:
Bit | Binary value | Hex value | Item | Equipped on |
---|---|---|---|---|
1 | 00000001 | 0x01 | Staff | Primary hand |
2 | 00000010 | 0x02 | Short Sword | Primary hand |
3 | 00000100 | 0x04 | Broad Sword | Primary hand |
4 | 00001000 | 0x08 | Battle Axe | Primary and secondary hands |
5 | 00010000 | 0x10 | Crossbow | Primary hand |
6 | 00100000 | 0x20 | Hand Axe | Primary hand |
7 | 01000000 | 0x40 | Spear | Primary hand |
8 | 10000000 | 0x80 | Tool Kit | Primary hand |
Armour Items
Like the weapons, the Armour types follow their order on the inventory screen, with the Shield as the lowest value.
Armour items:
Bit | Binary value | Hex value | Item | Equipped on |
---|---|---|---|---|
1 | 00000001 | 0x01 | Shield | Secondary hand |
2 | 00000010 | 0x02 | Helmet | Head |
3 | 00000100 | 0x04 | Chain Mail | Body |
4 | 00001000 | 0x08 | Plate Armour | Body |
Special Items
Like the normal items, special items are saved as single bits that can be combined into a full value. They follow the layout of the special items on screen, with the lowest bit indicating the first item.
The special items are:
Bit | Binary value | Hex value | Item | Equipped on | Remarks |
---|---|---|---|---|---|
1 | 00000001 | 0x01 | Borin's Armour | Body | Despite showing a helmet as icon, this item is considered body armour and can be combined with the helmet. |
2 | 00000010 | 0x02 | Wand of Recall | None | Can't be equipped. |
3 | 00000100 | 0x04 | Talisman of Lore | None | Can't be equipped. |
4 | 00001000 | 0x08 | Orc's Bane | Primary hand | |
5 | 00010000 | 0x10 | Spirit Blade | Primary hand |
Examples for the ownership bits:
- 00000001 = 01 = Borin's Armour Only
- 00010100 = 14 = Talisman of Lore and Spirit Blade
- 00011111 = 1F = everything
Spells
Like the other items, spells are saved as single bits that can be combined into a full value. In the Savefile though these bytes are only a placeholder for the spells once in memory. There are two separate 8 bit masks the first for Water and Air and the second for Fire and Earth.
Bit | Binary value | Hex value | 0x0B Spell name (Type) | 0x0C Spell name (Type) |
---|---|---|---|---|
1 | 00000001 | 0x01 | Veil of mist (Water) | Courage (Fire) |
2 | 00000010 | 0x02 | Water of healing (Water) | Ball of flame (Fire) |
3 | 00000100 | 0x04 | Sleep (Water) | Fire of wrath (Fire) |
4 | 00001000 | 0x08 | Tempest (Air) | Pass through rock (Earth) |
5 | 00010000 | 0x10 | Swift wind (Air) | Rock skin (Earth) |
6 | 00100000 | 0x20 | Genie /attack (Air) | Body healing (Earth) |
7 | 01000000 | 0x40 | not used | Genie /reveal (air) |
8 | 10000000 | 0x80 | not used | not used |
Examples for the ownership bits:
- 00000111 = 07 = all three Water (0B) or Fire (0C) spells
- 00111000 = 38 = all three Air (0B) or Earth (0C) spells
- 00111111 = 3F = all Water and Air (0B) or Fire and Earth (0C) spells
- 00000100 = 04 = only sleep (0B) or fire of wrath (0C) spell
Spells effects
Only the effects that last at least one round appear in this bit mask (0x18).
Bit | Binary value | Hex value | Spell Name | Spell effect | Duration (PC) | Duration (board game) |
---|---|---|---|---|---|---|
1 | 00000001 | 0x01 | Veil of mist | Invisibility | next monster phase | next monster phase |
2 | 00000010 | 0x02 | Sleep | Lose a turn | until you throw a 6 | until you throw a 6 or if attacked |
3 | 00000100 | 0x04 | Tempest | Lose a turn | next hero phase | next hero phase |
4 | 00001000 | 0x08 | Swift wind | Double movement | next movement phase | next movement phase |
5 | 00010000 | 0x10 | Courage | +2 Attack dice | next attack phase | until no monster are visible by the hero anymore |
6 | 00100000 | 0x20 | Pass through rock | Self explanatory | next movement phase | next movement phase |
7 | 01000000 | 0x40 | Rock skin | +2 Defense dice | next defense phase | until the hero suffers a wound |
8 | 10000000 | 0x80 | not used | -- | -- | -- |
- Courage, Rock skin and sleep effects differ from the original boardgame.
Potions
Potions follow the same principle of all other bit masks. The only exceptions is they get wiped once you start a new quest.
This can be bypassed with a simple hack since the save and load features correctly process that byte.
Bit | Binary value | Hex value | Potion Name | Potion effect |
---|---|---|---|---|
1 | 00000001 | 0x01 | Potion of Strength | +2 attack dice in the next combat phase |
2 | 00000010 | 0x02 | Potion of Resilience | +2 defence dice in the next combat phase |
3 | 00000100 | 0x04 | Potion of Healing | +4 body points |
4 | 00001000 | 0x08 | Potion of Healing | +4 body points |
5 | 00010000 | 0x10 | Holy Water | Kills every undead in the room |
6 | 00100000 | 0x20 | Potion of Speed | 2x movement in the next movement phase |
7 | 01000000 | 0x40 | Heroic Brew | 2x attack in the next combat phase |
8 | 10000000 | 0x80 | not used |
Examples:
- 01111111 = 7F = All potions
- 00001100 = 0C = Two potions of Healing
- 00000011 = 03 = Strenght and Resilience