14
edits
m (Grammar and stuff) |
|||
(3 intermediate revisions by one other user not shown) | |||
Line 19: | Line 19: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<code>P</code> and <code>S</code> are identifiers which will be defined later. Every row is separated with a tab, while an empty cell is | <code>P</code> and <code>S</code> are identifiers which will be defined later. Every row is separated with a tab, 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 === | === Ingredients === | ||
All we need to do now | All we need to do now is to define the identifiers we have used before. In our example <code>P</code> stands for a copper pickaxe and <code>S</code> for an ordinary stick. | ||
<syntaxhighlight lang="json"> | <syntaxhighlight lang="json"> | ||
Line 68: | Line 68: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Theoretically we could add the <code>quantity</code> property here as well. | Theoretically, we could add the <code>quantity</code> property here as well. | ||
=== Distributing === | === Distributing === | ||
This is | This is what our final recipe looks like: | ||
<syntaxhighlight lang="json"> | <syntaxhighlight lang="json"> | ||
Line 80: | Line 80: | ||
height: 3, | height: 3, | ||
ingredients: { | ingredients: { | ||
"P": { type: "item", code: "pickaxe-copper"}, | "P": { type: "item", code: "game:pickaxe-copper"}, | ||
"S": { type: "item", code: "stick"} | "S": { type: "item", code: "game:stick"} | ||
}, | }, | ||
output: { type: "item", code: "wand-pickaxe"} | output: { type: "item", code: "wand-pickaxe"} | ||
Line 100: | Line 100: | ||
ingredientPattern: "L", | ingredientPattern: "L", | ||
ingredients: { | ingredients: { | ||
"L": { type: "block", code: "log-*-ud", name: "wood" } | "L": { type: "block", code: "game:log-*-ud", name: "wood" } | ||
}, | }, | ||
width: 1, | width: 1, | ||
Line 111: | Line 111: | ||
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}"</code> to <code>code: "planks-birch"</code>. | ||
{{Navbox/modding|Vintage Story}} |
edits