Show / Hide Table of Contents

Method AddRequirement

| Edit this page View Source

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.
Declaration
public void AddRequirement(RequirementConfig requirementConfig)
Parameters
Type Name Description
RequirementConfig requirementConfig
| Edit this page View Source

AddRequirement(string, int, int)

Appends a new RequirementConfig to the array of existing ones.
If the item name is null or empty or the amount is less than 1 nothing will be added.
Declaration
public void AddRequirement(string item, int amount, int amountPerLevel = 0)
Parameters
Type Name Description
string item The internal item prefab id, see https://valheim-modding.github.io/Jotunn/data/objects/item-list.html or the Valheim Wiki
int amount The amount of items needed to craft this item
int amountPerLevel The amount of items needed to upgrade this item. The basic formular is: Upgrade Amount = Item Level * Amount Per Level
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Generated by DocFX
☀
☾