FILE DESCRIPTION   (Part 5, Corpse & Mercenary)
Just after the Items data we find the corpse data, the mercenary data, and since patch 1.08 some strange unknown datas. Up to patch 1.06 this was easy, but the patch 1.08 introduced a little more complex structure (essentialy due to the fact that we can equip the mercenary in the Expansion set : Lord of Destruction).
(since patch 1.08)
This page will explain the patch 1.08 (and the expansion as well), but if you want, you can still read how it was before the patch 1.08.
Just after the last item of the player inventory, we find the Corpse data.
- If the player is alive, it is represented by the bytes 4A 4D 00 00
- If the player is dead, theses bytes are "simply" not here !
Just after, we find the (new) mercenary structure.
- If the player has NEVER take a mercenary, we only find the byte 00, and that will be ALL for the Mercenary data
- If the player has a mercenary (dead or alive), we find the bytes 4A 4D 00 00 (yes, this is the same sequence of bytes as for the Corpse data, and this may be confusing, especially if the player is dead), following by other datas :
- First we find 2 bytes which indicates if the mercenary is dead or alive :
- If the mercenary is dead, we find the bytes 01 00
- If the mercenary is alive, we find the bytes 00 00
- The following 8 bytes are describing the mercenary : his name, his type, and the skill he master. I don't really know how it works (and to tell the truth, I think it's not important)
- The following 4 bytes are his total experience points. Knowing it, we can deduce his level, and therefore his statut points (like strength, defense, dexterity and so on)
- The following 4 bytes indicates the number of items the mercenary is equiped with (between 0 and 4). 4A 4D 04 00 means there are 4 items, and 4A 4D 00 00 there are no items. Note : in the patch 1.08 we can't equip the mercenary (we need the expansion set), so we'll always find 4A 4D 00 00. This is only in the expansion set that we can find another values.
- Just after, there is a variable amount of bytes : they are the items the mercenary is wearing. Each item is starting with the bytes 4A 4D 10 00 (which seems to be a constant in the item format). Of course, if it is not an Expansion set savegame, these bytes are not here (at all).
I just found that the folowing unknown datas are used for the additional shortkeys of expansion. If the player use more than the regular F1 to F8 shortkey, the format change, so what I describe below is incorrect. I'll analyse it later.
UNKNOWN DATA 1
The mercenary data is now finished, but not the file. We find 8 curious sequences of bytes. The 2 first bytes of each sequence are FF 00 and the 4 next are taken from some precedents bytes in the file ! They're take exactly 4A bytes before (74 in decimal). Some examples :
And they're following a pattern : 4 bytes took, 2 bytes jump, 4 bytes took, 2 bytes jump, and so on. How strange. What's the use ? A kind of protection ? It can't be : it's too obvious.
- If the unknown data 1 start at offset 987, then the bytes are taken from 93D (987 - 4A = 93D)
- If the unknown data 1 start at offset 73B, then the bytes are taken from 6F1 (73B - 4A = 6F1)
It's like if a whole block of 48 bytes is take from 76 bytes before, then 8 sequences of FF 00 bytes are paste into it at regular interval, and finaly the resulting block is just put like that in the file.
UNKNOWN DATA 2
And finally we find 8 another bytes. With the patch 1.08 without the expansion they're always set to 00 00 00 00 00 00 00 00, but with the expansion, they may change. For instance, I have found the value 00 00 00 00 DC 00 00 00. I don't figure out what it is yet.
Back to Part 1 : Easy Hacking
Back to Part 2 : Statut Datas
Back to Part 3 : Skill Levels
Back to Part 4 : Items
Back to Menu page