Difference between revisions of "Recipe Items"

From wiki
Jump to: navigation, search
(Initial commit.)
 
(Update Page.)
 
Line 9: Line 9:
 
</pre>
 
</pre>
  
Recipe Items contain only one piece of information, the recipe to give the player. Otherwise they act like a normal item.
+
Recipe items allow the player to unlock new recipes. Recipes are not needed to actually perform tasks, but providing a step-by-step process in creating items.
  
  
 
= Creating a Recipe Item =
 
= Creating a Recipe Item =
Unlike [[Craft Items]], Recipe Items are automatically generated from [[Recipes]]. You cannot make the item yourself (i.e. Create an "*.item" file) as the game will not be able to generate it properly. As such you will have to rely on "*.recipe" files to create Recipe Items.
+
Unlike [[Craft Items]], Recipe Items are automatically generated from [[Recipes]]. You cannot make the item yourself. (i.e. Create an "*.item" file for recipes.) As such you will have to rely on [[Recipes|Recipe files]] to create Recipe Items.
  
  
 
= Spawning in a Recipe Item =
 
= Spawning in a Recipe Item =
As it is not possible to create a proper Recipe Item, you can create a Recipe Item using the following;
+
The following can be used to spawn in a recipe;
 
<pre>
 
<pre>
 
{
 
{
Line 28: Line 28:
  
 
Example Input: <code>{"kind": "staxel.item.Recipe", "recipe": "staxel.crafting.recipes.CakeCarrot"}</code>
 
Example Input: <code>{"kind": "staxel.item.Recipe", "recipe": "staxel.crafting.recipes.CakeCarrot"}</code>
 
 
= Config Options =
 
== "kind" ==
 
'''Valid options (String): <code>A unique string which type of item this object is.</code>'''
 
 
This page is referring to <code>staxel.item.Recipe</code> to view other types of items head to [[:Category:Item Modding]]
 
 
 
A string containing the type of item the blob will be referring to.
 
 
 
== "accessory" ==
 
'''Valid options (String): <code>The code to an [[Recipe]] file</code>'''
 
 
'''Default Value:''' No default value is specified. Always need to provide your own.
 
 
 
A string containing which recipe you want to let this item give to the player.
 

Latest revision as of 05:04, 12 December 2017

Items are fairly broad in their types. Each type has it's own properties and uses.

This page is for items that can teach you a recipe.

Recipe Items are all items that have the following line;

"kind": "staxel.item.Recipe",

Recipe items allow the player to unlock new recipes. Recipes are not needed to actually perform tasks, but providing a step-by-step process in creating items.


Creating a Recipe Item

Unlike Craft Items, Recipe Items are automatically generated from Recipes. You cannot make the item yourself. (i.e. Create an "*.item" file for recipes.) As such you will have to rely on Recipe files to create Recipe Items.


Spawning in a Recipe Item

The following can be used to spawn in a recipe;

{
  "kind": "staxel.item.Recipe",
  "recipe": "your.recipe.here"
}

Both properties must be included and non-blank (i.e. It must have something inside of the quotes ""). The "kind" property has to be "staxel.item.Recipe" for the game to recognise it is a Recipe Item. The "recipe" is the code of the Recipe in which you want to give to the player. And that is all.


Example Input: {"kind": "staxel.item.Recipe", "recipe": "staxel.crafting.recipes.CakeCarrot"}