Closed Infinitay closed 6 months ago
I think it would be confusing to have the list of ground items take priority - you can set values in it so it's weird that a value of "2" would go over an expensive item on the ground. Maybe these should be sorted together, with the value in the list overriding the ge price? Not sure which is better.
Also, how does it handle untradeable items? Lots of untradeable items show up at the top of the list for good reason. Would this sort them to the bottom? I feel like this might make this feature very annoying to use.
HA price max is weird because many items have significantly higher HA price than GE price, e.g. steel longsword at 110 vs 300. I would avoid doing that. Items worth alching are high enough value that this won't matter but for these low value items it will be confusing.
you can set values in it so it's weird that a value of "2" would go over an expensive item on the ground
That is my fault. I completely forgot to test it with positive values
Maybe these should be sorted together, with the value in the list overriding the ge price?
That was my intent. It crossed my mind to test the changes with a positive value and I did not see that wasn't the case
how does it handle untradeable items?
Lots of untradeable items show up at the top of the list for good reason
When I was making this feature I had the intent in mind that items with value > untradeables.
Would this sort them to the bottom?
Yes. I suppose I can add an option to always have it at the top if they choose to and make it sort after the custom list sort
HA price max is weird because many items have significantly higher HA price than GE price
The reason I did this is for two reasons
For the HA thing - maybe the dropdown can be disabled
, ge
, or highest ge/ha
I don't like the idea of descending anyways because I don't know what anyone would ever use it for.
I think the untradeable thing is important because if you get a drop like a dragon defender it would be odd for it to show at the bottom. Maybe you can use the "price" (shop value)? That is what it sorts by normally, somewhat. Or maybe just HA value since people are way more familiar with that value.
Initially I wanted to make everything optional, but I feel like I have a bad habit of offering too much customization. I will go ahead and continue with it and make the changes since you approve of them. I will:
I don't like the idea of descending anyways because I don't know what anyone would ever use it for.
I think you mean ascending? I think everyone would want descending so it's from most expensive to least expensive. Back before there was loot keys in PVP, you would want to snag up the most expensive loot first and then get out as fast as you can. Although, since I'm already adding options for price sorting I will keep the sorting order option unless you really object it.
I think the untradeable thing is important
What if I were to make it so when the user selects to show untradeables on top, it will sort those untradeables by max(Store Price, High Alch Price)? Because I don't think some untradeables could be bought at stores just as some untradeables can't be alched.
Untradeables are not always on top. I believe it uses the "store price" (1.5x HA). I think using the HA price for these is fine, and just including them in the sort normally. FYI this store price thing exists for all items iirc.
The custom list should always override everything else.
I mean descending because players think of the list from top to bottom. Ascending has the cheapest stuff at the top. I see you did the opposite in the code but I don't think that is intuitive.
so tl;dr for changes as far as I can tell: make untradables worth ha value in sorting. options should be off, ge, or max(ha, ge) Make the custom list's values be used as values for the sorting, as overrides for the ge/ha price. The comments I made on the code.
I discussed it with you on GitHub briefly but I'll go ahead and write it here too
make untradables worth ha value in sorting.
I think RL already does this because the OSRS wiki for the Dragon Defender say's it is unalchable, but there is still a price return of 40804
by ItemComposition#getHaPrice
. I also tested it with a firecape and it returned a value of around 39K.
make untradables worth ha value in sorting.
For the reason above, this is already done assuming `ItemComposition#getHaPrice
does return a price for all untradeable items
options should be off, ge, or max(ha, ge)
I will go ahead and do this now as you suggested due to issues with items such as the steel sword. For items with a GE value of 0 I'll make it sort by the HA price instead.
Make the custom list's values be used as values for the sorting, as overrides for the ge/ha price.
This is already the behavior (first it will sort by GE price, then it will sort again using custom values (overrides ge sort), then untradeables always on top option (overrides ge price and custom value)
Although as mentioned previously, I want to add an option to always include untradeables at the top because of items like desert ammy having no price at all and being at the bottom
With the latest few commits, I replaced ground item price sorting order to a price sorting method instead such as Grand Exchange pricing or the maximum between the Grand Exchange and High Alchemy prices.
getItemPrice
for each pricing modeGroundItem
tradeability equal to
Note, ended up leaving a debug statement so fixup'ed the commit and rebased
Refactored ground items price sorting by removing the separate sorting method and instead handling it within HotkeyableMenuSwapsPlugin#sortGroundItems
instead
Previous behavior:
After:
I realized now there is some odd issue where changing the sort mode starts incrementing the count by * however many times you changed the sort mode
but resets it back to 0 if you disable it. I guess that's why logging in GroundItemsStuff is being printed out multiple times and essentially isn't clearing the state. I'll work on this after I push the missing price sort mode check within #sortGroundItems
Fixed registering multiple instances of GroundItemsStuff to EventBus
didPricingModeChange
parameter to #reloadGroundItemPluginLists
didPricingModeChange
parameter to #reloadGroundItemSortgroundItemsPriceSortMode
to make sure the option was changed either on/off
https://github.com/geheur/More-menu-entry-swaps/assets/6964154/2c0de0e7-676a-4ac6-8cfe-14459fd82943
This should be everything. If you could test out the plugin for yourself in case you can find any issues I would appreciate it if you find the time to do so. If you have any questions or issues with the code let me know. Thanks.
New Feature
New Additions
HotkeyableMenuSwapsPlugin#sortGroundItemsGE
usingHotkeyableMenuSwapsPlugin#sortGroundItems
MenuEntry
sorting before thehighlightedItemValue != null || hiddenItemValue != null
check and afterGroundItemPriceSortMode
to provide user's with a choice on how they want to sort the prices if they choose to enable the price sortingChanges
GroundItemsStuff#buildGroundItem
GroundItem
from theScene
to a new methodHotkeyableMenuSwapsPlugin#getGroundItemFromScene
GroundItemsStuff#reloadGroundItemPluginLists
with a new parametershouldSortByPrice
to account for price sortinghttps://github.com/geheur/More-menu-entry-swaps/assets/6964154/813e1295-ac81-42a4-a4dc-029f66c83b71
When watching the video, the list under "Custom hides" is the proper ordering from most expensive to least. Please also keep in mind of the custom ground item order that I pass in later to show that it still works.