artemis-nerds/node-asbs-server

Documenting the NPC ship update packet

Opened this issue · 2 comments

The NPC ship update packet still has many unknowns. This issue is to keep track of discoveries made.

Status:

  • float unknown1: known, impulse/throttle for the ship. Used for simulation between two updates. Doesn't appear to affect jet streams behind the ship.
  • byte unknown6: known, fleet number as set in a mission file. Similar to the 'faction', but probably represents grouping of ships.
  • byte unknown8: possibly known, seems to be the side of the ship (at least in a mission). 1 is enemy and 2 is player.
  • int unknown7: maybe the dive/rise control. Almost always is -1 or not in the packet, sometimes is 0. Using an int for this seems a bit weird though.
  • byte unknown9 and unknown10: something? Appear to always give values of -1 (or 255) for neutral ships and other values including -1 (or 255) for enemies. Might have something to do with AI or hull/race keys?
  • short unknown4: something? Doesn't seem to be normally set in the initial 'creation' packet. Might be shield state or similar. Not enough testing to confirm yet.
  • int unknown13 and unknown14: maybe? most of the time is either omitted or 0. Could have something to do with hull/race keys?
  • byte unknown11: always seems to be 1 from my testing.

Things that are missing: Through testing with the mission editor, both setting a ships exit point and changing the surrender chance don't seem to have any effect on the packet. Race and hull keys are missing from the currently documented packet, although the client might not need them. They would have to be a pair of values (one for hull and one for race), so could be unknown9 and unknown10 or unknown13 and unknown14?

The mission editor also has a property to determine if a ship triggers mines, which doesn't appear to affect any values in the packet.

Some other testing and feedback would be gladly appreciated!

The exit point, surrender chance, and mine trigger settings would be absent in the network protocol because the client doesn't need to know them; they dictate other behavior that is already communicated to the client. The race and hull keys are contained in vesselData.xml, so the client can just look up that information once it has a hull ID.

Yeah, I know that the client doesn't need to know most of those, but the server might still send it. I'll keep experimenting