Bug - Fixed Coinmaster not working after the war

Magus_Prime

Well-known member
With r19795 when I try to turn in items to the Dimemaster, via the Coinmaster frame it fails. I normally select everything and choose "max possible" and it sells everything except one of each outfit piece. Now I get:

Code:
Visiting the Dimemaster...
You acquire 3 dimes
Visiting the Dimemaster...
You acquire 3 dimes
Visiting the Dimemaster...
You acquire 4 dimes
Visiting the Dimemaster...
You acquire 9 dimes
Visiting the Dimemaster...
You don't have that many of that item to turn in.
Visiting the Dimemaster...
You acquire 0 dimes
Visiting the Dimemaster...
You acquire 0 dimes
Visiting the Dimemaster...
You don't have that many of that item to turn in.
Visiting the Dimemaster...
You don't have that many of that item to turn in.
Visiting the Dimemaster...
You acquire 0 dimes
Visiting the Dimemaster...
You acquire 0 dimes
Visiting the Dimemaster...
You don't have that many of that item to turn in.
Visiting the Dimemaster...
You acquire 0 dimes
Visiting the Dimemaster...
You acquire 0 dimes
Visiting the Dimemaster...
You don't have that many of that item to turn in.
 

Veracity

Developer
Staff member
I do the same thing, except force of habit makes me skip selling things that pulverize into elemental wads. Not that I've actually pulverized anything for years.
I went to the Dimemaster today. I don't have the gCLI output, but my session log says:

Code:
trading 1 beer helmet for 1 dime
You acquire 1 dime

trading 4 bejeweled pledge pins for 4 dimes
You acquire 4 dimes

trading 2 blue class rings for 6 dimes
You acquire 6 dimes

trading 2 energy drink IVs for 6 dimes
You acquire 6 dimes

trading 2 keg shields for 2 dimes
You acquire 2 dimes

trading 7 PADL Phones for 14 dimes
You acquire 14 dimes

trading 1 perforated battle paddle for 1 dime
You acquire 1 dime

trading 4 red class rings for 4 dimes
You acquire 4 dimes

trading 4 white class rings for 20 dimes
You acquire 20 dimes

trading 7 distressed denim pantses for 7 dimes
You acquire 7 dimes

trading 60 dimes for 6 Hippy Army MPEs
You acquire Hippy Army MPE (6)

trading 5 dimes for 1 fancy seashell necklace
You acquire an item: fancy seashell necklace
All of my Coinmaster transactions worked they same as they ever did.

Looks like an inventory issue? Which items did you try to sell that failed? What does YOUR session log say?
 

Magus_Prime

Well-known member
Here's what was in the session log:
Code:
8 frat boys defeated; 1000 down, 0 left.

trading 1 beer bong for 3 dimes
You acquire 3 dimes

trading 3 beer helmuts for 3 dimes
You acquire 3 dimes

trading 4 bejeweled pledge pins for 4 dimes
You acquire 4 dimes

trading 3 blue class rings for 9 dimes
You acquire 9 dimes

trading 6 bottle opener belt buckles for 6 dimes

trading 0 beer helmuts for 0 dimes
You acquire 0 dimes

trading 0 bejeweled pledge pins for 0 dimes
You acquire 0 dimes

trading 6 bottle opener belt buckles for 6 dimes

trading 5 bottle opener belt buckles for 5 dimes

trading 0 beer helmuts for 0 dimes
You acquire 0 dimes

trading 0 bejeweled pledge pins for 0 dimes
You acquire 0 dimes

trading 6 bottle opener belt buckles for 6 dimes

trading 0 beer helmuts for 0 dimes
You acquire 0 dimes

trading 0 bejeweled pledge pins for 0 dimes
You acquire 0 dimes

trading 6 bottle opener belt buckles for 6 dimes
 

Magus_Prime

Well-known member
I just logged in with r19797 to finish my turns for the day and the coinmaster worked as expected with the rest of my booty from the war. <shrug>
 

Veracity

Developer
Staff member
I have never seen anything like your output. Looks like it was trying to submit the same stuff multiple times.

Everything - except the bottle opener belt buckles - sold, as expected, first time through.
Every time it tried to sell bottle opener belt buckles, it said "you don't have that many".
The things you sold "all but one" of - the outfit pieces - it worked the first time and subsequently submitted sales for "all but 1 of 1" - zero items - and got 0 dimes.

