Difference between revisions of "Template:Infobox cooking"
Margotbean (talk | contribs) |
Margotbean (talk | contribs) (Use templates edibilitygrid & qualityprice) |
||
(19 intermediate revisions by 3 users not shown) | |||
Line 3: | Line 3: | ||
|colspan="2" id="infoboxheader"|{{{name|{{PAGENAME}}}}} | |colspan="2" id="infoboxheader"|{{{name|{{PAGENAME}}}}} | ||
|- | |- | ||
− | |colspan="2"|[[File:{{{image|}}}|center]] | + | |colspan="2" style="padding-bottom: 5px;"|[[File:{{{image|Blank icon.png}}}|center]] |
|- | |- | ||
− | |colspan="2" id="infoboxdetail" style="text-align: center; font-style: italic;"|{{#if:{{{description|}}}|{{{description|}}}|{{Description|{{PAGENAME}}}}}} | + | |colspan="2" id="infoboxdetail" style="text-align: center; font-style: italic; padding-right: 3px;"|{{#if:{{{description|}}}|{{{description|}}}|{{Description|{{PAGENAME}}}}}} |
|- | |- | ||
− | |colspan="2" id="infoboxsection" style="text-align:center;"|Information | + | |colspan="2" id="infoboxsection" style="text-align:center; padding-left: 0; padding-right: 0;"|Information |
|- | |- | ||
− | |id="infoboxsection"|Source | + | |id="infoboxsection"|Source |
|id="infoboxdetail"|{{#if: {{{source|}}} | {{{source|}}} | [[Cooking]]}}<!-- | |id="infoboxdetail"|{{#if: {{{source|}}} | {{{source|}}} | [[Cooking]]}}<!-- | ||
-->{{#if:{{{buff|}}}|<nowiki /> | -->{{#if:{{{buff|}}}|<nowiki /> | ||
{{!}}- | {{!}}- | ||
− | {{!}}id="infoboxsection"{{!}}Buff(s) | + | {{!}}id="infoboxsection"{{!}}Buff(s) |
{{!}}id="infoboxdetail"{{!}}{{{buff|}}} | {{!}}id="infoboxdetail"{{!}}{{{buff|}}} | ||
{{!}}- | {{!}}- | ||
− | {{!}}id="infoboxsection"{{!}}Buff Duration | + | {{!}}id="infoboxsection"{{!}}Buff Duration |
{{!}}id="infoboxdetail"{{!}}{{duration|{{{duration|}}}}} | {{!}}id="infoboxdetail"{{!}}{{duration|{{{duration|}}}}} | ||
− | |}} | + | |}}<!-- |
− | {{#if:{{{edibility|}}}|<nowiki /> | + | -->{{#if:{{{edibility|}}}|<nowiki /> |
+ | <tr> | ||
+ | <td id="infoboxsection">[[Energy]] / [[Health]]</td> | ||
+ | <td id="infoboxdetail">{{#if:{{{health|}}} | ||
+ | |{{EdibilityGrid|{{#sub:{{{image|Blank icon.png|}}}|0|-4}}|{{{edibility|}}}|quality=0|dsv=false|health={{{health|}}}}} | ||
+ | |{{EdibilityGrid|{{#sub:{{{image|Blank icon.png|}}}|0|-4}}|{{{edibility|}}}|quality=0|dsv=false}} }} | ||
+ | </td> | ||
+ | </tr> | ||
+ | }}<!-- | ||
+ | -->{{#if:{{{sellprice|}}}|<nowiki /> | ||
{{!}}- | {{!}}- | ||
− | {{!}}id="infoboxsection"{{!}} | + | {{!}}id="infoboxsection"{{!}}Sell Price |
+ | {{!}}id="infoboxdetail"{{!}}{{#ifeq:{{{qiseasoning|}}}|false|{{price|{{{sellprice|}}}}}|{{Qualityprice|{{#sub:{{{image|Blank icon.png|}}}|0|-4}}|{{{sellprice|}}}|quality=0|dsv=false}}}} | ||
+ | }}<!-- | ||
+ | -->{{#ifeq:{{{qiseasoning|}}}|false| |<nowiki /> | ||
+ | {{!}}- | ||
+ | {{!}}id="infoboxsection" class="no-wrap" style="padding-left: 12px; vertical-align: middle;"{{!}}[[File:Qi Seasoning.png|24px|link=]][[Qi Seasoning]] | ||
{{!}}id="infoboxdetail"{{!}} | {{!}}id="infoboxdetail"{{!}} | ||
− | + | <table style="padding: 0; margin: 0 0 2px 0; border-spacing: 0;"> | |
− | + | <tr> | |
− | + | <td>{{EdibilityGrid|{{#sub:{{{image|Blank icon.png|}}}|0|-4}}|{{{edibility|}}}|quality=gold|dsv=false}}</td> | |
− | {{ | + | <td style="width: 6px;"></td> |
− | + | <td>{{Qualityprice|{{#sub:{{{image|Blank icon.png|}}}|0|-4}}|{{{sellprice|}}}|quality=gold|dsv=false}}</td> | |
− | {{ | + | </tr> |
− | { | + | </table> |
− | |}} | + | }} |
− | |||
− | |||
− | |||
|- | |- | ||
− | |colspan="2" id="infoboxsection" style="text-align:center;"|Recipe | + | |colspan="2" id="infoboxsection" style="text-align:center; padding-left: 0; padding-right: 0;"|Recipe |
|- | |- | ||
− | |id="infoboxsection" | + | |id="infoboxsection" class="no-wrap"| Recipe Source(s) |
|id="infoboxdetail" | {{{recipe|}}} | |id="infoboxdetail" | {{{recipe|}}} | ||
|- | |- | ||
− | |id="infoboxsection"|Ingredients | + | |id="infoboxsection"|Ingredients |
|id="infoboxdetail"|{{{ingredients|}}}<!-- | |id="infoboxdetail"|{{{ingredients|}}}<!-- | ||
-->{{#if:{{{produces|}}} |<nowiki /> | -->{{#if:{{{produces|}}} |<nowiki /> | ||
{{!}}- | {{!}}- | ||
− | {{!}}id="infoboxsection"{{!}}Produces | + | {{!}}id="infoboxsection"{{!}}Produces |
{{!}}id="infoboxdetail"{{!}}{{{produces|}}} |}} | {{!}}id="infoboxdetail"{{!}}{{{produces|}}} |}} | ||
− | |} | + | |}</div>{{InfoboxSEO}}</includeonly><noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude> |
− | </div></includeonly> | ||
− | <noinclude> |
Latest revision as of 15:24, 13 March 2023
Description
This template displays an infobox for cooked items (and some crafted items). Its syntax provides a way to transclude the information onto other pages, using Template:RecipeRow.
Do not use this on your user page. It is reserved for content pages.
The health and energy values are calculated from the "edibility" parameter. These are the actual gains when a cooked item is consumed in-game, which are not always the same as the hover text values.
Parameters
Parameter | Notes |
---|---|
name | Name of item/name of page |
image | Name of image, including extension |
description | In-game description of item (Use Template:Description) |
source | Source of item (e.g., [[Crafting]]) Optional parameter; defaults to Cooking if omitted. |
buff | Buffs given when consuming the item |
duration | Duration of buff(s) |
dsvduration | data-sort-value for duration of buffs (Format:mmss) Optional, but tables that transclude items that use this template will not sort correctly without it |
edibility | Found in ObjectInformation.xnb |
sellprice | Found in ObjectInformation.xnb. Use only raw unformatted numbers |
recipe | Recipe source(s) |
ingredients | Ingredients |
produces | Use for crafted items that produce >1 item per craft |
qiseasoning | Calculates gold quality values for health, energy, and sell price Must be set to false for all non-cooked items |
health | Optional parameter, use for items whose health differs from the normal calculation (e.g., Bug Steak) |
Example
{{Infobox cooking |name = Fried Mushroom |image = Fried Mushroom.png |description = {{Description|Fried Mushroom}} |buff = {{name|Attack|+2}}{{name|Defense|+4}} |duration = 7m |dsvduration = 0700 |edibility = 54 |sellprice = 200 |recipe = {{NPC|Demetrius|Mail - 3+ [[File:HeartIconLarge.png|16px|link=]]}} |ingredients = {{name|Common Mushroom|1}}{{name|Morel|1}}{{name|Oil|1}} }}
Fried Mushroom | ||||||||||
Earthy and aromatic. | ||||||||||
Information | ||||||||||
Source | Cooking | |||||||||
Buff(s) | Attack (+2) Defense (+4) | |||||||||
Buff Duration | 7m | |||||||||
Energy / Health |
|
|||||||||
Sell Price |
| |||||||||
Qi Seasoning |
| |||||||||
Recipe | ||||||||||
Recipe Source(s) | Demetrius (Mail - 3+ ) | |||||||||
Ingredients | Common Mushroom (1) Morel (1) Oil (1) |
Example Syntax for use with Template:RecipeRow
<onlyinclude>{{{{{1|Infobox cooking}}} |name = Lucky Lunch |image = Lucky Lunch.png |description = {{Description|Lucky Lunch}} |buff = {{name|Luck|+3}} |duration = 11m 11s |dsvduration = 1111 |edibility = 40 |sellprice = 250 |recipe = {{CookingChannel|28 Spring, Year 2}} |ingredients = {{name|Sea Cucumber|1}}{{name|Tortilla|1}}{{name|Blue Jazz|1}} }}</onlyinclude>