ChanceCraft

v1.1.6·Updated 2025-11-10

Set chances for crafting and upgrading armor, weapons and ammo.

About this mod Author’s original text

Description

  • This mod allows you to setup probability of crafting armor, weapons and ammo.
  • With Failiour craft you loose your resources, only one resource at random is given back.
  • When try to upgrade item fails you loose only one resource from recipe.

Join me on discord to report bugs and give me feedback:

Link:

Chance Craft — README (summary)

Chance Craft is a small Valheim BepInEx plugin that adds a configurable chance for crafting and upgrading weapons, armor, shields and arrows to fail. It also provides optional consumable helper items that temporarily increase the success chance when consumed during crafting.

Key behaviour (short)

  • Adds a success/failure roll to crafting and upgrading of eligible item types:
  • Weapons (one- and two-handed, bows)
  • Shields
  • Armor pieces (helmet, chest, legs)
  • Ammo
  • Base success chances are configurable separately for crafting and upgrading (weapons / armor / arrows).
  • The mod can detect and consume "helper" items in the player's inventory (configurable by prefab name). Each consumed helper adds a configured percent to the success chance for that craft.
  • On success the crafting/upgrading effect is allowed and required resources are removed normally.
  • On failure the mod attempts to revert any changed item quality/variant (undo the partial result) and removes resources according to the failure handling rules (the plugin tries to mimic the game's expected behavior as best it can).
  • The mod displays HUD messages to inform the player when helper items increased chance or when the craft failed.

Notable details & limits

  • The plugin only affects the eligible item types listed above. Other recipe types are left entirely to the game's default behavior.
  • The plugin inspects recipes and only intercepts/suppresses crafting in certain conditions. (Implementation detail: the current logic only intercepts recipes that contain more than one valid resource entry. Recipes with one or zero resource entries are not intercepted — they remain unaffected by Chance Craft and will behave with the game's default outcome.)
  • The plugin attempts to safely handle upgrades (detects upgrade operations and tries to revert or apply changes correctly). Because it uses reflection and best-effort heuristics, behavior may vary across Valheim versions or other mods that change crafting UI internals.
  • The plugin removes consumed helper items by best-effort reflection (it supports multiple inventory removal patterns and falls back to decrementing the item stack when possible).

Configuration

All configuration is in the plugin's config file (BepInEx/config...). Main options include:

  • General:
  • WeaponSuccessChance (float 0.0–1.0) — base craft success for weapons
  • ArmorSuccessChance (float 0.0–1.0) — base craft success for armor
  • ArrowSuccessChance (float 0.0–1.0) — base craft success for ammo
  • WeaponSuccessUpgrade, ArmorSuccessUpgrade, ArrowSuccessUpgrade — base upgrade success chances
  • Logging Enabled — turn plugin logging on/off
  • ChanceCraft.Line1.. Line5:
  • increase craft percentage (float 0.0–1.0) — how much this helper increases success (0.05 = 5%)
  • item prefab — Valheim prefab name of the helper item that will be consumed (leave empty to disable that line)

Notes:

  • Multiple matching helper items found will be summed, but the total is clamped to 100% (1.0).
  • Each helper item is removed (one instance) when used to increase chance.

Player messages

  • On success when helper(s) were consumed: shows a centered HUD message like "Percentage increased by X%".
  • On failure: shows "Crafting failed!" (or "Crafting failed even percentage increased by X%" when helpers were used).

Installation

  • Install BepInEx for Valheim.
  • Drop the plugin DLL into the BepInEx/plugins folder.
  • Start the game and edit the generated config file to tune chances and helper prefabs.

Troubleshooting & notes for modders

  • If a particular item or recipe is not affected, check that:
  • The reci

Install & use Install: BepInEx plugin

  1. The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
  2. Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
  3. Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
  4. Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.

Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file. In multiplayer, the host and every client need the same mods installed.

Dependencies

Install these first, or the mod will not work:

denikson-BepInExPack_Valheim

File & checksum

Filename
ChanceCraft-1.1.6.zip
File size
139.7 KiB