Talk:Skill template format

From Guild Wars Wiki
Jump to navigationJump to search

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)

Move[edit]

Shouldn't this page be on Skill template format instead? - Anja Astor Anja Astor (talk) 17:33, 12 April 2007 (EDT)

Moved, since no one opposed and we already have Equipment template format. - Anja Astor Anja Astor (talk) 04:58, 14 April 2007 (EDT)

Parserfunction for template code?[edit]

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)

Page format[edit]

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)

I agree with the table, I don't think it's necessary. -- CoRrRan (CoRrRan / talk) 14:15, 21 June 2007 (UTC)
I can't tell if you meant that you like having them in the tables or not. Cloud 01:17, 2 July 2007 (UTC)
I do not like the table. I prefer the simpler listing. (Sorry for the confusion. :) ) -- CoRrRan (CoRrRan / talk) 12:52, 2 July 2007 (UTC)

Parsing problem[edit]

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)

I think you're facing the exact same problem I faced with PHP: This i no "ordinary" base64, it's somehow different from what PHP uses. I don't know the exact details, but that's why it doesn't work. -- User Nachdenki sig.pngnachdenki [ user | talk | contribs ] 12:58, 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) -- User Nachdenki sig.pngnachdenki [ user | talk | contribs ] 16:09, 21 June 2007 (UTC)
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)

I don't get it[edit]

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 talk 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 an A is an encoded 0, a G an encoded 6, and u is an 47. So you can display numbers from 0 to 63 by using a simple character. (see also hexadecimal encoding with 16 different characters)
For example the encoded string OgNFg (taken from above) means 14 32 13 5 32. When you now translate this numbers into binary, you get 001110 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):
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...
I am also wondering why there is flipping of bit order. There is nothing said about it on the RFC nor the Wikipedia article. --98.92.20.165 19:52, 1 May 2011 (UTC)

Into the skill bits...[edit]

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(proftemplate[template].substring(pointer, pointer+4)))*(binaryIntToDecimal(Integer.parseInt(proftemplate[template].substring(pointer+4, pointer+8)))+4);
		pointer += 8;
		int skillbitlength = 8+Integer.parseInt(proftemplate[template].substring(pointer, pointer+4),2);
		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.

Page not found error accessing the article[edit]

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? Go to Aiiane's Talk page (Aiiane - talk - contribs) 04:55, 23 July 2007 (UTC)
Working for me as well. -- ab.er.rant sig 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)

Why encoding?[edit]

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)
As I said: "And shorter.. so it's easier to copy." - That is most probably the main reason; there is no nice way to copy binary data after all. poke | talk 23:43, 11 December 2008 (UTC)

odd decoding?[edit]

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 41 which means 001110 110000 101001 in binary. Flipped, separated and flipped again I get: 1110 0000 00 0111 1010 which 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 ^^

Binary -> Base64 Conversion Problem[edit]

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)

A Bad Guide to Decoding Base64(inefficient method that uses binary in highest-bit-first order)[edit]

  • I will make a newer better guide later. The correct method is to interpret the binary array in lowest-bit-first order. This is why in this guide, you have to flip the binaries a lot. As a metaphor, this guide tells you that if you want to solve what 8+8 is, you must go outside and collect 8 pebbles. Then you must arrange them from smallest to largest. Then you must arrange them from largest to smallest. Then you must collect 8 more pebbles and arrange them as you did before. Then you must hold each pebble for one minute at a time. Then you must count.... GET THE PICTURE?

So I've been confused many times over during my attempts to make "unique" builds with this base64 encoding. This will be a mediocre guide explaining how to take apart a template code.

Resources:

http://guildwars.wikia.com/wiki/Skill_template_format If you go to the WIKIA, it actually makes more sense now. It has a table that shows the decoding of base64 and it makes a bit more sense.

http://wiki.guildwars.com/wiki/Skill_template_format The GW wiki page on skill template format of course! This page has links to the values for every skill, profession, and attribute. A build is constructed from these values, so you need them. The page also explains the bit format for the templates(which I will explain later).

