Figuring out items
I've been working this cold weekend on finally tackling items. Seventh Umbral had made some leeway on the items, but didn't get very far with figuring out the item blocks themselves. On Saturday I figured out the general layout of how the initial inventory update works. It is made up of a start packet, multiple item packets, and an end packet. The opcodes are 0x146 and 0x147, with both 0x14A and 0x14B used for the items themselves (though the data is the same). 0x149 seems to be a "end of list" packet, showing up if there is only 1 item packet or as the last item packet. The start/end tags define where exactly the items get show: Key Items, Currancy/Crystals, or Normal Inventory. There are also more tags, and these most likely are for the Bazaar, Meld Requests, and Loot tabs.
Today I found a lot of the item block itself. Below is an example of one of those blocks. This is a Vanya Hat +1. I do realized I accidentally left it as 6 Vanya Hat's but it seems the game fixes that anyway.
The makeup I understand so far is:
0x00: Database ID (used to retrieve unique item info like durability/spiritbind) 0x08: Quantity 0x0C: Item ID (retrieves all the data about it in the dats) 0x10: Index/Slot 0x28: If it's 1: NQ, If it's 2: HQ 0x29: Unknown for now 0x2A: Unknown for now 0x2B: Durability 0x4C: Spirit Bind (0 - 10,000) 0x4E: Melded Materia 1 0x4F: Melded Materia 2 0x50: Melded Materia 3 0x51: Melded Materia 4 0x52: Melded Materia 5
Knowing the above I have been able to modify various information about an item in the inventory. Here is some examples below: