Template:Infobox mineral: Difference between revisions
Appearance
imported>Margotbean New template for minerals, profession name and % price increase are hard-coded |
imported>Margotbean +parameter for corrected gemologist price |
||
| (13 intermediate revisions by 3 users not shown) | |||
| Line 3: | Line 3: | ||
|colspan="2" id="infoboxheader"|{{#if:{{{name|}}}|{{{name|}}}|{{PAGENAME}} }} | |colspan="2" id="infoboxheader"|{{#if:{{{name|}}}|{{{name|}}}|{{PAGENAME}} }} | ||
|- | |- | ||
|colspan="2"|{{#if:{{{image|}}}|[[File:{{{image|}}}|center| | |colspan="2" style="padding-bottom: 5px;"|{{#if:{{{image|}}}|[[File:{{{image|}}}|center]]|[[File:{{PAGENAME}}.png|center]]}} | ||
|- | |- | ||
|colspan="2" id="infoboxdetail" style="text-align: center; font-style:italic;" |{{{description|}}} | |colspan="2" id="infoboxdetail" style="text-align: center; font-style: italic;"|{{#if:{{{description|}}}|{{{description|}}}|{{Description|{{PAGENAME}}}}}} | ||
|- | |- | ||
|colspan="2" id="infoboxsection" style="text-align:center;"|Information | |colspan="2" id="infoboxsection" style="text-align:center;"|Information | ||
|- | |- | ||
|id="infoboxsection"|Source | |id="infoboxsection"|Source | ||
|id="infoboxdetail"|{{{source|}}} | |id="infoboxdetail"|{{{source|}}} | ||
|- | |- | ||
|id="infoboxsection"|Sell Price | |id="infoboxsection"|Sell Price | ||
|id="infoboxdetail"|{{#iferror: {{ | |id="infoboxdetail"|{{#iferror:{{#expr:{{{sellprice|}}}<0}}|{{{sellprice|N/A}}}|{{price|{{{sellprice|}}} }} }}<!-- | ||
-->{{#if:{{{profession|}}} |<nowiki /> | -->{{#if:{{{profession|}}} |<nowiki /> | ||
{{!}}- | {{!}}- | ||
{{!}}id="infoboxsection"{{!}}[[File:Gemologist.png|24px|link=]] Gemologist Profession ''<span style="white-space: nowrap;">(+30% Sell Price)</span>'' | {{!}}id="infoboxsection"{{!}}[[File:Gemologist.png|24px|link=]] Gemologist Profession ''<span style="white-space: nowrap;">(+30% Sell Price)</span>'' | ||
{{!}}id="infoboxdetail"{{!}}{{# | {{!}}id="infoboxdetail"{{!}}{{#if:{{{correctedprice|}}} | {{Price|{{{correctedprice|}}}}} | {{#iferror:{{#expr:1.3*{{{sellprice|}}}}}| |{{price|{{#expr: floor(1.3*{{{sellprice|}}}) }} }}}}|}}}} | ||
|}} | |}</div>{{InfoboxSEO}}</includeonly><noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude> | ||
|}</div></includeonly><noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude> | |||
Latest revision as of 01:55, 9 July 2023
Description
This template is used to provide a simple infobox for minerals (i.e., Foraged Minerals, Gems, Geode Minerals, and Geodes). Do not use this on your user page. It is reserved for content pages.
Parameters
| Parameter | Notes |
|---|---|
| name | Mineral name |
| image | The image name, including file extension (.png, .gif, etc.) |
| description | Mineral description (automatically populated by Template:Description if omitted) |
| sellprice | Base sell price of mineral, in unformatted numbers (no commas, decimal points, etc.) |
| profession | Display the 30% Gemologist profession price increase? (Any value in this field will trigger the profession section to display) |
| correctedprice | The in-game sell price of the mineral with the Gemologist profession (which can be off by one from the expected price of sellprice × 1.3). Use raw unformatted numbers. |