Tuercas-NEWDropSingleItem icon

NEWDropSingleItem

Drop/place a single item instead of the whole stack, split stacks in half and grab full stacks. Updated for Valheim 1.0.15.

Last updated 2 days ago
Total downloads 25
Total rating 1 
Categories Mods Utility AI Generated
Dependency string Tuercas-NEWDropSingleItem-1.3.4
Dependants 0 other packages depend on this package

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2350 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.2350

README

NEWDropSingleItem

Inventory shortcuts for Valheim (1.0.15). Right-click to place or drop a single item instead of the whole stack, grab or drop half a stack with Shift + Right-click, and merge matching stacks with a double-click.

Rebuilt for the current game version from TechGuard's "Drop Single Item" (via cjayride's Valheim 1.0 fork).

Features

  • Place 1 item - Pick up a stack and right-click an empty slot (or a matching stack) to place a single item. The rest of the stack stays on your cursor, so you can keep placing items one by one.
  • Drop 1 item - Right-click outside the inventory grids while dragging to drop a single item on the ground. The rest stays on your cursor.
  • Grab half a stack - Shift + Right-click on a stack (without picking it up first) to grab exactly half of it onto your cursor. Odd quantities round down.
  • Drop half a stack - Shift + Right-click outside the inventory grids while dragging to throw half of the held stack on the ground. The rest stays on your cursor.
  • Grab a full stack - Double-left-click a stack to merge every matching stackable item from your inventory and the opened container into it, then pick the whole merged stack up on your cursor to place it wherever you want.

Installation

  1. Install BepInExPack Valheim (5.4.2350 or newer).
  2. Drop NEWDropSingleItem.dll into your Valheim/BepInEx/plugins folder.
  3. If you have an older DropSingleItem.dll installed, delete it so the two mods do not conflict.

Configuration

A config file is created at BepInEx/config/NEWDropSingleItem.cfg after the first launch.

  • InventoryUseItem (default: Mouse1): the key used to use/consume/equip an item in the inventory (Mouse1 = right mouse button). If you set this to anything other than Mouse1, you no longer need to hold Shift to grab half a stack with right click.

Compatibility

  • Client-side only: neither the host nor other players need this mod.
  • Tested on Valheim 1.0.15 with BepInExPack Valheim 5.4.2350.

Technical notes

  • Every Harmony patch is applied individually with error isolation, so a single failed patch can never disable the rest of the mod.
  • Split/grab operations use the game's Inventory.MoveItemToThis, so items are never flagged as "cheated".
  • Private game members are accessed through reflection (System.Reflection); no extra libraries are required.
  • A transpiler on InventoryGui.UpdateItemDrag keeps the dragged stack on your cursor while right-clicking.

Building from source

Requirements: .NET SDK (the project targets net480 and references the local Valheim installation).

dotnet build -c Release

The project references E:/Steam/steamapps/common/Valheim (see valheim.targets) and the Unity modules in valheim_Data/Managed. To auto-copy the build output to your plugins folder, build with -p:DeployToPlugins=true.

License

GPL-3.0 (same as the original mod).

Credits: TechGuard (original "Drop Single Item"), cjayride (fork for Valheim 1.0), NEWDropSingleItem (1.3.x maintenance for Valheim 1.0.15).