Translations:Modding:Creating Recipes/34/en: Difference between revisions

From Vintage Story Wiki
(Importing a new version from external source)
 
(Importing a new version from external source)
 
Line 1: Line 1:
{{Navbox/modding|Vintage Story}}
=== Converting an ingredient to another item upon crafting ===
Sometimes you want to keep one or more of the ingredients, but convert them to a different item after crafting. For example, when crafting a honey-sulfur poultice, the player needs a bowl filled with honey, but the bowl is not consumed to craft it. Instead the bowl of honey is turned into an empty bowl. This is accomplished by adding the <code>returnedStack</code> property to the ingredient. This property's value needs to contain a <code>type</code> and <code>code</code> just like the standard ingredient properties. This tells the recipe which item to give the player back.

Latest revision as of 05:53, 14 June 2022

Information about message (contribute)
This message has no documentation. If you know where or how this message is used, you can help other translators by adding documentation to this message.
Message definition (Modding:Creating Recipes)
=== Converting an ingredient to another item upon crafting ===
Sometimes you want to keep one or more of the ingredients, but convert them to a different item after crafting. For example, when crafting a honey-sulfur poultice, the player needs a bowl filled with honey, but the bowl is not consumed to craft it. Instead the bowl of honey is turned into an empty bowl. This is accomplished by adding the <code>returnedStack</code> property to the ingredient. This property's value needs to contain a <code>type</code> and <code>code</code> just like the standard ingredient properties. This tells the recipe which item to give the player back.

Converting an ingredient to another item upon crafting

Sometimes you want to keep one or more of the ingredients, but convert them to a different item after crafting. For example, when crafting a honey-sulfur poultice, the player needs a bowl filled with honey, but the bowl is not consumed to craft it. Instead the bowl of honey is turned into an empty bowl. This is accomplished by adding the returnedStack property to the ingredient. This property's value needs to contain a type and code just like the standard ingredient properties. This tells the recipe which item to give the player back.