Thread:Bob the Wikipedian/@comment-5116706-20121030022455/@comment-2255188-20121030201509

Since they're fan fiction, I'd recommend setting the templates up in your userspace. You can use something like User:Supertoastfairy/Which Wesen are you? and the same naming convention for the other two templates.

Here's a brief description of how it works. In the first template, Which Wesen are you?, you'll see a bunch of lines that look like this:

This indicates that a Schakal should ideally have a true answer for 14, 15, 16, 22, 56, 64, and 65. If we wanted an answer to be false, we'd use isfalse instead of istrue. To calculate the score, I count up how many answers this Wesen looks for-- this one has 7, so I divide the total of the true answers by 7 to come up with a percentage between 0 and 100. I never use a number less than 5, in order to prevent people from defaulting to Wesen that we know very little about.

This line should be updated any time you add new questions. It checks to see if a certain question has been answered.

Userbox creature type figures out which Wesen scores highest and passes that and its score along to the next template. It uses the max template to do this. Since max maxes out at 3 parameters, you'll need to nest them. I use numbers, letters, and Roman numerals to help keep track of each set of three.

The top portion of the code finds the name of the Wesen that scores highest, and the bottom portion finds the score for that Wesen. Both sections contain the max stuff, so when you edit the top you should copy and paste the edit to the bottom. The middle portion is actually part of the top, and it is just used for passing the name of the best-scoring Wesen on to the next template.

Userbox creature type backend is the code that actually generates the userbox. There are four sections here:
 * 1) The text that displays for each Wesen type
 * 2) The image that displays for each Wesen type
 * 3) Category sorting - I assign a different ASCII character to each Wesen type to help sort them a little better, rather than creating a bunch of categories
 * 4) A gallery of the images the template uses. Not necessary, but if you don't want to risk losing an image when someone comes through and deletes duplicate images, this is a good way to let them know it's in use.

I know it feels really bulky and redundant right now, and I'd like to sit down sometime and make it a bit cleaner. If/when I do, I'll be sure and do it in such a way that it can be used by whatever quiz you come up with as well.

I hope this helps! Have fun!