Template:BadgeBox: Difference between revisions

From Homecoming Wiki
Jump to navigation Jump to search
imported>Rugiel (historical)
mNo edit summary
m (attempting to fix display in non mainspace)
 
(48 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<includeonly><div style="margin: 0.5em;">
<includeonly>{{BadgeBox/core
{| style="background-color: #64646F; border: 1px solid #AAAAFF;"
|image={{#explode:{{#show:{{{link|{{{1}}} Badge {{#if:{{{which|}}}|({{{which}}})}}}}}|?Has image|link=none}}|,|0}}
{{#if: {{{2|}}}|{{!}} style="vertical-align: top; padding: 0.25em;" {{!}} [[Image:{{{1}}}]]
|image 2={{#explode:{{#show:{{{link|{{{1}}} Badge {{#if:{{{which|}}}|({{{which}}})}}}}}|?Has image|link=none}}|,|1}}
{{!}} style="width:100%; padding: 0.25em;" {{!}} '''[[{{{2}}} Badge|{{{2}}}]]'''<br>
|badge={{{1|}}}
{{if|test={{{3|}}}|then={{{3}}}|else={{#dpl: title={{{2}}} Badge | includepage=#Description}}}}
|link={{{link|{{{1}}} Badge {{#if:{{{which|}}}|({{{which}}})}}}}}
|
|titles={{#show:{{{link|{{{1}}} Badge {{#if:{{{which|}}}|({{{which}}})}}}}}|?Has title|valuesep=&nbsp;/&#32;}}
{{!}} style="vertical-align: top; padding: 0.25em;" {{!}} {{#dpl: title={{{1}}} Badge | includepage={Image} }}
|which={{{which|}}}
{{!}} style="width:100%; padding: 0.25em;" {{!}} '''[[{{{1}}} Badge|{{{1}}}]]'''<br>
|note={{lc:{{#replace:{{#ask:[[{{{link|{{{1}}} Badge {{#if:{{{which|}}}|({{{which}}})}}}}}]][[Requires alignment::+]]|?Requires alignment=|mainlabel=-|link=none|intro=(requires&#32;|valuesep=/|outro=)}}|<nowiki></nowiki> (Alignment)}}}}{{#ask:[[{{{link|{{{1}}} Badge {{#if:{{{which|}}}|({{{which}}})}}}}}]][[Requires level::+]]|?Requires level|intro=(requires level&#32;|outro=)}}{{#if:{{#pos:{{#show:{{{link|{{{1}}} Badge {{#if:{{{which|}}}|({{{which}}})}}}}}|?Has coordinates.Has x coordinate}}}}|(multiple locations)|{{#ask:[[{{{link|{{{1}}} Badge {{#if:{{{which|}}}|({{{which}}})}}}}}]][[Has coordinates::+]]|link=none|template=coords|named args=yes|?=page}}}}
{{#dpl: title={{{1}}} Badge | includepage=#Description}}}}
|desc={{#lsth::{{{link|{{{1}}} Badge {{#if:{{{which|}}}|({{{which}}})}}}}}|Description}}{{#show:{{{link|{{{1}}} Badge {{#if:{{{which|}}}|({{{which}}})}}}}}|?Has description|valuesep=</blockquote><hr><blockquote style="margin: 0; border-left: none; padding: 1em 0;"><p>}}{{#if:{{{monument|}}}|{{{monument}}}}}
|}</div></includeonly><noinclude>{{{{PAGENAME}}/Doc}}
|left={{{left|}}}
[[Category:Templates]]</noinclude>
}}</includeonly><noinclude>{{Documentation}}</noinclude>

Latest revision as of 17:35, 19 December 2023

[edit] [purge] Documentation

Overview

This template is used to generate a badge box for displaying the badge graphic, badge name, and badge description for a badge.

Usage

Badge data is automatically filled in from the badge article. {{Badge display}} on the badge page provides the data. A combination of {{Image}} and a section with heading "Description" also works, but is deprecated.

{{BadgeBox|Badge Name}}

Note that some badges have a different graphic and/or a different description for heroes and villains. Most badges will work fine automatically (once set up), but some may require additional parameters to get the exact effect you want.

Additionally, you can supply the which= option to specify which of a set of disambig pages to refer to; the which= should refer to the parenthetical after the badge name. Or, you can supply the link= option to specify the exact page title.

{{BadgeBox|Badge Name|which=Type}}

Additionally, you can specify a width for the left using left=. You should provide a number, which will be treated as a width in pixels. This allows a series of badge boxes to line up well.

{{BadgeBox|Badge Name|left=number}}

Additionally, you can supply the monument= option to add additional information after the description, for instance the monument coordinates.

{{BadgeBox|Badge Name|monument=text}}

Limitation

If the data comes from a section with heading "Description", BadgeBox will work only once per badge per page. If you call BadgeBox for the same badge twice on one page, the second BadgeBox will have a page link instead of the description.

If the data comes from {{Badge display}}, this limitation doesn't apply.

Examples

Basic use

{{BadgeBox|Law Enforcer}}
Badge
Law Enforcer / Dirty Cop (requires hero/vigilante)

You have worked closely with the Paragon Police Department during your free time earning the Law Enforcer Day Job. Logging out in a Police Station will earn you an Experience Bonus, when you log back in, each time you complete a mission for a short time.


The Paragon Police Department has severed its ties with you now that you're a villain.

Which parameter

Pulls data from a badge article with a parenthetical disambiguation after the title, e.g., the historical Terminator Badge (AE) vs the current Terminator Badge.

{{BadgeBox|Terminator|which=AE}}
{{BadgeBox|Terminator}}
Badge

You've defeated 5000 custom enemies during published Architect missions earning yourself the Terminator badge.

Badge

The citizens of Paragon City flee in terror when they see you coming.


Given your past deeds, many of Paragon City's citizens are understandably wary of you.

Link parameter

Pulls data from a badge article with the exact page name specified.

{{BadgeBox|Silent Sentinel}}
{{BadgeBox|link=Silent Sentinel Badge}}
Badge
Silent Sentinel (-608.0, 70.0, -1890.0)[Copy]

In the 1950's the hero called 'Gargoyle' would stand watch over the city from this spot.

Badge
Silent Sentinel (-608.0, 70.0, -1890.0)[Copy]

In the 1950's the hero called 'Gargoyle' would stand watch over the city from this spot.

Left parameter

Gives a smaller badge more space, to align with a large badge.

{{BadgeBox|left=78|Top Dog}}
{{BadgeBox|Atlas Tour Guide}}
Badge
Top Dog (131.0, 319.7, -319.5)[Copy]

The top of Atlas' statue is the first place many flying heroes will go.

Badge

You've obtained this Accolade by earning every Exploration badge within Atlas Park.

Monument parameter

{{BadgeBox|Intellectual|monument=* [[Intellectual Badge#Monument 1|Monument 1]] {{coords|2381|0|-1251}}}}
Badge

You have learned the history of the Lost's attempt to control the minds of Paragon City's people.