Azoth Central — MB::ContainerComponentReplicatedState

All Packets #1755

MB::ContainerComponentReplicatedState

SolvedCaptured ✓

We know its format and the Azoth server already uses it.

What it doesWe know what this does

Keeps the contents of your bag in sync: every item you carry, how much you can hold, and whether the bag was emptied.

Activity: Inventory & gear

How to capture

We already have this packet in a recording. You only need to record it again if you want to help check it.

  1. Start the capture before you launch the game, then log in and wait for the world to load.
  2. Open your inventory and move one item to another slot.
  3. Pick up an item from the ground or a creature and close the inventory.
  4. Write down the time of each step.

Recording tips

  • Record one activity per recording.
  • Keep each recording under 5 minutes.
  • Write down the time of each step.
  • Send the ledger.bin file only through /capture on Discord.

Send your recording or use /capture on Discord.

FieldsSpec: Verified

When: Sent by the server with the contents of a container. The local player has its bag as component key 61 and a second container as key 76 (the window of the loot bag or storage being looked at); a bag dropped on the ground uses the same state on its own entity (key 2). Everything is in one group (mask bit 0x01). The bag is sent in full at login (up to 500 items) and later as deltas whose key is the item's position in the container. A container is sent either in full (a 0 byte, then an optional version, the entry count and the entries; it replaces what the client has) or as a delta (the number of changes, then for each batch of up to 8 entries one mask byte and, per entry, its key, an optional version and, if the mask bit is set, the value; a clear bit removes the entry).

This state has no fixed offsets. It travels as a member inside the replicated state bundle (packet 8): component key, type, then the body. The body starts with a group mask (one bit per group, see mask_bit), then for each group present a field mask (7 bits per byte, the top bit means another mask byte follows), then only the fields whose bit is set, in order. Fields are matched by name.

AtFieldTypeSizeMeaningExample
— Container structured — The items. Each item is: one packed 64-bit number (current durability, the item's index in the client's item table (20 bits), the position in the container (501 = none), a sync reason (6 bits) and the quantity), eight more numbers (the first is the maximum durability, the third the gear score and the last five perk ids; the second has no known meaning), four dye bytes, the 16-byte instance id, a flag byte (bit 0 = bound to the character, bit 1 = locked) and the transmog appearance id with its four dye bytes. In a delta the entry key is the position of the item in the container.
  • count: 1 (0 to 12)
  • each: durability: 3000 (0 to 3000)
  • each: itemIndex: 21028 (0 to 46201)
  • each: packed502: 31 (0 to 501)
  • each: packed6: 5 (1 to 47)
  • each: quantity: 1 (0 to 827)
  • each: v0: 3000 (0 to 3000)
  • each: v1: 468848 (0 to 1360508)
+ 11 more sub-values in the API
— Item Class unknown — A list of 64-bit item class ids: a count, then that many 64-bit numbers. The server does not send it and no capture has it. not seen in the recordings
— Bonus Max Encumbrance u32be 4 B Extra weight the container can hold, as a 32-bit number (10395 in one capture, up to 16330 in others). 10323
also seen: 10323, 10823, 10073, 10573, 11323, 0, 11823, 11073, 16330, 14830
range 0 to 16330
— Can Transfer items bool 1 B A byte, 1 when items may be moved in and out. Only seen as 0 in the captures. 0
— Container Was Emptied bool 1 B A byte, 1 when the container was just emptied. The official server sends it with 0 or 1 alongside the items. 0
also seen: 0, 1
range 0 to 1
— itemSyncReason — — Part of every item entry: why this slot was sent. Only the values seen in captures or tests are listed.
  • 1 Item gathered (shows the "+N item" notice)
  • 2 Item removed
  • 4 Item equipped
  • 5 Item unequipped (the empty slot left behind)
  • 6 Moved in from another container, such as a loot bag (shows the "+N item" notice)
  • 17 Default value used in the full state sent at login
—
How to capture