Code:
trading 6 bottle opener belt buckles for 6 dimes
The gCLI reported this:

Visiting the Dimemaster...
You don't have that many of that item to turn in.

Code:
trading 0 beer helmuts for 0 dimes
You acquire 0 dimes
Ideally, we should not have bothered submitting this.

I have no idea why it made multiple iterations over your list of things to sell.
There was an inventory mismatch for the bottle opener belt buckles and it kept submitting and failing.
The outfit pieces worked - but it kept trying to sell 0 of them, pointlessly.

I'm going to look into how the Coinmaster Frame sells multiple items and see if I can explain this weirdness, but I think the root cause was, somehow, an inventory mismatch for one item.
 

Veracity

Developer
Staff member
FWIW, revision 19799 will not submit a request to buy or sell 0 items.
Still don't see how you could have tried to sell the same list multiple times.
 

Magus_Prime

Well-known member
That happened because, when it errored out, I whacked the sell button again in the hope that it was a transitory issue. :rolleyes:

I think I may have figured out how inventory got out of sync: the diabolic pizza cube.

Plumber runs are the first time I've really used the pizza oven.

Today I made a pizza and noticed that after using the last of an item to make a pizza that item was still in the list of available consumables under food. Hitting the refresh button on that frame did nothing to resolve the problem. I had to hit the refresh status button on the main KoLmafia window before things were correct.

Does KoLmafia handle removal of inventory items when they are "consumed" by the pizza oven? Or, come to think of it, add new items gained by consumption of a diabolic pizza?

BTW - I'm using Lacey Jones' new Pizza Cube GUI relay script to help with the oven mechanics.
 
Last edited:

Veracity

Developer
Staff member
I just started using the pizza cube myself, with the new challenge path. We have no support for it at all, so far.
That is surely what caused the inventory mismatch.

I am surprised that hitting the refresh button on the food panel did not refresh inventory. That calls api.php?what=inventory
Or if it did, that the display did not update.

And I am surprised that hitting refresh status did - since that does NOT refresh inventory.

I'll investigate that and will add the minimal support for the pizza oven to make sure inventory doesn't get out of synch when you use it.
 

Magus_Prime

Well-known member
I closed the food panel, hit refresh status, then went back in to food. It may have been closing and reopening the food panel that actually refreshed.
 

Veracity

Developer
Staff member
Bumping to remind myself to investigate why/whether you need to refresh the food panel when you move things in to / out of inventory.
My expected behavior is that as items are removed (via Horadric Pizza Cube in the Relay Browser, say), the food panel (all inventory panels) should update.

Beyond this, the originally reported issue should be fixed, now that said pizza cube correctly removes items from inventory when you bake.
 

Veracity

Developer
Staff member
Well, I don't know if there is anything to fix here.

Revision 19857 adds a test command to artificially manipulate inventory, so I can see how the Item Manager responds to such changes.

Code:
[color=green]> inv magical sausage[/color]

magical sausage casing (3)

[color=green]> test inventory add 3 magical sausage[/color]

[color=green]> inv magical sausage[/color]

magical sausage (3)
magical sausage casing (3)

[color=green]> test inventory remove 2 magical sausage[/color]

[color=green]> inv magical sausage[/color]

magical sausage
magical sausage casing (3)

[color=green]> refresh inv[/color]

Updating inventory...
Requests complete.

[color=green]> inv magical sausage[/color]

magical sausage casing (3)
Looking at that, I could make the new test command tell you how many of the item are supposedly in inventory, obviating the "inv xxx". I'll do that.

Anyway, I had the Item Manager frame open in its own window.
Everytime I manipulated inventory, nothing seemed to change - until I gave the Item Manager focus, at which time inventory updated. That's reasonable - and is how Swing works: if it is displaying a list model, it won't actually update the display unless the list's frame has focus and you can manipulate it.

I tried the Refrssh button, and nothing happened. I looked into that and that is because on the Food/Drink/Spleen/Potions frame, that actually refreshes "Concoctions", not "Inventory". Refreshing Concoctions does not take a server hit. Refreshing Inventory does.

I COULD make the "Refresh" button refresh first Inventory and then Concoctions. Not sure if it's worth it, since we essentially never get Inventory out of synch - although you did find a case where it did, before we implemented support for the Pizza Oven.

I think I'll close this. I'll leave the Refresh button alone, unless there is strong demand to make it also refres inventory.
 
Top