User:Veerserif/Sandbox/Food infobox: Difference between revisions

From Vintage Story Wiki
(Created page with "{{User:Veerserif/Sandbox/Infobox common | title = {{#if: {{{title|}}} | {{{title}}} | {{BASEPAGENAME}} }} | imagearea = File:{{#if: {{{image|}}} | {{{image}}} | {{#ifexist: File:{{#if: {{{title|}}} | {{{title}}} | {{BASEPAGENAME}} }}.png | {{#if: {{{title|}}} | {{{title}}} | {{BASEPAGENAME}} }}.png | No image.png}} }}|{{#ifeq: {{NAMESPACE}} | {{ns:10}} || link=File:{{#if: {{{image|}}} | {{{image}}} | {{#if: {{{title|}}} | {{{title}}} | {{BASEPAGENAME}} }}.png }} }}|150...")
 
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 5: Line 5:
{{User:Veerserif/Sandbox/Infobox row|label=Stackable|field={{ #if: {{{stackable|}}} | {{{stackable}}} | N/A }} }}
{{User:Veerserif/Sandbox/Infobox row|label=Stackable|field={{ #if: {{{stackable|}}} | {{{stackable}}} | N/A }} }}
{{User:Veerserif/Sandbox/Infobox row|label=Edible|field={{ #if: {{{edible|}}} | {{{edible}}} | N/A }} }}
{{User:Veerserif/Sandbox/Infobox row|label=Edible|field={{ #if: {{{edible|}}} | {{{edible}}} | N/A }} }}
{{User:Veerserif/Sandbox/Infobox row|label=Satiety|field={{ #if: {{{satiety|}}} | {{{satiety}}} {{#if: {{{category|}}}|, {{ll|Satiety|{{{category|}}}}}]] }} | N/A }} }}
{{User:Veerserif/Sandbox/Infobox row|label=Satiety|field={{ #if: {{{satiety|}}} | {{{satiety}}} {{#if: {{{category|}}}| {{ll|Satiety|{{lcfirst:{{{category|}}}}}}} }} | N/A }} }}
{{User:Veerserif/Sandbox/Infobox row|label=Ingredient|field={{ #if: {{{ingredient|}}} | Yes, in {{{ingredient}}} | No }} }}
{{User:Veerserif/Sandbox/Infobox row|label=Ingredient|field={{ #if: {{{ingredient|}}} | Yes ({{{ingredient}}}) | No }} }}
{{User:Veerserif/Sandbox/Infobox row|label=Shelf life|field={{{FreshTime|}}}, turns into {{#if:{{{TransitionRatio|}}} |{{{TransitionRatio|}}}x}} {{#if: {{{TransitionOutput|}}} | {{{TransitionOutput}}}|[[rot]] }} {{#if: {{{TransitionTime|}}} | in {{{TransitionTime|}}} }} }}
{{User:Veerserif/Sandbox/Infobox row|label=Fresh for|field={{{FreshTime|}}}, turns into {{#if:{{{TransitionRatio|}}} |{{{TransitionRatio|}}}x}} {{#if: {{{TransitionOutput|}}} | {{{TransitionOutput}}}|[[Special:MyLanguage/Rot|rot]] }} {{#if: {{{TransitionTime|}}} | over {{{TransitionTime|}}} }} }}
| footer =
| footer =
{{{notes|}}}
{{{notes|}}}

Latest revision as of 16:31, 1 September 2023

Veerserif/Sandbox
No image.png
Stackable

N/A

Edible

N/A

Satiety

N/A

Ingredient

No

Fresh for

, turns into rot

Food-specific infobox, and by "food" I mean "anything edible with or without processing". So as of 1.18.8 that includes honeycomb and cattail roots, but not, I don't know, sticks.

Parameters

Parameter Type Notes
stackable number Required. maximum stack size
edible string Required. Whether or not the item is edible - I suggest the values "Raw", "Cooked (Firepit)", "Cooked (Meal)", "Cooked (Oven)"
satiety number Required. Satiety number
category string Only displays if satiety exists. Satiety category - vegetable, protein, dairy, fruit
ingredient string What the food can be used to make - meals, pies, soup, etc.
FreshTime string Required. Shelf life of the item
TransitionRatio number Optional. Ratio of transition (i.e. a TransitionRatio of 0.5 means "0.5 of the stack of the original item becomes the TransitionOutput after TransitionTime")
TransitionOutput string Optional. Output of transition - defaults to "rot"
TransitionTime string Optional. Time taken, after FreshTime expires, for the item to fully transition into TransitionOutput.