Changes

no edit summary
Line 1: Line 1:  
==Description==
 
==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).
+
This template displays prices for items of specified qualities, formatted appropriately for the language where they appear. The image of the item is included (with any quality stars) instead of the gold icon. The size of the image is always 24px.
   −
Note that this intentionally doesn't show the money icon as to not clutter the page with multiple icons.
+
==Parameters==
 +
{|class="wikitable sortable"
 +
|-
 +
!Parameter
 +
!Notes
 +
|-
 +
|First (unnamed) parameter
 +
|Name of image (minus ".png")
 +
|-
 +
|Second (unnamed) parameter
 +
|Normal/base sell price of item (can be found in <samp>ObjectInformation.xnb</samp>)<br />''or''<br />Normal/base sell price of item used to make [[Artisan Goods|Artisan Good]] (see examples below)<br />Note: also accepts non-numbers such as "3x base fruit price" without throwing an error
 +
|-
 +
|quality
 +
|Single quality to display.<br />Defaults to all qualities (normal, silver, gold, iridium) if omitted.<br />Items that exist in normal quality only do not have to specify <samp>quality=normal</samp> (''i.e.,'' [[Cave Carrot]], [[Ginger]], [[Green Tea]], [[Honey]], [[Jellies and Pickles|Jelly]], [[Juice]], [[Oil]], [[Jellies and Pickles|Pickles]], [[Qi Fruit]], and [[Tea Leaves]])<div style="font-size: smaller;">''Note: Other items may be added in the future. In the meantime, specifying <samp>quality=normal</samp> will work.''</div>
 +
|-
 +
|hide
 +
|Qualities to hide<br />(''e.g.,'' <samp>hide=silver,gold</samp>)
 +
|-
 +
|pm
 +
|Profession modifier<br />[[Skills#Farming|Tiller]] gives a 10% bonus, so specify <samp>pm=1.1</samp><br />[[Skills#Fishing|Angler]] gives a 50% bonus, so specify <samp>pm=1.5</samp><br />etc.
 +
|-
 +
|dsv
 +
|data-sort-value<br />Set to <samp>false</samp> if the quality price(s) are displayed in a non-sortable structure (like an infobox)<br />Default value is <samp>true</samp> (the entire parameter can be omitted if a data-sort-value is desired).
 +
|-
 +
|}
   −
Additionally, a sortkey is provided allowing correct sorting in tables where a column contains multiple instances of this template.
+
==Examples==
 
+
{|class="wikitable sortable"
==Usage==
+
|-
This template can be used by entering the following onto a relevant page.
+
!Template Call
 
+
!Result
<pre>
+
|-
{{Qualityprice|item name|item base cost}}
+
|<code><nowiki>{{Qualityprice|Melon|250}}</nowiki></code>
{{Qualityprice|item name|item base cost|iridium quality|hide|size}}
+
|{{Qualityprice|Melon|250}}
</pre>
+
|-
===parameters===
+
|<code><nowiki>{{Qualityprice|Parsnip|35|pm=1.1}}</nowiki></code>
; item name: This unnamed parameter accepts an item name.
+
|{{Qualityprice|Parsnip|35|pm=1.1}}
; 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.
+
|<code><nowiki>{{Qualityprice|Ginger|60}}</nowiki></code>
; hide: (optional) Any quality listed here will hide that quality. Specifying iridium here and in the third parameter will result in an error.  To hide normal/regular quality, specify "hide=normal".
+
|{{Qualityprice|Ginger|60}}
; size: (optional) Size of item image in pixels (16, 32, 48, 64).  Default is 24.
+
|-
 
+
|<code><nowiki>{{Qualityprice|Goat Cheese|400|hide=normal,silver}}</nowiki></code>
===Example===
+
|{{Qualityprice|Goat Cheese|400|hide=normal,silver}}
<pre>
+
|-
{{Qualityprice|Pumpkin|100}}
+
|<code><nowiki>{{Qualityprice|Large Goat Milk FR|345}}</nowiki></code>
</pre>
+
|{{Qualityprice|Large Goat Milk FR|345}}
{{Qualityprice|Pumpkin|100}}
+
|-
 
+
|<code><nowiki>{{Qualityprice|Juice|260}}</nowiki></code><br />(The base sell price of [[Red Cabbage]] is 260,<br />and the base sell price of Red Cabbage Juice is 585)
<pre>
+
|{{Qualityprice|Juice|260}}
{{Qualityprice|Leek|60|iridium}}
+
|-
</pre>
+
|<code><nowiki>{{Qualityprice|Wine|750|pm=1.4}}</nowiki></code><br />(The base sell price of [[Starfruit]] is 750,<br />and the Artisan base sell price of Starfruit Wine is 3,150)
{{Qualityprice|Leek|60|iridium}}
+
|{{Qualityprice|Wine|750|pm=1.4}}
 
+
|-
<pre>
+
|<code><nowiki>{{Qualityprice|Honey|30}}</nowiki></code><br />(The base sell price of a [[Tulip]] is 30,<br />and the base sell price of Tulip Honey is 160)
{{Qualityprice|Apple|42|iridium|hide=gold,silver|size=48}}
+
|{{Qualityprice|Honey|30}}
</pre>
+
|-
{{Qualityprice|Apple|42|iridium|hide=gold,silver|size=48}}
+
|}<includeonly>[[Category:Templates]]{{Addlanglinks}}</includeonly><noinclude>[[Category:Template documentation]]</noinclude>
 
  −
<pre>
  −
{{Qualityprice|Apple|42|iridium|hide=silver,iridium}}
  −
</pre>
  −
{{Qualityprice|Apple|42|iridium|hide=silver,iridium}}
  −
 
  −
<includeonly>[[Category:Formatting templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude>
  −
<includeonly>[[de:Vorlage:{{PAGENAME}}]]
  −
[[es:Plantilla:{{PAGENAME}}]]
  −
[[ja:テンプレート:{{PAGENAME}}]]
  −
[[pt:Predefinição:{{PAGENAME}}]]
  −
[[ru:Шаблон:{{PAGENAME}}]]
  −
[[zh:Template:{{PAGENAME}}]]</includeonly>
 
105,831

edits