PacketLogger.FieldType
Type of Fields available for FieldTemplate
Example of "Damage" (0x0B) packet:
{
'packetID': 0x0B,
'name': 'Damage 0x0B',
'showHexDump': true,
'fields':[
{ 'name':'packetID', 'length':1, 'type':'packetID'},
{ 'name':'Serial', 'length':4, 'type':'serial'},
{ 'name':'Damage', 'length': 2, 'type':'int'},
]
}
TODO: PacketLogger.FieldType Constructors
Properties
PacketLogger.FieldType.BOOLString
PacketLogger.FieldType.BOOLString
Boolean type, length is fixed to 1 byte.
Example:
{'name':'Paralized', 'type':'bool'}
PacketLogger.FieldType.DUMPString
PacketLogger.FieldType.DUMPString
Dump a certain amount of data as raw bytes-by-bytes HEX
Length is mandatory.
Example:
{'name':'unused', 'type':'dump', 'length': 40}
PacketLogger.FieldType.FIELDSString
PacketLogger.FieldType.FIELDSString
A special field which has subfields, useful for displaying stucts.
'length' is ignored, 'type' is optional, 'fields' is mandatory.
Example:
{'name':'Player Position', 'type':'fields',
'fields':[
{'name':'X', 'type':'uint', 'length': 2}
{'name':'Y', 'type':'uint', 'length': 2}
{'name':'Z', 'type':'uint', 'length': 1}
]
}
PacketLogger.FieldType.FIELDSFORString
PacketLogger.FieldType.FIELDSFORString
PacketLogger.FieldType.HEXString
PacketLogger.FieldType.HEXString
Hex type is equivalent to unsigned integers but the contents is displayed as 0x hex.
Length is mandatory and can range between 1 and 4 bytes.
Example:
{'name':'Hue', 'type':'hex', 'length': 2}
PacketLogger.FieldType.INTString
PacketLogger.FieldType.INTString
Integers type used for positive and negative integers.
Length is mandatory and can range between 1 and 4 bytes.
Example:
{'name':'Z Level', 'type':'int', 'length': 2}
PacketLogger.FieldType.MODELIDString
PacketLogger.FieldType.MODELIDString
ModelID type like Item.ItemdID, Mobile.Body, etc.
Length is fixed to 2 bytes and is displayed as 0x hex.
Example:
{'name':'Item ID', 'type':'modelID'}
{'name':'Mobile Body', 'type':'modelID'}
{'name':'Static ID', 'type':'modelID'}
PacketLogger.FieldType.PACKETIDString
PacketLogger.FieldType.PACKETIDString
Common type present in every packet, packetID, length is fixed to 1 byte.
Example:
{'name':'packetID', 'type':'packetID'}
PacketLogger.FieldType.SERIALString
PacketLogger.FieldType.SERIALString
Serial type, length is fixed to 4 bytes and is displayed as 0x hex.
Example:
{'name':'Target Serial', 'type':'serial'}
PacketLogger.FieldType.SKIPString
PacketLogger.FieldType.SKIPString
Skip a certain amount of data.
Length is mandatory.
Example:
{'name':'unused', 'type':'skip', 'length': 40}
PacketLogger.FieldType.SUBPACKETString
PacketLogger.FieldType.SUBPACKETString
A special field which denotes the beginning of a subpacket.
'length' is ignored, 'type' is optional, 'subpacket' is mandatory.
Example:
{'name':'action', 'type':'subpacket',
'subpacket':{
'name':'my subpacket'
'fields':[
...
]
}
}
PacketLogger.FieldType.TEXTString
PacketLogger.FieldType.TEXTString
Text reads bytes as text.
Length is mandatory.
Example:
{'name':'Name', 'type':'text', 'length': 20}
PacketLogger.FieldType.UINTString
PacketLogger.FieldType.UINTString
Unsigned integers type used for positive integers.
Length is mandatory and can range between 1 and 4 bytes.
Example:
{'name':'Z Level', 'type':'uint', 'length': 2}
PacketLogger.FieldType.UTF8String
PacketLogger.FieldType.UTF8String
Text reads bytes as UTF8 text.
Length is mandatory.
Example:
{'name':'Pet name', 'type':'utf8', 'length': 40}
PacketLogger.FieldType.VALID_TYPESString[][]
PacketLogger.FieldType.VALID_TYPESString[][]
List of valid types
Methods
PacketLogger.FieldType.IsValid(typename)
PacketLogger.FieldType.IsValid(typename)
Check if the name of type is a valid Template filed type.
Parameters
typenameStringName of the types
Return
BooleanTrue: is resognized. - False: not recognized.