You are viewing a potentially older version of this package. View all versions.
cjayride-RecycleItemsIntoParts-1.8.9 icon

RecycleItemsIntoParts

Fork of aedenthorn/DiscardInventoryItem. Recycle items into lesser parts. Drag, press [Delete], confirm Yes/No. Updated for Valheim 1.0.

Date uploaded a week ago
Version 1.8.9
Download link cjayride-RecycleItemsIntoParts-1.8.9.zip
Downloads 1541
Dependency string cjayride-RecycleItemsIntoParts-1.8.9

This mod requires the following mods to function

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

โ™ป๏ธ RecycleItemsIntoParts

Updated for Valheim 1.0.21

Recycle unwanted items into crafting materials with a simple Delete key shortcut.

A fork of DiscardInventoryItem by aedenthorn.

Thunderstore ยท GitHub


๐ŸŽฎ How to Use

  1. Select an item in your inventory.
  2. Press Delete.
  3. Review the materials you'll receive.
  4. Click Yes to recycle or No to cancel.

Press Escape or right-click to cancel, too.

โœจ What Can Be Recycled?

  • ๐Ÿชต Crafting materials
  • โœจ Epic Loot enchantment materials
  • ๐Ÿ’Ž Epic Loot Magic Shards
  • ๐Ÿช™ Coins
  • ๐Ÿ† Trophies
  • ๐Ÿ– Consumables

Each category can be enabled or disabled in the configuration.


โš™๏ธ Configuration

Launch the game once to generate the config file:

BepInEx/config/cjayride.RecycleItemsIntoParts.cfg

๐Ÿ–ฅ๏ธ Server Settings

ServerEnforced = true

Default: true

When enabled, everyone follows the server's recycling rules.

CJAYCRAFT: Must be true.

๐Ÿชต Resource Returns

ReturnResources = 0.40
ReturnResourcesMagic = 0.40
Setting Purpose
ReturnResources Percentage of crafting materials returned.
ReturnResourcesMagic Percentage of enchantment materials returned.

Default: 0.40 = 40%

Returned quantities are rounded. For example, 3 Wood returns 1 Wood.

โœจ Enchanted Gear

ReturnEnchantedResources = true
DowngradeEnchantRarity = true
MagicDustSoftener = true
  • ReturnEnchantedResources โ€” Recycle enchanted gear into magic materials.
  • DowngradeEnchantRarity โ€” Return materials one rarity tier below the item's rarity.
  • MagicDustSoftener โ€” Green magic items return 1โ€“2 Magic Dust.

CJAYCRAFT: Keep ReturnEnchantedResources = true.

๐Ÿšซ Optional Recycling Restrictions

Change these settings to control what players can recover.

Setting Default Effect
RecycleCoins false Allow Coins to be returned.
RecycleTrophy true Allow Trophies to be returned.
RecycleConsumables true Allow food and consumables to be recycled.
RecycleShards true Allow Epic Loot Magic Shards to be recycled.

CJAYCRAFT server settings:

RecycleCoins = false
RecycleTrophy = false
RecycleConsumables = false
RecycleShards = false

These restrictions help protect the server economy and custom recipes.

โœ… Confirmation Popup

RequireConfirm = true

When enabled, the popup shows the item and the materials you'll receive before recycling.

CJAYCRAFT: Keep this enabled.


๐Ÿ“ฆ Installation

  1. Install BepInEx.
  2. Install RecycleItemsIntoParts.
  3. Launch Valheim to generate the config.
  4. Adjust settings as needed.

For CJAYCRAFT, use the server settings listed above.

๐Ÿ“ฌ Contact

๐Ÿค– Development

The code was not AI-generated. AI was used to help verify compatibility with Valheim 1.0.21.

CHANGELOG

v1.8.9

  • Fixed startup crash (Harmony FieldRefAccess ArgumentNullException)

v1.8.8

  • Rechecked against Valheim 1.0.21 (Steam build 26249040)
  • Removed the Harmony postfix on InventoryGui.Update (hot path); recycle uses the plugin Update instead
  • Faster inventory tick: Delete is checked before any inventory work
  • Cached Valheim/EpicLoot field and method lookups instead of reflecting every recycle
  • Hovered slot is used first; expensive grid scans run only as fallback
  • Magic Dust lookup and inventory grids are cached while the inventory is open

v1.8.7

  • Verified against Valheim 1.0.21 (Release build, Steam build 26249040).
  • Updated BepInExPack dependency to 5.4.2360

