Bug - Fixed Storage doesn't always parse pulls correctly.

Veracity

Developer
Staff member
Breakfast will use a bunch of daily-use "toys".
If they are not in inventory, it will remove them from closet or pull from storage, depending on properties and character state.
Pulling from storage will be done once (duh) and typically is done the first full breakfast you do after freeing the King.

One of the toys is the subscription cocoa dispenser.

Looking at my session logs for this year, I see 24 runs from 1/15 to 3/12 (Standard and AoSoL) with the following:

Code:
pull: 1 handmade hobby horse, 1 ball-in-a-cup, 1 set of jacks, 1 Chester's bag of candy, 1 Idol of Ak'gyxoth, 1 burrowgrub hive, 1 glass gnoll eye, 1 Trivial Avocations board game, 1 creepy voodoo doll, 1 Taco Dan's Taco Stand Flier, 1 warbear soda machine

pull: 1 warbear breakfast machine, 1 festive warbear bank, 1 Chroner trigger, 1 picky tweezers, 1 The Cocktail Shaker, 1 infinite BACON machine, 1 cheap toaster, 1 pump-up high-tops, 1 pump-up high-tops, 1 pump-up high-tops, 1 [glitch season reward name]

pull: 1 subscription cocoa dispenser, 1 overflowing gift basket, 1 meatball machine, 1 refurbished air fryer
...
use 1 subscription cocoa dispenser

(The "use" fails, obviously, since you can't actually use it until the next day.)

I recently completed my 4th (of 6) LoL run, and something is different:

Code:
pull: 1 handmade hobby horse, 1 ball-in-a-cup, 1 set of jacks, 1 Chester's bag of candy, 1 Idol of Ak'gyxoth, 1 burrowgrub hive, 1 glass gnoll eye, 1 Trivial Avocations board game, 1 creepy voodoo doll, 1 Taco Dan's Taco Stand Flier, 1 warbear soda machine

pull: 1 warbear breakfast machine, 1 festive warbear bank, 1 Chroner trigger, 1 picky tweezers, 1 The Cocktail Shaker, 1 infinite BACON machine, 1 cheap toaster, 1 pump-up high-tops, 1 pump-up high-tops, 1 pump-up high-tops, 1 subscription cocoa dispenser
...
pull: 1 subscription cocoa dispenser
mallsearch "subscription cocoa dispenser"
mallsearch "subscription cocoa dispenser"

The "use" didn't think the item was in inventory, so it attempted another pull - which failed, leading to an attempted malll purchase - which also failed, since my autoBuyPriceLimit would not tolerate 59,000,000 Meat. Fortunately. :)

Looking at inventory (in the GUI), I see no subscription cocoa machine.
Looking at storage (in the GUI), I see a subscription cocoa machine.

In the browser, I see it in inventory and not in storage.
Refreshing inventory and storage in the GUI, and our model now agrees with KoL's.

So, somehow, it actually did end up in inventory, but we did not detect it.

1) Did we fail to parse the transfer from storage?
(Because it was the 11th in the bulk transfer? in both examples, warbear soda machine was the 11th in a bulk transfer - and that worked.)
2) (Why did it try to pull pump-up high-tops twice?)
3) Did something change in the transfer message for the subscription cocoa dispenser?
4) Did LoL, auto-pull it after freeing the king in LoL, for some reason? (We refresh inventory in that situation, and it was not there.)

Huh. I only have 1 pump-up high-tops.
Did the (failed) second attempt to pull throw off the retrieval parsing?
 

Veracity

Developer
Staff member
I've diagnosed this and discovered two bugs. I changed the title to reflect the biggest one.

If you ask to pull items A, A, and B, we submit a URL to storage.php with three itemIds and 3 quantities.
If you actually have 2 of A, KoL reports:

A (1) moved from storage to inventory
A (1) moved from storage to inventory
B (1) moved from storage to inventory

If you only have 1 A, KoL reports:

A (1) moved from storage to inventory
B (1) moved from storage to inventory

We currently walk the URL and result messages in parallel, getting itemId from the URL and pull count from the result messages.

That doesn't work if one message is silently omitted by KoL.

The second bug is in Breakfast.

We use daily-use "toys" from an array.

Code:
...
        ItemPool.get(ItemPool.CSA_FIRE_STARTING_KIT, 1),
        ItemPool.get(ItemPool.PUMP_UP_HIGH_TOPS, 1),
        ItemPool.get(ItemPool.PUMP_UP_HIGH_TOPS, 1), // You can pump them more than once
        ItemPool.get(ItemPool.PUMP_UP_HIGH_TOPS, 1), // Three times in fact
        ItemPool.get(ItemPool.ETCHED_HOURGLASS, 1),
...

Guess what? Because pump-up high-tops are listed three times, if you have none in inventory but at least 1 in storage), we will attempt to pull it. More than once, for reasons I don't understand yet - which results in the item being listed in the storage.php request more than once, and running in to the first bug I listed.

(And a third bug I just noticed: if you have a potted power plant in storage, breakfast will try to harvest it by "using" it - which redirects to a choice - without pulling it into inventory first.)

I foresee three PRs in the future...
 

Veracity

Developer
Staff member
r27432 - make sure potted power plant is in inventory before harvesting
r27436 - StorageRequest doesn't always accurately identify pulled items
r27437 - rationalize using toys in breakfast
 
Top