Modding:Creating Recipes: Difference between revisions
From Vintage Story Wiki
Craluminum (talk | contribs) (Added showInCreatedBy example) |
Craluminum (talk | contribs) (Add liquid container example) |
||
Line 255: | Line 255: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<!--T:40--> | === Using liquid container as ingredient === <!--T:40--> | ||
Some recipes use liquid containers, such as buckets, bowls or jugs. For single liquid container, it can be done by adding <code>liquidContainerProps</code> to recipe attributes. This is recipe for honey-sulfur poultice: | |||
<syntaxhighlight lang="json"> | |||
{ | |||
ingredientPattern: "SBS,_L_", | |||
ingredients: { | |||
"L": { type: "block", code: "linen-*" }, | |||
"S": { type: "item", code: "powderedsulfur" }, | |||
"B": { type: "block", code: "bowl-fired" } | |||
}, | |||
attributes: { | |||
liquidContainerProps: { | |||
requiresContent: { type: "item", code: "honeyportion" }, | |||
requiresLitres: 0.25 | |||
} | |||
}, | |||
width: 3, | |||
height: 2, | |||
output: { type: "item", code: "poultice-linen-honey-sulfur", quantity: 4 } | |||
} | |||
</syntaxhighlight> | |||
<!--T:41--> | |||
{{Navbox/modding|Vintage Story}} | {{Navbox/modding|Vintage Story}} | ||
</translate> | </translate> |