ArcByte-EpicLootSacrificeRecycler icon

EpicLootSacrificeRecycler

Full crafting, upgrade and enchanting refunds, guaranteed tempering, and configurable service costs. Client-local settings for Epic Loot 0.15.x. Obviously Cheaty!

By ArcByte
Last updated 4 days ago
Total downloads 110
Total rating 0 
Categories Utility
Dependency string ArcByte-EpicLootSacrificeRecycler-1.4.3
Dependants 0 other packages depend on this package

This mod requires the following mods to function

RandyKnapp-EpicLoot-0.15.0 icon
RandyKnapp-EpicLoot

Adds loot drops, magic items, and enchanting to Valheim.

Preferred version: 0.15.0
denikson-BepInExPack_Valheim-5.4.2360 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.

Preferred version: 5.4.2360

README

EpicLootSacrificeRecycler 1.4.3

Low-loss enchanting and equipment recycling for shorter Epic Loot playthroughs. Builds target .NET Framework 4.8 and require Epic Loot 0.15.0+. The 0.14.x line is no longer supported. Later releases must retain the checked integration hooks; a higher version alone does not guarantee compatibility.

1.4.3 renames the DLL, assembly, namespace, plugin identity, project and solution to EpicLootSacrificeRecycler. Open Source/EpicLootSacrificeRecycler.slnx or Source/EpicLootSacrificeRecycler.csproj in Visual Studio. The public API namespace is now ArcByte.EpicLootSacrificeRecycler and the BepInEx ID is arcbyte.epicloot.sacrificerecycler.

When updating, remove every old EpicLootSalvageRecycler.dll from the active profile; do not just add the new DLL alongside it. Keep arcbyte.epicloot.salvagerecycler.cfg: on first launch, it is copied to the new config name if the new file does not exist. The original stays as a backup. To preserve your existing values, install the new DLL without copying a default new config first. An existing new config is never overwritten. The renamed plugin refuses to activate while the old plugin is also installed.

1.4.1 fixes startup with Epic Loot 0.15.2, which added a SacrificeCategory argument to GetSacrificeItems. Recycler now recognizes that exact signature as well as the older no-argument form. Native category filtering remains intact. The 1.4.0 missing-method error rolled back Recycler's hooks and left native Epic Loot active.

1.4.2 fixes another startup failure seen with Epic Loot 0.15.4 on Unity Mono: HarmonyX generated invalid IL (stind.ref) when the Disenchant hooks used object[] __args for the method's out bool parameter. These hooks now use a typed item parameter and ref bool. Cleanup removes all owned hooks per method, continues after individual cleanup failures, and logs the original installation error before attempting rollback. An earlier Windows .NET Framework-only smoke test did not expose the Mono failure.

New defaults

  • Valid temper attempts always succeed, including over-tempering. The panel shows 100% success; failure cannot downgrade or destroy the item. Native critical-success rolls and effect eligibility remain. Basic enchanting already succeeds in Epic Loot; random effect selection remains.
  • Augment/reroll costs default to 50%. Temper, identification, disenchant and rune service fees default to free. Every operation and each resource group can be independently scaled down to zero.
  • The escalating fee for augmenting additional effect slots is removed.
  • Disenchant now guarantees the full native enchanting recipe and configured modification credits while retaining the original item. It never refunds construction/quality upgrades for an item that survives.
  • Initial enchanting remains at 100% cost and is recovered when supported equipment is sacrificed. Set Enchant cost percent = 0 for free initial enchanting too.
  • Supported equipment sacrifice restores its crafting recipe, every quality upgrade, and one current-rarity enchant recipe at full native recipe value, even when spending costs are zero. Recoverable socket contents use Epic Loot's separate recovery path and are never multiplied.

Install/update

Close Valheim and merge this package's BepInEx folder into your active profile. Remove the older ArcByteSacrificeRefund.dll if present; these add-ons must not run together. Keep Epic Loot and its dependencies installed. Do not replace EpicLoot.dll or install Source as a plugin.

Plugin: BepInEx/plugins/EpicLootSacrificeRecycler/EpicLootSacrificeRecycler.dll.

Settings: BepInEx/config/arcbyte.epicloot.sacrificerecycler.cfg. Restart after editing, particularly after changing guaranteed success with a temper panel already open. Existing configs gain missing settings without overwriting existing values: a saved 1.2.0 Augment cost percent = 0 stays free until you change it. The supplied config uses the new 50% default.

Settings

[General]
Enabled = true
Hover preview = true

