MetaBattle Wiki:SMW Templates Manual

This manual contains information about adding certain data to the wiki through the use of SMW-empowered templates. These new templates are aimed at simplifying adding and displaying data, so that it's easier for new users to contribute, and easier for editors to maintain in the future. The templates are split into two parts: data storage and data display. Data storage occurs simply by creating a certain subject page prefixed with its namespace, and filling up the parameters with the appropriate data. Data display is the act of calling a tooltip template passing the subject page name (eg. skill page name, trait page name, etc).

If you're confused and willing to learn about what SMW is and what it does, please refer the Semantic MediaWiki page to get a grasp of how it's used and what properties are available for each build/game context.

Traits

There are three important templates specifically for traits, and one add-on template tied to traits. We will review each of them and their purpose:

{{Trait info}}
This template is used to store data in the wiki through SMW. In the template page there's a style book available to help guide how one can fill up a trait entry so that it can be retrieved in a correct way. Each trait page must be prefixed with Trait:. If you want to add data about the elementalist trait "Aquatic Benevolence", you will need to create the page with the title Trait:Aquatic Benevolence. This page will need the {{Trait info}} invocation, passing values to the parameters, followed by a call to the {{Trait tooltip}} template, this helps view the trait tooltip right away. It's encouraged to leave the {{Trait tooltip}} invocation in the trait page for future verification.
{{Trait tooltip}}
This template generates a trait tooltip, pulling data from the trait page passed as first parameter. Data is pulled from the information fed in that trait page, through the {{Trait info}} template. There's also a style book available to demonstrate what styling options are available, and how you can make a template call.
Technical note: This template queries for a single trait data (fed by {{Trait info}}) through SMW, and generate the html composition (the tooltip itself) by handing the query results to {{Trait tooltip format}}.
{{Specialization}}
This template generates a specialization table. It expects the specialization name as first parameter, followed by the optional column position for adept, master, and grandmaster major traits. It makes heavy use of {{Trait tooltip}}.
Technical note: This template queries for traits data (fed by {{Trait info}}) through SMW, stylizing them in columns by handing the query results to {{Specialization column}}.

Skills

Skills follow the same scheme as above, and also uses the same add-on template.

{{Skill info}}
It behaves pretty much like {{Trait info}}, except for the page prefix which must be Skill:, and also serves only to store data in the wiki.
{{Skill tooltip}}
This template generates a skill tooltip, much like {{Trait tooltip}}, pulling data from the skill page passed as first parameter. Consult the style book to see what styling options are available for skill tooltips.
Technical note: This template queries for a single skill data (fed by {{Skill info}}) through SMW, and generate the html composition (the tooltip itself) by handing the query results to {{Skill tooltip format}}.

Shared templates

Some templates are shared between more than one context (ie. traits, skills, etc).

{{Skill fact}}
It's designed to be used inside {{Skill info}} and {{Trait info}}. It generates a skill fact about a certain trait or skill, this includes boons, conditions, control effects, durations, availability, and many more. Consult the extensive book style to see the list of skill facts available.
Technical note: This template queries for a single skill fact data (fed by {{Skill fact}}) through SMW, and generate the html composition (the skill fact item) by handing the query results to {{Skill fact format}}. This is the only tooltip-related template that doesn't produce anything alone, and it's designed to be used by other templates.

Builds

Templates related to build pages.

{{MBuild}}
Stores and displays data about the build itself, such as profession, elite specialization, game mode and type associated. Builds created by this template can be queried later with the Build Search Form.
Technical note: This template stores build data and tags such build depending on the input parameters. Tagging a build in this sense means categorizing it, therefore searching the Builds Category Index is another way to look for builds.
{{Skillbar}} (beta)
Designed to generate a skill bar given the input parameters. It queries valid data across SMW database to display a certain profession's skill bar. It also annotates the Has utility set property.
Technical note: This template queries for profession skills with {{Skillbar standard}} to display a specific set of skills based on the profession. It also uses {{Skillbar mechanic header}} to display profession-specific mechanics UI with additional custom elements provided by {{Skillbar mechanic icon}}.
{{Skillbar standard}} (beta)
Designed to generate a full skill bar given the input parameters. It queries valid data across SMW database to display a certain profession's skill bar.
Technical note: This template queries for weapon skills with {{Skillbar weapon}} and pulls utility skills directly from the database to display a full skill bar based on input parameters.
{{Skillbar weapon}}
Designed to generate a weapon skill bar given the input parameters. It queries valid data across SMW database to display a certain profession's weapon skill bar.
Technical note: This template queries for weapon skills with {{Weapon skill pull}} to display a specific set of skills based on the profession and weapon.

Minor

{{Short weapon name}}
This template accepts weapon names and return a shortened version. Some weapons already have a short name and as such will only return the very same input name.
{{Trait build link}}
This template generates a list containing all trait chatlinks associated with a certain specialization.
{{Skill chain}}
This template generates a skill chain for the input skill page name.
Technical note: This template queries for the Has chain sequence property, and if it's valid it then generates a chain sorting them accordingly.
{{Skillbar auxiliary}}
This template generates a skill set for a given engineer kit or "parent" skill. Parent skill refers to skills which generate a new skill bar, replacing the currently slotted weapon skill bar (e.g. Conjure Lightning Hammer).
Technical note: This template queries for all skills belonging to a certain parent skill or engineer kit. Note that chained auto-attacks only display first skill in the sequence.

PvP-specific

{{PvP equipment}}
Stores and displays equipment information for a certain build.
Technical note: This template allows PvP equipment data to be queried later.
{{PvP build card}}
Displays information about a given build, pulling equipment, specializations, and utility set from a build page. Check the template page to learn the requirements for displaying a correctly formatted PvP build card.
Technical note: This template queries for all data provided in the target build page through {{PvP equipment}} (formatted with {{Skillbar}}, and {{Specialization}} (parameter noprop not set).
Remove ads

Remove all ads across the entire website for only $4.99! Click here for more info.