ESOMod:Chat Log Format

Text Codes
There are various text codes starting with a | (pipe) character used in chat and other text descriptions in the game.

:* |a -- Alignment
:* |c -- Color
:* |H -- Item, achievement, character data, etc...
:* |L -- Unknown?
:* |o -- Unknown?
:* |r -- End color section
:* |s -- String display?
:* |t -- Texture
:* |u -- Padding?


|a Code Format
The |a code is used to specify alignment and has the format:

     |aALIGN...
      
             ALIGN = Alignment code (l=left, r=right, c=center)

End an alignment section with an optional |r.

Exmaples:
     |al|t256:128:EsoUI/Art/tutorial/Infamy_Gamepad-KOS.dds|t|r
     |acTHE CHORROL CRIER\nIssue 24|alAs most know, Ethyan and Larian returned...

|c Code Format
The |c code is used to specify a text color and has the simple format:
  
     |cCOLOUR...
      
          COLOUR   = 6-byte color hex code (000000 = black, FFFFFF = white)

You can end a color section using the optional |r code.

Examples:
     |cFF0000Red|c00FF00Green|c0000FFBlue
     Normal text|cFFFFFSome text that is white|r and back to normal

|H Code Format
The |H code is used mainly for item links but also other character data like achievements and names. See the Item Link article for a more complete and up to date format description on item links. The basic format is:

     |HCOLOUR:item:N1:N2:N3:N4:N5:N6:N7:N8:N9:N10:N11:N12:N13:N14:N15:N16:N17:N18:N19:N20:N21|h[ITEMNAME]|h
     
          COLOUR   = 6-byte color hex code (000000 = black, FFFFFF = white), 0, or 'ignore'
               FFFFFF =  
               2DC50E =  
               3A92FF =  
               A02EF7 =  
               EECA2A =  
          N1-N21   = Integers
          ITEMNAME = Displayed item name (may be appended with a '^' control code)

This same type of tag format is used in other places such as character names and achievements:

     |HDCD822:achievement:64:10:1389386601|h[Node Harvester I]|h
     |Hignore:character:Tuque|h[Tuque]|h

|s Code Format
Seems to substitute a string value for console quick-chat.

     |sINDEX|s

          INDEX = Number from 0-21

Examples:
     |s12|s

|r Code Format
The |r code is only used to end a previous |c or |a section and has no format or extra data.

Examples:
     Normal text|cFFFFFSome text that is white|r and back to normal
     |al|t256:128:EsoUI/Art/tutorial/Infamy_Gamepad-KOS.dds|t|r

|t Code Format
The |t code is used to add a texture/image within the text and has the format:

     |tWIDTH:HEIGHT:FILENAME|t
      
          WIDTH    = Width of the image in pixels
          HEIGHT   = Height of the image in pixels
          FILENAME = Image file to use

A list of textures used in the game is available on the ESOUI Wiki. You may be able to use textures from an add-on using the format AddonName/filename.dds.

Examples:
     |t256:128:EsoUI/Art/tutorial/Infamy_GamePad-MediumBounty_MediumHeat.dds|t
     |t512:128:EsoUI/Art/Tutorial/Examples/gp_Help-AbilityBar_Empty.dds|t
     |t64:64:EsoUI/Art/Tutorial/Examples/Help-Ultimate_Charged.dds|t

|u Code Format
The |u code is used for some sort of padding with the format:

     |uNUMBER1:NUMBER2:WORD:TEXT|u
     
          NUMBER1 = An integer or percent value
          NUMBER2 = An integer or percent value
          WORD    = Known values are "" (empty), 'key', and 'currency'
          TEXT    = Optional text or value to display

The first number seems to be an offset to shift the text to the right, either in pixels or a percent value (percent of what?). The second number seems to add a space between the first letter of the word/text and the rest of the word. Certain combinations seem to break the code. This code is only used a few times within the Lua API.

Examples:
     |u25%:25%:key:Text|u
     |u15:25:currency:500|u
     |u10:0::|u


Old Information
The following information comes from beta and early in the game's release and is likely outdated and no longer relevant.

Overall Format
The game client stores a text log of all chat and game events in the user's Windows Documents folder in the Elder Scrolls Online\live\Logs\ChatLog.log file. The basic format of each line in the chat log is simply:

     [Date Header (29 bytes)] [Data]