[Enchanting]
Guaranteed temper success = true
Remove additional augment fee = true
Enchant cost percent = 100
Augment cost percent = 50
Temper cost percent = 0
Identify cost percent = 0
Disenchant cost percent = 0
Rune service cost percent = 0

[Resources]
Material cost percent = 100
Gold cost percent = 100
Rune cost percent = 100
Shard cost percent = 100
Token cost percent = 100

[Refunds]
Refund multiplier = 1
Reroll credits per marked effect = 1
Temper credits per marked effect = 1

Cost percentages range from 0 (free) to 100 (native). Each ingredient costs ceil(native amount × operation percent × resource-group percent / 10000), with one final rounding step. For example, reroll at 50% plus gold at 50% charges 25% of the native gold amount; gold at zero removes gold without removing material costs. An operation at zero remains free regardless of group settings. Set an operation to 100 to control its price entirely through resource groups.

Gold, rune, shard and token groups have configurable comma-separated exact prefab-name lists in [Resources]. Defaults include Coins/Gold, six Runestone rarities, six Shard rarities, and ForestToken/IronBountyToken/GoldBountyToken. Unlisted prefabs (including dust, essence, reagents and ordinary materials) use the material group. Lists are case-insensitive; overlaps resolve in gold → rune → shard → token order. Add modded currencies or ingredients to the appropriate list. Display names are not used for classification. These rates cover recipe/service ingredients; consuming a selected source rune remains native.

Displayed requirements, affordability and actual payment use the same adjusted cost path. Shared Epic Loot recipe objects and synchronized configuration are never edited. Cost settings affect spending only. They never reduce crafting, quality-upgrade, enchant or modification recycling refunds. Refunds read the current native Epic Loot recipe before this add-on's discounts. For example, a recipe worth 5 dust and 1 runestone refunds 5 dust and 1 runestone even if you spent zero to enchant it.

Augment and temper credits use the full native recipe, including when the operation was free. Additional marked augmented slots also receive the standard native extra-slot fee schedule, even if the spending fee was removed. Only the separate [Refunds] credit counts and refund multiplier control these credits. Credits remain estimates based on surviving markers, not a transaction history. Epic Loot does not record repeated attempts, erased markers or actual historical payments. Repeating a reroll on the same effect does not add another marker or refund credit. A temper marker can be erased by later rerolls. These refunds deliberately can exceed what you paid; crafting/enchanting cheaply and recycling can create resources.

Multiplier range: 1–10; credit ranges: 0–100. Higher values intentionally grant extra resources. Socket contents are never multiplied.

To restore native enchanting, set all six operation percentages and all five resource percentages to 100, Remove additional augment fee = false, and Guaranteed temper success = false. To disable the whole add-on, set Enabled = false and restart.

Multiplayer and client-only installation

Install on each playing client that wants these features. This add-on requires no server installation, custom RPCs, custom items or custom item metadata. It operates on Epic Loot's local crafting/inventory paths; normal Epic Loot/Valheim serialization carries modified equipment when saved, traded or dropped. It adds no network version handshake.

Settings are local and not server-enforced. A client without Recycler uses native rules. Installing only on a dedicated server cannot alter a player's UI. Agree on settings with other players. Epic Loot itself and other mods still have their own multiplayer installation/version requirements; server policies or other mods can impose additional restrictions.

No in-game solo, hosted multiplayer or dedicated-server session has been run for this release. Client-only multiplayer is the implementation design, not a claim of completed live testing. Use the acceptance checks below before valuable gear.

See MULTIPLAYER.md for the per-feature call-path audit, limits and two-client acceptance procedure. Local overrides cannot unlock server-disabled features, grant permissions to third-party inventory providers, or enforce a common economy across clients with different refund rates.

Recovery boundaries

  • Full refunds cover non-stackable weapons, shields, tools, armor, cloaks and utility gear with an unambiguous single-output crafting recipe. Every quality step uses the actual recipe calculation.
  • Missing costs/material prefabs block full-refund sacrifice instead of destroying gear for a partial payout. Equipped/hotbar exclusions and Epic Loot API sacrifice vetoes remain.
  • Trophies, stackables, materials, unidentified items and gear without a supported crafting recipe are protected from Sacrifice destruction. They stay in inventory. Identified enchanted inputs can recover their magic materials through Disenchant if native Epic Loot eligibility and a matching enchant recipe allow it. Alternative-ingredient, batch-output and upgrade-only recipes are also retained rather than broken down.
  • Refunds use current full native recipes, even for looted, free-crafted or free-enchanted equipment. They do not reconstruct the item's original recipe, old configuration or spending history.
  • Hover/select equipment in Sacrifice for the refund preview. Preview and payout share the same calculation. Random double yield is suppressed for batches containing full-refund gear; native material/trophy-only batches retain their bonus.
  • Disenchant keeps the original item and strips its enchantment. It returns the full native enchanting recipe and configured modification credits independently of spending discounts, with no crafting/quality refund. The guaranteed recipe replaces the native random bonus; native socket recovery remains and is not paid twice. Enchanted stackable inputs are processed as a whole stack and refunded per unit. Source runes/shards and other native eligibility exclusions remain.
  • Socket-adding consumables, source runes consumed by native rune operations, locked/break-only socket restrictions, table construction/upgrades, MidgardPlus marks and unrelated crafting/conversion fees remain native. Recoverable socket items are returned separately, never duplicated. These native consumables can still be lost: this is not a universal zero-loss guarantee.
  • Free guaranteed over-tempering can raise effects beyond their normal range through repeated use. This intentionally changes balance substantially.

