Template:Properties/doc

From Stoneshard wiki
Jump to navigation Jump to search
Template-info.png Documentation

This template needs optimizing. Function is as follows:

1) Calls for Template:Properties sort and provides Properties from the Weapon's page one by one.
2) Then checks the returned PropertygrpX values against all 10 Property groups. Empty Propertygrps are evaluated as empty strings and don't affect the result.
3) Only when matched, calls for Properties' Values from the Weapon's page and colors them white.
4) Also checks the name of the page where you used this Template. If the name is the Weapon's page (or a subpage of the Weapon's page, like Templar Sword/Tooltip), it applies float:right to all the values (since that's how the values are ingame in the tooltips - floated to the right). If the name is not the Weapon's page (like "Swords"), it doesn't apply float:right to the Values.

Only one parameter is used - Weapon's page name.


This template requires that the Weapon's page name has the weapon's data entered as parameters. Example using a switch:

<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 template is used within Template:Weapon, but can also be used to simply load Properties and their Values. For example, here's a simple div with border and we load the Properties of Templar Sword:

<div style="width:fit-content;color:#9d9a9a;border:1px solid blue;">{{Properties|Templar Sword}}</div>

Template:Doc/end