Template:Infobox CharData

From BattleMaster Wiki
Jump to navigation Jump to search
Template-info.svg Semantic Coded Template
This template contains semantic coding. Do not use this template for anything other than its intended purpose.
Template-info.svg Template Documentation
This documentation is transcluded from Template:Infobox CharData/doc.

ExamplesSandbox

Please note: this template depends on external APIs that are not yet finalized, and thus will almost certainly break in the near future.

I'm mostly just trying to see if I can even do this Semantic Wiki stuff. -- Anaris 13:20, 25 March 2009 (UTC)

Intro

This template uses the BattleMaster external data API to grab your character data from the game database and display it on a wiki page. That way you don't need to continually update your character info on the wiki every time something changes.

Note: Once your character dies, this info box will break, and show as all blank. You can replace it with Template:Infobox DeadCharData.

Usage

The most basic usage of the template is to provide only the world number and your character ID number. You can get both of these by hovering your mouse over the Play link for that character, and noting the URL, like this:

  • https://battlemaster.org/stable/playchar.php?ID=9258&World=1
    • The character ID is the part that follows "ID=", in this case it is: 9258
    • The world is the number that follows "World=", in this case it is: 1

Substitute these into the template, using the inline format, like this:

{{Infobox CharData | (World) | (ID) }}

Like this:

{{Infobox CharData | 1 | 9258 }}

Usage of the character ID number is preferred, as it uses less server resources than using the character name. If, however, you cannot for some reason get the character ID number (like if it's not your character you're putting up a box for), then you can use the character name, like this (note the extra pipe (|) character):

{{Infobox CharData | (World) | | (Name) }}

Like this:

{{Infobox CharData | 1 | | Balkeese }}

Colors

You can optionally specify background colors by adding extra parameters on the end. Make sure you add extra pipe characters as needed, as shown below.

{{Infobox CharData | 1 | 9258 | | grey | blue | green }}
{{Infobox CharData | 1 | | Balkeese | #eeeeee | #dddddd | #cccccc }}

Experiment with the different colors to get the effect desired.

Graphics

You can optionally include a graphic to be displayed between the character name and the statistics. The image must be uploaded to the wiki, you cannot use external graphics. Note that if you use a wide graphic, the entire box will be as wide as the graphic, and may look awkward. If you have a large graphic, you may not want to include it as part of the infobox. To add the graphic, and an optional caption, include the image name (only the name, do not include the "Image:" part) and caption as additional parameters after the colors.

Note
If you add a graphic, you must specify background colors, or all the backgrounds will be white.
Note
The default colors for the infobox, in order, are: |#eee|#cce|#ddf|
{{Infobox CharData | (World) | (ID) | (Name) | (BottomRightColor) | (BottomLeftColor) | (TitleColor) | (ImageName) |(Caption) }}

For example:

{{Infobox CharData | 1 | 9258 | | #eee | #cce | #ddf | Balkeese crest.png | Personal Crest }}