Template:Weapon

Sample Infobox
Below is a sample Infobox for the followed by template documentation.

Template Documentation
This template contains various independently retrievable data items about weapons from the Battle Bears series, primarily from the MMO editions Battle Bears Overclock and Battle Bears Gold. For Battle Bears Gold, all data is based on values retrieved from:


 * http://bbr2.battlebears.com/1.2/store/store_items.json

Or in Gnifle's trusty pastebin, in a more readable format:


 * http://pastebin.com/txp6h4dT

A reliable source of data for Battle Bears Overclock is still being researched.

Technical Explanation
More information about how this is used in practice on Template:Infobox Weapon.

This template takes advantage of using Wikia Templates as an improvised data storage, that can be "retrieved" if this templated is "included" into another template, where the data is to be used - an infobox for example.

Weapon data is stored in a descendant template of Template:Weapon_Data - meaning it'll have to have a page name like Template:Weapon_Data_ _()  to work. The structure of one of these pages could be like this, which is retrieved from Template:Weapon_Data_Viperifle_(BBG):

As shown, the data is stored as  pairs. In the first line, you should only want to edit the part where it says  - this is the name that will be used as title attribute and will be displayed on a page.

The important thing to note is that EVERY parameter (e.g. ' ') is 100% optional aside from  and. In other words, it is possible to add any, and as many, parameters that are relevant for a particular weapon. For example, the weapon Urine Trouble doesn't have a locktime attribute in the data source while the Viperifle does. So in the Urine Trouble Data Template you would simply exclude it entirely - just remove the line.

Advanced, but easy to use
This entire concept does involve some technical topics - but the baseline is that you only need to worry about the individual weapons' Data Template page Template:Weapon_Data_{Weapon name}. The rest is taken care of automatically by a separate template displaying it, like an infobox as shows below. So by simply including:

You'll get:

Actual text will automatically wrap around the infobox like this in a real case - more info below this area. In the Template:Infobox Weapon, the relevant data is automatically filtered and displayed for each weapon.

Parameters


All item data templates use the same parameter.

Usage
Until here the documentation is automatically generated by Template:Item data.