Translations:Modding:Content Tutorial Simple Recipe/29/en

From Vintage Story Wiki

Add the following code to your file, below the height property.

"ingredients": {
		"Q": {
			"type": "item",
			"code": "game:clearquartz"
		},
		"S": {
			"type": "item",
			"code": "game:stick"
		}
	},

The 'ingredients' property is a little different to any properties used before in the tutorials, because it is a dictionary data type. In this case, it is simply a way of mapping each character in the pattern to an in-game object. There are two unique characters in the pattern, Q and S, so we need to add both of these to the list. When adding an ingredient, you need to include its type and code. The type is simple - either "item" or "block" depending on which one it is. The code is the item's unique identifier. A future tutorial will discuss multiple ways of finding an objects code, but for now we can use game:clearquartz and game:stick.