Class RecipeConfig
Configuration class for adding custom recipes.
Inherited Members
Namespace: Jotunn.Configs
Assembly: Jotunn.dll
Syntax
public class RecipeConfig
Properties
Name | Description |
---|---|
Amount | The amount of Item that will be created from this Recipe. Defaults to 1 . |
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. |
Enabled | Whether this recipe is craftable or not. Defaults to true. |
Item | The name of the item prefab that this recipe should create. |
MinStationLevel | The minimum required level for the crafting station. Defaults to 1 . |
Name | The unique name for your recipe. |
QualityResultAmountMultiplier | Multiplier for the amount of items created by the recipe based on the quality of the crafting materials. Defaults to 1 . |
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. |
RequireOnlyOneIngredient | Whether this recipe requires only one of the crafting requirements to be crafted. Defaults to false . |
Requirements | Array of RequirementConfigs for all crafting materials it takes to craft the recipe. |
Methods
Name | Description |
---|---|
AddRequirement(RequirementConfig) | Appends a new RequirementConfig to the array of existing ones. If the requirement is null or is not valid (has not item name or amount set) nothing will be added. |
FromJson(string) | Loads a single RecipeConfig from a JSON string. |
GetRecipe() | Converts the RecipeConfig to a Valheim style Recipe. |
GetRequirements() | Converts the RequirementConfigs to Valheim style Piece.Requirements |
ListFromJson(string) | Loads a list of RecipeConfigs from a JSON string. |