Project Zomboid

Project Zomboid

Reorder Containers - Backpack Orders [B42/41]
Eurymachus 9 月 27 日 下午 5:33
1
[42.12] Fixes
I was able to fix the issues brought in by the inventory changes in 42.12

Below are the fixes that worked for me.

File locations:
Steam\steamapps\workshop\content\108600\2901962885\mods\ReorderContainers\42.0\media\lua\client\ReorderContainers

Use this link to download the fixed files and replace them:
https://filebin.net/qa2a64xju10lchqb

Alternatively you can follow the steps below:



Fix #1
In ReorderContainers.lua
Replace all the functions from here:
https://pastebin.com/HknfCJCM

Fix #2
In ReorderContainers_InventoryPage.lua
Replace:
local function isButtonValid(invPage, button) return button:getIsVisible() and invPage.children[button.ID] end
With:
local function isButtonValid(invPage, button) local panel = invPage and invPage.containerButtonPanel return button:getIsVisible() and panel and panel.children and panel.children[button.ID] ~= nil end



And replace:
ISInventoryPage.applyBackpackOrder = function(self) local playerObj = getSpecificPlayer(self.player) local buttonsAndSort = {} for index, button in ipairs(self.backpacks) do if isButtonValid(self, button) then local sort = 1000 + index local targetModData, sortKey, parent = ReorderContainers_Mod.getTargetModDataAndSortKeyAndParentObject(playerObj, button.inventory) if targetModData then sort = targetModData[sortKey] or (1000 + index) end table.insert(buttonsAndSort, {button = button, sort = sort}) end end table.sort(buttonsAndSort, function(a, b) return a.sort < b.sort end) for index, data in ipairs(buttonsAndSort) do data.button:setY((index - 1) * self.buttonSize + self:titleBarHeight() - 1) end end
With:
ISInventoryPage.applyBackpackOrder = function(self) local playerObj = getSpecificPlayer(self.player) local panel = self.containerButtonPanel -- buttons live here now local buttonsAndSort = {} for index, button in ipairs(self.backpacks) do if isButtonValid(self, button) then local sort = 1000 + index local targetModData, sortKey = ReorderContainers_Mod.getTargetModDataAndSortKeyAndParentObject(playerObj, button.inventory) if targetModData then sort = targetModData[sortKey] or (1000 + index) end table.insert(buttonsAndSort, { button = button, sort = sort }) end end table.sort(buttonsAndSort, function(a, b) return a.sort < b.sort end) -- Y coordinates are relative to the PANEL (top of the button list), -- so don't add page:titleBarHeight() anymore. for index, data in ipairs(buttonsAndSort) do data.button:setY((index - 1) * self.buttonSize) end -- Ensure the panel knows the tallest child (vanilla usually handles this, -- but it doesn't hurt to keep layout sane while dragging) if panel and panel.prerender then panel:prerender() end end
最后由 Eurymachus 编辑于; 9 月 30 日 下午 12:46
< >
正在显示第 1 - 15 条,共 19 条留言
Арешки 9 月 28 日 上午 10:41 
The guy is good :lunar2019coolpig:
Philinator 9 月 28 日 上午 11:14 
Thanks for this - maybe fork for us??
I’m playing on steam deck and doing this is near impossible on it.
Eurymachus 9 月 28 日 下午 1:20 
引用自 Philinator
Thanks for this - maybe fork for us??
I’m playing on steam deck and doing this is near impossible on it.
Hi Phil,
I much rather leave this mod in the capable hands of Notloc. I'm sure it'll be updated when they're able. :)
EastDawn 9 月 28 日 下午 4:54 
@Eurymachus Please tell us how to fix the other two mods, equipment UI and reorder the hotbar. I don't think the original mod Author will ever come back at this point.
Eurymachus 9 月 28 日 下午 7:22 
引用自 EastDawn
@Eurymachus Please tell us how to fix the other two mods, equipment UI and reorder the hotbar. I don't think the original mod Author will ever come back at this point.
Hi EastDawn,

I don't have any issues with Eq UI. I don't use the hotbar mod but I wager that it stems from the same error.

What makes you say Notloc won't be back?
EastDawn 9 月 29 日 上午 5:01 
@Eurymachus The mod last update was in December 2024. He's not responding to question or bug problems either. Well, who knows, he might be back, don't know when though. But we surely really appreciate it if someone tells us how to fix the mod, instead of deleting this wonderful mod from our load order.
Eurymachus 9 月 29 日 上午 9:27 
Well I'm happy to take on another mod, but I'm definitely not about to take it on if the developer is still active. :D
I don't quite get the fix #1
Like I replaced all of it below the first section with that file but it doesn't work still
Am I not supposed to do both of them, I mean I see it says fix #1/2 and not step #1/2 but I figured I'd need to do both

I'm gonna undo the fix #1 on mine and see if it works but I wanted to comment to ask either way
(A fork would be awesome for real though, even if it's just labeled temporary, your last comment didn't pop until I posted)
最后由 Smiley Face Killer 编辑于; 9 月 29 日 上午 9:35
Madz 9 月 30 日 上午 10:23 
Same issue as Smiley Face Killer, tried both individually, tried both together... Reloaded new game reloaded MOD, still doesn't work for me
Madz 9 月 30 日 上午 11:15 
I have to say it's nuts this hasn't become a default feature... When you've got 70 crates full on a 2 year save... Bonkers! Just going to wait for someone to re-release or better this mod
Eurymachus 9 月 30 日 下午 12:32 
Give me a minute going to host the files
Eurymachus 9 月 30 日 下午 12:46 
Here are the hosted files:
https://filebin.net/qa2a64xju10lchqb

I also updated the Discossion post to reflect.

Just download the files in the filebin and replace them (Build 42 only)
Philinator 9 月 30 日 下午 8:04 
引用自 Eurymachus
引用自 Philinator
Thanks for this - maybe fork for us??
I’m playing on steam deck and doing this is near impossible on it.
Hi Phil,
I much rather leave this mod in the capable hands of Notloc. I'm sure it'll be updated when they're able. :)

Bummer
guidjelegamba 9 月 30 日 下午 8:57 
Well done, buddy!! TY!!
Madz 10 月 1 日 上午 7:47 
引用自 Eurymachus
Here are the hosted files:
https://filebin.net/qa2a64xju10lchqb

I also updated the Discossion post to reflect.

Just download the files in the filebin and replace them (Build 42 only)


Many thanks bro - that has worked now! I guess I wasn't following the prior instructions properly. You're a legend. I only play with this MOD and has been read MOD.
< >
正在显示第 1 - 15 条,共 19 条留言
每页显示数: 1530 50