You are viewing a potentially older version of this package. View all versions.
MidnightMods-RecipeManager-0.3.3 icon

RecipeManager

A very lightweight recipe modification framework

Date uploaded 2 months ago
Version 0.3.3
Download link MidnightMods-RecipeManager-0.3.3.zip
Downloads 649
Dependency string MidnightMods-RecipeManager-0.3.3

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2202 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured and includes unstripped Unity DLLs.

Preferred version: 5.4.2202
ValheimModding-Jotunn-2.20.1 icon
ValheimModding-Jotunn

Jötunn (/ˈjɔːtʊn/, 'giant'), the Valheim Library was created with the goal of making the lives of mod developers easier. It enables you to create mods for Valheim using an abstracted API so you can focus on the actual content creation.

Preferred version: 2.20.1

README

RecipeManager

This is a lightweight recipe modification tool. You can define recipes to Add, Modify, Delete etc. It does not use any patches, and does not run constantly.

If you want to do more than modify recipes, check out WackysDB

In Valheim a recipe is something that is crafting at a crafting station, or cooking station etc. For example, to make wood arrows you use a crafting recipe from the workbench. Building pieces (built with the hammer) are not recipes, furnace conversions (1 ore for 1 ingot etc) are not recipes.

Features

  • Disable recipes
  • Modify recipes
  • Delete recipes
  • Disable recipes

Recipes can be manipulated and added through yaml. All of the existing recipes can also be dumped to a file, in the same format to help you find and understand existing recipes.

Its recommended to use a syntax highlighting yaml editor when modifying recipes to help ensure that your yaml is valid. yamlChecker is a free online linter you can use to validate also.

Recipe modifications are stored at \BepInEx\config\RecipeManager\Recipes.yaml. This file will be generated on the first run if it does not already exist.

Yaml configuration example
#################################################
# Recipe Manipulation Config
#################################################
recipeModifications:                     # <- This is the top level key, all modifications live under this, it is required.
  DisableWoodArrow:                      # <- This is the modification name, its primarily for you to understand what this modification does SHOULD BE UNIQUE
    action: Disable                      # <- This is the action it should be one of [Disable, Delete, Modify, Add, Enable]
    prefab: ArrowWood                    # <- This is the prefab that the modification will target
  AddNewWoodArrowRecipe:
    action: Add
    prefab: ArrowWood
    recipeName: Recipe_ArrowWood         # <- optional, specifying the recipe name allows multiple mutating multiple recipes targeting the same prefab
    craftedAt: Workbench                 # <- The crafting station that should craft this recipe, leave it empty or invalid for handcrafting
    minStationLevel: 2                   # <- This is the required crafting station level for discovery AND crafting
    recipe:                              # <- When performing [Modify] or [Add] you should define a recipe
      anyOneResource: false              # <- This makes the recipe only require one ingrediant, first from the top will be used.
      ingredients:                       # <- Ingrediants in the recipe, is an array
        - prefab: Wood                   # <- Prefab that this ingrediant requires
          craftCost: 2                   # <- The amount of this ingrediant it takes to craft the recipe  
          upgradeCost: 0                 # <- The amount of this ingrediant it takes to upgrade the item 
          refund: false                  # <- Whether or not this recipe refunds  
        - prefab: Feathers
          craftCost: 2
          upgradeCost: 0
          refund: true
  DeleteTrollHideArmorRecipe:
    action: Delete
    prefab: CapeTrollHide
  ModifyTrollHideChestRecipe:
    action: Modify
    prefab: ArmorTrollLeatherChest
    craftedAt: Workbench
    minStationLevel: 1
    recipe:
      anyOneResource: false
      ingredients:
        - prefab: TrollHide
          craftCost: 4
          upgradeCost: 2
          refund: false

Commands

This mod adds two new commands which can be used to speed up recipe modification.

RecipeManager_Reload - This reloads all recipe modifications that are listed in the recipe config file.

RecipeManager_PrintAllRecipes - This prints all recipes currently stored in the object DB (including modifications).

Commands require enabling the in-game console.

If you are using Thunderstore Mod Manager or R2 Modmanager, you can enabled the console by selecting your valheim profile, going to settings (on the far left), debugging tab, set launch parameters and add --console

It is not recommended to use Vortex mod manager, however using vortex hardlink or copy deployments you can launch from steam using BepinEx with a --console launch parameter. To do so right click on the game in your library, manage, general, at the bottom add --console to the launch options.

Examples

The mod ships with a default example recipe file which will provide you similar explanations to what is listed above. You can find the recipe file after starting up your game with the mod installed in you BepInEx\config\RecipeManager folder.

R2modman or Thunderstore mod manager will also detect this file as an editable config file and it can be edited or opened directly from the "Edit Config" menu, search for Recipes.yaml.

The only file that is will be used to load recipes is Recipes.yaml other yaml files in that directory will not be loaded.

Add a craftable chain (replace Chain-Manager)

Yaml example
recipeModifications:
  CraftableChainRecipe:
    action: Add
    prefab: Chain
    craftedAt: forge
    minStationLevel: 4
    craftAmount: 1
    recipe:
      anyOneResource: false
      ingredients:
      - prefab: Iron
        craftCost: 2
        upgradeCost: 0
        refund: false

Disable recipes you don't want from vanilla or other mods (disable recipes from Southsil Armors as that mod does not properly support disabling recipes)

Yaml example
recipeModifications:
  DisableNeckHelm:
    action: Disable
    prefab: neckhelm
  DisableNeckChest:
    action: Disable
    prefab: neckchest
  DisableNeckLegs:
    action: Disable
    prefab: necklegs

Increase the bronze yield (replace triple bronze)

Yaml example
recipeModifications:
  Recipe_Bronze:
    action: Modify
    prefab: Bronze
    recipeName: Recipe_Bronze
    craftedAt: forge
    minStationLevel: 1
    craftAmount: 3
    recipe:
      anyOneResource: false
      ingredients:
      - prefab: Copper
        craftCost: 2
        upgradeCost: 1
        refund: true
      - prefab: Tin
        craftCost: 1
        upgradeCost: 1
        refund: true
  Recipe_Bronze5:
    action: Modify
    prefab: Bronze
    recipeName: Recipe_Bronze5
    craftedAt: forge
    minStationLevel: 1
    craftAmount: 15
    recipe:
      anyOneResource: false
      ingredients:
      - prefab: Copper
        craftCost: 10
        upgradeCost: 1
        refund: true
      - prefab: Tin
        craftCost: 5
        upgradeCost: 1
        refund: true

Move a recipe from one crafting station to another (Custom mead from Honey+)

Yaml example
recipeModifications:
  custom_item_meadbase_damage:
    action: Modify
    prefab: HoneyMeadBaseDamage
    recipeName: $custom_item_meadbase_damage
    craftedAt: piece_cauldron

Planned Features

  • More recipe validation

Installation (manual)

Ensure the downloaded .dll is placed inside your /bepinex/plugins folder.

Please note this mod does nothing until configured.

CHANGELOG

0.3.3

- Simplified item add during server handshake post config recieved

0.3.2

- More eventual consistency checks
- Add ensures that the recipe does not already exist

0.3.1

- Modify ensures the target recipe does not already exist

0.3.0

- Added more error reporting for common recipe issues
- Updated example docs
- Server sync'd recipes are now virtual

0.2.0

- Improves ways to reference a recipe as handcrafted
- Added recipe state sychronization on config file server sync

0.1.3

- Fixed server sync'd configurations trying to write out to a temp address

0.1.2

- Fixed customRPC naming to not collide with ValheimFortress

0.1.1

- Added support for targeting recipe names. Allows mutation of multiple recipes that target the same prefab (eg craft x5)
- Added recipe reversion which is applied right before reloading recipes to ensure previous recipe modifications are removed before reapplying

0.1.0

- Initial release, I'm sure I forgot something