Hi, I've been messing with the save states and I've got a few notes to add to the file. If you have any time, could you add them up for me? Also, I've only tried things on UW2, so I don't know if they're valid for UW1, as well, though I expect them to be.
First, on the encrypted block of PLAYER.DAT:
* 0035 (Int8) is the current vitality, NOT 00DC;
* 004A (Int16) is the current weight carried, in decistones;
* 004C (Int16) is the MAXIMUM weight allowance in decistones; its value is always 300 + 13 * [001E] (Strength);
* 0052 (Int8) is the number of skill points available;
* 0062 (Int8) may contain the drunkenness level in its lower hex digit.
The unencrypted block contains several things I haven't been able to figure out, plus the inventory. Here are some quick notes:
* The first byte after the encrypted block, offset 37E, contains the number of items in the inventory plus one;
* Bit 5 of 383 seems to be set when the Avatar first picks up an item in the world and stay set thereafter;
* Bit 6 of 386 seems to be set whenever the Avatar has any items in the Inventory, and unset when it is empty;
* Starting from 3A3, there are 19 Int16 referring to the Inventory slots, first the paperdoll ones, head to feet, followed by left and right shoulder, left and right hand, left and right ring, then the eight general slots in order. Their bits 6-15 contain the index of the item stored there (also, "left" is the screen's left, not the paperdoll's left);
* The inventory items start from offset 3E3 and have the same format as static objects from section 4.2, though bytes 2 and 3 (position and heading) are ignored. The first item is index 1, and the others increase normally. Notice that all objects form through their "next" and "sp_link" fields a single tree, with its root in object index 1, even though they may be in different inventory slots; this is consistent with the view that the Avatar acts as a container for all items in the Inventory.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I've been messing with the save states and I've got a few notes to add to the file. If you have any time, could you add them up for me? Also, I've only tried things on UW2, so I don't know if they're valid for UW1, as well, though I expect them to be.
First, on the encrypted block of PLAYER.DAT:
* 0035 (Int8) is the current vitality, NOT 00DC;
* 004A (Int16) is the current weight carried, in decistones;
* 004C (Int16) is the MAXIMUM weight allowance in decistones; its value is always 300 + 13 * [001E] (Strength);
* 0052 (Int8) is the number of skill points available;
* 0062 (Int8) may contain the drunkenness level in its lower hex digit.
The unencrypted block contains several things I haven't been able to figure out, plus the inventory. Here are some quick notes:
* The first byte after the encrypted block, offset 37E, contains the number of items in the inventory plus one;
* Bit 5 of 383 seems to be set when the Avatar first picks up an item in the world and stay set thereafter;
* Bit 6 of 386 seems to be set whenever the Avatar has any items in the Inventory, and unset when it is empty;
* Starting from 3A3, there are 19 Int16 referring to the Inventory slots, first the paperdoll ones, head to feet, followed by left and right shoulder, left and right hand, left and right ring, then the eight general slots in order. Their bits 6-15 contain the index of the item stored there (also, "left" is the screen's left, not the paperdoll's left);
* The inventory items start from offset 3E3 and have the same format as static objects from section 4.2, though bytes 2 and 3 (position and heading) are ignored. The first item is index 1, and the others increase normally. Notice that all objects form through their "next" and "sp_link" fields a single tree, with its root in object index 1, even though they may be in different inventory slots; this is consistent with the view that the Avatar acts as a container for all items in the Inventory.
Hey, thats great. Thanks for the infos!
I'll add it to the uw-formats.txt
-Julien