t-mw / gw2-arbitrage

Finds items in Guild Wars 2 that can be sold on the trading post for a higher price than the cost of crafting the item.
28 stars 5 forks source link

feat: stable sorted ingredient list #28

Closed Iiridayn closed 2 years ago

Iiridayn commented 2 years ago

Sorts by vendor/TP, then quantity, then total price, then all things being equal, by id - so the sort is stable on repeated runs.

I occasionally re-run after buying some of the ingredients to see if anything has updated, and moderately bothersome to match the list of purchases again.

Vendor at bottom so all TP purchases are together, and vendor is next to crafting station. Quantity next since I often have limited inventory space, and the largest quantity usually crafts down to a smaller amount (better still to order by fastest inventory space reduction, but one step at a time). Price, as the costlier things are more painful if hit by volatility (it might be worth ordering by volatility first - if it were feasible to estimate...). Finally, as noted above, id to ensure the order will always be stable - unless the market changes. Thus, a visual glance can verify if the market has changed proportionally.