CraftSim

CraftSim

2M Downloads

Bug: incorrect profit calculation when pressing "Use Best Quality Reagents"

kylejrp opened this issue ยท 5 comments

commented

This bug has been occurring where the profit calculation doesn't update when checking "Use Best Quality Reagents" and ends up showing a stale profit despite having new materials assigned.

best-quality-bug


Steps to reproduce:

  1. Open up a material to craft
  2. View the CraftSim Average Profit (104g 20s 43c)
  3. Press "Use Best Quality Reagents"
  4. Compare the CraftSim Average Profit

Expected:
CraftSim Average Profit should immediately update (-120g 27s 93c)

Actual:
CraftSim Average Profit is stuck on the old value (104g 20s 43c).


  1. Now that the profit is out of sync, uncheck "Use Best Quality Reagents"
  2. Compare the CraftSim Average Profit

Expected:
CraftSim Average Profit should be the same as when we first saw it in step 2 (104g 20s 43c)

Actual:
CraftSim Average Profit shows the old value that should have shown in step 4 (-120g 27s 93c)


Workaround:
Reassigning any of the reagent qualities by clicking on a reagent then pressing accept will properly recalculate the CraftSim Average Profit. It will however break again if you repeat the reproduction steps again.

commented

I just tried to reproduce it but it actually updates fine!
Please also check the behavior in the latest version and tell me if this still occurs

commented

Will do! Some other factors that might be impacting it would be that sometimes I use TSM as a price source with a long-running price string, so it's possible that there's a race condition there? I'll see if I an reproduce after the maintenance today though.

commented

Still reproducing today on 5.5.2.2. I checked and I'm using the Auctionator price source in this, so ignore my previous comment about TSM:.

best-quality-bug-v2

commented

Hm so I could reproduce it when fresh logging in but it seems to go away after clicking to other recipes and coming back huh

commented

@derfloh205 Oh yeah, if you have "Use Best Quality Reagents" already selected when you're switching between recipes, it works fine. It's only when you toggle it on or off that it breaks. I can still reproduce it after switching recipes and toggling "Use Best Quality Reagents" for a recipe where that changes the reagent qualities.