Sampling Resources (Sequence)

From SWGANH Wiki
Revision as of 17:15, 29 December 2006 by Snow (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

having surveyed the resources by clicking on the sample resource button the client sends the following packet to the server in which the survey tool ID and the resource to get sampled are lined out.

Packet: Client --> Server

00 09                            Data Channel A 

01 0c                            Server sequence

05 00                            operand count

46 5e ce 80                      Int Packet Opcode

23 00 00 00                      Int 1

16 01 00 00                      Int 2

95 5c 2b 03 18 00 00 00          Player ID

00 00 00 00 00 00 00 00          not used in this case

34 c6 23 92                      Int 3 -> sample resource

3e dc 1f ab 11 00 00 00          ID Resource Template

09 00 00 00                      length Unicode string

52 00 6f 00 63 00 6f 00 6f 00    R.o.c.o.o.l.o.i.m.
6c 00 6f 00 69 00 6d 00 

00                               compression flag

72 35                            CRC


Packet: Server --> Client

this is answered by the following packet which prompts the client to say *you start sampling for xyz*


00 09

wx yz                             server sequence

04 00

13 64 2a 6d

00 00 00 00
00 3d 00 00
00 00 00 01
ff ff ff ff

06 00                              length string "survey"

73 75 72 76 65 79                  "survey"

00 00 00 00

0e 00                              length string "start_sampling"

73 74 61 ....                      "start_sampling"
..... 6e 67               

00 00 00 00 00 00 00               56 times 00
00 00 00 00 00 00 00
00 00 00 00 00 00 00
00 00 00 00 00 00 00
00 00 00 00 00 00 00
00 00 00 00 00 00 00
00 00 00 00 00 00 00

09 00 00 00                        length unicode string resource

52 00 6f 00 .......

00 00 00 00 00 00 00               9 times 00
00

00 00 00                           CRC etc.


this packet is send by the server to determine that the sampling was unsuccesful

as of yet I have never seen the client ask for an update after some time. That means that the server does not verify if a client who send a sample packet is eligible to sample again, but that the server after say 20 seconds sends a sample packet of his own until the player changes his stance and thus ends sampling.

Packet: Server --> Client
00 09 

04 3e 

00 19 89                            00 19 multi packet Packet with count for the first Packet

04 00                               operand count

13 64 2a 6d                         uint 32 opcode (system message)

00 00 00 00                         ???

00 3d 00 00                         ???

00 01 00 01                         ???

ff ff ff ff                         ???

06 00                               length of string "survey"
73 75 72 76 65 79                   string "survey"

00 00 00 00 

0d 00                               length of string
73 61 6d 70 6c 65 5f 66 61          string "sample_failed"
69 6c 65 64 

00 00 00 00 00 00 00 00             56 times 0
00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00  
00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00      

09 00 00 00                         length unicode string
52 00 6f 00 63 00 6f 00             unicode string R.o.c.o.o.l.o.i.m = resource name
6f 00 6c 006f 00 69 00 6d 00 

00 00 00 00 00 00 00 00 00 00       10 times 00

(uv wx yz )                         if send as single packet of course with crc and compression flag

// this packet plays the sampling effect

52 09 00 
74 9e 94 02                         Opcode

26 00                               length of string
63 6c 69 65 6e 74 65 66 66 65 63    string "clienteffect/survey_sam
74 2f 73 75 72 76 65 79 5f 73 61    ple_mineral.cef"
6d 70 6c 65 5f 6d 69 6e 65 72 61 
6c 2e 63 65 66 

08 00                               length of string
74 61 74 6f 6f 69 6e 65             string "tatooine"

91 e2 c7 45                         Position X

17 33 3a 43                         Position Y (Z)

d9 54 8e c5                         Position Z (Y)

00 00 00 00                         12 bytes 00 in preCU, 14 in NGE
00 00 00 00 
00 00 00 00 

(00 00 )                            NGE only dont know about CU though :(

(uv wx yz)                          compression flag and crc if needed


However should the sampling prove succesfull the server sends a ONCR (RCNO)Packet structure which is actually quite similar to the TANO (ONAT) packet structures to create a stackable resource item in the players Inventory.

As of yet the client parses the packets up to the ONCR 3 packet, which creates an item in the inventory with some kind of graphic that is displayed far to big and the number of items we have given. The name which is displayed for this item is "[resource\resource_names] vegetable_fungi" which is provided by the ONCR 3 to describe the kind of resource.

As I can see out of the NGE packet structs the actual name, amount and other descriptions are given in the ONCR 6 packet, which in the NGE is quite similiar to the TANO 6 Packet.

Sadly as of yet I have found no way of sending that packet without crashing the client. So if someone is bored or wants to polish/show off his l33t reversing skills - your welcome :P

Packet: Server --> Client

00 09                                Data Channel A

04 70                                server sequence

04 00                                operand count

13 64 2a 6d                          Opcode 2 system message

00 00 00 00 

00 3d 00 00 

00 00 00 01 

ff ff ff ff 

06 00                               length string
73 75 72 76 65 79 	            string "survey"

00 00 00 00 

0e 00                              length string
73 61 6d 70 6c 65 5f 6c        	   sample_located
6f 63 61 74 65 64 				


00 00 00 00 00 00 00 00           56 times 00
00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 

09 00 00 00                       length string
52 00 6f 00 63 00 6f 00           unicode string resource name
6f 00 6c 00 6f 00 69 00           "R.o.c.o.o.l.o.i.m."
6d 00 

02 00 00 00                       amount of the gathered resources

00 00 00 00                       ??
00                                ??

(UV WX YZ )                       CRC and compression Flag
Packet: Server --> Client


00 09                             Data Channel A
04 71                             Server sequence
00 19                             Multi Packet
2f                                length of first Packet
05 00                             operand count
ea dd 89 fe                       Opcode SMSG_OBJ_INIT
ea b7 e9 33 18 00 00 00           I believe this to be the ID of the newly created Item / resource

00 00 00 00                       dunno
00 00 00 00 
00 00 00 00 

00 00                             dunno see notes below
80 3f                             dunno 70 dez ??

91 e2 c7 45                       Position X                  Ok to tell the truth I have doubts if these have to be send.
17 33 3a 43                       Position Z (Y)              In NGE Logs when logging in and creating resis in the backpack 
d9 54 8e c5                       Position Y (Z)              (the same princip really) theire 00 00 00 00 ....lol

6d 5e ce 88                       CRC resource container 
                                  // please note that the container is not displayed correct
                                  // Im not sure if Im missing something there or if that would be
                                  // fixed with that ONCR 6 packet that crashes the client
                                  // I personally believe theres something missing though

00                                one single 00

1a 


04 00 

9e de cb 56                       SMSG_OBJ_LINK

ea b7 e9 33 18 00 00 00           ID of the created Item / resource

96 5c 2b 03 18 00 00 00           Player ID Should be inventory ID!!! or hopper ID or backpack ID

ff ff ff ff                       dunno





7d                                length

05 00                             operand count

0c 5f a7 68                       SMSG_OBJ_UPDATE

ea b7 e9 33 18 00 00 00           ITEM / resource ID

4f 4e 43 52 03                    ONCR 3 Packet


66 00 00 00                       the length of the Packet following this dword

0d 00                             perhaps the number of object operands

00 00 80 3f                       //dunno same as the above value is also found in 
                                  //the nge creo packets I have seen see notes below

17 00                             length string
72 65 73 6f 75 72 63 65           string "resource/resource_names"
2f 72 65 73 6f 75 72 63 
65 5f 6e 61 6d 65 73 				    

00 00 00 00                       dunno

12 00                             length string
67 65 6d 73 74 6f 6e 65 5f 61     string"gemstone_armophous"
72 6d 6f 70 68 6f 75 73  

00 00 00 00                       // dunno
01 00 00 00 

00 00 00 00 
00 00 00 00      
00 00 00 00 

00 00 00 00 
00 00 00 00 

00 00 64 00        
00 00 01 02 
00 00 00 5f
74 6a 02 18 
00 00 00 



84        ......._tj/...

05 00 

0c 5f a7 68 							sms obj update

ea b7 e9 33 18 00 00 00 					object ID

4f 4e 43 52 06 							ONCR 6

6d 00 00 00 							size rest

06 00 								item operand count

5e 00 00 00 							(!!??!!)

14 00                                                           length string
72 65 73 6f 75 72 63 65 5f 63 6f 6e 74 61 69 6e 	        string "resource_container_d"
65 72 5f 64 							 

00 00 00 00 

18 00                                                           length string
69 6e 6f 72 67 61 6e 69 63 5f 6d 69 6e 65 	 	        string "anorganic_minerals_small"
72 61 6c 73 5f 73 6d 61 6c 6c 

a0 86 01 00                                                     dezimal 100.000 its the max stack size

0f 00                                                           length string
61 72 6d 6f 70 68 6f 75 73       				armophous_rudic
5f 72 75 64 69 63 						 

09 00 00 00                                                     length unicode string
52 00 6f 00 63 00 6f 00 6f 00 
6c 00 6f 00 69 00 6d 00                                         string"R.o.c.o.o.l.o.i.m."


00 00 00 00        
00 00 00 00 

19                                                              // length next Packet

05 00                                                           // operand count

0c 5f a7 68                                                     // SMSG_OBJ_UPDATE

ea b7 e9 33 18 00 00 00                                         // Obj ID

4f 4e 43 52 08                                                  // ONCR 8

02 00 

00 00 00 00 

19                                                              // length next packet

05 00 

0c 5f a7 68                                                     //SMSG_OBJ_UPDATE

ea b7 e9 33 18 00 00 00                                         //OBJ ID

4f 4e 43 52 09                                                  // ONCR 9

02 00 

00 00 00 00 

0e                                                              // length next packet

02 00 

37 60 43 2c                                                     // SMSG_OBJ_FINISH

ea b7 e9 33 18 00 00 00                                         // OBJ ID

(UV WX YZ)                                                      // as usual

about the 00 00 80 3f

I believe this structure is quite similar to the creo tano structures seen in the game. Incidently the selfsame dword (0000803f) is seen in other creo 3 and creo 6 packets, too.

One example for that are two different sets of creo structures sent for one and the self mob in the NGE, in the log I have a cu-pa. In the first set of creos the server sends

4f 45 52 43 03         //creo 3
69 00 00 00            // packet length
11 00                  // operand count ??
00 00 

80 3f

12 00                  // string length
string "mob/creature_names"

00 00 00 00

05 00                 // string length

string "cu_pa"
00 00 00 00
01 00 00 00
...........

while in the second the server sends

4f 45 52 43 03        // creo 3

3a 00 00 00 

04 00 

01 00 

12 00                // string length

string "mob/creature_names"

00 00 00 00

05 00                // string length

string "cu_pa"

04 00 07 00
02 01 02 1b
..........
</pe>

So this is pesumably some kind of indicator for the layout and content of the packet??

CREO TANO ONCR --Schmunzel 17:55, 22 August 2006 (EDT) corrected some errors