Project Zomboid

Project Zomboid

30 ratings
Priority Sort
   
Award
Favorite
Favorited
Unfavorite
Tags: Mod
File Size
Posted
Updated
30.459 KB
Aug 22, 2015 @ 1:46pm
Aug 22, 2015 @ 1:50pm
2 Change Notes ( view )

Subscribe to download
Priority Sort

Description
This mod alters how the "Category" button in inventory panes behave. When you click this existing "Category" button, it'll now cycle between various categories, and push any item belonging to that category to the top of the list. Any other item will first be sorted by alphabetical category order, then by name order. Double sorting the inventory, but first prioritizing the selected category in other words.

Neither overwrites any vanilla files nor affects your saves; only alters the UI to include a custom sort function.

TL;DR: A simple mod that alters the sorting function of the Category button in containers. Clicking multiple times will push a specific category to the top, and sort the rest in an alphabetical order.
10 Comments
Redeye Oct 24, 2019 @ 4:47pm 
is this still needed/work?
Acecool Oct 24, 2015 @ 7:37pm 
Sorry, I wasn't talking about a mod called extended categories. I was referring to making it more dynamic so it doesn't need to be updated every time the game updates, ie dynamically load the categories list from the items or from a table containing the categories then all you need to do is provide the function to sort. You could even take it a step further by simply looking at what items are in the container and only cycling through those.

I saw you commented out those other categories ( I'm uncommenting those ).

If you want to add compatibility for other mods, simply make it dynamic and look at the option of only cycling through categories of items that are in the current container. Another option to prevent accidentally going by a category you want to select is (if the game supports this) to get the x/y coord of the click on the button along with the width.. If the click is on the left half, go back and vice versa.

Add me on Steam if you want, I've written over 500 Lua tuts.
lyravega  [author] Oct 20, 2015 @ 5:11am 
@Acecool, I am aware of that, and a few other similar issues (like those that happen when you change the active container), but I left them there to avoid hooking (overriding) more of the game.

About extended categories, someone pointed it out on the forums a while back, and as far as I know extended categories gets the job done in a different way which makes it a bit incompatible with this little thing. Also, I defined the categories by hand, and omitted some base categories (like weaponpart and ammo) depending on rarity, and only kept the most important ones on the cycle table.

I thought about making this compatible with extended categories, but having to cycle through a lot of categories would make this mod useless. That said, I may take a different route and change the container window a little in order to provide more accessibility and support for extended categories. That'd be a completely different mod though :)
Acecool Oct 20, 2015 @ 3:31am 
I'm having issues with this, minor though... When I re-sort via type, the category still appears as the previous category sort I used.

Also, it doesn't work for extended categories, a simple fix is to delay loading the files ( ie way for an on loaded hook to fire ) before reading the categories table to see all of the available categories put in via mods or vanilla; then you'd likely never need to update the mod again unless the location of the table changes.
lyravega  [author] Oct 13, 2015 @ 5:10am 
Thank you too people!
Acecool Oct 13, 2015 @ 3:15am 
+1, essential.
Corona2172 Oct 5, 2015 @ 9:37pm 
NICE, thank you much!
ps3joelee Sep 17, 2015 @ 10:01am 
Will help me organise stuff better XD Thanks for the mod dude, and keep up the good work :)
lyravega  [author] Sep 9, 2015 @ 1:53pm 
Thank you too :)
Marc1314 Sep 7, 2015 @ 5:59pm 
its stupid they dont have this feature in-game!
thanks a lot man this is great.