Reasearch (1) - Hex bytes (DMute)
Posted: Fri Nov 17, 2000 2:00 pm
Objects use different amount of bytes, even though DMute always shows 8 (2 ident.). Not including the ident, bytes used are:
Doors 2 (see posting)
Potions 2 (byte 3 is the power, each with a range for different experience levels, and 4 is the type)
Weapons 2 (the first is type, and the second is charge where applicable, the maximum seeming to be 3C for wands, torches etc)
Misc items and clothes 2 (the first is type, the second is normally 0, except for cursed objects: the armet, torso, leg, foot plate and sword have values of 3rd byte 26, 27, 28, 29 and A respectively, and fourth byte 1)
Wall texts and speaking pads use 2, bytes 3 and 4 indicating the text, (see other postings) and both are identical (like floor pads and wall objects).
Scrolls use 2, the 4th byte used to indicate open (0) or closed (4). As with chests and monster carried objects, the third byte is only a referece to an already existing object, in this case a wall text/speaking pad, so to create a new scroll a new wall text has to be created, altered then the tile blanked and the objects ident number refered to in the scroll.
All the above (with rare excptions) seem to be stored in such a way that the 2 bytes of the next object in the sequence are displayed in bytes 7 and 8. To see this, look at the first doors on Level 2, or the 'Elements' wall texts in Level 7. So, if you change these values, you are changing the next numerical object.
Chests use 2 for items, but with all others bytes at 0, I wonder if they aren't used for advanced functions while in a characters hand. (I have occasionally seen F9 in byte 5, maybe this byte indictes open/shut etc)
Teleporters use 4 (see posting)
Floor pads and wall objects use the 6 we know and love
Monsters seem to not only use the 6 we see, but an additional 6 - 9 bytes. Byte 6 seems to indicate a monsters position more than hard monster numbers (occasionally groups of 3 nd 4 have the same number hex, etc - maybe the first hex is position, and the second number?) while bytes 7 and 8 are monsters hit points (byte 8 contains higher byte if required). These other bytes for the other monsters aren't really needed, thought it might be nice to hex edit to get more than 1 wasp, 1 rat, 2 rocks, 1 jawa, etc.
In the cases of all items and wall objects, the position (from north/top left clockwise) can be changed by adding 0, 40, 80 or c0 to the objects type ident (so a scroll is 1C, a west facing scroll is DC)
Doors 2 (see posting)
Potions 2 (byte 3 is the power, each with a range for different experience levels, and 4 is the type)
Weapons 2 (the first is type, and the second is charge where applicable, the maximum seeming to be 3C for wands, torches etc)
Misc items and clothes 2 (the first is type, the second is normally 0, except for cursed objects: the armet, torso, leg, foot plate and sword have values of 3rd byte 26, 27, 28, 29 and A respectively, and fourth byte 1)
Wall texts and speaking pads use 2, bytes 3 and 4 indicating the text, (see other postings) and both are identical (like floor pads and wall objects).
Scrolls use 2, the 4th byte used to indicate open (0) or closed (4). As with chests and monster carried objects, the third byte is only a referece to an already existing object, in this case a wall text/speaking pad, so to create a new scroll a new wall text has to be created, altered then the tile blanked and the objects ident number refered to in the scroll.
All the above (with rare excptions) seem to be stored in such a way that the 2 bytes of the next object in the sequence are displayed in bytes 7 and 8. To see this, look at the first doors on Level 2, or the 'Elements' wall texts in Level 7. So, if you change these values, you are changing the next numerical object.
Chests use 2 for items, but with all others bytes at 0, I wonder if they aren't used for advanced functions while in a characters hand. (I have occasionally seen F9 in byte 5, maybe this byte indictes open/shut etc)
Teleporters use 4 (see posting)
Floor pads and wall objects use the 6 we know and love
Monsters seem to not only use the 6 we see, but an additional 6 - 9 bytes. Byte 6 seems to indicate a monsters position more than hard monster numbers (occasionally groups of 3 nd 4 have the same number hex, etc - maybe the first hex is position, and the second number?) while bytes 7 and 8 are monsters hit points (byte 8 contains higher byte if required). These other bytes for the other monsters aren't really needed, thought it might be nice to hex edit to get more than 1 wasp, 1 rat, 2 rocks, 1 jawa, etc.
In the cases of all items and wall objects, the position (from north/top left clockwise) can be changed by adding 0, 40, 80 or c0 to the objects type ident (so a scroll is 1C, a west facing scroll is DC)