runelite / runelite

Open source Old School RuneScape client
https://runelite.net
BSD 2-Clause "Simplified" License
4.76k stars 5.21k forks source link

Ground item overlay isn't in the same order as items. #4404

Open MagicfTail opened 6 years ago

MagicfTail commented 6 years ago

As of the latest release, the ground item overlay is no longer the same order as the items on the ground, but rather in the order they appeard. This makes, as an example, the collector role in barbarian assault more difficult as you can't see what order the eggs will be.

Example showing they aren't the same: https://i.imgur.com/DgJC8If.png The items were dropped in the order, chisel, bracelet, amulet, jug, hammer

xDemoN commented 5 years ago

I cannot replicate this - I'm guessing this was fixed when menu entry collapsing was implemented? #7341 or #7408 ?

Bkh1994 commented 5 years ago

I cannot replicate this - I'm guessing this was fixed when menu entry collapsing was implemented? #7341 or #7408 ?

This was not fixed. The ground items match the order dropped (first dropped is on bottom) -- instead of the way OSRS functions, ordered by high alch value

dekvall commented 5 years ago

The drops are ordered by HA value yes, but only somewhat. It is guaranteed that the uppermost item in a pile is the one with the highest HA value, but the rest of the stack is more complicated. Basically, when you drop a more valuable item than the one on top, the list is moved down one space to make space for the option of the new item. If you pick up the the top item, it's option is replaced with the option of the second most valuable item.

The thing is that the items dropped with a lesser value than the topmost item are added as options in insertion order. Which means that if we want to have the same order in the overlay as it is in the actual options, we need to know insertion order. We have a way to do this for items you get as loot, and items you have dropped but we have no way of knowing insertion order of items other players have dropped or static spawns.

The only fix for this that I can see is to modify the order of menu entries to match the order we have for the overlaid items. I think that this is possible, but I am not sure it is something we want to do?

Bkh1994 commented 5 years ago

This also happens with loot and dropped items though. Here is a link to the post I made. https://github.com/runelite/runelite/issues/8910 My example is at Blue Dragons. Coins are at the top of the overlay because it is a secondary drop. The dragonhide and bones are always dropped so they are put at the bottom. Then the coins are on the overlay at the top when they should actually be at the bottom.