Template:EdibilityGrid/doc: Difference between revisions
Appearance
imported>Margotbean No edit summary |
imported>Margotbean No edit summary |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
==Description== | ==Description== | ||
This template displays a grid of energy and health values for an edible item. | |||
== | ==Parameters== | ||
{|class="wikitable sortable" | |||
|- | |||
!Parameter | |||
!Notes | |||
|- | |||
|First (unnamed) parameter | |||
|Name of image (minus ".png") | |||
|- | |||
|Second (unnamed) parameter | |||
|Edibility of item (can be found in <samp>ObjectInformation.xnb</samp>)<br />Items with a negative edibility will display the poison icon instead of the energy icon. | |||
|- | |||
|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 Algae]], [[Green Tea]], [[Juice]], [[Oil]], [[Qi Fruit]], [[Sap]], and [[White Algae]])<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>) | |||
|- | |||
|showitem | |||
|Set to <samp>true</samp> to display the image of the edible item | |||
|- | |||
|dsv | |||
|data-sort-value<br />Set to <samp>false</samp> if the energy & health values are displayed in a non-sortable structure (like an infobox)<br />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== | |||
< | {|class="wikitable sortable" | ||
{{EdibilityGrid| | |- | ||
< | !Template Call | ||
{{EdibilityGrid| | !Result | ||
< | |- | ||
{{EdibilityGrid| | |<code><nowiki>{{EdibilityGrid|Melon|45}}</nowiki></code> | ||
< | |{{EdibilityGrid|Melon|45}} | ||
{{EdibilityGrid| | |- | ||
< | |<code><nowiki>{{EdibilityGrid|Melon|45|showitem=true}}</nowiki></code> | ||
{{EdibilityGrid|Milk| | |{{EdibilityGrid|Melon|45|showitem=true}} | ||
< | |- | ||
{{EdibilityGrid| | |<code><nowiki>{{EdibilityGrid|Parsnip|10}}</nowiki></code> | ||
< | |{{EdibilityGrid|Parsnip|10}} | ||
{{EdibilityGrid| | |- | ||
|<code><nowiki>{{EdibilityGrid|Ginger|10}}</nowiki></code> | |||
|{{EdibilityGrid|Ginger|10}} | |||
< | |- | ||
{{EdibilityGrid| | |<code><nowiki>{{EdibilityGrid|Goat Cheese|50|hide=normal,silver}}</nowiki></code> | ||
< | |{{EdibilityGrid|Goat Cheese|50|hide=normal,silver}} | ||
{{EdibilityGrid| | |- | ||
< | |<code><nowiki>{{EdibilityGrid|Large Goat Milk JA|35|showitem=true}}</nowiki></code> | ||
{{EdibilityGrid| | |{{EdibilityGrid|Large Goat Milk JA|35|showitem=true}} | ||
<includeonly>{{Addlanglinks}}[[Category:Templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude> | |- | ||
|<code><nowiki>{{EdibilityGrid|Juice|30}}</nowiki></code> | |||
|{{EdibilityGrid|Juice|30}} | |||
|- | |||
|<code><nowiki>{{EdibilityGrid|Wine|20}}</nowiki></code> | |||
|{{EdibilityGrid|Wine|20}} | |||
|- | |||
|<code><nowiki>{{EdibilityGrid|Holly|-15}}</nowiki></code> | |||
|{{EdibilityGrid|Holly|-15}} | |||
|- | |||
|<code><nowiki>{{EdibilityGrid|Bug Steak|18|quality=0}}</nowiki></code> | |||
Missing <samp>health</samp> parameter; Shows incorrect health value | |||
|{{EdibilityGrid|Bug Steak|18|quality=0}} | |||
|- | |||
|<code><nowiki>{{EdibilityGrid|Bug Steak|18|health=30|quality=0}}</nowiki></code> | |||
|{{EdibilityGrid|Bug Steak|18|health=30|quality=0}} | |||
|- | |||
|}<includeonly>{{Addlanglinks}}[[Category:Templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude> | |||
Latest revision as of 23:37, 15 March 2023
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}}
|
|