Difference between revisions of "UpdateTransformMessage"

From SWGANH Wiki
Jump to: navigation, search
 
(Sample Packet)
 
(30 intermediate revisions by 6 users not shown)
Line 1: Line 1:
__NOTOC__
+
{{PageHeader|Server Packet|UpdateTransformMessage (1B24F808)}}
 
+
 
{| border="0" width="90%" cellpadding=6
 
{| border="0" width="90%" cellpadding=6
 
|-
 
|-
Line 6: Line 5:
 
===Struct===
 
===Struct===
 
----
 
----
 
+
{| align="center"
 +
|-
 +
||
 
{| class="wikitable"
 
{| class="wikitable"
 +
|{{short}}||'''Op Count'''
 
|-
 
|-
|align="center" style="background:#6C86BF; color:white;"|'''SHORT'''||'''Operand_Count'''
+
|{{int}}||'''Opcode'''
 
|-
 
|-
|align="center" style="background:#3C548A; color:white;"|'''INT'''||'''Opcode'''
+
|{{long}}||'''ObjectID'''
 
|-
 
|-
|align="center" style="background:#3C4565; color:white;"|'''LONG'''||'''ObjectID'''
+
|{{short}}||'''PositionX'''
 
|-
 
|-
|align="center" style="background:#6C86BF; color:white;"|'''SHORT'''||'''PositionX'''
+
|{{short}}||'''PositionY'''
 
|-
 
|-
|align="center" style="background:#6C86BF; color:white;"|'''SHORT'''||'''PositionZ'''
+
|{{short}}||'''PositionZ'''
 
|-
 
|-
|align="center" style="background:#6C86BF; color:white;"|'''SHORT'''||'''PositionY'''
+
|{{int}}||'''UpdateCounter'''
 
|-
 
|-
|align="center" style="background:#3C548A; color:white;"|'''INT'''||'''UpdateCounter'''
+
|{{byte}}||'''Speed'''
|-
+
|align="center" style="background:#B3C0DE; color:white;"|'''BYTE'''||'''<font color=red>Unknown</font>'''
+
|-
+
|align="center" style="background:#B3C0DE; color:white;"|'''BYTE'''||'''Direction'''
+
 
|-
 
|-
 +
|{{byte}}||'''Direction'''
 +
|}
 
|}
 
|}
  
Line 40: Line 40:
 
:ObjectID that you are listing attributes for.
 
:ObjectID that you are listing attributes for.
  
* '''Position X / Z / Y''':
+
* '''Position X / Y / Z''':
 
:New Position of Object. The value is transformed the following way.
 
:New Position of Object. The value is transformed the following way.
 
<pre>
 
<pre>
(Coordinate * 4) = Position
+
n = X / 4;
(Position / 4) = Coordinate
+
if n > 8192 n = n - 16384;
This is done to utilize variable size to prevent moving anywhere outside of the map.
+
effective map range is -8192..8192
Range of map = 16,000
+
 
Range of SHORT = 64,000
+
to convert the a float to position
64/16 = 4
+
n = uint16(x * 4.0f + 0.5f);
 
</pre>
 
</pre>
  
Line 56: Line 56:
 
:Incremented by 1 each packet.
 
:Incremented by 1 each packet.
  
* '''Direction'':
+
* '''Speed''':
 +
 
 +
 
 +
Haven't seen it out side the range of 0..5 yet
 +
 
 +
* '''Direction''':
 
:This is the direction for the object to face after moving.
 
:This is the direction for the object to face after moving.
 
:It is calculated by (Angle / 0.0625) where angle is in radians.
 
:It is calculated by (Angle / 0.0625) where angle is in radians.
Line 63: Line 68:
 
:This packet needs to be sent frequently to prevent start/stop in a movement stream.
 
:This packet needs to be sent frequently to prevent start/stop in a movement stream.
 
:Also, shorter distances at slower frequency will create slower speed.
 
:Also, shorter distances at slower frequency will create slower speed.
:
+
 
:It appears the unknown byte is some sort of server-side interpolation variable. 
+
''':OLD--DATA--Found this to be the posture byte'''
:It doesnt have any affect on the client, as far as we can tell.
+
:
+
 
:This byte seems to be related to the 2 variances of ObjController Transform Packets
 
:This byte seems to be related to the 2 variances of ObjController Transform Packets
 
:used (23 vs 21). See them for further detail. The 23 seems to be sent
 
:used (23 vs 21). See them for further detail. The 23 seems to be sent
Line 72: Line 75:
 
:count of 21's the occur between a group of 23. The 23 is assumed to be start/end
 
:count of 21's the occur between a group of 23. The 23 is assumed to be start/end
 
:of a chain of movement while the 21 is an update.
 
:of a chain of movement while the 21 is an update.
:'''<font color=red>TODO</font>''': Look into this byte more...
+
-
 
|valign=top|
 
|valign=top|
 +
 
===Tags===
 
===Tags===
 
----
 
----
Line 79: Line 83:
 
|-  
 
|-  
 
||{{ServerPacket}}
 
||{{ServerPacket}}
|-
 
||{{ClientPacket}}
 
 
|-
 
|-
 
||{{100%}}
 
||{{100%}}
|-
 
||{{75%}}
 
|-
 
||{{50%}}
 
|-
 
||{{25%}}
 
|-
 
||{{0%}}
 
 
|-
 
|-
 
|}
 
|}
 
 
|}
 
|}
 
 
----
 
----
  
==Sample Code==
+
==Sample Packet==
  
 
<pre>
 
<pre>
Insert Code Snippet Here...
+
08 00 // op count
 +
08 F8 24 1B // UpdateTransformMessage
 +
EB 4F 90 19 17 00 00 00 // object ID
 +
AD CF // x
 +
7C 00 // y
 +
CB 2B // z
 +
03 03 00 00 // counter
 +
00 // Speed
 +
2F // direction
 +
 
 +
08 00 //opcount
 +
08 F8 24 1B // UpdateTransformMessage
 +
D5 4F 90 19 17 00 00 00 // ID
 +
FA CF // x -3073.5
 +
7C 00 // y 31
 +
11 2C // z 2820.25
 +
6E 02 00 00 // update counter
 +
00 // speed
 +
E7 // direction
 
</pre>
 
</pre>
  
==Sample Packet==
+
Below is an NGE Packet
 
+
 
<pre>
 
<pre>
Insert Sample Packet Here...
+
0A 00 //opcount
 +
08 F8 24 1B // UpdateTransformMessage
 +
F1 50 15 74 1E 00 00 00 // ID
 +
85 0D  // x
 +
1D 00  // y
 +
87 34  // z
 +
02 00 00 00 // update Count
 +
00 // speed
 +
15 // rotation
 +
00 // rotation direction ??
 +
00
 
</pre>
 
</pre>

Latest revision as of 17:06, 5 January 2025

Server Packet - UpdateTransformMessage (1B24F808)

SWGANH Wiki is a repository of Star Wars Galaxies Developer information. This site is only meant to be used by SWGANH Developer team.

Struct


SHORT Op Count
INT Opcode
LONG ObjectID
SHORT PositionX
SHORT PositionY
SHORT PositionZ
INT UpdateCounter
BYTE Speed
BYTE Direction

Variable Descriptions


Opperand_Count = 8

Opcode = 1B24F808


  • ObjectID:
ObjectID that you are listing attributes for.
  • Position X / Y / Z:
New Position of Object. The value is transformed the following way.
n = X / 4;
if n > 8192 n = n - 16384; 
effective map range is -8192..8192

to convert the a float to position
n = uint16(x * 4.0f + 0.5f);
  • UpdateCounter:
Number of movement updates the object has done.
Used to distinguish new updates from potential repeats.
Incremented by 1 each packet.
  • Speed:


Haven't seen it out side the range of 0..5 yet

  • Direction:
This is the direction for the object to face after moving.
It is calculated by (Angle / 0.0625) where angle is in radians.
    • Additional Notes:
This packet needs to be sent frequently to prevent start/stop in a movement stream.
Also, shorter distances at slower frequency will create slower speed.

:OLD--DATA--Found this to be the posture byte

This byte seems to be related to the 2 variances of ObjController Transform Packets
used (23 vs 21). See them for further detail. The 23 seems to be sent
in a Data channel signifying it being important. This byte is related to a
count of 21's the occur between a group of 23. The 23 is assumed to be start/end
of a chain of movement while the 21 is an update.

-

Tags


S→C This packet originates on the server.

100% This packet has been completely reversed.


Sample Packet

08 00 // op count
08 F8 24 1B // UpdateTransformMessage
EB 4F 90 19 17 00 00 00 // object ID
AD CF // x
7C 00 // y
CB 2B // z
03 03 00 00 // counter
00 // Speed
2F // direction

08 00 //opcount
08 F8 24 1B // UpdateTransformMessage
D5 4F 90 19 17 00 00 00 // ID
FA CF // x -3073.5
7C 00 // y 31
11 2C // z 2820.25
6E 02 00 00 // update counter
00 // speed
E7 // direction

Below is an NGE Packet

0A 00 //opcount
08 F8 24 1B // UpdateTransformMessage
F1 50 15 74 1E 00 00 00 // ID
85 0D  // x
1D 00  // y
87 34  // z
02 00 00 00 // update Count
00 // speed
15 // rotation
00 // rotation direction ??
00