Modding:Creating Recipes: Difference between revisions

From Vintage Story Wiki
Changed separator (tab -> comma); added that space cannot be separator; partially updated to 1.16 (needs additional check and new mod zip)
No edit summary
(Changed separator (tab -> comma); added that space cannot be separator; partially updated to 1.16 (needs additional check and new mod zip))
Line 1: Line 1:
<languages/>
<languages/>
<translate>
<translate>
{{GameVersion|1.15}}
{{GameVersion|1.16}}


<!--T:1-->
<!--T:1-->
Line 29: Line 29:


<!--T:8-->
<!--T:8-->
<code>P</code> and <code>S</code> are identifiers which will be defined later. Every row is separated with a comma, while an empty cell is marked with an underscore <code>_</code>. The <code>width</code> of this recipe is <code>1</code> and it is <code>3</code> rows high.
<code>P</code> and <code>S</code> are identifiers which will be defined later. Every row is separated with one comma or tab (no space!), while an empty cell is marked with an underscore <code>_</code>. The <code>width</code> of this recipe is <code>1</code> and it is <code>3</code> rows high.


=== Ingredients === <!--T:9-->
=== Ingredients === <!--T:9-->
Line 132: Line 132:
width: 1,
width: 1,
height: 1,
height: 1,
output: { type: "block", code: "planks-{wood}", quantity: 4  }
output: { type: "block", code: "planks-{wood}-hor", quantity: 4  }
}
}
</syntaxhighlight>
</syntaxhighlight>
Line 140: Line 140:


<!--T:33-->
<!--T:33-->
For example if we would have a birch log block, its code would be <code>log-birch-ud</code>, so <code>*</code> would stand for <code>birch</code>, therefore the output will be converted from <code>code: "planks-{wood}"</code> to <code>code: "planks-birch"</code>.
For example if we would have a birch log block, its code would be <code>log-birch-ud</code>, so <code>*</code> would stand for <code>birch</code>, therefore the output will be converted from <code>code: "planks-{wood}-hor"</code> to <code>code: "planks-birch-hor"</code>.


=== Converting an ingredient to another item upon crafting === <!--T:34-->
=== Converting an ingredient to another item upon crafting === <!--T:34-->
Line 194: Line 194:
},
},
{
{
ingredientPattern: "P_P,PSP,P_P",
ingredientPattern: "P_P PSP P_P",
ingredients: {
ingredients: {
"P": { type: "item", code: "plank-*" },
"P": { type: "item", code: "plank-*" },
Confirmedusers, editor
749

edits