Thanks for the trainer, as always, 0x90. It's working great on my end so far.
By the way, it would be nice if some form of item editor gets incorporated into the trainer. Just to assist a little, here are my findings:
Each item is represented in the form of XXYYZZ00, Little Endian, where (one byte each):
XX = Item ID
YY = Item Category
ZZ = Item Quantity
00 = Must be zero
Notes:
- Item ID must be paired with Item Category to identify a unique item. Example: 9113 = Gold Needle, 911A = Rod
- Item Category does not necessarily reflect who can equip what. It can simply be considered as an arbitrary value with limited grouping significance.
- Since both Item ID and Category must be paired to uniquely identify an item, this can essentially be treated as a 2 byte value.
- Item Quantity caps at 99. While it can be set to the max byte value of 255, the game will correct itself and set the quantity back to 99 at some point (on item use, etc.).
- If 00 is not zero due to setting item quantity past a byte's max value, the game will crash upon accessing the inventory. It is likely used as a delimiter to separate item slots.
In CoSMOS, the related addresses are:
FF4.exe+232C10 = Slot 1 Item ID and Category (2 bytes)
FF4.exe+232C12 = Slot 1 Item Quantity (1 byte)
FF4.exe+232C14 = Slot 2 Item ID and Category (2 bytes)
FF4.exe+232C16 = Slot 2 Item Quantity (1 byte)
...
FF4.exe+233214 = Total Unique Items (1 byte)
FF4.exe+233218 = Slot 1 Key Item ID and Category (2 bytes)
FF4.exe+23321A = Slot 1 Key Item Quantity (1 byte)
FF4.exe+23321C = Slot 2 Key Item ID and Category (2 bytes)
FF4.exe+23321E = Slot 2 Key Item Quantity (1 byte)
...
FF4.exe+23341C = Total Unique Key Items (1 byte)
If items/key items gets added or removed, another value must be updated to tell the game how many different items there are in the inventory, and display them correctly, using Total Unique Items/Key Items. This value should be no more than a byte, as there doesn't seem to be more than 255 known unique items or key items. Edit: In addition, this value should equal the number of item slots you have filled, to prevent undesirable outputs.
As for the Item ID's, this will be posted in a separate post. These seem to be identical to the ones on the iOS/Android ports, so credits mostly to xTopWarmachinex for the values on GameFAQs. I'll be re-posting it here, with item values re-sorted and useless items omitted for convenience.
[Edited by FFFanatic, 9/22/2014 11:51:15 AM]