Difference between revisions of "Template:Weapon"

From Stoneshard wiki
Jump to navigation Jump to search
old>Realpsojed
(reverting it back to when it was working fine. I'll leave the solution for small screens to someone else.)
old>Realpsojed
(Modified for tooltip use)
Line 1: Line 1:
<includeonly>{| class="wikitable" style="width: 20%; display: inline-table; float: right;"
<includeonly>
|colspan="2" style="text-align:center;"|{{ #if:{{{WeaponName|}}}|{{{WeaponName}}} <br />{{{WeaponRarity}}} {{{WeaponType}}}}}
{| width=300px
|colspan="2" style="text-align:center;"|{{ #if:{{{ {{ROOTPAGENAME}} }}} <br />Common {{{WeaponType}}}}}
|-
|-
|colspan="2" style="text-align:center;"|{{ #if:{{{Damage1|}}}|{{{Damage1}}} {{{Damage1type}}} Damage<br />}}<!--
|colspan="2" style="text-align:center;"|{{ #if:{{{Damage|}}}|{{{Damage}}} <br />}}
-->{{ #if:{{{Damage2|}}}|{{{Damage2}}} {{{Damage2type}}} Damage<br />}}<!--
|-
-->{{ #if:{{{Damage3|}}}|{{{Damage3}}} {{{Damage3type}}} Damage<br />}}<!--
|
-->{{ #if:{{{Damage4|}}}|{{{Damage4}}} {{{Damage4type}}} Damage<br />}}
|style="text-align:right;"|{{ #if:{{{Properties|}}}|{{{Properties}}}<br />}}
|- style="width: 50px;"
|{{ #if:{{{Stat1|}}}|{{{Stat1}}}<br />}}<!--
-->{{ #if:{{{Stat2|}}}|{{{Stat2}}}<br />}}<!--
-->{{ #if:{{{Stat3|}}}|{{{Stat3}}}<br />}}<!--
-->{{ #if:{{{Stat4|}}}|{{{Stat4}}}<br />}}<!--
-->{{ #if:{{{Stat5|}}}|{{{Stat5}}}<br />}}<!--
-->{{ #if:{{{Stat6|}}}|{{{Stat6}}}<br />}}<!--
-->{{ #if:{{{Stat7|}}}|{{{Stat7}}}<br />}}<!--
-->{{ #if:{{{Stat8|}}}|{{{Stat8}}}<br />}}<!--
-->{{ #if:{{{Stat9|}}}|{{{Stat9}}}<br />}}<!--
-->{{ #if:{{{Stat10|}}}|{{{Stat10}}} }}
|style="text-align:right;"|{{ #if:{{{Stat1value|}}}|{{{Stat1value}}}<br />}}<!--
-->{{ #if:{{{Stat2value|}}}|{{{Stat2value}}}<br />}}<!--
-->{{ #if:{{{Stat3value|}}}|{{{Stat3value}}}<br />}}<!--
-->{{ #if:{{{Stat4value|}}}|{{{Stat4value}}}<br />}}<!--
-->{{ #if:{{{Stat5value|}}}|{{{Stat5value}}}<br />}}<!--
-->{{ #if:{{{Stat6value|}}}|{{{Stat6value}}}<br />}}<!--
-->{{ #if:{{{Stat7value|}}}|{{{Stat7value}}}<br />}}<!--
-->{{ #if:{{{Stat8value|}}}|{{{Stat8value}}}<br />}}<!--
-->{{ #if:{{{Stat9value|}}}|{{{Stat9value}}}<br />}}<!--
-->{{ #if:{{{Stat10value|}}}|{{{Stat10value}}} }}
|-
|-
|colspan="2"|{{ #if:{{{Durability|}}}|Durability: {{{Durability}}}/{{{Durability}}} }}
|colspan="2"|{{ #if:{{{Durability|}}}|Durability: {{{Durability}}}/{{{Durability}}} }}
|-
|-
|colspan="2" style="text-align:center;"|{{ #if:{{{Flavortext|}}}|{{{Flavortext}}} }}
|colspan="2" style="text-align:center;"|{{ #if:{{{Description|}}}|{{{Description}}} }}
|}</includeonly>
|}</includeonly>
<noinclude>{{doc}}
<noinclude>{{doc}}


[[Category:Infobox_templates]]</noinclude>
[[Category:Infobox_templates]]</noinclude>

Revision as of 23:57, 27 March 2020

Template-info.png Documentation

This is weapon template created for use together with the Template:Tooltip hover box template to display tooltip with item attributes for weapons.

Usage: Copy this code to any page where you want to display the item tooltip:

{{{{{1|Tooltip hover box}}}|title={{Weapon}}}}

You can provide the item name as first parameter, otherwise the pagename is used.

By default, the page is also labelled with a category corresponding to the item type (ie. Heavy Aldorian Bow will receive the Category: Bow). If you don't want to add this category to a page, add the category parameter:

{{{{{1|Tooltip hover box}}}|title={{Weapon|Heavy Aldorian Bow|category=no}}}}

Examples: