Difference between revisions of "Template:Weapon/doc"

From Stoneshard wiki
Jump to navigation Jump to search
m (12 revisions imported)
Line 1: Line 1:
{{Doc/start}}
{{Doc/start}}
This is weapon template created for use together with the [[Template:Tooltip hover box]] template on a specific weapon's page or weapon's tooltip page.
This is weapon template created for use together with the [[Template:Tooltip hover box]] template to display tooltip with item attributes for weapons.


Usage: The page itself must contain the weapon's data before this Template works. For example, if I wanted to create the [[Templar Sword]] page, I'll add this code to the start of the page:
Usage: Copy this code to any page where you want to display the item tooltip:
<nowiki>
{{{{{1|Tooltip hover box}}}|title={{Weapon}}}}</nowiki>


<nowiki><includeonly>{{#switch: {{{1}}}
You can provide the item name as first parameter, otherwise the pagename is used.
|WeaponType = Sword
|Damage1 = 30
|DamageType1 = Slashing
|Damage2 = 2
|DamageType2 = Sacred
|Properties1 = Armor Penetration
|Values1 = {{c|+|+20%}}
|Properties2 = Accuracy
|Values2 = {{c|+|+3%}}
|Properties3 = Magic Power
|Values3 = {{c|+|+5%}}
|Properties4 = Block Chance
|Values4 = {{c|+|+5%}}
|Properties5 = Skills Energy Cost
|Values5 = {{c|-|+15%}}
|Durability = 400
|Description = There is a faint etching on the surface of the blade, pledging loyalty to the Host and the court... the common kind of court.
|Price = 7200
|#default =
}}</includeonly></nowiki>
This data is invisible on the page itself, thanks to the includeonly tags.


By default, the page is also labelled with a category corresponding to the item type (ie. [[Heavy Aldorian Bow]] will receive the <code>Category: Bow</code>).
If you don't want to add this category to a page, add the <code>category</code> parameter:
<nowiki>
{{{{{1|Tooltip hover box}}}|title={{Weapon|Heavy Aldorian Bow|category=no}}}}</nowiki>


Next, copy this code to [[Templar Sword]] or [[Templar Sword/Tooltip]] or [[Templar Sword/anything]] page:
{{{{{1|Tooltip hover box}}}|title={{Weapon|Heavy Aldorian Bow|category=no}}}}
<nowiki>
{{ {{{1|Tooltip hover box}}}
|title= {{Weapon}}
}}</nowiki>
It will automatically load the sword's data and fill them into this format. Go to [[Templar Sword]] to see the result.
{{Doc/end}}
{{Doc/end}}

Revision as of 12:05, 26 June 2023

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}}}}
Heavy Aldorian Bow
Common Bow
31 Piercing Damage

Armor Penetration: +33%
 
Knockback Chance: +6%
Stagger Chance: +4%
Immobilization Chance: +8%
 
Accuracy: -40%
Range: 12
 
Skills Energy Cost: +50%
Spells Energy Cost: +50%
 
Durability: 225/225

Heavy Aldorian Bow
Price3910

Heavy Aldorian Bow