http://en.wikipedia.org/wiki/Base64 Wiki page you can use to familiarize yourself with the base64 encoding. It also lists in a table, the value of each character in the base64 language.

http://www.binaryhexconverter.com/ A webpage with links to various data converters. You would be using the 'Binary to Decimal' and 'Decimal to Binary' converters.

There are other converters you can use, but I found there would be minor inconveniences relating to formatting, not incorrect answers. So be wary when using them, for instance I found a converter that spews the output in sets of 8 bits and would add extra 0's, and it could not read binaries correctly larger than 8 bits. So again, you have been warned.

Decoding the Base64 template:

Learn by example! The main reason to learn how to take apart a build is to better understand how to make one. So I'll explain the steps to decoding a build into the values(numbers) that represent skills, profession, attributes, etc. You will probably want to open a text document editor to use as your 'computer scratch-paper'. But really, don't bother doing this if you just want to make template codes because this is very tedious and not fun. Here is the build for this example:

OQBDApwTOhwcgM4mmBaCeAUA

OQBDApwTOhwcgM4mmBaCeAUA

1. The first step is to convert each character(letter/number) in the base64 string(code shown above) to its numerical value. This is when you use http://en.wikipedia.org/wiki/Base64 to look at the the conversion table. For instance, the first character of OQBDApwTOhwcgM4mmBaCeAUA is O which represents the number 14. The next character is Q, which represents 16. You will need to do this for each character. When you are done, you should have a string of decimals(numbers) exactly like this:

14 16 1 3 0 41 48 19 14 33 48 28 32 12 56 38 38 1 26 2 30 0 20 0

I've copied the table for quick use:

Value	Char	Value	Char	Value	Char    Value	Char
0	A	16	Q	32	g	48	w
1	B	17	R	33	h	49	x
2	C	18	S	34	i	50	y
3	D	19	T	35	j	51	z
4	E	20	U	36	k	52	0
5	F	21	V	37	l	53	1
6	G	22	W	38	m	54	2
7	H	23	X	39	n	55	3
8	I	24	Y	40	o	56	4
9	J	25	Z	41	p	57	5
10	K	26	a	42	q	58	6
11	L	27	b	43	r	59	7
12	M	28	c	44	s	60	8
13	N	29	d	45	t	61	9
14	O	30	e	46	u	62	+
15	P	31	f	47	v	63	/

2. Next, you must convert each of those numbers to binary format. Starting with the first number 14, you can attempt to do it in your head, on paper, with a calculator, or just use a conversion tool listed at http://www.binaryhexconverter.com/. You would use the decimal to binary converter for this. If you enter 14 into the box, the result should say 1110. The next number 16, would be 10000. Once you have converted them all, you must do something IMPORTANT!

You must make each of these binary numbers a total of 6 digits. You will add zeros to the FRONT of the numbers. So with 1110(4 digit binary) you must add 2 zeroes to front. It will now look like this: 001110(6 digit binary, GOOD!). You must do this with ALL of the binary numbers.

Once you are all done with that, you should have a string of binaries exactly like this:

001110 010000 000001 000011 000000 101001 110000 010011 001110 100001 110000 011100 100000 001100 111000 100110 100110 000001 011010 000010 011110 000000 010100 000000

3. Now you must do something a little unorthodox. You must flip/reverse each binary. Meaning 000111 would become 111000! Or 101110 would become 011101. The order of the binaries in the string stays the same, you are only reversing the individual binaries themselves. ***So I later found out when browsing for skill template info, why these binaries are reversed. If you go to the wikia page, http://guildwars.wikia.com/wiki/Skill_template_format. It has a table that shows decoding. Normally with binary numbers, the first digit represents a larger value and the last represents the smallest. For example if you have a 6 digit binary. The values of each digit is 32 16 8 4 2 1. And when you make a binary, you start with the largest value and see if it can fit, and go down to the smallest. For some reason, the values order is switched so its 1 2 4 8 16 32 instead. I'll post a table when I get around to it. It will make so much more sense or just go to the table on the wikia.

Once you are all done with that, you should have a new string of binaries exactly like this and yea I know that is quite a tedious task to do:

