Difference between revisions of "Packet Guide"
From SWGANH Wiki
(→Variable Types) |
|||
(One intermediate revision by the same user not shown) | |||
Line 4: | Line 4: | ||
==Variable Types == | ==Variable Types == | ||
− | + | {{field types}} | |
− | { | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
==Additional Guidelines== | ==Additional Guidelines== |
Latest revision as of 05:58, 21 March 2007
Packet Structure
Each Page should have a STRUCT section, which gives the variable type and a variable name if known.
Variable Types
Render | Keyword | Type Details |
---|---|---|
BOOL | bool | bool (1byte, 0:false, other value:true) |
SBYTE | sbyte | sbyte (1byte, signed) |
BYTE | byte | byte (1byte, unsigned) |
SHORT | short | short (2bytes, signed) |
USHORT | ushort | ushort (2bytes, unsigned) |
INT | int | int (4bytes, signed) |
UINT | uint | uint (4bytes, unsigned) |
FLOAT | float | float (4bytes, signed) |
LONG | long | long (8bytes, signed, mostly used for object ids) |
ULONG | ulong | ulong (8bytes, unsigned, mostly used for object ids) |
DOUBLE | double | double (8bytes, signed) |
A_STRING | a_string | ANSI/ASCII String (2 -packets- or 4 -files- bytes size + 1byte chars, ASCII:leading0+7bits, ANSI:8bits) |
U_STRING | u_string | Unicode String (4bytes size + 2bytes chars) |
C_STRING | c_string | Customization String (look here for details) |
B_STRING | b_string | Byte String (4bytes size + 1byte chars, used for session key only) |
{ } | list | LIST Component (this is a sub section repeated as a list of data. Indent Variable types with 1 space.) |
? | uncertain | Uncertain Values (use a single question mark ? in the name to display uncertainty in the variables understanding.) |
?? | unknown | Unknown Variable Name (use ?? or Unknown for the name to display that there is no clue as to what the data does.) |
XML style list tags sample: (use as many ":" as needed to multi-indent)
{{beginlist|myitems|mycount}} :{| class="wikitable" |} {{endlist|myitems}}
<myitems count=mycount>
<myitems/>
Additional Guidelines
In Addition, each page should contain a section for Variable Descriptions should be made. This should include a brief, or detailed description as needed to document what the variable does and how it can be used. Also the Opperand_Count and Opcode should be listed with it.
Finally an Additional Info section should be provided to give more info in the case it is needed for that packet.
= STRUCT = {{{ SHORT: VarName SHORT: 16bitVariable INT: 32bitVariable INT: LookAList { LONG: 64bitVariable BYTE: 8bitVariable BYTE: ?? } A_STRING: AsciiString U_STRING: UnicodeString C_STRING: CustomizationString }}} ---- = Variable Description = {{{ OpperandCount = 9 Opcode = FFFFFFFF AsciiString: This variable is a string for the name. 64bitVariable: This variable is an ID for that guy. 8bitVariable: This byte is a flag for stuff. }}} ---- = Notes = {{{ Anything Additional Goes here. }}}