Difference between revisions of "Template:Weapon/doc"

From Stoneshard wiki
Jump to navigation Jump to search
old>Realpsojed
(itemname -> weaponname)
old>Realpsojed
(Rewritten)
Line 1: Line 1:
{{Doc/start}}
{{Doc/start}}
This is weapon template created for use as an infobox on a specific weapon's tooltip page.
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.


Usage: Copy this code to any <weaponname>/Tooltip page and replace/fill in the values:
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:


<nowiki><includeonly>{{#switch: {{{1}}}
|WeaponType = Sword
|Damage1 = 30
|DamageType1 = Slashing
|Damage2 = {{Sacred|2}}
|DamageType2 = {{Sacred|Sacred}}
|Properties1 = Armor Penetration
|Values1 = {{Positive|+20%}}
|Properties2 = Accuracy
|Values2 = {{Positive|+3%}}
|Properties3 = Magic Power
|Values3 = {{Positive|+5%}}
|Properties4 = Block Chance
|Values4 = {{Positive|+5%}}
|Properties5 = Skills Energy Cost
|Values5 = {{Negative|+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.
Next, copy this code to [[Templar Sword]] or [[Templar Sword/Tooltip]] or [[Templar Sword/anything]] page:
  <nowiki>
  <nowiki>
{{ {{{1|Tooltip hover box}}}
{{ {{{1|Tooltip hover box}}}
|title= {{Weapon
|title= {{Weapon}}
|WeaponType=Sword
|Damage=37 Slashing<br> 2 Sacred
|Properties=Armor Damage:<br> Armor Piercing:<br> Bodypart Damage:<br> Block Chance:<br> Fumble Chance:<br> Accuracy:<br> Crit Chance:<br> Skills Energy Cost:
|Values= <span style="color:white;">+15%</span><br> <span style="color:white;">+20%</span><br> <span style="color:white;">+15%</span><br> <span style="color:white;">+10%</span><br> <span style="color:white;">-5%</span><br> <span style="color:white;">+5%</span><br> <span style="color:white;">+5%</span><br> <span style="color:#a8656c;">+15%</span>
|Durability=150
|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=6500
}}
}}</nowiki>
}}</nowiki>
It will produce this result:
It will automatically load the sword's data and fill them into this format. Go to [[Templar Sword]] to see the result.
 
{{ {{{1|Tooltip hover box}}}
|title= {{Weapon
|WeaponType=Sword
|Damage=37 Slashing<br> 2 Sacred
|Properties=Armor Damage:<br> Armor Piercing:<br> Bodypart Damage:<br> Block Chance:<br> Fumble Chance:<br> Accuracy:<br> Crit Chance:<br> Skills Energy Cost:
|Values= <span style="color:white;">+15%</span><br> <span style="color:white;">+20%</span><br> <span style="color:white;">+15%</span><br> <span style="color:white;">+10%</span><br> <span style="color:white;">-5%</span><br> <span style="color:white;">+5%</span><br> <span style="color:white;">+5%</span><br> <span style="color:#a8656c;">+15%</span>
|Durability=150
|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=6500
}}
}}
{{Doc/end}}
{{Doc/end}}

Revision as of 19:32, 11 May 2020

Template-info.png Documentation

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.

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:

<includeonly>{{#switch: {{{1}}}
|WeaponType = Sword
|Damage1 = 30
|DamageType1 = Slashing
|Damage2 = {{Sacred|2}}
|DamageType2 = {{Sacred|Sacred}}
|Properties1 = Armor Penetration
|Values1 = {{Positive|+20%}}
|Properties2 = Accuracy
|Values2 = {{Positive|+3%}}
|Properties3 = Magic Power
|Values3 = {{Positive|+5%}}
|Properties4 = Block Chance
|Values4 = {{Positive|+5%}}
|Properties5 = Skills Energy Cost
|Values5 = {{Negative|+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>

This data is invisible on the page itself, thanks to the includeonly tags.


Next, copy this code to Templar Sword or Templar Sword/Tooltip or Templar Sword/anything page:

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

It will automatically load the sword's data and fill them into this format. Go to Templar Sword to see the result.