Show / Hide Table of Contents

Class RecipeConfig

Configuration class for adding custom recipes.
Inheritance
System.Object
RecipeConfig
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Jotunn.Configs
Assembly: Jotunn.dll
Syntax
public class RecipeConfig

Properties

| Improve this Doc View Source

Amount

The amount of Item that will be created from this Recipe. Defaults to 1.
Declaration
public int Amount { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

CraftingStation

The name of the crafting station prefab where this recipe can be crafted.
Can be set to null to have the recipe be craftable without a crafting station.
Declaration
public string CraftingStation { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Enabled

Whether this recipe is craftable or not. Defaults to true.
Declaration
public bool Enabled { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Item

The name of the item prefab that this recipe should create.
Declaration
public string Item { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

MinStationLevel

The minimum required level for the crafting station. Defaults to 1.
Declaration
public int MinStationLevel { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Name

The unique name for your recipe.
Declaration
public string Name { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

RepairStation

The name of the crafting station prefab where this item can be repaired.
Can be set to null to have the recipe be repairable without a crafting station.
Declaration
public string RepairStation { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Requirements

Array of RequirementConfigs for all crafting materials it takes to craft the recipe.
Declaration
public RequirementConfig[] Requirements { get; set; }
Property Value
Type Description
RequirementConfig[]

Methods

| Improve this Doc View Source

FromJson(String)

Loads a single RecipeConfig from a JSON string.
Declaration
public static RecipeConfig FromJson(string json)
Parameters
Type Name Description
System.String json JSON text
Returns
Type Description
RecipeConfig Loaded RecipeConfig
| Improve this Doc View Source

GetRecipe()

Converts the RecipeConfig to a Valheim style Recipe.
Declaration
public Recipe GetRecipe()
Returns
Type Description
Recipe The Valheim recipe
| Improve this Doc View Source

GetRequirements()

Converts the RequirementConfigs to Valheim style Piece.Requirements
Declaration
public Piece.Requirement[] GetRequirements()
Returns
Type Description
Piece.Requirement[] The Valheim Piece.Requirement array
| Improve this Doc View Source

ListFromJson(String)

Loads a list of RecipeConfigs from a JSON string.
Declaration
public static List<RecipeConfig> ListFromJson(string json)
Parameters
Type Name Description
System.String json JSON text
Returns
Type Description
System.Collections.Generic.List<RecipeConfig> Loaded list of RecipeConfigs

Extension Methods

PrefabExtension.FixReferences(Object)
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