Talk:Chat link format

From Guild Wars 2 Wiki
Jump to: navigation, search

Vista-file-manager.png
Archive


WvW Objective Codes[edit]

I was working with the API recently and had to work out how the WvW chat codes are encoded. It's not hard but it wasn't on the wiki. An example: Y'lan Academy (Green BL tower) has a chat code of [&DGYAAABOBAAA]. From the API, the objectives ID is 1102-102. First byte is 0x0C as the wiki states, next four bytes are the last part of the objective ID (102, unique to the objective) as a little endian int. The three bytes after that are the first part of the objective ID (1102, map ID) again as a little endian int and finish it up with a null byte terminator and a Base64 encode. ZedTheYeti (talk) 04:10, 31 January 2016 (UTC)

Wardrobe and Outfit codes[edit]

So in this page, it seems to label outfits as a 0x0C codes, and wardrobe skins as 0x0B. However it seems like outfits are 0x0B and skins are 0x0A. Is this a typo on the page, or something that I just completely and totally got wrong? -Darqam 23:49, 15 November 2016 (UTC)

Ishmael's edit to the game link widget back in may 2015 suggested 10 = 0x0A = skins, and 11 = 0x0B = outfits.
The section at the top of this page agrees with that widget edit, however the pages linked from the bottom of this page doesn't seem to have been moved too. Good catch, but not something I want to fix tonight. -Chieftain AlexUser Chieftain Alex sig.png 00:26, 16 November 2016 (UTC)
Ok, well when you are done not fixing this, I can try to clean-up the remnants. Since I was not mistaken, then I understand what is wrong and where. -Darqam 00:38, 16 November 2016 (UTC)

0x08 - User[edit]

Is this even a thing? I tried multiple entries with this header and they all came out as simple text, seemingly not recognized as a chat code by the game. If it is a thing, then it might be worth expanding on what it is, since "User" is not very descriptive... -Darqam 18:49, 17 November 2016 (UTC)

they are, but the text parser doesn't expect them unless behind quote markup. the format is 0x08 16 byte account GUID, or zeros null terminated wchar_t name, eg. 08 00000000 0000 0000 0000 000000000000 41004100410041004100410041004100 0000 converted into base64 should give you a AAAAAAAA in a chat bubble with the channel's colour that it in. 99.231.213.98 01:39, 26 December 2016 (UTC)

Question regarding chat code conversion[edit]

I don't know where else to ask this.

I need to know how it works to get the ID out of an chat code. I simply don't get it.

Conversion from chat code to hex-code is easy and matches the exampels in the article. But i don't understand how to get from hex-code to ID. Maybe I miss something. Could someone here explain it to me? --DarxMaster (talk) 21:04, 4 June 2017 (UTC)

Use a calculator 185.189.14.230 21:21, 4 June 2017 (UTC)

Well I tried that of course. But I don't get the correct result. An example from the article:

If i give the AA B6 to the calculator I get 43702 insted of the ID above. --DarxMaster (talk) 07:12, 5 June 2017 (UTC)

It's little endian so you have to swap the byte order. You would use B6 AA 52.15.228.241 10:49, 5 June 2017 (UTC)

Thank you! Now it works. --DarxMaster (talk) 11:14, 5 June 2017 (UTC)

Some of the example links in the article are wrong[edit]

There are links with the header byte conflicting to what they should be an example to:

  1. [&B+cCAAA=], hex: 07e7020000 (id: 743), Trait link
  2. [&B3MVAAA=], hex: 0773150000 (id: 5491), Trait link
  3. [&B30VAAA=], hex: 077d150000 (id: 5501), Trait link
  4. [&CgEAAAA=], hex: 0a01000000 (id: 1), Wardrobe link
  5. [&CgIAAAA=], hex: 0a02000000 (id: 2), Wardrobe link
  6. [&CgcAAAA=], hex: 0a07000000 (id: 7), Wardrobe link
  7. [&CwQAAAA=], hex: 0b04000000 (id: 4), Outfit link
  8. [&DAQAAAA=], hex: 0c04000000 (id: 4), WwW objective link

I fixed them but can't edit the article, I tested them in-game and they are working, here they are:

Skills:

Recipes:

Wardrobe:

Outfit:

Sprsrpr (talk) 00:25, 16 June 2017 (UTC)

Thanks for pointing this out. We didn't get around to fixing the examples after they removed the Player header. I've applied your suggested changes, and also removed the protection because I expect the spam to not be as unbearable nowadays. -Chieftain AlexUser Chieftain Alex sig.png 16:49, 16 June 2017 (UTC)

Changing the item's quantity in the link[edit]

If I have a generic item, for exemple Iron Ingot [&AgHjTAAA], which is the rule to change the single-quantity link to show another quantity? (27 Iron Ingots for exemple=[????????]) 79.56.68.128 23:29, 15 February 2018 (UTC)

You need to decode the base64 encoded part: AgHjTAAA --> 0201e34c0000 (note that the decoded data is binary, this is the hexadecimal representation of it)
the second octet (marked in red here) is the quantity, 27 would be 0x1b in hexadecimal so 021be34c0000 then base64 encode it back and add [& and ], the final result would be [&AhvjTAAA]
Sprsrpr (talk) 15:09, 17 February 2018 (UTC)
Thanks for explaining. (I hope you don't mind but I've tweaked the colour above to make it a bit more obvious) -Chieftain AlexUser Chieftain Alex sig.png 15:18, 17 February 2018 (UTC)