Difference between revisions of "Template:Qualityprice/doc"
Jump to navigation
Jump to search
BryghtShadow (talk | contribs) (→Description: updated the fact that this template truncates) |
BryghtShadow (talk | contribs) (→Usage: Example for {{{hide}}}) |
||
Line 9: | Line 9: | ||
This template can be used by entering the following onto a relevant page. | This template can be used by entering the following onto a relevant page. | ||
− | <pre>{{Qualityprice|item name|item base cost|iridium quality}}</pre> | + | <pre> |
− | + | {{Qualityprice|item name|item base cost}} | |
+ | {{Qualityprice|item name|item base cost|iridium quality|hide}} | ||
+ | </pre> | ||
===parameters=== | ===parameters=== | ||
− | + | ; item name: This unnamed parameter accepts an item name. | |
− | This parameter accepts an item name. | + | ; item base cost: This unnamed parameter accepts the item's base cost. |
− | + | ; iridium quality: (optional) If this unnamed parameter exist, iridium quality will be added. | |
− | + | ; hide: (optional) Any quality listed here will hide that quality. Specifying iridium here and in the third parameter will result in an error. | |
− | This parameter accepts the item's base cost. | ||
− | |||
− | |||
− | If this parameter exist, iridium quality will be added. | ||
===Example=== | ===Example=== | ||
Line 25: | Line 23: | ||
{{Qualityprice|Pumpkin|100}} | {{Qualityprice|Pumpkin|100}} | ||
</pre> | </pre> | ||
− | |||
{{Qualityprice|Pumpkin|100}} | {{Qualityprice|Pumpkin|100}} | ||
Line 31: | Line 28: | ||
{{Qualityprice|Leek|60|iridium}} | {{Qualityprice|Leek|60|iridium}} | ||
</pre> | </pre> | ||
+ | {{Qualityprice|Leek|60|iridium}} | ||
+ | |||
+ | <pre> | ||
+ | {{Qualityprice|Apple|42|iridium|hide=gold,silver}} | ||
+ | </pre> | ||
+ | {{Qualityprice|Apple|42|iridium|hide=gold,silver}} | ||
+ | |||
+ | <pre> | ||
+ | {{Qualityprice|Apple|42|iridium|hide=silver,iridium}} | ||
+ | </pre> | ||
+ | {{Qualityprice|Apple|42|iridium|hide=silver,iridium}} | ||
− | |||
<includeonly>[[Category:Transclusion templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude> | <includeonly>[[Category:Transclusion templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude> |
Revision as of 06:35, 6 November 2016
Description
This template is used to provide a template that takes the base cost of each item, calculates the silver and gold quality costs, and displays it in a table. The cost calculation is silver=(basecost)*1.25 and gold=(basecost)*1.50. It always truncates the fraction (rounds down for positive numbers and up for negative numbers).
Note that this intentionally doesn't show the money icon as to not clutter the page with multiple icons.
Additionally, a sortkey is provided allowing correct sorting in tables where a column contains multiple instances of this template.
Usage
This template can be used by entering the following onto a relevant page.
{{Qualityprice|item name|item base cost}} {{Qualityprice|item name|item base cost|iridium quality|hide}}
parameters
- item name
- This unnamed parameter accepts an item name.
- item base cost
- This unnamed parameter accepts the item's base cost.
- iridium quality
- (optional) If this unnamed parameter exist, iridium quality will be added.
- hide
- (optional) Any quality listed here will hide that quality. Specifying iridium here and in the third parameter will result in an error.
Example
{{Qualityprice|Pumpkin|100}}
100g | |
125g | |
150g | |
200g |
{{Qualityprice|Leek|60|iridium}}
60g | |
75g | |
90g | |
120g |
{{Qualityprice|Apple|42|iridium|hide=gold,silver}}
42g | |
84g |
{{Qualityprice|Apple|42|iridium|hide=silver,iridium}}
42g | |
63g |