Project Zomboid

Project Zomboid

More Loot Settings v1.3.6 [41.78]
Compatibility with sorting and weapon mods
Hey. Wanted to ask what would I need to check over the mod files to make it compatible with sorting mods and weapon mods like VFE.

I checked the files and saw some references to better sorting with its new categories. If instead of just one category we had a bunch of separate categories (like Better Sorting actually has now for clothing), would we just need to add those different categories to the references?

For example, this is how it currently looks:

if itemCategory and itemCategory == "VehicleMaintenance" or itemCategory == "Mechanics" -- category from better sorting

In case we had more than one mechanics category would it just be a case of doing it like this?

if itemCategory and itemCategory == "VehicleMaintenance" or itemCategory == "Mech" or itemCategory == "MechAcc" or itemCategory == "MechArm" or itemCategory == "MechBat" (etc.)

Would it be possible in case we have a bunch of categories, that all start the same, to do instead something like this?

if itemCategory and itemCategory == "VehicleMaintenance" or itemCategory contains("Mech")

Regarding weapon mods like VFE, if they have custom sorting, as long as we include those categories in the MLS code above it should be fine right?

Thanks!
< >
Viser 1-8 af 8 kommentarer
Champy  [udvikler] 23. sep. 2023 kl. 5:39 
Just seeing this now. I haven't checked on this mod in a while.

Best thing to do would be having a category table for each category like this :

mechanicCategories = { VehicleMaintenance = 1, Mech = 1, MechAcc = 1, MechArm = 1, MechBat = 1, }

And then checking like this :
if itemCategory and mechanicCategories[itemCategory] then (etc.)

Which requires going through all BetterSorting categories to set up all the tables.

I'm currently looking at everything that needs updating, I will update the mod in the coming days.
Jacques the Crab 24. sep. 2023 kl. 10:09 
Thanks for the reply. Might check what you said with some categories I have.

Looking forward to the update.
Champy  [udvikler] 24. sep. 2023 kl. 10:50 
I updated the mod, but I didn't find the categories you mentioned. Could you link the relevant mods that uses those item categories ?
Champy  [udvikler] 24. sep. 2023 kl. 11:22 
All right man, I updated the mod again
Jacques the Crab 24. sep. 2023 kl. 12:01 
Oh nice! Many thanks for the attention.
RatKing ッ 12. maj kl. 1:36 
Oprindeligt skrevet af Jacques the Crab:
Oh nice! Many thanks for the attention.
was this ever figured out? I'm not understanding the convo quite clearly but I'm trying to make it work with VFE with restricting loot from spawning in houses but it seems to not do anything involving vanilla firearms. it wont stop them from spawning in houses even though it gives the option to.
Hi, to be honest I can't quite remember how I eventually did it and I can't find the files anymore. VFE was updated somewhat recently right? Maybe they changed how it interacts with vanilla firearms? I wouldn't know right now because I've taken a break from PZ for a while but from what I remember, as long as the categories are included in this mod's code they should be affected.
< >
Viser 1-8 af 8 kommentarer
Per side: 1530 50