Azoth Central — MB::PositionInTheWorldReplicatedState

All Packets #13

MB::PositionInTheWorldReplicatedState

SolvedCaptured ✓

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

What it doesWe know what this does

Keeps the place of things in the world in sync: where they are, which way they face and how big they are. Used for things such as gathering nodes and loot bags.

Activity: Movement

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 log in, then log in and wait 30 seconds. Write down the time.
  2. Walk through a forest or mining area so trees, rocks and plants come into view.
  3. Defeat a creature that leaves a loot bag, or drop a cheap item on the ground away from other players, and write down the time.

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 for an entity that stands in the world (a gatherable node, a loot bag, a creature). It carries where the entity is, which way it faces and how big it is.

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
— position structured — Where the entity is, in world meters. x and y are plain 32-bit floats. The height comes as a 16-bit number squeezed into the range -100 to 2000 m: z = value / 65535 * 2100 - 100. The position (7168, 7168, about 32) is a constant value that the official server sends at the start of a session: it is a placeholder, not a decoding mistake.
  • x: 9261.133 (294.3097 to 12122.875)
  • y: 3276.569 (207.1906 to 9376.038)
  • zQuantized: 5546 (2907 to 22332)
— rotation structured — Which way the entity faces, as a quaternion. One flag byte comes first. For each of x, y and z, bits 0 to 2 say that the part is exactly 0 and bits 3 to 5 say that it is exactly 1 (then that part is not sent). The parts that are not flagged follow as 16-bit numbers, in the order x, y, z, where part = n * 2 / 65535 - 1. The w part is never sent: the client works it out, and bit 6 of the flag byte says that w is negative.
  • flags: 3 (0 to 99)
  • qz: 65384 (190 to 65534)
  • qx: 32767 (26165 to 39693)
  • qy: 32767 (15738 to 38935)
— scale structured — How big the entity is. A tag byte says what follows: 0 means normal size, 1 means one half-float used for all three axes, 2 means three half-floats for x, y and z.
  • tag: 2 (1 to 2)
  • x: 1.0097656 (0.9199219 to 1.3798828)
  • y: 1.0097656 (0.9199219 to 1.3798828)
  • z: 1.0097656 (0.9199219 to 1.3798828)
  • uniform: 0.9902344 (0.9199219 to 1.3798828)
How to capture