Chat link format

From Guild Wars 2 Wiki
Jump to navigationJump to search

In the chat it is possible to insert links to certain elements within the game, like waypoints, points of interest, items and skills. These links are usually entered by clicking an element while holding Ctrl or Shift. The former will immediately insert a link into the current chat channel, while the latter will append it to the current chat line, allowing for further changes.

Internally, these links are represented by a special text command that can be embedded manually. When sending it then in the chat, the client will read out information about the linked element and display it correctly for the current localization. This page describes the format of said chat links.

The creation of such links requires knowledge about the internal identifiers and involves a fair amount of calculation. As such this information is not really useful for the average player trying to link to certain elements within the game. For those purposes, the mentioned method in-game is preferred.

General format[edit]

The common layout found in most types of chat codes. (Specifically at least types 0x04, 0x06, 0x07, 0x09, 0x0A and 0x0B.)

Following the skill template format from the original Guild Wars, the links make use of Base64 to encode their information. A link is enclosed within single square brackets and preceded by an ampersand, for example [&AgEAWgAA] will render a link for the Basic Salvage Kit.

Header[edit]

The first byte of a link contains the header. It describes the type of the link:

Notes
  1. ^ a b Currently disabled.
  2. ^ Automatically generated by the client

Data[edit]

For most link types, the header is followed by the ID as a (likely unsigned) 3-byte (24bit) little-endian integer, then by a byte of all zeroes. It appears that the game currently ignores the value of this last byte, even if it is not zero. It is presumably present to allow for extensions. (If that is truly the case then the byte should be kept all zeroes to avoid unexpected behavior should the game decide to make use of it in the future.)

Link type details[edit]

Coin link[edit]

The layout of chat codes for coins.

Currently disabled. Specifies a unsigned four byte number in copper Copper coin coins. Divide the number by 100 to get the amount in silver Silver coin and by 10,000 to get the amount in gold Gold coin.

