Template:EdibilityGrid: Difference between revisions
Appearance
imported>Margotbean No edit summary |
imported>Margotbean No edit summary |
||
| Line 1: | Line 1: | ||
<noinclude>{{Stub|Work in Progress}}</noinclude><includeonly> | <noinclude>{{Stub|Work in Progress}}</noinclude><includeonly><table class="no-wrap" style="text-align: left; border-spacing: 0;"> | ||
<tr> | |||
<td><span class="sortkey" style="display:none;">{{#len:{{{2|}}}}}{{{2|}}}</span> | |||
-->{{#if: {{#pos:{{{hide|}}}|silver}} | |< | <table> | ||
{{#if:{{#pos:{{{hide|}}}|normal}}|| | |||
<tr> | |||
-->{{#if: {{#pos:{{{hide|}}}|gold}} | |< | <td>[[File:{{{1|}}}.png|24px|link=]]</td> | ||
<td>{{#ifexpr: {{{2|}}} < 0 |[[File:Poison.png|20px|link=]]|[[File:Energy.png|20px|link=]]}}</td> | |||
<td>{{#expr:ceil({{{2|}}}*2.5)}}</td> | |||
-->{{#if: {{{iridium|}}}|< | {{#ifexpr: {{{2|}}} < 0 || | ||
<td>[[File:Health.png|20px|link=]]</td> | |||
<td>{{#expr:trunc(ceil({{{2|}}}*2.5)*0.45)}}</td>}} | |||
</tr> | |||
<noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude><noinclude>{{EdibilityGrid|Cauliflower|30}}</noinclude> | }}<!--end if pos hide normal--> | ||
{{#if:{{#pos:{{{hide|}}}|silver}}|| | |||
<tr> | |||
<td>[[File:{{{1|}}}.png|24px|link=]]<div style="position: absolute; margin-top: -24px;">[[File:Silver Quality Icon.png|24px|link=]]</div></td> | |||
<td>{{#ifexpr: {{{2|}}} < 0 |[[File:Poison.png|20px|link=]]|[[File:Energy.png|20px|link=]]}}</td> | |||
<td>{{#expr:trunc(ceil({{{2|}}}*2.5)+{{{2|}}})}}</td> | |||
{{#ifexpr: {{{2|}}} < 0 || | |||
<td>[[File:Health.png|20px|link=]]</td> | |||
<td>{{#expr:trunc(trunc(ceil({{{2|}}}*2.5)+{{{2|}}})*0.45)}}</td>}} | |||
</tr> | |||
}}<!--end if pos hide silver --> | |||
{{#if:{{#pos:{{{hide|}}}|gold}}|| | |||
<tr> | |||
<td>[[File:{{{1|}}}.png|24px|link=]]<div style="position: absolute; margin-top: -24px;">[[File:Gold Quality Icon.png|24px|link=]]</div></td> | |||
<td>{{#ifexpr: {{{2|}}} < 0 |[[File:Poison.png|20px|link=]]|[[File:Energy.png|20px|link=]]}}</td> | |||
<td>{{#expr:trunc(ceil({{{2|}}}*2.5)+{{{2|}}}*2)}}</td> | |||
{{#ifexpr: {{{2|}}} < 0 || | |||
<td>[[File:Health.png|20px|link=]]</td> | |||
<td>{{#expr:trunc(trunc(ceil({{{2|}}}*2.5)+{{{2|}}}*2)*0.45)}}</td>}} | |||
</tr> | |||
}}<!--end if pos hide gold--> | |||
{{#if:{{{iridium|}}}| | |||
<tr> | |||
<td>[[File:{{{1|}}}.png|24px|link=]]<div style="position: absolute; margin-top: -24px;">[[File:Iridium Quality Icon.png|24px|link=]]</div></td> | |||
<td>{{#ifexpr: {{{2|}}} < 0 |[[File:Poison.png|20px|link=]]|[[File:Energy.png|20px|link=]]}}</td> | |||
<td>{{#expr:trunc(ceil({{{2|}}}*2.5)+{{{2|}}}*4)}}</td> | |||
{{#ifexpr: {{{2|}}} < 0 || | |||
<td>[[File:Health.png|20px|link=]]</td> | |||
<td>{{#expr:trunc(trunc(ceil({{{2|}}}*2.5)+{{{2|}}}*4)*0.45)}}</td>}} | |||
</tr> | |||
}}<!--end if iridium--> | |||
</table> | |||
</td> | |||
</tr> | |||
</table></includeonly> | |||
<noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude><noinclude><pre>{{EdibilityGrid|Cauliflower|30}}</pre>{{EdibilityGrid|Cauliflower|30}}</noinclude> | |||
Revision as of 21:12, 1 January 2020
| Article Stub
This article is marked as a stub for the following reason:
|
Description
This template displays a grid of energy and health values for an edible item.
Parameters
| Parameter | Notes |
|---|---|
| First (unnamed) parameter | Name of image (minus ".png") |
| Second (unnamed) parameter | Edibility of item (can be found in ObjectInformation.xnb) Items with a negative edibility will display the poison icon instead of the energy icon. |
| 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 Algae, Green Tea, Juice, Oil, Qi Fruit, Sap, and White Algae) Note: Other items may be added in the future. In the meantime, specifying quality=normal will work.
|
| hide | Qualities to hide (e.g., hide=silver,gold) |
| showitem | Set to true to display the image of the edible item |
| dsv | data-sort-value Set to false if the energy & health values 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). |
| health | Use to override the normal calculation for health, when the normal formula does not apply (e.g., for Bug Steak and Oil of Garlic) |
Examples
| Template Call | Result | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{EdibilityGrid|Melon|45}}
|
| ||||||||||||||||
{{EdibilityGrid|Melon|45|showitem=true}}
|
| ||||||||||||||||
{{EdibilityGrid|Parsnip|10}}
|
| ||||||||||||||||
{{EdibilityGrid|Ginger|10}}
|
| ||||||||||||||||
{{EdibilityGrid|Goat Cheese|50|hide=normal,silver}}
|
| ||||||||||||||||
{{EdibilityGrid|Large Goat Milk JA|35|showitem=true}}
|
| ||||||||||||||||
{{EdibilityGrid|Juice|30}}
|
| ||||||||||||||||
{{EdibilityGrid|Wine|20}}
|
| ||||||||||||||||
{{EdibilityGrid|Holly|-15}}
|
| ||||||||||||||||
{{EdibilityGrid|Bug Steak|18|quality=0}}
Missing health parameter; Shows incorrect health value |
| ||||||||||||||||
{{EdibilityGrid|Bug Steak|18|health=30|quality=0}}
|
|
{{EdibilityGrid|Cauliflower|30}}
|
