Project Zomboid

Project Zomboid

149 ratings
Save Backpack Attachments
2
   
Award
Favorite
Favorited
Unfavorite
Mods: Build 41
File Size
Posted
Updated
146.920 KB
Apr 15, 2022 @ 7:19pm
Apr 15, 2022 @ 8:11pm
2 Change Notes ( view )

Subscribe to download
Save Backpack Attachments

Description
As I was creating the rucksack mod, it occurred to me I could use a similar method to store attached items within a backpack, and then reattach them once they were equipped. This is the result, though I'm certain it needs more testing. After you drop/unequip a backpack that has some attached items, the items will be moved to the backpack automatically. If you look within the bag, saved attachments will have a yellow icon next to them. If you re-equip this bag, those items will be reattached automatically.

Requirements
This mod has no direct requirements, but you will need a mod to give your game some attachments to save, like my Sleeping bags and attachments mod. However, any mod should work.

Known to work with these attachments
Let me know if you find more mods that work with this, and I will list them here.
Sleeping Bags and Attachments
Noirs Backpack Attachments
AuthenticZ
Attach Items to Backpacks

Notes
While all seems functional, the script does not care if putting the items inside the backpack will make it over it's capacity, which certainly could be used to store extra items within a bag, though limited to whatever they could attach to the pack. If you experience any problems with the mod, just let me know.

Another thanks to George Soros Gaming for taking his time to help me test this.



If you'd like to help me spend more time modding, consider buying me a coffee[www.buymeacoffee.com].


Workshop ID: 2795007896
Mod ID: SaveBackpackAttachments
25 Comments
aquelarrefox May 7 @ 7:20pm 
i have a frezzing caracter when i use mele with a firegun (dont move can be biten even with zombies doing animation), strange
3lfu84 Mar 23 @ 7:56am 
@Smokin' Joe sadly i have to remove this anyway ty for ur effort :steamthumbsup: i will wait for update :steambored:
Torque Mar 4 @ 10:59am 
Has anyone made a fix for this mod yet? =(
Rimurito Jan 2 @ 1:06pm 
All my items dissapear, so maybe this mod stoped from working or idk, i was using the vanilla alice backpack, noir atachment and brita weapons (no error or nothing the items just dissapeared) please check that i love this mod but that just happen :C
USER404 Aug 15, 2023 @ 6:22am 
Cannot get it to work with bedrolls
Dimm Jun 16, 2023 @ 9:16pm 
man this is exactly what i wanted, but scared of the bugs
FNQIAWE Jan 4, 2023 @ 5:55am 
This is an essential QoL mod but there seem to be a lot of incompatibilities
TimotheoBenjameo Dec 20, 2022 @ 6:52pm 
That's the error. Someone should make a patch if they can reorder the Hotbar mod, or if that is not possible, the author of reordering the Hotbar will give me a solution.
TimotheoBenjameo Dec 20, 2022 @ 6:49pm 
`attempted index: availableSlot of non-table: null
function: Add -- file: SaveAttachments.lua line # 25 | MOD: Save Backpack Attachments
Callframe at: setAttachedItem
function: attachItem -- file: ISHotbar.lua line # 362 | Vanilla
function: attachItem -- file: GEAR_BackpackExceptionException_Hotbar.lua line # 11 | MOD: G.E.A.R. C.O.R.E.
function: refresh -- file: ISHotbar.lua line # 523 | Vanilla
function: refresh -- file: ReorderTheHotbar_ISHotbar.lua line # 39 | MOD: Reorder The Hotbar
function: new -- file: ISHotbar.lua line # 798 | Vanilla
function: createInventoryInterface -- file: ISPlayerDataObject.lua line # 149 | Vanilla
function: createPlayerData -- file: ISPlayerData.lua line # 187 | Vanilla
java.lang.RuntimeException: attempted index: availableSlot of non-table: null
Deluxional Nov 21, 2022 @ 8:40pm 
Siri, remind me to reinstall this when it stops poofing everything.