Examples[edit]

  • [&AQAAAAA=]Copper coin
  • [&AQEAAAA=]Copper coin
  • [&AdsnAAA=]Gold coin 2 Silver coin 3 Copper coin
  • [&Af////8=]429496 Gold coin 72 Silver coin 95 Copper coin

Item link[edit]

The layout of chat codes for items.

The quantity of items is encoded as a single byte immediately following the header byte, before the three byte item ID.

Examples[edit]

Wardrobe skins and upgrades[edit]

Additional data, such as the item ID of an attached upgrade component or wardrobe skin ID can be added by adding flags to the byte after the base item id.

  • 0x80 (1 << 7) binary: 1000 0000 Skinned
  • 0x40 (1 << 6) binary: 0100 0000 first upgrade slot in use
  • 0x20 (1 << 5) binary: 0010 0000 second upgrade slot in use

See Bit field for an explanation.
When there's only one upgrade, regardless of which upgrade slot's flag is used, the game will always show the first slot in use.
If a skin or upgrade is absent the relevant field is omitted from the code, not zeroed out. This causes the item code to have a variable length and the location of each part to shift. The examples below demonstrate this.

Examples[edit]
Items used
flags in binary, HEX Values and Chat Codes
  • Weapon only
    • 0000 0000 == 0x00
    • 02 01 AA B6 00 00
    • [&AgGqtgAA]
  • Weapon with Sigil 1
    • 0100 0000 == 0x40
    • 02 01 AA B6 00 40 FF 5F 00 00
    • [&AgGqtgBA/18AAA==]
  • Weapon with Sigil 1 and Sigil 2
    • 0110 0000 == 0x60
    • 02 01 AA B6 00 60 FF 5F 00 00 27 60 00 00
    • [&AgGqtgBg/18AACdgAAA=]
  • Weapon with Wardrobe Skin
    • 1000 0000 == 0x80
    • 02 01 AA B6 00 80 7D 0E 00 00
    • [&AgGqtgCAfQ4AAA==]
  • Weapon with Wardrobe Skin and Sigil 1
    • 1100 0000 == 0xc0
    • 02 01 AA B6 00 C0 7D 0E 00 00 FF 5F 00 00
    • [&AgGqtgDAfQ4AAP9fAAA=]
  • Weapon with Wardrobe Skin, Sigil 1 and Sigil 2
    • 1110 0000 == 0xe0
    • 02 01 AA B6 00 E0 7D 0E 00 00 FF 5F 00 00 27 60 00 00
    • [&AgGqtgDgfQ4AAP9fAAAnYAAA]

NPC text string[edit]

Currently disabled. Specifies the three byte internal string identifier and displays the corresponding text in the chat window (sometimes just a chat bubble), highlighted in a color that matches the chat channel. (e.g. gold for guild chat, blue for party chat, etc.)

Examples[edit]

  • [&AxcnAAA=]Fight what cannot be fought. (Id: 10007)
  • [&AxgnAAA=]Any secrets you want to share? (Id: 10008)
  • [&AxknAAA=]Any news? (Id: 10009)
  • [&AyAnAAA=]Do you need assistance? (Id: 10016)

See Chat link format/0x03 codes for a list of the documented codes.

Map link[edit]

Specifies the three byte point of interest (internally landmarks, waypoints, and vistas are deemed as points of interest) identifier.

Examples[edit]

  • Dr. Bleent's Encampment (Id: 56)
  • – Desider Atum Waypoint (Id: 72)
  • – Caudecus' Estate Waypoint (Id: 825)

See Chat link format/0x04 codes for a list of the documented codes.

PvP game link[edit]

Skill link[edit]

Specifies the three byte skill (including effects, buffs, and abilities) identifier.

Examples[edit]

  • Aegis (Id: 743)
  • Fireball (Id: 5491)
  • Meteor Shower (Id: 5501)

Trait link[edit]

Specifies the three byte trait identifier.

Examples[edit]

See Chat link format/0x07 codes for a list of the documented codes.

User link[edit]

Currently disabled. Specifies the account's GUID and character name. The first 16 bytes contain the GUID, the rest is the character name in UTF-16LE followed by two null bytes as terminator.

Example:[edit]

The layout of chat codes for users.
  • [&CAECAwQFBgcICQoLDA0ODxBFAGEAcwB0AGUAcgAAAA==]
  • 08 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 45 00 61 00 73 00 74 00 65 00 72 00 00 00

To convert between the GUID exposed by the API and the one used in the game, consider the following structure (after 0x08):

  • 01020304
  • 0506
  • 0708
  • 090A
  • 0B0C0D0E0F10

Which the API represents as 04030201-0605-0807-090A-0B0C0D0E0F10. The character name can simply be read and is Easter in this example.

Recipe link[edit]

Specifies the three byte recipe identifier.

Examples[edit]

Wardrobe skin link[edit]

Specifies the three byte wardrobe skin identifier.

Examples[edit]

0x0A codes are documented using the skin infobox on the wiki.

Outfit link[edit]

Specifies the three byte outfit identifier.

Examples[edit]

See Chat link format/0x0B codes for a list of the documented codes.

WvW objective link[edit]

The layout of chat codes for WvW objectives.

Specifies a three byte WvW objective identifier, followed by one byte of all zeroes, followed by a three byte WvW map identifier (ties in with API:2/maps), followed by one byte of all zeroes.

Note that the identifiers specified in API:2/wvw/objectives are of the form <mapId>-<objectiveId>.

Examples[edit]

Build template link[edit]

The layout of chat codes for builds.

The first byte after 0x0D specifies the character's profession:

  • 01 – Guardian
  • 02 – Warrior
  • 03 – Engineer
  • 04 – Ranger
  • 05 – Thief
  • 06 – Elementalist
  • 07 – Mesmer
  • 08 – Necromancer
  • 09 – Revenant

Following that are 3 pairs of bytes describing the character's specializations.

The first byte gives a specialization ID, resolvable against /v2/specializations. The second byte encodes the major trait choices as 2-bit values from 0 to 3, in reverse order. The first two bits of this byte are unused. Example:

  • 00000011 00111001
    • Specialization ID
    • Third Trait Choice
    • Second Trait Choice
    • First Trait Choice

The choice values represent which of the three traits were chosen, where 1 is the top, 2 is the middle, and 3 is the bottom choice. A value of 0 means no trait is yet chosen.

After that, there are 10 sets of 2 bytes containing skill information. The IDs here are provided in little-endian format and refer to internal skill palette IDs. In order, each 16-bit value represents the following skills:

  • Terrestrial Heal Skill
  • Aquatic Heal Skill
  • Terrestrial Utility Skill 1
  • Aquatic Utility Skill 1
  • Terrestrial Utility Skill 2
  • Aquatic Utility Skill 2
  • Terrestrial Utility Skill 3
  • Aquatic Utility Skill 3
  • Terrestrial Elite Skill
  • Aquatic Elite Skill

The remaining 16 bytes of the chat link are used to encode profession-specific information, with the context changing depending on whether the profession is Ranger or Revenant. For other classes those 16 bytes are unused.

Ranger
The layout of the profession specific data for Rangers.

Ranger build links will additionally include 4 more bytes, each describing the pets they have equipped. Each byte represents a pet ID resolvable against /v2/pets in the following order:

  • Terrestrial Pet 1
  • Terrestrial Pet 2
  • Aquatic Pet 1
  • Aquatic Pet 2

The other 12 profession-specific bytes are unused.

Revenant
The layout of the profession specific data for Revenants.

Revenant build links will additionally include 16 more bytes.

The first 4 bytes are each describing the legends they have equipped. Legends are encoded in the following order:

  • Terrestrial Legend 1 (the active legend, above weapon skill 2)
  • Terrestrial Legend 2 (the inactive legend, above weapon skill 1)
  • Aquatic Legend 1
  • Aquatic Legend 2

Each legend is encoded as one of the following values:

Then 12 more bytes are included to save the order of the inactive legend utility skills. They are saved with 2 bytes per skill, in the following order:

  • Inactive Terrestrial Legend skill 1
  • Inactive Terrestrial Legend skill 2
  • Inactive Terrestrial Legend skill 3
  • Inactive Aquatic Legend skill 1
  • Inactive Aquatic Legend skill 2
  • Inactive Aquatic Legend skill 3

The actual C++ struct definition used to serialize build template links has been posted by Daniel Snider on the official forums.

Finding game IDs from chat links[edit]

For many templates found on the wiki, the game ID rather than the full chat link is required. This can be obtained by typing /wiki, then holding Shift + clicking on the item in question. Pressing enter will then bring up your browser and return the wiki's enhanced search page which will decode the chat link into an ID at the top of the page. If the ID has been set in an infobox on any page, then the search page will redirect you to the item with the matching ID, pressing the "back" button in your browser will return you to the results prior to being redirected.

Notes[edit]

  • Some item chat links will appear to not work correctly. Often this is because in order for the chat code to work, the item must actually be in the player's inventory.