Talk:Skill template format
From Guild Wars Wiki
I am assuming that this information is allowable. I can't see that Anet would disapprove of it, even though technically its probably proprietary information. This is available from other sources, and some very useful GW tools have made used of it.--Vlad 13:14, 9 February 2007 (PST)
I am pretty sure this will not hurt anyone, and Anet most likely will approve of it. I have been working on a program that will allow players to generate a skill template, and it is not in any way connected to the client of GW, so it is allowable. --70.68.146.159 20:27, 29 March 2007 (EDT)
This description is wrong, the size of the attribute and skill codes can vary from template to template. Look at the description on guildwiki (I wrote the Overall Format section there, feel free to copy it). Also, Anet seems to have changed the format slightly with the 4/5/2007 update. Cloud 09:26, 6 April 2007 (EDT)
Contents |
[edit] Move
Shouldn't this page be on Skill template format instead? - Anja Astor
(talk) 17:33, 12 April 2007 (EDT)
- Moved, since no one opposed and we already have Equipment template format. - Anja Astor
(talk) 04:58, 14 April 2007 (EDT)
[edit] Parserfunction for template code?
I just asked myself if it was theoretically possible to write a template that can convert templatecode to a build and vice versa? And if it is not (which I assume, even if it was it would be hell to write) if it is possible that arenanet will add any wiki parserfunction that does the job. Just thought it would be very nice if this was possible. -- nachdenki [ File:User Nachdenki vcard.png user | File:User Nachdenki talk.png talk | File:User Nachdenki edit.png contribs ] 01:21, 10 June 2007 (UTC)
[edit] Page format
Wouldn't the numeric codes be better in a simple list like on the equipment template page instead of in tables? I don't find the tables to be any easier to read, quite the opposite in fact because they take up so much vertical space. Cloud 19:34, 16 June 2007 (UTC)
[edit] Parsing problem
Hello.
I have converted OwET8YIW1xeMqnJUkv3dteUSAA into 111011000000010001001111110001100000100001011011010111000101111000110010101 0100111001001010100100100101111110111011101101101011110010100010010000000, But there is no correspondence with the tables of index (profession, skill) I think my binary string is good (base64 decode, conversion in hexa and "binary" to parse after).
Somebody has an idea or an example of code? (I program in php 4, but I take any language)
Thank a lot
PS: Sorry for my bad english, i'm french. Keitarosan 11:57, 21 June 2007 (UTC)
- Thank you for your response. I continue to search solution for this problem, and i will post if i find it :) Keitarosan 13:31, 21 June 2007 (UTC)
- To really find out the differences I guess you will have to compare RFC 2045 (PHP) to RFC 3548 (GW) --
nachdenki [ user | talk | contribs ] 16:09, 21 June 2007 (UTC)
- To really find out the differences I guess you will have to compare RFC 2045 (PHP) to RFC 3548 (GW) --
- I tried converting some letters by hand and got a different result from what you posted. For example, O=14 (011100), w=48(000011), E=4(001000), T=19(110010). That gives 011100 000011 001000 110010. Note that I am listing bits in order from least significant to most significant. -- Mike O'Brien 19:21, 21 June 2007 (UTC)
- He's displayed each hexet of the binary big endian (compared to your little endian), but dropped 2 msb zeroes of the resulting number in the process. Iglam 02:43, 29 June 2007 (UTC)
[edit] I don't get it
Ok, I see all these numbers that match up to skills, but that doesn't make any sense. Ingame, the coding is OgNFg4uM25HjWtdaW5GyiPyrDkA which produces a GvG Flag Runner build I use commonly but here there is nothing about letters, only numbers.--§ Eloc § 05:08, 16 July 2007 (UTC)
- It's encoded in w:Base64 apparently (says in the article. Take the time to read those links, may help. (I still don't understand how, but I understand why there's letters :P) - anja
09:26, 16 July 2007 (UTC)
- Still dont get it... can anyone explain??? User:Paladin Trackr
- Ok, short example. Base64 is an encoded bitstream; a bitstream is a row of "1"s and "0"s. The bitstream itself includes areas where information is stored. How long and where these areas are, is mentioned in the article. Now back to decoding a base64 bitstream.
- Base64 uses characters one of the following characters to represent a number:
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/. So anAis an encoded0, aGan encoded6, anduis an47. So you can display numbers from0to63by using a simple character. (see also hexadecimal encoding with 16 different characters) - For example the encoded string
OgNFg(taken from above) means14 32 13 5 32. When you now translate this numbers into binary, you get001110 100000 001101 000101 100000(zeros at the beginning added as base64 represents 6 bits with each character). Now comes the real translation (which can be a bit confusing):
- Still dont get it... can anyone explain??? User:Paladin Trackr
binary 0 0 1 1 1 0 1 0 0 0 0 0 0 0 1 1 0 1 0 0 0 1 0 1 1 0 0 0 0 0 ..
flip each 6 bits 0 1 1 1 0 0|0 0 0 0 0 1|1 0 1 1 0 0|1 0 1 0 0 0|0 0 0 0 0 1|..
read sections |0 1 1 1|0 0 0 0|0 0|0 1 1 0|1 1 0 0|1 0 1 0|0 0 0 0|0 0 0 1|..
| type |version| pl| prim. | sec. | attr. | attrl.|attr.id|..
flip again |1 1 1 0|0 0 0 0|0 0|0 1 1 0|0 0 1 1|0 1 0 1|0 0 0 0|1 0 0 0|..
to decimal | 14 | 0 | 0 | 6 | 3 | 5 | 0 | 8 |..
type (template type) = 14 (Skill template)
version (template version) = 0
pl (profession length) = 0 (=> 4 bits per profession)
prim. (primary profession) = 6 (Elementalist)
sec. (secondary profession) = 3 (Monk)
attr. (number of attributes) = 5 (so 5 attribute sections will follow)
attrl. (attribute length) = 0 (=> 4 bits per attribute id)
attr.id (attribute id) = 8 (Air Magic)
- So you can "simply" decode everything.. poke | talk 11:57, 15 August 2007 (UTC)
- I wouldn't have gotten it without this example, thank you! Is there any rationale behind the (double) flipping of the bit fields? Seems uselessly convoluted..Noobus 12:15, 4 September 2007 (UTC)
- Edited table for those of us who cant count to 6 lol. (the flipping thing confused me for a sec so i clarified a bit) 65.29.13.52 04:25, 23 January 2008 (UTC)
- Can anyone explain the flipping of each 6 bits? Never mind, silly me...
- Edited table for those of us who cant count to 6 lol. (the flipping thing confused me for a sec so i clarified a bit) 65.29.13.52 04:25, 23 January 2008 (UTC)
- I wouldn't have gotten it without this example, thank you! Is there any rationale behind the (double) flipping of the bit fields? Seems uselessly convoluted..Noobus 12:15, 4 September 2007 (UTC)
- So you can "simply" decode everything.. poke | talk 11:57, 15 August 2007 (UTC)
[edit] Into the skill bits...
Can anyone explain it further, into the skill bits?--Yanman.be 14:25, 5 May 2008 (UTC)
- Ok follow with me: Owpj0tjsqNkbp3ADBTmRYGf+H , some freaky A/D build. When I decypher and flip the 6 bits I get:
011100000011100101110001001011101101110001001101010101101100001001110110100101111011000000110000100000110010011001100010000110011000111110011111111000001011001011001011 This should be 168 bits long. Right now, I am only interested in getting the skills. My calculations are as followed: First skill starts on 108 (probably wrong., and the skillbitlength is 10 ( probably wrong as well ) . As you can see, 8 skills that take 10 bits each is longer than the 60 bits I still have left. The algrhytmn I used to get the pointer index 108 are as followed:
int pointer = 4+4+2+4+4;
pointer = binaryIntToDecimal(Integer.parseInt(new String(new char[]{proftemplate[template].toCharArray()[pointer+0],proftemplate[template].toCharArray()[pointer+1],proftemplate[template].toCharArray()[pointer+2],proftemplate[template].toCharArray()[pointer+3]})))*(binaryIntToDecimal(Integer.parseInt(new String(new char[]{proftemplate[template].toCharArray()[pointer+4],proftemplate[template].toCharArray()[pointer+5],proftemplate[template].toCharArray()[pointer+6],proftemplate[template].toCharArray()[pointer+7]})))+4);
pointer = pointer + 4 + 4;
int skillbitlength = 8+Integer.parseInt(new String(new char[]{proftemplate[template].toCharArray()[pointer+0],proftemplate[template].toCharArray()[pointer+1],proftemplate[template].toCharArray()[pointer+2],proftemplate[template].toCharArray()[pointer+3]}),2);
pointer = pointer +4;
The initial overhead: 4+4+2+4+4 is :
- 4+4 : version&template id
- 2 : bits for profession id length
- 4+4 : prim&second profession ( I think every template had only 00 as template, thus length is 4
Then we add the number of attributes multiplied by the number of bits needed
- 4+4+ #attributes*(attributelength+4bits)
Then we calculate the length of a skill: skillbitlength = 8 + the integer value of the next 4 bits. pointer = 4+pointer; //what we just used
So something must be wrong in my logic. I flip every //hold on, i didn't flip it.
Ok, I've changed it so it flip everything I should read ( attribute#, attributebitsize and skillbitsize ). I get even more absurd readings:
- pointer 30
- skillbitlength 21
- skillbit id: 1318887
Seems like the pointer works? skillbitlength is skewed though. -newsflash- I forgot to count the attribute points as well I think. Adding it didn't solve it yet. --The preceding unsigned comment was added by User:Yanman.be (talk).
- Ok, without going to detailed into your code. What exactly is your problem? The skill bits work exactly as the other parts of the template just that the length might be different and that the values mean other things. poke | talk 11:18, 6 May 2008 (UTC)
- Problem solved, was a "small" error in the rest of my code.
[edit] Page not found error accessing the article
Using the direct link http://wiki.guildwars.com/wiki/Skill_template_format (aka click the article tab) I get a 404 error for this page. It comes up fine via one of the redirects or with http://wiki.guildwars.com/index.php?title=Skill_template_format. So... is it the page or is it just me? :P Cloud 04:46, 23 July 2007 (UTC)
- Both of the links you just posted work fine for me, as does clicking the article tab. Try restarting your browser?
(Aiiane - talk - contribs) 04:55, 23 July 2007 (UTC)
- Working for me as well. -- ab.er.rant
04:58, 23 July 2007 (UTC)
- Letting time go by seems to have fixed it, sorry for the false alarm. Cloud 06:07, 23 July 2007 (UTC)
[edit] Why encoding?
I don't get why Anet want to encode the template file. Storage space is cheap. This just make things hard to read. Lightblade 10:08, 7 December 2007 (UTC)
- And shorter.. so it's easier to copy. poke | talk 12:58, 7 December 2007 (UTC)
- not to mention it seems silly to use 4 bits to try to save at BEST 4 bits. you'll only ever shave off one bit in the attributes, and at best, you can only save 4 bits for the skills (so you negate the benefit). idk, am i missing something? 65.29.13.52 05:34, 23 January 2008 (UTC)
- huh? Could you explain what you mean? poke | talk 06:35, 23 January 2008 (UTC)
- That makes no sense. You would be saving a maximum of 1 bit for every 4 bits (64bit encoding is a 6-bit character vs. a typical 8-bit character). However, I believe the reason that Anet would encode the templates is simply for making it easy to copy and paste. 74.94.70.29 23:24, 11 December 2008 (UTC)
- not to mention it seems silly to use 4 bits to try to save at BEST 4 bits. you'll only ever shave off one bit in the attributes, and at best, you can only save 4 bits for the skills (so you negate the benefit). idk, am i missing something? 65.29.13.52 05:34, 23 January 2008 (UTC)
[edit] odd decoding?
I made a java program that decodes templates, but for one reason every profession has a different index than listed:
- assassin: OwpiMypMhmFgxc1cNBdmtIKAA - 14
- dervish: OgajggpMrSWgMXAYibLgaVdDCAA - 5
- ele: OgdSwYPPiVAAPyNr1gYvZAA - 6
- mesmer: OQZTA2hp4RXYEFdAjeBuQJAAA - 10
- monk: OwYT003C1ZmspDjcaAAyoeEQA - 12
- necro: OAdSYYPP1M3sWDi9mnqVVBA - 2
- paragon: OQOkUmmzJjmj92CHk1wb4Ti7WAA - 9
- ranger: OgMU8mLjzcOJmHjqZ2kX/1+GBA - 4
- ritualist: OAmjEykTJPAZF8QGbHPzYXvLG - 1
- warrior: OQMT4mIP5wkg9rLlpatrCA - 8
- Then you probably made something wrong. For example the first begins with
Owp = 14 48 41which means001110 110000 101001in binary. Flipped, separated and flipped again I get:1110 0000 00 0111 1010which means the following: 7 as primary profession and 10 as secondary, so it is a A/D skill template. See also the table above for more
help :) poke | talk 17:01, 15 March 2008 (UTC)
- The odd thing is that it's consistent :/ I followed your table step by step, and i get a good result for an elemenalist, but the rest of the classes are screwed?
- lol i got it....i forgot to flip again....the reason why ele does work is because 0110 = 0110 ^^
- The odd thing is that it's consistent :/ I followed your table step by step, and i get a good result for an elemenalist, but the rest of the classes are screwed?
[edit] Binary -> Base64 Conversion Problem
I've been hacking at this particular problem for a while now... The basic build is as follows:
Mo/None Healing=12, Prot=12 The skills are Amity and Contemplation of Purity, throughout the entire skill bar. Now, I've done the work, and got the following binary: 1110 0000 00 0011 0101 0010 1100 1101 1101 1111 0001 100001001 100101100 100001001 100101100 100001001 100101100 100001001 100101100 0.
Now, when I convert it into a Base64 stream, I got this: 001110 000000 001100 000010 110011 011101 111100 011000 010011 001011 001000 010011 001011 001000 010011 001011 001000 010011 010110 000000, which, according to my translation, was OAMCzd8YTLITLITLITLA, yet Guild Wars won't read it. I added the two zero's in front to keep the header at 12, and tried getting rid of the trailing A, but to no avail. If someone wouldn't mind helping me figure this out, I'd be much obliged. RavynousHunter 08:23, 18 July 2008 (UTC)
- If I'm doing this correctly, your first binary is incorrect
0xE v0 4b Mo Me 2x 16b not enough bits 9b 265 300 265 300 265 300 265 300
yours: 1110 0000 00 0011 0101 0010 1100 1101 1101 1111 0001 100001001 100101100 100001001 100101100 100001001 100101100 100001001 100101100 0
0xE v0 4b Mo none 2x 4b Heal 12 Prot 12 9b 265 300 265 300 265 300 265 300
correct: 1110 0000 00 0011 0000 0010 0000 1101 1100 1111 1100 0001 100001001 100101100 100001001 100101100 100001001 100101100 100001001 100101100 0
- and your base64 encoding looks incorrect and I'm not sure what steps you did so here's the correct steps using the correct binary
correct binary: 1110 0000 00 0011 0000 0010 0000 1101 1100 1111 1100 0001 100001001 100101100 100001001 100101100 100001001 100101100 100001001 100101100 0 flip bits: 0111 0000 00 1100 0000 0100 0000 1011 0011 1111 0011 1000 100100001 001101001 100100001 001101001 100100001 001101001 100100001 001101001 0 group to 6bits: 011100 000011 000000 010000 001011 001111 110011 100010 010000 100110 100110 010000 100110 100110 010000 100110 100110 010000 100110 100100 flip bits: 001110 110000 000000 000010 110100 111100 110011 010001 000010 011001 011001 000010 011001 011001 000010 011001 011001 000010 011001 001001 decimal: 14 48 0 2 52 60 51 17 2 25 25 2 25 25 2 25 25 2 25 9 base64: O w A C 0 8 z R C Z Z C Z Z C Z Z C Z J
- which gives you:
OwAC08zRCZZCZZCZZCZJ. Which can't be loaded into Guild Wars because it has duplicate skills. -Smurf 12:16, 18 July 2008 (UTC)
- Actually, it does load in Guild Wars. Much like the build "Poke the Baby," which is nothing but Healing Touch and Contemplation of Purity. However, thanks much on the binary correction there, it should help when I decide to screw around with templates a bit more. RavynousHunter 20:10, 18 July 2008 (UTC)
- Huh, I guess it does load. I might've copied/pasted a space with it or something the first time. -Smurf 22:17, 18 July 2008 (UTC)

