Modding:Creating Recipes: Difference between revisions

From Vintage Story Wiki
No edit summary
Line 27: Line 27:
<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
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"}
},
},
</syntaxhighlight>
</syntaxhighlight>


<code>Type</code> is either <code>block</code> or <code>item</code> depending whether it's an item or a block.
<code>Type</code> is either <code>block</code> or <code>item</code> depending whether it's an item or a block.
When recipes have vanilla items they need <code>game:</code> in front of the item name. When they are from your own mod you can just put the item name.


In order to find out the <code>code</code> of each item (or block), you can type <code>.edi</code> into console, which will add the code property to the tooltip:
In order to find out the <code>code</code> of each item (or block), you can type <code>.edi</code> into console, which will add the code property to the tooltip:
Line 43: Line 45:
<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
ingredients: {
ingredients: {
"P": { type: "item", code: "pickaxe-copper"},
"P": { type: "item", code: "game:pickaxe-copper"},
"S": { type: "item", code: "stick", quantity: 2}
"S": { type: "item", code: "game:stick", quantity: 2}
},
},
</syntaxhighlight>
</syntaxhighlight>
Line 52: Line 54:
<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
ingredients: {
ingredients: {
"P": { type: "item", code: "pickaxe-copper", isTool: true},
"P": { type: "item", code: "game:pickaxe-copper", isTool: true},
"S": { type: "item", code: "stick"}
"S": { type: "item", code: "game:stick"}
},
},
</syntaxhighlight>
</syntaxhighlight>
Confirmedusers, Bureaucrats, editor, Administrators
783

edits