011100 000010 100000 110000 000000 100101 000011 110010 011100 100001 000011 001110 000001 001100 000111 011001 011001 100000 010110 010000 011110 000000 001010 000000

4. This next part I think may be the worst; it is definitely hard to explain. You no longer need to keep the binary numbers as sets of 6. You can put them all together as one long number. I'm just pointing out, it no longer matters how you perceive these numbers because you will be grouping them in a different way.

So, now you have a long number:

011100000010100000110000000000100101000011110010011100100001000011001110000001001100000111011001011001100000010110010000011110000000001010000000

You will need to refer to http://wiki.guildwars.com/wiki/Skill_template_format for this section. It lists in order, the number of bits in each part of the template. One bit is a 0 or 1 in this case. The template is made of various numbers represented in binary form, such as the template version, your profession, skills, and attributes. Each of these numbers is represented in what I will call a 'part'. The wiki page I just linked addresses them by the number of bits in each part, their name/use, and their value/number. You will notice some of the 'parts' have 'N bits'. This means they have a to be determined amount of bits. But how do you know how many bits to use for these parts labeled with 'N'? There is always a preceding 'part' that tells you how many bits to use in those following 'N parts'.

Let's start with the 'Type/version header'. Since this build was made after April 5, 2007, the header contains:

4 Bits - Template Type - 14

4 Bits - Version Number - 0

So the first 4 bits of that really long string refer to the Template Type. The value is 14 by default. So looking at your really long binary number, 0111 are the first 4 digits. But notice that 0111 does not equal 14 in binary? That's because you have to reverse/flip them AGAIN! (You want to smash your keyboard against the programmer's head who came up with this don't ya?)


So if you flip 0111, you get 1110 which is 14. As you take apart your really long binary in this method, you'll want to put spaces between each new group. For example, mine would look like this in my text editor:

1110 00000010100000110000000000100101000011110010011100100001000011001110000001001100000111011001011001100000010110010000011110000000001010000000

Then you have the next 4 digits which represent the Version Number. Your next 4 digits in your really long binary are 0000. 0000 is the same in reverse and it equals 0 in binary. 0 is the default for the Version number so that is good.

This example shows your 2 new groups(both part of header), the rest of the really long binary number, and then the corresponding values below that go with each group:

1110 0000 0010100000110000000000100101000011110010011100100001000011001110000001001100000111011001011001100000010110010000011110000000001010000000
14   0

Next you have 2 bit group that tells you how many bits will be used in next few groups. The value of this 2 bit group is used in this function: N * 2 + 4. If the value of the 2 bit group is 0, then 4 is the number of bits in the next few groups. If the value is 3, then 10 is the number used.

Anyways, I think the value of this 2 bit binary is always 0 because there are currently not enough professions to require a binary number with more than 4 bits.

So take the next 2 bits, they are 00 and you would reverse them just like before. 00 is the same in reverse. In binary, it is 0. Since the value of this 'part' is 0, and you plug 0 into that function N * 2 + 4, you get 4. This means the next 2 'parts' only use 4 bits. Now you have:

1110 0000 00 10100000110000000000100101000011110010011100100001000011001110000001001100000111011001011001100000010110010000011110000000001010000000
14   0    0  

I will do BOTH of the next 2 'parts'. You get 1010 and 0000. Reverse/flip them and you have 0101 and 0000. Translated in binary, these equal 5 and 0. If you read over that wiki page, you will see these numbers refer to your primary profession and your secondary profession respectively. So if you scroll down to the Profession Index on that page, it shows 5=mesmer and 0=none. Those match up with my build, a mesmer with no second profession.

1110 0000 00 0101 0000 110000000000100101000011110010011100100001000011001110000001001100000111011001011001100000010110010000011110000000001010000000
14   0    0  5    0

Now we move to attributes. The first 2 'parts' are made of 4 bits each. The first bit will tell us how many attributes are used in the build. It should be 3 since I have Domination Magic, Fast Casting, and Inspiration Magic. So the next 4 bits are 1100. In reverse 0011 or 3 in binary. The second 'part' is used to tell you how many bits you will use in the following 'part', n Bits - Attribute id.

