Difference between revisions of "Template:Qualityprice"
Jump to navigation
Jump to search
Margotbean (talk | contribs) (allow for hiding of normal quality) |
Margotbean (talk | contribs) m (Reverted edits by Edward Chernenko (talk) to last revision by Margotbean) Tag: Rollback |
||
(22 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly>{| | + | <includeonly>{{#ifeq:{{lc:{{{dsv|}}}}}|false||<span style="display: none;">data-sort-value="{{#invoke:Calcsellprice|csp |
− | |<span | + | |im = {{{1|}}} <!-- image --> |
− | | | + | |bp = {{#expr:{{{2|0}}}}} <!-- base price --> |
− | | | + | |q = 0 <!-- quality = normal --> |
− | {{ | + | |pm = {{{pm|1}}} <!-- profession multiplier --> |
− | {{ | + | |fm = false <!-- format number? --> |
− | + | }}"</span>}}<!-- | |
− | | | + | --><table class="no-wrap" style="text-align: left; margin: 0; padding: 0; border-spacing: 0; border: 0;"> |
− | | | + | {{#if:{{#pos:{{{hide|}}}|normal}}|| |
− | {{ | + | {{#switch:{{{quality|all}}} |
− | {{ | + | |normal|base|all|0 = |
− | {{ | + | <tr> |
− | | | + | <td>{{Overlayimg|{{{1|Blank icon}}}|width=24|center=true|type=star|quality=0}}</td> |
− | + | <td>{{#iferror:{{#expr:{{{2|}}}}}|{{{2|}}}|{{#invoke:Calcsellprice|csp | |
− | {{ | + | |im = {{{1|}}} <!-- image --> |
− | + | |bp = {{#expr:{{{2|0}}}}} <!-- base price --> | |
− | {{ | + | |q = 0 <!-- normal quality --> |
− | | {{# | + | |pm = {{{pm|1}}} <!-- profession multiplier --> |
− | + | |fm = true <!-- format number? --> | |
− | + | }} }} | |
− | + | </td> | |
− | + | </tr> | |
− | + | }} }}{{#if:{{#pos:{{{hide|}}}|silver}}||{{#switch:{{lc:{{{1|}}}}} | |
− | + | |juice|pickles|jelly|honey|oil|cave carrot|green tea|tea leaves|ginger|qi fruit= | |
− | }} | + | |#default={{#switch:{{{quality|all}}} |
− | + | |silver|all|1 = | |
+ | <tr> | ||
+ | <td>{{Overlayimg|{{{1|Blank icon}}}|width=24|center=true|type=star|quality=1}}</td> | ||
+ | <td>{{#iferror:{{#expr:{{{2|}}}}}|{{{2|}}}|{{#invoke:Calcsellprice|csp | ||
+ | |im = {{{1|}}} <!-- image --> | ||
+ | |bp = {{#expr:{{{2|0}}}}} <!-- base price --> | ||
+ | |q = 1 <!-- silver quality --> | ||
+ | |pm = {{{pm|1}}} <!-- profession multiplier --> | ||
+ | |fm = true <!-- format number? --> | ||
+ | }} }} | ||
+ | </td> | ||
+ | </tr> | ||
+ | }} }} }}{{#if:{{#pos:{{{hide|}}}|gold}}||{{#switch:{{lc:{{{1|}}}}} | ||
+ | |juice|pickles|jelly|honey|oil|cave carrot|green tea|tea leaves|ginger|qi fruit= | ||
+ | |#default={{#switch:{{{quality|all}}} | ||
+ | |gold|all|2 = | ||
+ | <tr> | ||
+ | <td>{{Overlayimg|{{{1|Blank icon}}}|width=24|center=true|type=star|quality=2}}</td> | ||
+ | <td>{{#iferror:{{#expr:{{{2|}}}}}|{{{2|}}}|{{#invoke:Calcsellprice|csp | ||
+ | |im = {{{1|}}} <!-- image --> | ||
+ | |bp = {{#expr:{{{2|0}}}}} <!-- base price --> | ||
+ | |q = 2 <!-- gold quality --> | ||
+ | |pm = {{{pm|1}}} <!-- profession multiplier --> | ||
+ | |fm = true <!-- format number? --> | ||
+ | }} }} | ||
+ | </td> | ||
+ | </tr> | ||
+ | }} }} }}{{#if:{{#pos:{{{hide|}}}|iridium}}||{{#switch:{{lc:{{{1|}}}}} | ||
+ | |juice|pickles|jelly|honey|oil|cave carrot|green tea|tea leaves|ginger|qi fruit= | ||
+ | |#default={{#switch:{{{quality|all}}} | ||
+ | |iridium|all|4 = | ||
+ | <tr> | ||
+ | <td>{{Overlayimg|{{{1|Blank icon}}}|width=24|center=true|type=star|quality=4}}</td> | ||
+ | <td>{{#iferror:{{#expr:{{{2|}}}}}|{{{2|}}}|{{#invoke:Calcsellprice|csp | ||
+ | |im = {{{1|}}} <!-- image --> | ||
+ | |bp = {{#expr:{{{2|0}}}}} <!-- base price --> | ||
+ | |q = 4 <!-- iridium quality --> | ||
+ | |pm = {{{pm|1}}} <!-- profession multiplier --> | ||
+ | |fm = true | ||
+ | }} }} | ||
+ | </td> | ||
+ | </tr> | ||
+ | }} }} }}</table></includeonly><noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude> |
Latest revision as of 15:59, 28 June 2024
Description
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.
Parameters
Parameter | Notes |
---|---|
First (unnamed) parameter | Name of image (minus ".png") |
Second (unnamed) parameter | Normal/base sell price of item (can be found in ObjectInformation.xnb) or Normal/base sell price of item used to make Artisan Good (see examples below) Note: also accepts non-numbers such as "3x base fruit price" without throwing an error |
quality | Single quality to display. Defaults to all qualities (normal, silver, gold, iridium) if omitted. Items that exist in normal quality only do not have to specify quality=normal (i.e., Cave Carrot, Ginger, Green Tea, Honey, Jelly, Juice, Oil, Pickles, Qi Fruit, and Tea Leaves) Note: Other items may be added in the future. In the meantime, specifying quality=normal or quality=0 will work.
|
hide | Qualities to hide (e.g., hide=silver,gold) |
pm | Profession modifier Tiller gives a 10% bonus, so specify pm=1.1 Angler gives a 50% bonus, so specify pm=1.5 etc. |
dsv | data-sort-value Set to false if the quality price(s) are displayed in a non-sortable structure (like an infobox) Default value is true (the entire parameter can be omitted if a data-sort-value is desired). |
Examples
Template Call | Result | ||||||||
---|---|---|---|---|---|---|---|---|---|
{{Qualityprice|Melon|250}}
|
| ||||||||
{{Qualityprice|Parsnip|35|pm=1.1}}
|
| ||||||||
{{Qualityprice|Ginger|60}}
|
| ||||||||
{{Qualityprice|Goat Cheese|400|hide=normal,silver}}
|
| ||||||||
{{Qualityprice|Large Goat Milk FR|345}}
|
| ||||||||
{{Qualityprice|Juice|260}} (The base sell price of Red Cabbage is 260, and the base sell price of Red Cabbage Juice is 585) |
| ||||||||
{{Qualityprice|Purple Juice|260|quality=0}} (Must specify quality=normal or quality=0 if using a colored sprite) |
| ||||||||
{{Qualityprice|Wine|750|pm=1.4}} (The base sell price of Starfruit is 750, and the Artisan base sell price of Starfruit Wine is 3,150) |
| ||||||||
{{Qualityprice|Honey|30}} (The base sell price of a Tulip is 30, and the base sell price of Tulip Honey is 160) |
|