There are three basic formats the data can be in:
:* Chat
:* Event
:* System/other

For example:
 


Update Frequency
The chat log appears to be updated in chunks of roughly 4096 bytes at a time. This may be from the game client itself but is more likely due to the library, OS or hardware buffering. Thus the frequency of chat log file updates depends on how much is being output to the log. For normal idling this could be several minutes but during combat it could be as often as every second.


Date Header
The date header starts each line in the chat log and is 29 bytes in length. It follows the format:

     YYYY-MM-DDThh:mm:ss.sssUUUUUU
     
          YYYY-MM-DD   = Year month and day
          hh:mm:ss.sss = Current time down to millisecond resolution
          UUUUUU       = UTC time zone offset

There is a single space separating the date header and the rest of the chat data in the line.

Chat Format
The format for all chat channels in the chat log is:

     |Hignore:character:CHARNAME|h[CHARNAME]|h CHANNEL: CHATTEXT
     
          CHARNAME = Character name (unsure why the character name is repeated or if it can be different)
          CHANNEL  = The specific channel name.
          CHATTEXT = The chat text which can include item tags (see below)

Note that the Hignore at the start is likely a color code specifier like in the item tag format with a special value of ignore. All | characters entered by players will be escaped and appear as || in the log.

The channel name can be a simple string like "zone" or "guild1" or it can be a more complex name for tells:

     |Hignore:channel:UESP|h[UESP]|h |Hignore:display:Jeancey|h[@Jeancey]|h: probably :)

Event Format
The data from many types of events are output to the chat log and all have the same overall format:

     ,1=EVENTTYPE,KEY1=DATA1,KEY2=DATA2,...
     
          EVENTTYPE = The event name, usually a text string but sometimes a number
          KEY/DATA  = Pairs of keys (usually numbers but can be text) and data depending on the event type
                      The number of pairs varies from none to 20+

For example:
     ,1=CHATTER_BEGIN,2=3
     ,1=CHATTER_END
     ,1=LOOT_RECEIVED,2=Reorx Holybeard^Mx,3=|HFFFFFF:item:802:1:7:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0|h[rough maple]|h,4=3,5=0,6=1,7=true

See the list of event types and the format of their keys & data below.


Event Formats
Details on the key/data formats for all known events are listed below. The eventhandler reference is from files extracted from GAME.MNF.

 

System/Other Formats
There are a few other chat line formats that don't fit into the chat or event formats.

System Message
A server-wide system message has the format:

      [System] MESSAGE
     ^Note the extra space at the very beginning

Login
When the player logs in there are two lines output with just the contents of 0 and 3:

     2014-02-07T16:21:11.400-05:00 0
     2014-02-07T16:21:11.400-05:00 3

They are sometimes immediately followed by an init and an ACTIVE_WEAPON_PAIR_CHANGED event. The contents and purpose of these lines is unknown.


Stack Trace
Immediately after a LUA_ERROR event there is a stack trace listing composed of multiple lines:

     2014-02-10T11:49:59.370-05:00 ,1=LUA_ERROR,2=assertion failed
     stack traceback:
          [C]: in function 'assert'
          EsoUI/Libraries/ZO_KeybindStrip/ZO_KeybindStrip.lua:81: in function 'ZO_KeybindStrip:AddKeybindButton'
          EsoUI/Libraries/ZO_KeybindStrip/ZO_KeybindStrip.lua:169: in function 'ZO_KeybindStrip:AddKeybindButtonGroup'
          EsoUI/Ingame/Inventory/InventorySlot.lua:1848: in function 'SlotMouseoverCommand:SetInventorySlot'
          EsoUI/Ingame/Inventory/InventorySlot.lua:1869: in function 'UpdateMouseoverCommand'
          EsoUI/Ingame/Inventory/InventorySlot.lua:1935: in function 'ZO_InventorySlot_OnMouseEnter'
          7524690221276444389:3: in function '(main chunk)'

Note that the traceback lines all start with a tab character.

Event Types
 

Combat Event Types
For the COMBAT_EVENT there are ~50 different event sub-types as given by the key "2" in the event data:

 

Types and Constants
 

Complete Event Listing
From the LUA files extracted from GAME.MNF we can find 503 different events matching the form "EVENT_[A-Z_]*". Most of these don't seem to appear in the chat log.