Validation

Critical hook installation rolls back as one unit if the supported assembly shape changes. Look for EpicLootSacrificeRecycler enabled and local enchanting settings in BepInEx/LogOutput.log. Failure logs Could not install refund hooks and leaves native behavior active.

1.4.3 validation: 62 calculation/compatibility/config-migration tests; 17 Harmony smoke checks on the actual Mono runtime shipped with the local Valheim installation; 124 assembly/call-path checks against installed Epic Loot 0.15.4. The renamed assembly's production Disenchant hooks are also checked on game Mono with null input, including installation and removal. Previous 1.4.2 tests reproduced/fixed the old invalid-IL startup error. Live inventory transactions and multiplayer still require in-game validation.

See INTEGRATIONS.md for the read-only refund API and exact third-party status. Automatic MidgardPlus/SeneaL adapters are prepared in source but not enabled; approval review rejected the automatic transaction/extraction integration. Installing this release does not change those mods' payouts.

Before valuable gear, test in solo, a hosted world and a dedicated-server world with Recycler absent from the server:

  1. Enchant inexpensive quality-upgraded gear; compare Sacrifice preview with actual crafting/upgrade/enchant material returns.
  2. Augment multiple slots repeatedly; verify operation/group-scaled fees and full native modification credits on sacrifice, including at zero spending rates. Set every operation and resource rate to zero and verify preview/payout still contain full native recipe amounts.
  3. Temper an eligible effect repeatedly, including beyond its normal range; verify 100% display, improvement each time, no currency/material consumption and preserved sockets.
  4. Identify, disenchant and use rune services; verify free fees with native source-item consumption. Confirm disenchant never grants base crafting materials.
  5. Set percentages to 50 and 100, restart and compare previews with consumption. Disable Recycler and verify native costs/chances resume.
  6. Transfer modified gear to a player without Recycler, reconnect and reload; verify effects/sockets survive and that player's crafting rules remain native.

Build and tests

dotnet build .\Source\EpicLootSacrificeRecycler.csproj -c Release `
  -p:GameDir="C:\Your\Valheim" -p:BepInExDir="D:\YourProfile\BepInEx"
dotnet build .\Source\tests\RefundEngineTests.csproj
& .\Source\tests\bin\RefundEngineTests\Debug\net48\RefundEngineTests.exe
dotnet build .\Source\tests\VerifyCompatibility.csproj `
  -p:BepInExDir="D:\YourProfile\BepInEx"
& .\Source\tests\bin\VerifyCompatibility\Debug\net48\VerifyCompatibility.exe `
  "D:\EpicLoot.dll" "C:\Your\Valheim\valheim_Data\Managed\assembly_valheim.dll"

Build HarmonySmokeTests.csproj with the same BepInExDir property and run its resulting .NET Framework 4.8 executable on Windows. The older game Harmony library does not initialize under .NET 8. Game/reference assemblies are not redistributed. Install only the plugin DLL and config.

For the additional Mono test, build Source/tests/UnityMonoHost.csproj (a standalone .NET 8 test driver, not part of the plugin) and run its DLL with the Valheim directory and the smoke-test EXE path. It embeds the installed game's Mono DLL and uses the game's managed libraries; it does not start Valheim or open a save. ActualDisenchantHookTests.csproj additionally tests the real production hooks against a supplied Epic Loot DLL using null input only. The standalone process cannot bind Unity engine internal calls; warnings about UnityEngine.Random or an "out of sync" UnityEngine library in that process reflect the absent Unity host, not a detected broken game install. No player or world data is read or written by these tests.

To uninstall, close Valheim and remove the plugin folder. Native behavior resumes; modified gear and ordinary returned materials remain.