So take your next 4 bits, 0000, which is the same in reverse and 0 in binary. The function described on the wiki page is N + 4, so the number of bits you will use is 4(0+4).

1110 0000 00 0101 0000 0011 0000 0000100101000011110010011100100001000011001110000001001100000111011001011001100000010110010000011110000000001010000000
14   0    0  5    0    3    0

So hopefully this is all becoming redundant for you, and you have caught on to the pattern used here. I'm going to skip translating the rest of the bits and just show you my end result with explanation of each 'part'. For you to do the remaining 'parts' on your own, you must pay careful attention to the notes on each 'part' on the wiki page.

This is what I got:

1110 0000 00 0101 0000 0011 0000 0000 1001 0010 1100 0011 1001 0011 10000100001 00000111001 00000110010 10100110111 00000011001 00001001101 00000011110 00000101000 00
14   0    0  5    0    3    0    0    9    2    12   3    9    3    1057        57          50          1335        25          77          30          40          0

The only mistake I made was the 'tail' has 2 bits, but it still equals 0 which it should. It is supposed to have only 1 bit according to the wiki page. I'm not sure where I made an error, but I will check later and hopefully address the problem. If you know what it is, go ahead and leave a note!

Below is a short list of each of the values/numbers from my build and a note next to them describing what they are or their purpose.

14   -Template Type(the value is 14 by default)
0    -Template Version(the value is 0 by default)   
0    -A code controlling the number of encoded bits per profession id, decoded as follows: bits_per_profession_id = N * 2 + 4
5    -Primary Profession(5=mesmer)    
0    -Secondary Profession(0=none)  
3    -quantity of attributes(3 because I have only Domination, Fast Casting, and Inspiration. One, two, three!)   
0    -A code controlling the number of encoded bits per attribute id, decoded as follows: bits_per_attribute_id = N + 4
0    -Fast Casting(use http://wiki.guildwars.com/wiki/Skill_template_format#Attribute_index to look up the values for each attribute)   
9    -points in Fast Casting   
2    -Domination Magic   
12   -points in Domination Magic   
3    -Inspiration Magic  
9    -points in Inspiration Magic   
3    -A code controlling the number of encoded bits per skill id, decoded as follows: bits_per_skill_id = N + 8 
1057 -Psychic Instability(use http://wiki.guildwars.com/wiki/Skill_template_format/Skill_list to look up values for each skill)
57   -Cry of Frustration
50   -Wastrel's Worry
1335 -Wastrel's Demise
25   -Power Drain
77   -Chaos Storm
30   -Diversion
40   -Ether Feast        
0    -tail end of the template

This next box summarizes the steps taken to decode the base64 template code.

Get your template code first!
OQBDApwTOhwcgM4mmBaCeAUA

Translate each letter into its base64 value.
14 16 1 3 0 41 48 19 14 33 48 28 32 12 56 38 38 1 26 2 30 0 20 0

Translate each value into a 6 digit binary.
001110 010000 000001 000011 000000 101001 110000 010011 001110 100001 110000 011100 100000 001100 111000 100110 100110 000001 011010 000010 011110 000000 010100 000000

Flip/reverse each 6 digit binary.
011100 000010 100000 110000 000000 100101 000011 110010 011100 100001 000011 001110 000001 001100 000111 011001 011001 100000 010110 010000 011110 000000 001010 000000

Group up your 6 digit binaries(not actually neccessary)
011100000010100000110000000000100101000011110010011100100001000011001110000001001100000111011001011001100000010110010000011110000000001010000000

Take apart your long binary stream using the template guidelines on the gw wiki page. REMEMBER TO FLIP/REVERSE THESE BEFORE YOU EVALUATE THEM!
You sorta have to translate the binaries to decimal as you do it.
1110 0000 00 0101 0000 0011 0000 0000 1001 0010 1100 0011 1001 0011 10000100001 00000111001 00000110010 10100110111 00000011001 00001001101 00000011110 00000101000 00
14   0    0  5    0    3    0    0    9    2    12   3    9    3    1057        57          50          1335        25          77          30          40          0

--(Desmond Dreadheart 16:57, 3 October 2011 (UTC))