Difference between revisions of "Template:Weapon"

From Stoneshard wiki
Jump to navigation Jump to search
old>Realpsojed
m (added includeonly tag)
old>Realpsojed
(apparently description and usage goes into /doc, moved it there, added doc and category)
Line 1: Line 1:
<noinclude>This is weapon template created for use anywhere on the wiki. Usage: Copy this code and replace/fill in the values:
<nowiki>
{{Weapon
|WeaponName=Colt 1911
|WeaponRarity=Common
|WeaponType=Gun
|Damage1=50|Damage1type=Piercing
|Damage2=3|Damage2type=Fire
|Damage3=|Damage3type=
|Damage4=|Damage4type=
|Stat1=Armor Penetration|Stat1value=+10%
|Stat2=Block Power|Stat2value=+5
|Stat3=Accuracy|Stat3value=+3%
|Stat4=Fumble Chance|Stat4value=-5%
|Stat5=|Stat5value=
|Stat6=|Stat6value=
|Stat7=|Stat7value=
|Stat8=|Stat8value=
|Stat9=|Stat9value=
|Stat10=|Stat10value=
|Durability=150
|Flavortext=A ranged weapon from the future! Good luck finding the correct ammo for it though.
}}
</nowiki>
It will produce this result:
{{Weapon
|WeaponName=Colt 1911
|WeaponRarity=Common
|WeaponType=Gun
|Damage1=50|Damage1type=Piercing
|Damage2=3|Damage2type=Fire
|Damage3=|Damage3type=
|Damage4=|Damage4type=
|Stat1=Armor Penetration|Stat1value=+10%
|Stat2=Block Power|Stat2value=+5
|Stat3=Accuracy|Stat3value=+3%
|Stat4=Fumble Chance|Stat4value=-5%
|Stat5=|Stat5value=
|Stat6=|Stat6value=
|Stat7=|Stat7value=
|Stat8=|Stat8value=
|Stat9=|Stat9value=
|Stat10=|Stat10value=
|Durability=150
|Flavortext=A ranged weapon from the future! Good luck finding the correct ammo for it though.
}}
</noinclude>
<includeonly>
<includeonly>
{| class="wikitable" style="width: 20%;"
{| class="wikitable" style="width: 20%;"
Line 82: Line 33:
|colspan="2" style="text-align:center;"|{{ #if:{{{Flavortext|}}}|{{{Flavortext}}}}}
|colspan="2" style="text-align:center;"|{{ #if:{{{Flavortext|}}}|{{{Flavortext}}}}}
|}
|}
<includeonly>
</includeonly>
<noinclude>
{{doc}}
 
[[Category:Item templates]]</noinclude>

Revision as of 14:44, 12 February 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: