Bug - Fixed Sometimes unable to buy limited items from Underground Fireworks Shop

katyarn

Member
I'm unable to determine when/why but kolmafia sometimes won't attempt to buy limited items from the Underground Fireworks Shop despite having visited it. Turning on debug, it appears that mafia does not make any queries and instead returns a failure without attempting to buy them.

Given the following state:

Name Value Default Scope
_fireworksShoptruefalse user
_fireworksShopEquipmentBoughtfalsefalse user
_fireworksShopHatBoughttruefalse user

Using the CLI command acquire rocket boots, sometimes the result is:

Code:
Desired purchase quantity not reached (wanted 1, got 0)

You need 1 more rocket boots to continue.

The rocket boots are available based on visual inspection:

1644262594272.png
I've been unable to find a workaround to resolve it, although I imagine just using visit_url should succeed even if acquire won't.
 
Last edited by a moderator:

Veracity

Developer
Staff member
Do you switch clans? Are you sure you are in a clan with the shop? Yes, your settings show you have visited (some clan's) fireworks shop today - and even bought a hat - but if you're not in the same clan ...
 

katyarn

Member
Whats your autobuylimit set at?
40000

Do you switch clans? Are you sure you are in a clan with the shop? Yes, your settings show you have visited (some clan's) fireworks shop today - and even bought a hat - but if you're not in the same clan ...
I have whitelisted between clans each day prior to this. Currently I'm in a clan that owns the fireworks shop.
To be sure, I went to the clan hall and read the name to verify that I'm in Ferengi Commerce Authority currently, attempted to acquire rocket boots, and encountered the same issue.
 

kuankyh

New member
It happened to me as well, same issues as described above. I am currently running 1 Day runs and it gives me the same error after each new ascension but seems to work the day after (before I ascend again). I currently run a chat command in my script to buy the rocket boots as an alternative to this.
 

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
Fwiw - once you've visited the shop in one clan, you can change to another clan and still access it. Strange game
 
Im having the same problem with Veracitys meat farm script not autobuying for the robortender it fails with the same kind of message
 
Ive set my autobuylimit to 100000 and when veracitys script tries to buy robortender ingredients it gets the same message no errors on other
the one thing I can see and I will post tomorrow is the search is incorrect it has escape characters in it
 

c2t

Member
I don't think the fireworks shop has ever worked to buy limited quantity things with retrieve_item() or acquire. I pretty much never change clans and it's never worked, or at least not reliably. I apparently brought it up shortly after mafia "supported" the IotM in the ASS discord, and seems like I resorted to just using visit_url()s to deal with it instead.
 
Last edited:

Veracity

Developer
Staff member
The fireworks shop always works for me, ever since I made KoLmafia visit it when you log in to a clan that has one.

Congratulations on mentioning it here, considering that the ASS discord isn't followed by most KoLmafia developers.
Curious why you put "supported" into quotes, since that is usually a euphemism for "didn't REALLY support".
 

c2t

Member
I mentioned the ASS discord because it was several months before I made an account here. Katarn (the OP) was even one to reply when I had brought it up at the time. So it's not all about you. Also, I resisted making an account here for a long time because making throwaway accounts on every little corner of the Internet is annoying and tiresome, so I wasn't going to bother making an account at the time to report something I already made a workaround for.
 
Last edited:

Alium

Member
Recently added buying fireworks hats to autoscend. When I was testing the change, acquire_item was working correctly. One user reported this issue yesterday and coincidentally I got it today. It was working the last few days without issue for me. I didn't change clan or change my buy limit.

Command issued:
Code:
ash retrieve_item(1, $item[porkpie-mounted popper])

Issued from autoscend - failed
Issued from gcli - failed
Clicked refresh button and tried in gcli again - failed
Closed UI (but not login window), logged back in, tried in gcli again - failed
Closed UI and login window. Started mafia, logged in, tried in gcli - worked! Well at least partially worked. Did buy it, but has both pass and fail text.

Code:
> ash retrieve_item(1, $item[porkpie-mounted popper])

Purchasing porkpie-mounted popper (1 @ 500)...
You spent 500 Meat
You acquire an item: porkpie-mounted popper
Preference _fireworksShopHatBought changed from false to true
Desired purchase quantity not reached (wanted 1, got 0)
Returned: true

Worth noting that after RO last night I just clicked the refresh button. Usually I fully close and get the latest build. Perhaps something needs to fully close for this to work?

Maybe related to: https://kolmafia.us/threads/turns_spent-can-be-lost-over-ro.26804/#post-165487 ? Only bring that up since both issues have strange behavior after using the refresh button after RO. Don't know if actually related.
 

Veracity

Developer
Staff member
Recently added buying fireworks hats to autoscend. When I was testing the change, acquire_item was working correctly. One user reported this issue yesterday and coincidentally I got it today. It was working the last few days without issue for me. I didn't change clan or change my buy limit.
...
Worth noting that after RO last night I just clicked the refresh button. Usually I fully close and get the latest build. Perhaps something needs to fully close for this to work?

Maybe related to: https://kolmafia.us/threads/turns_spent-can-be-lost-over-ro.26804/#post-165487 ? Only bring that up since both issues have strange behavior after using the refresh button after RO. Don't know if actually related.
That's likely. Refreshing does a "time in" - essentially a log in that leaves you in the same state as you were before.
We do detect changes in fullness and stuff from api, but do we recognize that rollover has happened?
I thought so, since I am under the impressions that "_" properties get reset, but perhaps there are other things that are missing.
 

katyarn

Member
Just another small observation: I've encountered this after ascending (without any rollover between ascension and bug encounter) on two occasions.

Both times were attempts at buying the sombrero-mounted sparkler. No other purchases from the fireworks shop were made prior in those runs.
 

oztrich

Member
I'm getting an issue running autoscend. Every time I kick it off I get the following error:

Code:
[INFO] I think we're good to go to apply Carlweather's    Cantata of Confrontation
You need 1 more    sombrero-mounted sparkler to continue.
Stack trace:
  at    doTasks (autoscend.ash:1711)
[INFO] Starting    bedtime: Pulls Left: 0
[INFO] Deleting    processed mail...
[INFO] 3 messages deleted.
[WARNING]    Still adventurous! Stopping bedtime.

It looks like it runs through the following two checks:

Code:
[INFO] Checking if we can provide 25 negative combat    rate, with equipment
[INFO] Checking if we can provide 25 positive combat    rate, with equipment

It passes the first test, but then looks to be wanting to buy the sparkler to try and pass the 2nd test. It doesn't actually buy the sparkler. I can buy it manually and then run autoscend again and it works fine.

Checked on discord and this issue was reported in March and the answer was to check this thread. Is anyone else noticing this?
 

Alium

Member
At the edge of my understanding on this one but maybe made progress with where the issue is... you all tell me!

Seems to be related to limit. When this failure is happening, limit is 0. However when it is working, there is no limt. Below are pics from the getPurchaseRequest function in NPCStoreDatabase.java

Failing:
1668566585360.png
1668566645890.png

Working:

1668566759554.png
1668566815363.png
 

Jilltow

New member
Also having the same issue (not a problem) but when I first run autoscend, it does it's list of tasks then stops and tells me I dont have the sombrero- mounted sparkler and it stops. I go buy it because of course I have about 50k meat at that point then autoscend works just fine. For some reason autoscend seems to have a check point of buying that item before it will proceded. I honestly thought at first it might be a stop check to ensure a person really wanted autoscend to run, but it's an item that is +combat instead of - combat which is against most of the starting runs in a new ascension. +combat on day one seems counter intuitive on day one as a required item to have for autoscend to run. Just side notes. I have fully deleted the svn version of autoscend and only have the git version now and have updated git daily if that information is valuable at all. Autoscend seems to be working well other than the purchase requirement.
 
Top