v1.8.6

  • Default craft return is 0.40
  • ReturnResourcesMagic scales EpicLoot enchant mats after the rarity drop (5 dust at 0.40 returns 2)
  • Optional MagicDustSoftener gives 1-2 Magic Dust on green/Magic items; Rare+ stay one tier down

v1.8.5

  • Recycle confirm list shows each returned item's icon next to its name
  • Removed the hover-delete hint popup (it fired on every hover). Recycle is drag the item, then Delete
  • EpicLoot enchanted gear still returns downgraded enchant materials when enabled

v1.8.4

  • Hover + Delete checks every inventory grid slot under the mouse in screen space (including extra inventory mods)

v1.8.3

  • Hover + Delete follows the item tooltip under the mouse
  • If no item is held or hovered, Delete explains to drag the item first

v1.8.2

  • Hover + Delete uses the inventory slot under the mouse cursor (UI raycast)

v1.8.1

  • Yes / No are real colored buttons on the recycle window (not cloned hidden inventory buttons)
  • Hover + Delete uses the slot the pointer entered, not only a dragged item

v1.8.0

  • Recycle Yes/No is a small inventory window (not the full-screen Valheim pause popup)
  • Yes and No buttons work; Escape or right-click cancels

v1.7.9

  • Recycle confirmation is a Yes/No popup on top of the inventory, listing the item and parts you will get
  • Hover now uses the inventory cell under the mouse (no longer recycles slot 1 by mistake)

v1.7.8

  • Recycle preview and results show in the center HUD as one line (item + returned parts)
  • Optional top-left notifications: UseTopLeftNotifications = false by default
  • Hover + Delete uses the hovered inventory slot (not only a dragged item)
  • RecycleHotkey is read as Unity KeyCode Delete (stops BepInEx 'delete' keybind errors)

v1.7.7

  • Recycle works on a hovered item or a dragged item (Delete no longer requires a drag)
  • First Delete shows a confirmation with the item name and returned parts; press Delete again within 4 seconds to confirm
  • HUD messages list what is being recycled and what you get back
  • RecycleHotkey uses KeyCode.Delete so it registers in Valheim 1.0 / Unity 6

v1.7.6

  • Added togglable server-enforced config (ServerEnforced = true by default). Host/server recycle settings apply to clients; set false for per-player configs. Recycle hotkey stays local.

v1.7.5

  • Enchant materials are no longer doubled on upgraded items (quality loop)
  • Enchant returns drop one EpicLoot rarity (Legendary -> Epic). Magic rarity returns none
  • Default craft return is 25%. Amounts under 0.5 round to nothing, so 1 bronze returns 0 bronze

v1.7.4

  • Thunderstore version bump (1.7.3 was already published)

v1.7.3

  • Fixed enchanted gear recycling dropping the first craft material (for example a boar skirt returning essences but no hides) when coins were also in the EpicLoot enchant cost

v1.7.2

  • Recycling no longer returns Valheim 1.0 upgrade idols (for example Wooden Protection Idol)

v1.7.1

  • Fixed NullReferenceException when recycling (ObjectDB.m_items can contain objects without ItemDrop in Valheim 1.0)

v1.7.0

  • Updated for Valheim 1.0
  • Fixed Inventory.AddItem for the 1.0 signature (avoids MissingMethodException when returning recycled parts)
  • Trophy recycle option now matches ItemType.Trophy
  • Shard recycle option now uses RecycleShards instead of RecycleTrophy when deciding whether to delete shards
  • Updated BepInExPack dependency to 5.4.2350

v1.6.0

  • Removed terminal reload
  • Added compatibility for v0.217.46

v1.5.1 - 2024/4/7

  • Fixed reference to assembly files

v1.5.0 - 2024/4/7

  • Change for EpicLoot, committed by blradlof (verfied by "aedenthorn") on Dec 16, 2023. Line 86 changed EpicLoot.Crafting.EnchantTabController to EpicLoot.Crafting.EnchantHelper

v1.4.0 - 2023/7/9

  • Update for Mistlands. I've tested it with a combination of mods like EpicLoot, EquipmentandQuickSlots, ExtendedPlayerInventory, BetterArchery.
  • Note: The BetterArchery QUIVER (if enabled) breaks the game if ExtendedPlayerInventor is also installed.
  • I'll continue to test as I complete the rebuild of CJAYCRAFT modpack. As far as I can tell, this mod is working, but shoot me a message if you discover an issue before I get to play more :)