"sort by level"
are items in this game categorizable by level? i feel like we could use a sorting mechanism in various crafting (and vendoring) windows that would allow us to quickly figure out what's worth using/saving, and what can be sold or whatever.
|
Quote:
We can only apply filters. It is a somewhat odd limitation, but afaik it is the one that is there. |
so the only "hack" for this would be to manually detect level values, and setup a filter for that?
i don't get why ZOS didn't include this... :confused: |
This add-on proves that the inventory IS sortable, and probably even does what you're looking for.
|
i don't quite see what MrPlow actually does, though?
|
From the description and images I think it sorts items in inventory in a more natural way. Like swords always before bows and staves, and such. I don't use it, but many times cursed why I have gloves made from various materials scattered all over my bag :D That's how it could be useful.
Anyway, when you asked the question, I took it as an excersise. The UI code is probably a mess, I was just picking pieces to make it work, but I managed to add a "Level" sorting header to the inventory, and with the way I've overridden sortFn, you can replace orderByItemLevel with custom comparison function. Lua Code:
|
Quote:
|
I'm using AdvancedFilters, too. It doesn't conflict with filters, only sorts items that are in the (filtered) list. I noticed sometimes when I change filter category, the sort order resets to "Name", but so far I was unable to reproduce it reliably, it appears randomly.
The only real hack in my approach is this: They use SortHeader to set currentSortKey="somestring", then pass this string along with a table describing how various keys are compared to ZO_TableOrderingFunction. I use a function as the sort key, not a string, and in sortFn check the type - if it's a function, call it, otherwise fall back to the original method. I admit I was a bit afraid it wouldn't work, but after scanning the sources didn't find any other place that would rely on sortKey being a string ;) |
You may find libSort useful if you plan on moving forward with the code.
|
|
I've actually already added filters for item level ranges to the drop down menus in Advanced Filters. I just have to wait to publish until 1.3 goes live as I'm using some of the new item link functions to get information.
I actually stumbled across this thread while I was looking for some tips on sorting the inventory by item quality. I'll probably pm you when I get home from work, merlight, as you're taking much of the same approach I was before I tried using libsort:) |
All times are GMT -6. The time now is 08:18 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI