-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocs.txt
1040 lines (924 loc) · 29.2 KB
/
docs.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
## Connect Request [1]
### Client -> Server
| Size | Description | Type | Notes |
|------|----------|------|-------|
|?|Version|String|"Terraria" + Main.curRelease|
## Disconnect [2]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|?|Reason|NetworkText|-|
## Continue Connecting [3]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Player ID|Byte|-|
## Player Info [4]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Player ID|Byte|-|
|1|Skin Varient|Byte|-|
|1|Hair|Byte|If >134 then Set To 0|
|?|Name|String|-|
|1|Hair Dye|Byte|-|
|1|Hide Visuals|Byte|-|
|1|Hide Visuals 2|Byte|-|
|1|Hide Misc|Byte|-|
|3|Hair Color|Color|-|
|3|Skin Color|Color|-|
|3|Eye Color|Color|-|
|3|Shirt Color|Color|-|
|3|Under Shirt Color|Color|-|
|3|Pants Color|Color|-|
|3|Shoe Color|Color|-|
|1|Difficulty|Byte|-|
## Player Inventory Slot [5]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Player ID|Byte|-|
|1|Slot ID|Byte|0 - 58 = Inventory, 59 - 78 = Armor, 79 - 88 = Dye, 89 - 93 MiscEquips, 94 - 98 = MiscDyes, 99 - 138 = Piggy bank, 139-178 = Safe, 179 = Trash|
|2|Stack|Int16|-|
|1|Prefix|Byte|-|
|2|Item NetID|Int16|-|
## Continue Connecting2 [6]
### Client -> Server
| Size | Description | Type | Notes |
|------|-------------|------|-------|
||||
## World Info [7]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|4|Time|Int32|-|
|1|Day and Moon Info|Byte|BitFlags: 1 = Day Time, 2 = Blood Moon, 4 = Eclipse|
|1|Moon Phase|Byte|-|
|2|MaxTilesX|Int16|-|
|2|MaxTilesY|Int16|-|
|2|SpawnX|Int16|-|
|2|SpawnY|Int16|-|
|2|WorldSurface|Int16|-|
|2|RockLayer|Int16|-|
|4|WorldID|Int32|-|
|?|World Name|String|-|
|?|World Unique ID|String|-|
|8|World Generator Version|UInt64|-|
|1|Moon Type|Byte|-|
|1|Tree Background|Byte|-|
|1|Corruption Background|Byte|-|
|1|Jungle Background|Byte|-|
|1|Snow Background|Byte|-|
|1|Hallow Background|Byte|-|
|1|Crimson Background|Byte|-|
|1|Desert Background|Byte|-|
|1|Ocean Background|Byte|-|
|1|Ice Back Style|Byte|-|
|1|Jungle Back Style|Byte|-|
|1|Hell Back Style|Byte|-|
|4|Wind Speed Set|Single|-|
|1|Cloud Number|Byte|-|
|4|Tree 1|Int32|-|
|4|Tree 2|Int32|-|
|4|Tree 3|Int32|-|
|1|Tree Style 1|Byte|-|
|1|Tree Style 2|Byte|-|
|1|Tree Style 3|Byte|-|
|1|Tree Style 4|Byte|-|
|4|Cave Back 1|Int32|-|
|4|Cave Back 2|Int32|-|
|4|Cave Back 3|Int32|-|
|1|Cave Back Style 1|Byte|-|
|1|Cave Back Style 2|Byte|-|
|1|Cave Back Style 3|Byte|-|
|1|Cave Back Style 4|Byte|-|
|4|Rain|Single|-|
|1|Event Info|Byte|BitFlags: 1 = Shadow Orb Smashed, 2 = Downed Boss 1, 4 = Downed Boss 2, 8 = Downed Boss 3, 16 = Hard Mode, 32 = Downed Clown, 64 = Server Side Character, 128 = Downed Plant Boss|
|1|Event Info 2|Byte|BitFlags: 1 = Mech Boss Downed, 2 = Mech Boss Downed 2, 4 = Mech Boss Downed 3, 8 = Mech Boss Any Downed, 16 = Cloud BG, 32 = Crimson, 64 = Pumpkin Moon, 128 = Snow Moon|
|1|Event Info 3|Byte|BitFlags: 1 = Expert Mode, 2 = FastForwardTime, 3 = Slime Rain, 4 = Downed Slime King, 5 = Downed Queen Bee, 6 = Downed Fishron, 7 = Downed Martians, 8 = Downed Ancient Cultist|
|1|Event Info 4|Byte|BitFlags: 1 = Downed Moon Lord, 2 = Downed Pumking, 3 = Downed Mourning Wood, 4 = Downed Ice Queen, 5 = Downed Santank, 6 = Downed Everscream, 7 = Downed Golem, 8 = Birthday Party|
|1|Event Info 5|Byte|BitFlags: 1 = Downed Pirates, 2 = Downed Frost Legion, 3 = Downed Goblins, 4 = Sandstorm, 5 = DD2 Event, 6 = Downed DD2 Tier 1, 7 = Downed DD2 Tier 2, 8 = Downed DD2 Tier 3|
|1|Invasion Type|SByte|-|
|8|Lobby ID|UInt64|-|
## Get Section [8]
### Client -> Server
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|4|X|Int32|If -1 Send spawn area tile sections|
|4|Y|Int32|If -1 Send spawn area tile sections|
## Status [9]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|4|StatusMax|Int32|Status only increases|
|?|Status Text|NetworkText|-|
## Send Section [10]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Compressed|Boolean|-|
|4|X Start|Int32|-|
|4|Y Start|Int32|-|
|2|Width|Int16|-|
|2|Height|Int16|-|
|?|Tiles|-||
|2|Chest Count|Int16|-|
|?|Chests|-||
|2|Sign Count|Int16|-|
|?|Signs|-||
|2|TileEntity Count|Int16|-|
|?|TileEntities|-|-|
## Section Tile Frame [11]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|StartX|Int16|-|
|2|StartY|Int16|-|
|2|EndX|Int16|-|
|2|EndY|Int16|-|
## Spawn Player [12]
### Client -> Server
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Player ID|Byte|-|
|2|SpawnX|Int16|-|
|2|SpawnY|Int16|-|
## Update Player [13]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Player ID|Byte|-|
|1|Control|Byte|BitFlags: ControlUp = 1, ControlDown = 2, ControlLeft = 4, ControlRight = 8, ControlJump = 16, ControlUseItem = 32, Direction = 64|
|1|Pulley|Byte|BitFlags: 0 = None, 1 = Direction, 2 = Direction, 4 = Update Velocity, 8 = Vortex Stealth Active, 16 = Gravity Direction, 32 = Shield Raised|
|1|SelectedItem|Byte|-|
|4|PositionX|Single|-|
|4|PositionY|Single|-|
|4|VelocityX|Single|Not sent if Update Velocity is not set|
|4|VelocityY|Single|Not sent if Update Velocity is not set|
## Player Active [14]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Player ID|Byte|-|
|1|Active|Boolean|-|
## Null [15]
### Never sent
| Size | Description | Type | Notes |
|------|-------------|------|-------|
## Player HP [16]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Player ID|Byte|-|
|2|HP|Int16|-|
|2|Max HP|Int16|-|
## Modify Tile [17]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Action|Byte|Values: 0 = KillTile, 1 = PlaceTile, 2 = KillWall, 3 = PlaceWall, 4 = KillTileNoItem, 5 = PlaceWire, 6 = KillWire, 7 = PoundTile, 8 = PlaceActuator, 9 = KillActuator, 10 = PlaceWire2, 11 = KillWire2, 12 = PlaceWire3, 13 = KillWire3, 14 = SlopeTile, 15 = FrameTrack, 16 = PlaceWire4, 17 = KillWire4, 18 = PokeLogicGate, 19 = Actuate|
|2|TileX|Int16|-|
|2|TileY|Int16|-|
|2|Var1|Int16|KillTile (Fail: Bool), PlaceTile (Type: Byte), KillWall (Fail: Bool), PlaceWall (Type: Byte), KillTileNoItem (Fail: Bool), SlopeTile (Slope: Byte)|
|1|Var2|Byte|Var2: PlaceTile (Style: Byte)|
## Time [18]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|DayTime|Boolean|-|
|4|TimeValue|Int32|-|
|2|SunModY|Int16|-|
|2|MoonModY|Int16|-|
## Door Toggle [19]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Action|Byte|0 = Open Door, 1 = Close Door, 2 = Open Trapdoor, 3 = Close Trapdoor, 4 = Open Tall Gate, 5 = Close Tall Gate|
|2|TileX|Int16|-|
|2|TileY|Int16|-|
|1|Direction|Byte|If (Action == 0) then (if (Direction == -1) then OpenToLeft else OpenToRight) if (Action == 2) then (if (Direction == 1) then PlayerIsAboveTrapdoor) if (Action == 3) then (if (Direction == 1) then PlayerIsAboveTrapdoor)|
## Send Tile Square [20]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|Player ID|UInt16|-|
|1|TileChangeType|Byte|Only if != 0|
|2|Size|Int16|-|
|2|TileX|Int16|-|
|2|TileY|Int16|-|
|?|Tiles|-||
## Update Item Drop [21]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|ItemID|Int16|If below 400 and NetID 0 Then Set NullIf ItemID is 400 Then New Item|
|4|PositionX|Single|-|
|4|PositionY|Single|-|
|4|VelocityX|Single|-|
|4|VelocityY|Single|-|
|2|Stack Size|Int16|-|
|1|Prefix|Byte|-|
|1|NoDelay|Byte|If 0 then ownIgnore = 0 and ownTime = 100|
|2|Item NetID|Int16|-|
## Update Item Owner [22]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|ItemID|Int16|-|
|1|Player ID|Byte|-|
## NPC Update [23]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|NPC ID|Int16|-|
|4|PositionX|Single|-|
|4|PositionY|Single|-|
|4|VelocityX|Single|-|
|4|VelocityY|Single|-|
|2|Target|UInt16|Player ID|
|1|Flags|Byte|BitFlags: 1 = Direction, 2 = DirectionY, 4 = AI[0], 8 = AI[1], 16 = AI[2], 32 = AI[3], 64 = SpriteDirection, 128 = LifeMax|
|?|AI[?]|Single[]|Requires the AI flag to be set in order to be sent down the wire|
|2|NPC NetID|Int16|-|
|1|LifeBytes|Byte|The size in bytes of Life, only present if !Flags[7] (LifeMax)|
|?|Life|Byte or Int16 or Int32|Only present if !Flags[7] (LifeMax)|
|1|ReleaseOwner|Byte|Only present if NPC is catchable|
## Strike NPCwith Held Item [24]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|NPC ID|Int16|-|
|1|Player ID|Byte|-|
## Projectile Update [27]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|ProjectileID|Int16|-|
|4|PositionX|Single|-|
|4|PositionY|Single|-|
|4|VelocityX|Single|-|
|4|VelocityY|Single|-|
|4|KnockBack|Single|-|
|2|Damage|Int16|-|
|1|Owner|Byte|Player ID|
|2|Type|Int16|-|
|1|AIFlags|Byte|BitFlags: 0 = AI[0] is Present, 1 = AI[1] is Present, 2 = Needs UUID|
|4|AI0|Single|Requires the AI0 flag to be set in order to be sent down the wire|
|4|AI1|Single|Requires the AI1 flag to be set in order to be sent down the wire|
|2|ProjUUID|Int16|Requires the Needs UUID flag to be set in order to be sent down the wire|
## NPC Strike [28]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|NPC ID|Int16|-|
|2|Damage|Int16|-1 = Kill|
|4|Knockback|Single|-|
|1|Direction|Byte|-|
|1|Crit|Boolean|-|
## Destroy Projectile [29]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|Projectile ID|Int16|-|
|1|Owner|Byte|Player ID|
## Toggle P V P [30]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Player ID|Byte|-|
|1|PVP Enabled|Boolean|-|
## Get Chest Contents [31]
### Client -> Server
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|TileX|Int16|-|
|2|TileY|Int16|-|
## Chest Item [32]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|Chest ID|Int16|-|
|1|ItemSlot|Byte|-|
|2|Stack|Int16|-|
|1|Prefix|Byte|-|
|2|Item Net ID|Int16|-|
## Set Chest Name [33]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|Chest ID|Int16|-|
|2|ChestX|Int16|-|
|2|ChestY|Int16|-|
|1|Name Length|Byte|-|
|?|Chest Name|String|Only if length > 0 && <= 20|
## PlaceChest [34]
### Server <-> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|ChestID|Byte|BitFlags:0 = Place Chest, 1 = Kill Chest, 2 = Place Dresser, 3 = Kill Dresser. 4 = Place Containers2, 5 = Kill Containers2|
|2|TileX|Int16|-|
|2|TileY|Int16|-|
|2|Style|Int16|FrameX(Chest type)|
|2|Chest ID to destroy|Int16|ID if client is receiving packet, else 0|
## Heal Effect [35]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Player ID|Byte|-|
|2|Heal Amount|Int16|-|
## Player Zone [36]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Player ID|Byte|-|
|1|Zone1|Byte|1 = Dungeon, 2 = Corruption, 4 =Holy, 8 = Meteor, 16 = Jungle, 32 = Snow, 64 = Crimson, 128 = Water Candle|
|1|Zone2|Byte|1 = Peace Candle, 2 = Solar Tower, 4 = Vortex Tower, 8 = Nebula Tower, 16 = Stardust Tower, 32 = Desert, 64 = Glowshroom, 128 = Underground Desert|
|1|Zone3|Byte|1 = Overworld, 2 = Dirt Layer, 4 = Rock Layer, 8 = Underworld, 16 = Beach, 32 = Rain, 64 = Sandstorm|
|1|Zone4|Byte|1 = Old One's Army|
## Request Password [37]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|||||
## Send Password [38]
### Client -> Server
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|?|Password|String|-|
## Remove Item Owner [39]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|ItemIndex|Int16|-|
## Set Active NPC [40]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Player ID|Byte|-|
|2|Npc Talk Target|Int16|-|
## Player Item Animation [41]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Player ID|Byte|-|
|4|Item Rotation|Single|-|
|2|Item Animation|Int16|-|
## Player Mana [42]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Player ID|Byte|-|
|2|Mana|Int16|-|
|2|Max Mana|Int16|-|
## Mana Effect [43]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Player ID|Byte|-|
|2|Mana Amount|Int16|-|
## Player Team [45]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Player ID|Byte|-|
|1|Team|Byte|-|
## Request Sign [46]
### Client -> Server
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|X|Int16|-|
|2|Y|Int16|-|
## Update Sign [47]
### Updates sign if sent from client otherwise displays sign to client.
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|Sign ID|Int16|-|
|2|X|Int16|-|
|2|Y|Int16|-|
|?|Text|String|-|
|1|Player ID|Byte|-|
## Set Liquid [48]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|X|Int16|-|
|2|Y|Int16|-|
|1|Liquid|Byte|-|
|1|Liquid Type|Byte|-|
## Complete Connection and Spawn [49]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|-| |-| |
## Update Player Buff [50]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Player ID|Byte|-|
|1 * 22|BuffType|Byte[22]|
## Special NPC Effect [51]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Player ID|Byte|-|
|1|Type|Byte|Values: 1 = Spawn Skeletron, 2 = Cause sound at player, 3 = Start Sundialing (Only works if server is receiving), 4 = BigMimcSpawnSmoke|
## Unlock [52]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Type|Byte|Values: 1 = Chest Unlock, 2 = Door Unlock|
|2|X|Int16|-|
|2|Y|Int16|-|
## Add NPC Buff [53]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|NPC ID|Int16|-|
|1|Buff|Byte|-|
|2|Time|Int16|-|
## Update NPC Buff [54]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|NPC ID|Int16|-|
|1|Buff ID|Byte|-|
|2|Time|Int16|-|
|1|Buff ID 2|Byte|-|
|2|Time 2|Int16|-|
|1|Buff ID 3|Byte|-|
|2|Time 3|Int16|-|
|1|Buff ID 4|Byte|-|
|2|Time 4|Int16|-|
|1|Buff ID 5|Byte|-|
|2|Time 5|Int16|-|
## Add Player Buff [55]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Player ID|Byte|-|
|1|Buff|Byte|-|
|4|Time|Int32|-|
## Update NPC Name [56]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|NPC ID|Int16|-|
|?|Name|String|Only if client is receiving packet|
## Update Good Evil [57]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Good|Byte|-|
|1|Evil|Byte|-|
|1|Crimson|Byte|-|
## Play Music Item [58]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Player ID|Byte|-|
|4|Note|Single|-|
## Hit Switch [59]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|X|Int16|-|
|2|Y|Int16|-|
## NPC Home Update [60]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|NPC ID|Int16|-|
|2|HomeTileX|Int16|-|
|2|HomeTileY|Int16|-|
|1|Homeless|Byte|-|
## Spawn Boss Invasion [61]
### Client -> Server
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|Player ID|Int16|-|
|2|Type|Int16|Negative Values: -1 = GoblinInvasion, -2 = FrostInvasion, -3 = PirateInvasion, -4 = PumpkinMoon, -5 = SnowMoon, -6 = Eclipse, -7 = Martian Moon Positive Values: Spawns any of these NPCs:4,13,50,126,125,134,127,128,131,129,130,222,245,266,370,75,398,439,493,507,422,517|
## Player Dodge [62]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Player ID|Byte|-|
|1|Flag|Byte|1 = Ninja Dodge 2 = Shadow Dodge|
## Paint Tile [63]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|X|Int16|-|
|2|Y|Int16|-|
|1|Color|Byte|-|
## Paint Wall [64]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|X|Int16|-|
|2|Y|Int16|-|
|1|Color|Byte|-|
## Player NPC Teleport [65]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Flags|Byte|BitFlags: 0 = Player Teleport (Neither 1 or 2), 1 = NPC Teleport, 2 = Player Teleport to Other Player, 4 = Style += 1, 8 = Style += 2|
|2|Target ID|Int16|-|
|4|X|Single|-|
|4|Y|Single|-|
## Heal Other Player [66]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Player ID|Byte|-|
|2|Heal Amount|Int16|-|
## Placeholder [67]
### Does not exist in the official client. Exists solely for the purpose of being used by custom clients and servers.
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|-| |-| |
## Client UUID [68]
### Client -> Server
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|?|UUID|String||
## Get Chest Name [69]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|Chest ID|Int16|-|
|2|Chest X|Int16|-|
|2|Chest Y|Int16|-|
|?|Name|String|-|
## Catch NPC [70]
### Client -> Server
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|NPC ID|Int16|-|
|1|Who|Byte|-|
## Release NPC [71]
### Client -> Server
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|4|X|Int32|-|
|4|Y|Int32|-|
|2|NPC Type|Int16|-|
|1|Style|Byte|Sent to NPC AI[2]|
## Travelling Merchant Inventory [72]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2*40|Items|Int16[40]|Each short related to an item type NetID.|
## Teleportation Potion [73]
### Server <-> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
## Angler Quest [74]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Quest|Byte|-|
|1|Completed|Boolean|-|
## Complete Angler Quest Today [75]
### Client -> Server
| Size | Description | Type | Notes |
|------|-------------|------|-------|
## Number Of Angler Quests Completed [76]
### Client -> Server
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Player ID|Byte|-|
|4|Angler Quests Completed|Int32|-|
## Create Temporary Animation [77]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|AnimationType|Int16|-|
|2|TileType|UInt16|-|
|2|X|Int16|-|
|2|Y|Int16|-|
## Report Invasion Progress [78]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|4|Progress|Int32|-|
|4|MaxProgress|Int32|-|
|1|Icon|SByte|-|
|1|Wave|SByte|-|
## Place Object [79]
### Server <-> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|X|Int16|-|
|2|Y|Int16|-|
|2|Type|Int16|-|
|2|Style|Int16|-|
|1|Alternate|Byte|-|
|1|Random|SByte|-|
|1|Direction|Boolean|-|
## Sync Player Chest Index [80]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Player|Byte|-|
|2|Chest|Int16|-|
## Create Combat Text [81]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|4|X|Single|-|
|4|Y|Single|-|
|3|Color|Color|-|
|4|Heal Amount|Int32|-|
## Load Net Module [82]
### Client -> Server
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|Module ID|Unsigned Short||
|??|Payload|??||
Note: 82 is sent prior to chat packets in 1.3.5.x. Instructs the server to load a net module.
## Set NPC Kill Count [83]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|NPC Type|Int16|-|
|4|Kill Count|Int32|-|
## Set Player Stealth [84]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Player|Byte|-|
|4|Stealth|Single|-|
## Force Item Into Nearest Chest [85]
### Client -> Server
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Inventory Slot|Byte|-|
## Update Tile Entity [86]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|4|Key|Int32|-|
|1|Remove?|Boolean|-|
|1|TileEntity Type|Byte|If Remove? == false|
|4|ID|Int32|If Remove? == false|
|2|X|Int16|If Remove? == false|
|2|Y|Int16|If Remove? == false|
|2|NPC|Int16|If Remove? == false && Type = 0|
|2|ItemType|Int16|If Remove? == false|
|1|Prefix|Byte|If Remove? == false|
|2|Stack|Int16|If Remove? == false|
## Place Tile Entity [87]
### Client -> Server
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|X|Int16|-|
|2|Y|Int16|-|
|1|Type|Byte|2 = Logic Sensor 1 = Item Frame 0 = Training Dummy|
## Alter Item Drop [88]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|Item Index|Int16|-|
|1|Flags1|Byte|BitFlags: 1 = Color, 2 = Damage, 4 = Knockback, 8 = UseAnimation, 16 = UseTime, 32 = Shoot, 64 = ShootSpeed, 128 = NextFlags|
|4|Packed Color Value|UInt32|if Flags1.Color|
|2|Damage|UInt16|if Flags1.Damage|
|4|Knockback|Single|if Flags1.Knockback|
|2|Use Animation|UInt16|if Flags1.UseAnimation|
|2|Use Time|UInt16|if Flags1.UseTime|
|2|Shoot|Int16|if Flags1.Shoot|
|4|Shoot Speed|Float|if Flags1.ShootSpeed|
|1|Flags2|Byte|if Flags1.NextFlags BitFlags: 1 = Width, 2 = Height, 4 = Scale, 8 = Ammo, 16 = UseAmmo, 32 = NotAmmo|
|2|Width|Int16|if Flags2.Width|
|2|Height|Int16|if Flags2.Height|
|4|Scale|Float|if Flags2.Scale|
|2|Ammo|Int16|If Flags2.Ammo|
|2|UseAmmo|Int16|If Flags2.UseAmmo|
|1|NotAmmo|Bool|If Flags2.NotAmmo|
## Place Item Frame [89]
### Client -> Server
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|X|Int16|-|
|2|Y|Int16|-|
|2|Item Id|Int16|-|
|1|Prefix|Byte|-|
|2|Stack|Int16|-|
## Update Item Drop 2 [90]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|ItemID|Int16|If below 400 and NetID 0 Then Set NullIf ItemID is 400 Then New Item|
|4|PositionX|Single|-|
|4|PositionY|Single|-|
|4|VelocityX|Single|-|
|4|VelocityY|Single|-|
|2|Stack Size|Int16|-|
|1|Prefix|Byte|-|
|1|NoDelay|Byte|If 0 then ownIgnore = 0 and ownTime = 100|
|2|Item NetID|Int16|-|
## Sync Emote Bubble [91]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|4|Emote ID|Int32|-|
|1|Anchor Type|Byte|-|
|2|MetaData|UInt16|Only if AnchorType != 255|
|1|Lifetime|Byte|Only if AnchorType != 255|
|1|Emote|Byte|Only if AnchorType != 255|
|2|MetaData|Int16|Only sent if AnchorType != 255 and Emote < 0|
## Sync Extra Value [92]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|NPC Index|Int16|-|
|4|ExtraValue|Single|-|
|4|X|Single|-|
|4|Y|Single|-|
## Social Handshake [93]
### Not used
| Size | Description | Type | Notes |
|------|-------------|------|-------|
## Deprecated [94]
### Not used
| Size | Description | Type | Notes |
|------|-------------|------|-------|
## Kill Portal [95]
### Client -> Server
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|Projectile Index|UInt16|-|
## Player Teleport Through Portal [96]
### Server <-> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Player ID|Byte|-|
|2|Portal Color Index|Int16|-|
|4|New Position X|Single|-|
|4|New Position Y|Single|-|
|4|Velocity X|Single|-|
|4|Velocity Y|Single|-|
## Notify Player NPC Killed [97]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|NPC ID|Int16|-|
## Notify Player Of Event [98]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|Event ID|Int16|-|
## Update Minion Target [99]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Player ID|Byte|-|
|4|Target X|Single|-|
|4|Target Y|Single|-|
## NPC Teleport Through Portal [100]
### Server <-> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|NPC ID|UInt16|-|
|2|Portal Color Index|Int16|-|
|4|New Position X|Single|-|
|4|New Position Y|Single|-|
|4|Velocity X|Single|-|
|4|Velocity Y|Single|-|
## Update Shield Strengths [101]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|Solar Tower Shield|UInt16|-|
|2|Vortex Tower Shield|UInt16|-|
|2|Nebula Tower Shield|UInt16|-|
|2|Stardust Tower Shield|UInt16|-|
## Nebula Level Up Request [102]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Player ID|Byte|-|
|1|Level Up Type|Byte|-|
|4|Origin X|Single|In world coordinate pixels.|
|4|Origin Y|Single|In world coordinate pixels.|
## Update Moon Lord Countdown [103]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|4|Moon Lord Countdown|Int32|-|
## Set NPC Shop Item [104]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|Slot|Byte|-|
|2|Item Type|Int16|-|
|2|Stack|Int16|-|
|1|Prefix|Byte|-|
|4|Value|Int32|-|
|1|Flags|Byte|BitFlags: 1 = BuyOnce|
## Toggle Gem Lock [105]
### Client -> Server
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|X|Int16|-|
|2|Y|Int16|-|
|1|On|Boolean|-|
## Poof of Smoke [106]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|4|PackedVector|Int32|Two Int16's packed into 4 bytes.|
## Chat Message v2 [107]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|3|Message Color|Color|Client cannot change colors|
|?|Message|NetworkText||-|
|2|Message Length|Int16|
## Wired Cannon Shot [108]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|Damage|Int16|-|
|4|Knockback|Single|-|
|2|X|Int16|-|
|2|Y|Int16|-|
|2|Angle|Int16|-|
|2|Ammo|Int16|-|
|1|Player ID|Byte|Shooter's Player ID|
## Mass Wire Operation [109]
### Client -> Server
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|Start X|Int16|-|
|2|Start Y|Int16|-|
|2|End X|Int16|-|
|2|End Y|Int16|-|
|1|ToolMode|Byte|BitFlags: 1 = Red, 2 = Green, 4 = Blue, 8 = Yellow, 16 = Actuator, 32 = Cutter|
## Mass Wire Operation Consume [110]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|Item Type|Int16|-|
|2|Quantity|Int16|-|
|1|Player ID|Byte|-|
## Toggle Birthday Party [111]
### Client -> Server
| Size | Description | Type | Notes |
|------|-------------|------|-------|
## GrowFX [112]
### Server <-> Client (Sync)
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|1|GrowEffect|Boolean|-|
|2|X|Int16|-|
|2|Y|Int16|-|
|1|Height|Byte|-|
|2|Tree Gore|Int16|-|
## CrystalInvasionStart [113]
### Client -> Server
| Size | Description | Type | Notes |
|------|-------------|------|-------|
|2|X|Int16|-|
|2|Y|Int16|-|
## CrystalInvasionWipeAll [114]
### Server -> Client
| Size | Description | Type | Notes |
|------|-------------|------|-------|
## MinionAttackTargetUpdate [115]
### Client -> Server
| Size | Description | Type | Notes |