Item Modifier/Item Packet

From Terraria Mods Wiki
Jump to: navigation, search

Format of this document is from TShock Docs

Total Packet Size : 484 Bits | 60 Bytes and 4 Bits

Size(Bits) Name Data Type Notes
8 Flags1 Byte 1 = Flags2

2 = Flags3

4 = Flags4

8 = Flags5

8 Flags2 Byte If Flags1[0] is true

1 = Auto Reuse

2 = Consumable

4 = Potion

8 = Accessory

16 = Damage Type

32 = Damage

64 = Knockback

128 = Crit

1 Auto Reuse Boolean If Flags2[0] is true
1 Consumable Boolean If Flags2[1] is true
1 Potion Boolean If Flags2[2] is true
1 Accessory Boolean If Flags2[3] is true
8 Damage Type Byte If Flags2[4] is true

0 = Non

1 = Melee

2 = Magic

3 = Ranged

4 = Summon

5 = Thrown

32 Damage Int32 If Flags2[5] is true
32 Knockback Single If Flags2[6] is true
16 Crit Unsigned Int16 If Flags2[7] is true
8 Flags3 Byte If Flags1[1] is true

1 = Shoot

2 = Shoot Speed

4 = Create Tile

8 = Tile Boost

16 = Buff Type

32 = Buff Time

64 = Heal Life

128 = Heal Mana

16 Shoot Unsigned Int16 If Flags3[0] is true
32 Shoot Speed Single If Flags3[1] is true
16 Create Tile Unsigned Int16 If Flags3[2] is true
8 Tile Boost Signed Byte If Flags3[3] is true
16 Buff Type Unsigned Int16 If Flags3[4] is true
32 Buff Time Int32 If Flags3[5] is true
16 Heal Life Unsigned Int16 If Flags3[6] is true
16 Heal Mana Unsigned Int16 If Flags3[7] is true
8 Flags4 Byte If Flags1[2] is true

1 = Axe

2 = Pickaxe

4 = Hammer

8 = Max Stack

16 = Use Animation

32 = Use Time

64 = Defense

128 = Fishing Pole

16 Axe Unsigned Int16 If Flags4[0] is true
16 Pickaxe Unsigned Int16 If Flags4[1] is true
16 Hammer Unsigned Int16 If Flags4[2] is true
32 Max Stack Int32 If Flags4[3] is true
16 Use Animation Unsigned Int16 If Flags4[4] is true
16 Use Time Unsigned Int16 If Flags4[5] is true
32 Defense Int32 If Flags4[6] is true
16 Fishing Pole Unsigned Int16 If Flags4[7] is true
8 Flags5 Byte If Flags1[3] is true

1 = Scale

2 = UseStyle

32 Scale Single If Flags5[0] is true
8 UseStyle Byte If Flags5[1] is true