Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ship index #152

Closed
rjwut opened this issue Apr 9, 2018 · 4 comments
Closed

Ship index #152

rjwut opened this issue Apr 9, 2018 · 4 comments

Comments

@rjwut
Copy link
Member

rjwut commented Apr 9, 2018

Until v2.3.0, bit 2.2 of the player ship object was ship number (1-based). We are uncertain what field it is now. We suspect bit 5.8 is now ship index (0-based), but we've also observed a value of 0xff, which puts makes that less certain. Ship number/index is a pretty important value to know, so let's try to figure out what it is.

@NoseyNick
Copy link
Collaborator

PlayerShip bit 5.8 is ShipNum, char/byte.
0=Artemis 1=Intrepid 2=Aegis etc. 255=fighter (or -1 if you're signed I guess?)

@NoseyNick
Copy link
Collaborator

Not sure what bit 2.2 became. Seems to still be an int. Almost always 0 except when it's 1 ☹️

@StarryWisdom
Copy link
Collaborator

if you set the char of bit 5.8 to always be 0 you are unable to select any ship other than ship 1 (IE 0) on the client and connect - thus I think 5.8 has to be ship num, 0xff being fighter as suggested seem likely esp if it was a signed value and set to -1 as an "this is not a ship num" value (this presumably can be tested with captures?)

@NoseyNick
Copy link
Collaborator

Analysis of my "top 15 capture files with the most ShipNums", obviously messed up by those pesky humans being allowed to rename ships and even fighters, but hopefully fairly convincing?

      5 ShipNum=>0 Name=Artemis  <<<
      1 ShipNum=>0 Name=Cygnus
      1 ShipNum=>0 Name=Hopper
      5 ShipNum=>0 Name=ISN Oblivion
      1 ShipNum=>0 Name=USFP Minnow
      1 ShipNum=>0 Name=USN Luna In Umbra

      1 ShipNum=>1 Name=Blazitron Ind. EscortSvc
      5 ShipNum=>1 Name=ISN Relentless
      5 ShipNum=>1 Name=Intrepid  <<<
      1 ShipNum=>1 Name=Tommy Wiseau
      1 ShipNum=>1 Name=UES Tauntology
      1 ShipNum=>1 Name=USN Crasher

      6 ShipNum=>2 Name=Aegis  <<<
      1 ShipNum=>2 Name=BORG!!!
      5 ShipNum=>2 Name=ISN Invictus
      1 ShipNum=>2 Name=Red 4

      6 ShipNum=>3 Name=Horatio  <<<
      5 ShipNum=>3 Name=ISN Excision
      1 ShipNum=>3 Name=Red 1

      5 ShipNum=>4 Name=Excalibur  <<<
      1 ShipNum=>4 Name=Red 3
      1 ShipNum=>4 Name=USN Phoenix

      5 ShipNum=>5 Name=Hera  <<<
      1 ShipNum=>5 Name=Red 2

      1 ShipNum=>6 Name=BORG
      5 ShipNum=>6 Name=Ceres  <<<
      1 ShipNum=>6 Name=Red 1
      1 ShipNum=>6 Name=Slate's Spiffy

      5 ShipNum=>7 Name=Diana  <<<
      1 ShipNum=>7 Name=TSN Phoenix
      1 ShipNum=>7 Name=cygnus

      1 ShipNum=>255 Name=AHA-2
      1 ShipNum=>255 Name=ComJNJ-0
      1 ShipNum=>255 Name=DeeETE-0
      1 ShipNum=>255 Name=KEK-0
      1 ShipNum=>255 Name=KTK-0
      1 ShipNum=>255 Name=LTL-0
      3 ShipNum=>255 Name=Odysseus
      2 ShipNum=>255 Name=Perseus
      3 ShipNum=>255 Name=Proteus
      1 ShipNum=>255 Name=RRR-1
      1 ShipNum=>255 Name=TJT-1
      4 ShipNum=>255 Name=Theseus
      1 ShipNum=>255 Name=USU-2
      1 ShipNum=>255 Name=YVY-0

Where parser.pl has had "ShipNum" on bit 5.8 for all v2.3.0+ files for quite a while

@rjwut rjwut closed this as completed in b2ca47f Apr 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants