Item Flags (ITEM) Section - Troodon80/Summoner-Save-File-Editor GitHub Wiki

Item Flags (ITEM) Section

Contains identification flags for items:

Field Offset Size Description
Signature 0x00026DF9 4 bytes "ITEM" ASCII string
Item Count +0x04 4 bytes Number of item entries (521)
Hash Table +0x08 Item Count * 4 bytes List of item hash values
Flags +0x08 + (Item Count * 4) (Item Count + 7) / 8 bytes Bitfield of identified flags

Item Flags Section (Details)

Note: In this system, true for IdentifiedBit means the item needs identification, not that it's already identified. Think of it as "Can be identified" rather than "Is identified". Setting all bytes in the Flags region to 0x00 makes all items identified.

Click for detailed information about item identification data

The ReadItemFlags method processes the item identification data:

  1. Positioning & Header Verification:

    • Seeks to position 0x00026DF9
    • Verifies signature is "ITEM"
  2. Structure of Item Flags:

    • Item Count (e.g. 521 items, 4 bytes)
    • Hash Table (Array of 521 item hashes, each 4 bytes)
    • Bit Flags (Compact bit array where each bit indicates whether an item is identified)
  3. Data Processing:

    • Hash Table offset starts at position 8 (after signature and count)
    • Flags section starts after the hash table
    • For each item, extracts:
      • The item hash from the hash table
      • The identification bit from the appropriate bit position
    • Maps identification flags to known items in the game database
    • Returns a list of ItemFlagEntry objects with hash and identification status
  4. Bitfield Calculation:

    • Bytes needed for flags = (ItemCount + 7) / 8
    • Each item's flag is found by:
      • byteIndex = flagsOffset + (itemIndex / 8)
      • bitIndex = itemIndex % 8
      • identifiedBit = (byte[byteIndex] & (1 << bitIndex)) != 0
⚠️ **GitHub.com Fallback** ⚠️