Jump to content

Recommended Posts

Zed Bag Patch

108600_screenshots_20160730214059_1.jpg

With the state this is in right now I am not posting a download link. However if you would like a workaround for your mod list let me know. I can make a custom workaround patch for you.

 

This is a patch to allow multiple mods to create Quick Access Containers in the players inventory!

I like to use both Quickbags, and US Military Gear but found out that it would only allow the mod that loaded last to have the quick access bags. This 'patch' is just a modified ISQuickAccessContainers.lua with the bags from both mods.

 

Once I have had a chance to test it and make sure it doesn't cause any weird issues with the mods conflicting then I will look at posting a download link.

 

Todo:

Spoiler

- Check for bugs (in proggress)

- add more mods (back burner)

- Look into having it load the list of bags from a table. Allowing for better compatibility with more mods (figuring out where to start ;-))

- Look into fixing the need to manually load the patch last(figuring out where to start ;-))

Known Bugs

Spoiler

-Mod has to be loaded after other mods that use ISQuickAccessContainers.lua  for it to work

Currently supported mods

Spoiler

 

Under the hood (code snippet)

Spoiler

...
	if item:getCategory() == "Container" and getSpecificPlayer(self.player):isEquipped(item) or item:getType() == "KeyRing" 
    or item:getType() == "Pouch" or item:getType() == "Holster" or item:getType() == "KnifeCase" or item:getType() == "FirstAidKit" 
    or item:getType() == "TacticalCase" or item:getType() == "ExtraBag" or item:getType() == "TacticalBelt" or item:getType() == "BananaBag" 
    or item:getType() == "TacticalBeltHol" or item:getType() == "TacticalBeltKni" or item:getType() == "TacticalBeltHolKni" 
    or item:getType() == "TacticalBeltKniKni" or item:getType() == "TacticalBeltHolHol" or item:getType() == "LegHolsterUCP" 
    or item:getType() == "LegHolsterMulticam" or item:getType() == "KnifeHolsterMulticam" or item:getType() == "KnifeHolsterUCP" 
    or item:getType() == "IOTVUCP" or item:getType() == "IOTVMulticam" or item:getType() == "PlateCarrierUCP" 
    or item:getType() == "PlateCarrierMulticam" or item:getType() == "DumpPouchUCP" or item:getType() == "DumpPouchMulticam" then
...

 

Let me know what you think and if you know any other mods you would like added to this patch.

NOTE: This is just a patch to get these mods working together. All credit for these mods goes to their respective creators and contributors.

This is kind of my first dive into PZ modding so I would really like feedback so I can learn more.

Edited by Leond
added known bugs

Share this post


Link to post
Share on other sites
3 hours ago, francogp said:

Of course that will work like that, but the problem is that you MUST use all those other mods you just write to work. That fix is not compatible with all mods in a generic way. That only adds compatibility for your specific mod combined with this. If I don't use your mod, this mod will not work at all.
The only way to support multiple containers, is that the DEVS add some function to register containers, without the need to override that core function, like we are doing right now. Other solution is that ALL mods use an intermediate API that allow us to register containers in a generic way.

Francogp brought up a good point here. I am going to continue looking for a more generic way for it to work.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...