Ultima VII item types
This is a discussion on the types of items in Ultima VII. It can be found in the documents section of the Exult project.
Here are the various possibilities for the 'class field', which is bits 0-4 of the second TFA byte.
- unusable items? (e.g. trees) |
- never occurs
- items that have a quality
- items that have a quantity
- ? (many items)
- ? (many items)
- container (e.g. bag, dead body)
- special (e.g. Egg, trap, moongate)
- spellbook only (761)
- barge only (961)
- never occurs
- Virtue Stone only
- NPC type
- NPC type (unknown difference)
- roof (e.g. slate roof, mountain)
- never occurs
- poisonous? (22:swamp and 67:muck only)
- never occur
- never occur
- never occur
- never occurs for Part I, only campfire in Part II (796)
- item has an effect when walked on (e.g. caltrops, fire field)
- never occur
- never occur
- never occur
- never occur
- never occur
- never occur
- never occur
- never occur
- never occur
- never occur
Bit 4 could also be a bit field
Bit 5 of the second byte seems to indicate a door. Perhaps this means that adjacent items will be activated together, the way double doors are.
Bit 6 of the second byte is set for items that are part of vehicles (cart, ship and flying carpet). This flag might be used with a "barge" so that a group items can be moved together.
Bit 4 of the first byte may indicate that the tile is water (so that swimming NPCs can move over it). Bit 1 of the first byte is set only for the following:
- 447 wounded man
- 525 sea serpent
- 529 slime
- 530 snake
- 844 sea serpent
...which does not make much sense :)
To find out what part of the body each armour/weapon item is placed, look at the READY.DAT file. The first byte is a count of the number of subsequent records. Each records is 9 bytes long:
unsigned 16-bit: item type number
unsigned 8-bit: inventory placement number
- 0x01 one-handed spell item (e.g. fire bolt)
- 0x08 one-handed weapon
- 0x20 armour for neck (e.g. amulet, gorget)
- 0x28 armour for torso
- 0x30 ring on finger
- 0x40 ammunition (e.g. arrows)
- 0x48 helm
- 0x50 leggings
- 0x58 boots
- 0x78 triple crossbow bolts? (ignore this?)
- 0x90 tongs (same as a one-handed weapon?)
- 0xA0 two-handed weapon
- 0xA1 other spell items (e.g. #676)
- 0xA8 gloves
unsigned 16-bit: unused (always zero)
unsigned 16-bit: unused (always zero)
unsigned 16-bit: unused (always zero)
Some items, like food and reagents, have a different name for each frame. These strings are stored in the same 'text.flx' file starting at entry 0x500, but a clean algorithm to tell me which shapes should be looked up has not been found. It might be done by looking at the shape numbers.