Difference between revisions of "Template:RecipeRow"

From Stardew Valley Wiki
Jump to navigation Jump to search
(Undo revision 57862 by Rigel Kent (talk) Unnecessary extra templte calls)
(+data sort values for buffs)
 
(5 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
|-
 
|-
 
|[[File:{{{image|}}}|center]]
 
|[[File:{{{image|}}}|center]]
|{{#if:{{{name|}}} | [[{{{name|}}}]] | [[{{PAGENAME}}]] }}
+
|{{#if:{{{name|}}} | [[{{{name|}}}]] | }}
|{{{description|}}}
+
|{{#if:{{{description|}}} | {{{description|}}} | {{Description|{{{name|}}}}} }}
 
|{{{ingredients|}}}
 
|{{{ingredients|}}}
{{#if:{{{edibility|}}} | {{!}}data-sort-value="{{padleft:{{{edibility|}}}|4}}"{{!}}[[File:Energy.png|24px|link=]] {{#expr:ceil({{{edibility|}}}*2.5)}} | {{!}}style="text-align: center;"{{!}}N/A }}
+
{{#if:{{{edibility|}}} | {{!}}data-sort-value="{{padleft:{{{edibility|}}}|4}}"{{!}}[[File:Energy.png|24px|link=]] {{#expr:ceil({{{edibility|}}}*2.5)}}<br />[[File:Health.png|24px|link=]] {{#if:{{{health|}}}|{{{health|}}}|{{#expr:trunc(ceil({{{edibility|}}}*2.5)*0.45)}} }}| {{!}}style="text-align: center;"{{!}}N/A}}
{{#if:{{{edibility|}}} | {{!}}data-sort-value="{{padleft:{{{edibility|}}}|4}}"{{!}}[[File:Health.png|24px|link=]] {{#expr:trunc(ceil({{{edibility|}}}*2.5)*0.45)}} | {{!}}style="text-align: center;"{{!}}N/A }}
+
{{#if:{{{buff|}}} | {{!}}{{{buff|}}} | {{!}}data-sort-value="Z" style="text-align: center;"{{!}}N/A}}
{{#if:{{{buff|}}} | {{!}}{{{buff|}}} | {{!}}style="text-align: center;"{{!}}N/A}}
+
{{#if:{{{duration|}}} | {{!}}{{#if:{{{dsvduration|}}}|data-sort-value="{{{dsvduration|}}}"{{!}}|}} {{Duration|{{{duration|}}}}} | {{!}}data-sort-value="0" style="text-align: center;"{{!}}N/A}}
{{#if:{{{duration|}}} | {{!}}{{#if:{{{dsvduration|}}}|data-sort-value="{{{dsvduration|}}}"{{!}}|}} {{Duration|{{{duration|}}}}} | {{!}}style="text-align: center;"{{!}}N/A}}
 
 
|{{{recipe|}}}
 
|{{{recipe|}}}
 
|data-sort-value="{{padleft:{{{sellprice|}}}|4}}"{{!}}{{Price|{{{sellprice|}}}}}
 
|data-sort-value="{{padleft:{{{sellprice|}}}|4}}"{{!}}{{Price|{{{sellprice|}}}}}
 
|-</includeonly>
 
|-</includeonly>
 
<noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude>
 
<noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude>

Latest revision as of 02:27, 20 December 2022

Description

This template creates a row in a recipe table. It requires transclusion tags in the infobox on the page to be included. For an example, please see Template:Infobox cooking. For information on transclusion tags, please see https://www.mediawiki.org/wiki/Transclusion

Credit to Lilly for creating the sandbox template.

This template is intended to be used in conjunction with Template:Recipes, which provides the table header and footer, as shown:

{{Recipes|header}}
{{:Autumn's Bounty|RecipeRow}}
{{:Fried Egg|RecipeRow}}
{{Recipes|footer}}

Example

Image Name Description Ingredients Energy / Health Buff(s) Buff Duration Recipe Source(s) Sell Price
Autumn's Bounty.png
Autumn's Bounty A taste of the season. Yam.png Yam (1)Pumpkin.png Pumpkin (1) Energy.png 220
Health.png 99
Foraging.png Foraging (+2)Defense.png Defense (+2) Time Icon.png 7m 41s

Demetrius Icon.png Demetrius (Mail - 7+ HeartIconLarge.png)

data-sort-value="350">Gold.png350g
Fried Egg.png
Fried Egg Sunny-side up. Egg.png Egg (1) Energy.png 50
Health.png 22
N/A N/A Starter data-sort-value="35">Gold.png35g

Other Languages

In languages other than English, the name of the recipe page needs to be in the native language, as shown below:

German Example

{{Recipes|header}}
{{:Herbstfülle|RecipeRow}}
{{:Spiegelei|RecipeRow}}
{{Recipes|footer}}

Japanese Example

{{Recipes|header}}
{{:秋のめぐみ|RecipeRow}}
{{:目玉焼き|RecipeRow}}
{{Recipes|footer}}