Data:Assets/recipes

From Starbounder - Starbound Wiki
Jump to: navigation, search

Recipes

Recipes define what are the ingredients required to make an item, and where the item can be made. A recipe can support multiple inputs, but only one output. Spelling and capitalization are EXTREMELY important. Double and triple check the reference ID name. Otherwise you will get a PGI ( Perfectly Generic Item ).

There are a few vanilla items that do not follow the standard protocol of using only lower-case. Cerulliumbar, Cerulliumore, Rubiumbar, Rubiumore are classic examples (as of Enranged Koala)

Important Notes

You can create recipes for randomly generated items
Only one output is currently allowed
You can have multiple recipes for the same item - using the same file name, but if you wish the recipe to be unlocked differently, you should use a different recipe name.
Recipes require to be "unlocked" before they can be used by the player. This is either done by adding it through the player.config - for general unlock. Species file - for species specific unlock. Or added as a loot drop using the syntax "recipefilename-recipe".
Subgroups of crafting objects are defined via the associated config file.

Sample

{
  "input" : [
    { "item" : "Ceruliumbar", "count" : 1 },
    { "item" : "coalore", "count" : 1 }
  ],
  "output" : {
    "item" : "Violiumbar",
    "count" : 1
  },
  "groups" : [ "metalworkstation", "all" ]
}
Variable Description
Input Defines what are the input item and the amount of each required
Output Defines the output item.
Groups These are the specific groups the recipe is attached too. Each Crafting object has its own group, and subgroups. By default all recipes associated with that crafting object group will be shown on the first page. Specific sub group items will be filtered onto associated sub group tabs defined by interface config file of that crafting object.

For those who are curious how a randomly generated object can be generated the syntax would be

{ "item" : "generatedgun", "count" : 1, 
"data" : { "definition" : "commonassaultrifle", "level" : 1 } }
  • note because the way the wiki handles code snippets part of the code was being cut off.

The code was made into two separate lines to prevent the cutoff.