What are the precise rules for inventory sorting feature in Terraria?
With the new update a new button has appeared. It says "Sort inventory":
When you click it, items in your items will be reordered and colored, presumably based on what type are they according to the algorithm:
Items marked as favourite will be unaffected. However it's entirely unclear what order applies to items of the same type. I was hoping to sort all my potions by name. That's not what is applied, as you can see here:
So what are the precise rules for sorting items, their colors and order of the items of the same type? This is a new feature, I'm sure other people are also curious how does it work...
Solution 1:
The other answer is false. The items are sorted by type (i.e. melee weapon, ranged weapon, block etc.), and the colours do not correlate with the rarity. This can be seen in that the copper shortsword, with a white rarity, is light pink when sorted.