Skip to content
Meridian 59
Feedback Open

Automatic chest and box updates and sorting

CoolMike ·

I’m making really good progress on my updates to the guildhall chests, rented room chests, and other containers. I think I want to add a sorting functionality but I don’t want to use the drag and drop method we use in inventory.

I think it would be better just to default to a two-layer sort. First, stackable items are up top and in alphabetical order. Second, non-stackable items are below but also in alphabetical order.

This will make the chest organization a little easier in my opinion but I want to hear some feedback before I make the effort of setting up the sort. Would you like your items to be sorted in some way or would you prefer to leave the chests chronologically / LIFO sorted?

If I get really adventurous I could create a button that sorts and unsorts the objects, leaving the chronological order in-tact but I am nervous this will be really difficult to accomplish. We will need to save the chrono order as a list somehow and revert back to that order when closing the container.

Please send feedback!

Discussion 12

playtoh

This would be fantastic, something I think a lot of people would wonder how they ever lived without. Admittedly I’ve been after this for a while (See my “Lootboxes - Add Default Ordering” post); but this looks even more robust.

playtoh

My feedback would be to have all windows lootboxes sort by default:
Items with stackable > Alpha
Items without stackable > Alpha

CoolMike Author

Thank you for the feedback. I probably won’t touch the regular look or get menus because the items reflect how far away they are from you. Contents of containers however will be sorted. Vaulted Items I believe can also be sorted similarly if we want.

CoolMike Author

Ok - I’ve looked into this a fair bit and sorting by the display name for an item is going to be pretty tricky. We can instead do this: Push all the number_items to the top (reagents, food, etc). They will be in reverse order that they were deposited into the box. After that all non-stackable items will show up. Do we think this is good enough?

If it is not I will think about other ways of sorting. For example, we could potentially sort objects by the filename of the lowest level in the class structure for each object. This would be strange for some items such as light jerkin which actually is called tanktop in the code.

Its strange that this is so difficult but the problem arises for a few reasons. 1. List_add_Sorted_item requires a comparison function we have to write from scratch for alphabetical sorting of objects. 2. Objects have properties such as ID (an integer I think) and Class_ID (also an integer? - not sure how to tell). I don’t think ‘name’ is one of those properties but I could be wrong.

Even if we do figure out how to identify the objects for sorting - the add_list_sorted_item routine requires some work on my end to apply and I think I’m close enough now to submit because perfect is the enemy of good.

Please let me know if simply pushing number items to the top is good enough. We will still be able to withdraw any amount of the stackable objects we select.

One last alternative: its easy to sort the whole list box alphabetically. If we do this number items and armor and weapons will all be sorted together but this might be some people’s preference.

CoolMike Author

Thanks!

CoolMike Author

One other potential automatic sorting would be in descending order of the number of each type of object the chest is holding. This would push number items to the top naturally and the number items would be presented in this descending order.

playtoh

I think if stackables go to the top, and the rest at least order themselves (in any way shape or form), thats a huge upgrade over what we have now

Meridian

@Morg

Keltic CenWulf

Yes, stackables which are the most utilized items at the top and non-stackables below. Alpha is good, but grouping by type and then sorting by alpha might be even more appealing, albeit more difficult, if not impossible programming. What I mean by “grouping by type” for stackables is that gems, (emeralds, diamonds, rubies, etc.) be grouped together; reagents (herbs, mushies) etc. For non-stackables, wands, weapons, potions, shrine dedication items, etc. be “grouped”. I don’t know if it is possible to program alpha within groups. While Alpha sort by itself would be an amazing improvement, when you look at the names of the various items in inventory, it may not be be as intuitive. Just something to think about.

CoolMike Author

Thanks for the feedback. The change actually made it into the recent October update! The sorting is stackables on top, not-stackables below. Within either group items are sorted alphabetically.

CoolMike Author

By type is possible but would require a bunch of work I think. The sorting happens in C and the C code doesn’t have access to things like reagent typing unless we build it out. I think you will see that grouped alpha sort is probably good enough.

CoolMike Author

I just wanted to put a note here that says this change has been implemented and I am marking this as closed.

Sign in to join the discussion.