Mods / Held Item to Backpack

Tags: #QoL
Author: zatrik
Side: Both
Created: Dec 22nd 2024 at 8:27 AM
Last modified: Dec 24th 2024 at 7:02 PM
Downloads: 475
Follow Unfollow 12

For testers (for Vintage Story 1.20.0-rc.6, outdated):
heldtoinventory_1.0.2.zip  1-click install


I made a quick mod that transfers your held item to your backpack or offhand and stacks it if possible. The keybind for backpack is default to b and the keybind for offhand is v but is configurable in the settings. This should work on servers as well as single player.

1.0.2 Update:

  • Fixed server sync with offhand swapping
  • When inventory is open, you can now move or swap active item or offhand item with hovered inventory item

1.0.1 Update:

  • Added a keybind to swap held item with offhand or move offhand to active slot if it's empty

Mod Version For Game version Downloads Released Changelog Download 1-click mod install*
1.0.2 295 Dec 24th 2024 at 7:02 PM heldtoinventory_1.0.2.zip 1-click install

1.0.2 Update:

  • Fixed server sync with offhand swapping
  • When inventory is open, you can now move or swap active item or offhand item with hovered inventory item
1.0.1 93 Dec 22nd 2024 at 9:59 PM heldtoinventory_1.0.1.zip 1-click install

Added a keybind to swap held item with offhand or move offhand to active slot if it's empty

1.0.0 87 Dec 22nd 2024 at 8:44 AM heldtoinventory_1.0.0.zip 1-click install

Initial Release


10 Comments (oldest first | newest first)

💬 quartzar, Oct 25th at 1:00 PM

Would love this mod to get updated, it's my favourite QoL mod. zatrik do you think you'll have spare time to do this anytime soon? Otherwise I might have a go at updating and patching the code to fix the bugs mentioned by ptrk

💬 ptrk, Jun 24th at 8:56 PM

Unsure if this mod is still maintained (it's extremely useful, btw), but there's a frequent bug that is often frustrating to deal with:

Stackable items of similar items will combine into one stack of a singular item (the firstmost item in the backpack), which I will refer to as the "seed item", since it's seeding the properties. Most common issues include:

  • Fruit tree stems will all combine into the same stack
    • if you have a pear tree stem in your inventory (as the seed item), and held to backpack an apple (or cherry, or whatever) fruit stem, it just converts it into the pear stem and stacks it on top
  • Any pie of ANY kind will just convert to your first inventory type
    • If you have full pies in your inventory and stow slices, they all convert to full pies (great for if you want infinite, pie, but it's also cheat-y)
    • Raw pies of various types will converge to the first pie
    • Raw pies convert to cooked pies
    • If uneated sliced are pushed to an inventory with a partially eaten slice, they all become stacks of that partially eaten slice
    • spoilage is always set to the seed item, not average, minimum, or maximum value
  • Like pies, any spoil-able foodstuffs/hides will all stack with the seed item's spoilage 
  • These all work vice-versa, it just depends which item is the "seeding" item.
  • First partial stack of a heated metal ingot/plate/whatever will just convert to the seed item's temperature, instead of just combining to the average, or lowest temperature
    • This is pretty much the same as the spoilage for foodstuffs I mentioned
    • Kind of useful when stuff is cooling off too fast, but it's still cheating so I have a love-hate relationship with this variety of the bug

 

There are probably more examples, but I am sure this gives the right idea, plus there's probably infinite configurations of this bug you could create, so it's not practical for me to investigate every single variety since they all exhibit the same exact behavior.

 

Edit: Another bug I forgot about is that if you press the "to backpack" key but your backpack is full, the item is simply deleted.

💬 Endrin, Feb 8th at 7:17 PM

Is it possible to add a keybind to send offhand item to inventory? It would be nice to be able to clear offhand with a hotkey for 2h items.

💬 ProfCupcake, Dec 30th 2024 at 10:37 PM

How does the offhand keybind from this mod differ from the vanilla swap-hands keybind? 

💬 SamMadeMC, Dec 28th 2024 at 7:20 AM

I just came back from a Survival mining run carrying 4 leather backpacks filled (along with my main items bar) and realized that some of the items I was Shift+Clicking from killed mobs to my inventory just went... somewhere else I guess... They moved away from the mob's recovered inventory but I figured they were not matching any existing item in my inventory and just move to somewhere I couldn't recover them. Idk if there's a secret backpack where these items moved to but my inventory just doesnt show these recently acquired items. Before installing this mod today, the items would just not transfer to the player's inventory from a killed mob inventory if there was no more space available. And before you ask, no the items were not dropped on the floor either. They just go somewhere into oblivion. 

💬 quartzar, Dec 25th 2024 at 6:41 PM

I've been wanting a mod that does this for ages, this is awesome

💬 Boyarde, Dec 23rd 2024 at 3:16 PM

I'm not sure if this is intended behavior, but when I press B on an item (like a spyglass from the Spyglass mod) it places it into one of the 4 bag slots, when normally this is not possible.

I actually really think this is cool, and like being able to use those slots for "gear" type stuff, at least for roleplay sake. If this is unintended I think it might be worth keeping because it kinda feels neat to have them almost as pockets as well as for bags. Maybe have a different hotkey (shift-B) to do this intentionally.

💬 zatrik , Dec 22nd 2024 at 8:20 PM

I was thinking of also adding Held Item to offhand/Swap held item with offhand. Would anyone be interested in this as well?

💬 zatrik , Dec 22nd 2024 at 2:05 PM

It's both. Clientside for the keybind and request which is handed off to the server to move the items.

💬 MRGOOSE, Dec 22nd 2024 at 1:36 PM

is it client side?

 (edit comment delete)
Основной веб-сайт | Почтовый сервер | FTP сервер | Административная панель | API интерфейс | Content Delivery Network | Статические файлы | Ресурсы сайта | Изображения | Файловое хранилище | Блог | Интернет-магазин | Техническая поддержка | Справочная система | Документация | Форум | Новости | Загрузки | Демонстрация | Тестовая среда | Приложение | Медиа контент | Разработка | Промежуточная среда | Бета версия | Безопасная зона | Вход в систему | Панель управления | Портал | Система управления контентом