Project Zomboid

Project Zomboid

493 ratings
Unpack
2
3
4
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
689.054 KB
Sep 30, 2020 @ 9:10pm
Jul 13, 2022 @ 3:41pm
15 Change Notes ( view )

Subscribe to download
Unpack

Description
Unpack adds some quality of life features to item management. At a high-level they are:

  • Moving duplicate items from your inventory to nearby containers automatically with a single button press. Timed actions for item transfer will be triggered as normal.
  • Moving items from your inventory to nearby containers based on category and the percentage of items of a given category in the container.
  • Inventory and Loot panel context-menu options to move selected items between equipped containers (no more drag-and-drop needed).
  • World object context-menu to unpack a specific equipped bag to a specific world container (i.e. only move items from my backpack to this cupboard)
  • Item Category customization for "Base" items to better facilitate automatic organization by category.
  • Bindable button to control "unpack"ing to nearby containers (default is "RSHIFT"...that is what I use!).
  • New Menu Options Tab that allows you enable/disable and configure category configurations (you can effectively disable all features of this mod, including item category renaming).
  • Localization setup - currently everything should work, but will come out in English (US) until translated...there are a few exceptions that already use vanilla PZ localized text.

Item Transfer Logic Details - Hitting the bound "Unpack" key
When hitting the bound button to unpack, the mod will look at nearby containers and move duplicate items in your inventory to them. Nearby containers are the same containers you can see in your loot panel (so anything the game considers within reach). Your inventory includes your main inventory and any equipped containers in your primary, secondary or back slots. The mod will not consider items that are favorited, equipped or in your hotbar. The floor is never considered.

If a container with a duplicate item in your inventory cannot be found, the category percentage logic will apply. This is best described with an example. Let's say a cupboard has 10 knives, and a can of tuna. First, note that the mod will consider a stack of items as one item for that particular category. So the mod would calculate that the container is:
  • 50% - Weapon (the 10 knives)
  • 50% - Non-Perishable (the 1 can of tuna)

The category drop-downs in the mod options then govern at what percent of the container the mod should transfer items of a matching category. If I had another weapon in my inventory, my drop-down for "Weapon" would need to be set to at least 50% for the mod to move it to the cupboard in our example.

Finally, the mod will only calculate these percentages if there are enough items in the container (again, where a stack is considered 1 item for that item's category). This count is determined by the "Count for Container Percentage" setting in the mod options. Setting this to "Off" will disable moving items by category altogether. Items will still be transferred if they are duplicates by name even if this if disabled.

Quirks
  • The mod will even move items from bags in your equipped container if there are items to move, but only one bag deep. Be careful, as the mod will drop the bag on the ground to transfer items. This is the fastest way to transfer items from a bag that is not equipped (the game 100% allows this). Just keep in mind that you may have dropped a bag if you move or otherwise interrupt the transfer.
  • I have seen "Money" show up as a category in the Main Menu, but never in game. It does not always appear in the main menu, and I get the impression that something in PZ itself is updating this items category during start-up (there seems to be a race condition as to who changes it first)??
  • The mod tries to be "polished" and will say "items" when something is plural in context-menu options. If you click on the top level of an item stack, the mod sees this as a single item in the context-menu text (even though it correctly sees and will move the entire stack you selected).
  • Right-clicking on a world container to unpack to it specifically ...technically allows you to see if that container has items in it that are also in your inventory (by name). I attempted to only add this context option for "explored" containers...but PZ tells me a container has been "explored" the moment it is within view. I tried working with only containers you have looted instead, but then this required you to physically loot at least one item from a container before it would be considered by the mod. Maybe I'm misunderstanding the "isExplored" concept in code, but it always being true for containers within view seems broken based on my expectation (which is based on a vacuum of thoughts in my own head lol).

I have only used and tested this in B41.

If you've gotten this far, thanks for reading! I want to help you have the most fun with PZ as possible, or at the very least not ruin your experience for trying to use my mod(s). Don't hesitate with bugs, question, comments or concerns. I will address as warranted.

Tags:B41,Interface,Tweak,QOL

Workshop ID: 2244486781
Mod ID: TA_UNPACK
Popular Discussions View All (4)
14
Mar 24, 2022 @ 7:17pm
PINNED: Translations
ThereforeAliens
2
Sep 9, 2021 @ 2:51pm
Help understanding transfer logic
bikinihorst
0
Jul 9, 2022 @ 10:04pm
PINNED: Bugs
ThereforeAliens
192 Comments
Heisenberg Feb 9 @ 9:51pm 
Mod works completely fine in 2024 but for some reason the default isn’t working as expected so I changed to my own key button and worked in case you have similar problems.
iaso2h Jan 5 @ 1:04am 
Doesn't work in my case. I played on 41 build and had this mod placed in the last position in the load order list(with the highest priority), but to no avail.
minduboy Nov 5, 2023 @ 11:37am 
Is this the mod that adds the "stock [container] from [bag]" command to the menu? If so, please, please, please, IGNORE corpses or small containers. ** IF ( container:get_capacity() < 10 || container:get_name() = "corpse" ) THEN return; ***
donut Apr 3, 2023 @ 10:15pm 
Any idea how i can ignore corpses? Makes it impossible to rebuild walls if there's tons of corpses around.
Nepenthe Mar 30, 2023 @ 8:51pm 
Great mod, thank you for saving me a lot of time when I return home after a long day scavenging!
Dan Mar 8, 2023 @ 4:31am 
Hi, is this still working with the current build? only mod installed and enabled, fresh game and doesnt seem to work. thanks
Grenden Mar 2, 2023 @ 7:39pm 
Hello! This is an excellent mod.

I've seen that if you stand on a big pile of corpses and you right-click on them, the menu that pops up gets flooded with "Stock corpse with..." options. Can you add an option to the config menu to ignore corpses? I see there's an option for ignoring mannequins. I believe a similar option for corpses would solve this issue. Thanks!
BlackWater821 Jan 13, 2023 @ 11:59pm 
@Author

I don't see any "Unpack.ini" in your Mods folder. Not sure what else needed to "edit" if the files you've mentioned basically non-existence.
BlackWater821 Jan 13, 2023 @ 11:51pm 
@author

Yeah,127. Not 1270. I pretty sure there is no "mods conflicts" applied in my case.
Is ok. Thanks tho )))
ThereforeAliens  [author] Jan 13, 2023 @ 11:38pm 
There are 127 mods in your link, lol. You can't delete a file until I check? No offense, but GL, dude.