Modding:Content Tutorial Simple Recipe: Difference between revisions

From Vintage Story Wiki
m
Minor formatting
(2nd recipe and conclusion finished - Still in progress.)
m (Minor formatting)
Line 202: Line 202:
* ''hammer-steel''
* ''hammer-steel''


When it comes to creating recipes, you do not want to have to create 9 seperate recipes where each one accepts a different hammer, so you can use a ''wildcard.'' A wildcard allows a modder to group all these objects together using an asterisk ( '''*''' ) in its code property. By using '<nowiki/>''hammer-*'<nowiki/>'', the game allows any object who's code begins with '<nowiki/>''hammer-''<nowiki/>' to be valid for this recipe. Note that you should still include the hyphen in the code, as using '<nowiki/>''hammer*''' will result in being able to use any hammer and also any hammer''head'' items.  
When it comes to creating recipes, you do not want to have to create 9 seperate recipes where each one accepts a different hammer, so you can use a ''wildcard.'' A wildcard allows a modder to group all these objects together using an asterisk ( '''*''' ) in its code property. By using "''hammer-*''", the game allows any object who's code begins with ''"hammer-''" to be valid for this recipe. Note that you should still include the hyphen in the code, as using "''hammer*''" will result in being able to use any hammer and also any hammer''head'' items.  


You will learn how to create your own object variants in future intermediate tutorials.
You will learn how to create your own object variants in future intermediate tutorials.


==== IsTool Property ====
==== IsTool Property ====
There are a number of extra properties that can be included within recipes to make them slightly more complex. One such property is the '<nowiki/>''isTool''' property. Without this property, the hammer will disappear when the block is created. By marking the hammer as a tool, the recipe simple uses a single durability point, but the hammer remains.  
There are a number of extra properties that can be included within recipes to make them slightly more complex. One such property is the '<nowiki/>''isTool''' property. Without this property, the hammer will disappear when the block is created. By marking the hammer as a tool, the recipe simple uses a single durability point, but the hammer remains.


=== Recipe Output ===
=== Recipe Output ===
Confirmedusers
615

edits