Bug Hagnk storage and related things don't work on r20109 (pull, storage_amount())

Aenimus

Member
Hello,

I have 18 special edition Batfellow comics in Hagnk's:
https://gyazo.com/7bcceab61dd195799dab9026c8e54cb6

Code:
> pull special edition Batfellow comic

[special edition Batfellow comic] requested, but none available.


Code:
> ash $item[special edition Batfellow comic].storage_amount()

Returned: 0

Code:
> /pull special edition Batfellow comic

Pulling 1 special edition Batfellow comic.

I was trying to troubleshoot someone else's issue in /hardcore, but I found out it didn't work for me either. It was not recognising any of the items the user in question had in Hagnk's.
 
Last edited:

lostcalpolydude

Developer
Staff member
Is lastEmptiedStorage the same as my_ascensions() for you? Given
> ash storage_amount( $item[special edition batfellow comic] )

Returned: 213
I suspect that KoLmafia isn't loading storage for you because it thinks it has been emptied. Setting lastEmptiedStorage to -1 (or anything other than my_ascensions()) will sort that out after a refresh (maybe logging out/in again?).
 

Veracity

Developer
Staff member
That item is a free pull. In run, free pulls are kept in a different list than the rest of storage while you are in-run. After you free the king, they are all in the storage list.

At the moment, the "pull" command looks only at the free pull list if you are in Hardcore and only at the storage list otherwise.

I'm in a Normal run now.

Code:
[color=green]> pull special edition Batfellow comic[/color]

[color=red][special edition Batfellow comic] requested, but none available.[/color]
storage_amount() does look at both storage and free pulls, however.

Code:
[color=green]> ash $item[special edition Batfellow comic].storage_amount()[/color]

Returned: 181
That item is out of Standard, isn't it? take_storage() does not use the "pull" command; it goes directly to StorageRequest.

Code:
[color=green]> ash take_storage( $item[special edition Batfellow comic], 1 )[/color]

Pulling items from storage...
Returned: true
It didn't actually get an item. Looking at my DEBUG log:

That item is too old to be used on this path.

It'd be nice if StorageRequest detected that.

Code:
[color=green]> /pull special edition Batfellow comic[/color]

Pulling 1 special edition Batfellow comic.
Yes, that is the message that KoL itself puts into chat. KoL also responds with the "that item is too old" in Results:

So, in response:

1) The "pull" command should work for free pulls in Normal as well as hardcore.
2) I cannot reproduce your storage_amount() issue; that counts both storage and free pulls. It works for me.
3) If you are in a Standard restricted run, you cannot pull items that are too old. We should not even try - and give an error. And we should detect the error if you try it anyway via visit_url()
4) /pull goes to KoL chat - and KoL itself does not check "out of standard" up front. It tries and fails to pull.
 

Aenimus

Member
The person I was helping was in aftercore (same as me--this might be relevant) and trying to pull a bowler, and after that, a brimstone beret. They provided evidence of the items' residence in Hagnk's. Both pull attempts failed; storage_amount() also returned 0.

lastEmptiedStorage is 213; the same as my ascensions.

P.S. the /pull was to prove I actually did have that item and nothing else.
 
Last edited:

Veracity

Developer
Staff member
Is lastEmptiedStorage the same as my_ascensions() for you?

I suspect that KoLmafia isn't loading storage for you because it thinks it has been emptied. Setting lastEmptiedStorage to -1 (or anything other than my_ascensions()) will sort that out after a refresh (maybe logging out/in again?).

lastEmptiedStorage is 213; the same as my ascensions.
Which, as lost said, will make KoLmafia not read storage for you since it "knows" there is nothing there.
I suggest that you do what he suggested:

set lastEmptiedStorage=-1

and refresh your session.
 

Veracity

Developer
Staff member
Alternatively, go to the Item Manager, look at the Storage tab under general, and hit the "refresh" button.
That should reload storage and, when it notices that storage is not empty, reset the lastEmptiedStorage setting to -1, since it was obviously wrong.
 

Aenimus

Member
This would work for me, yes. But it doesn't explain why Mafia thought that someone who definitely did not pull their entire storage (since they had items in storage) had pulled their entire storage. I'll try to find out from the user (username: Syi).

They had just completed ascensions 331, and their preference was at 330:
[12:23] Syi: prefref storage yields: autoSatisfyWithStora ge -> value: true; Default: true; Scope: user;
[12:24] Syi: lastEmptiedStorage -> value: 330; Default -1; Scope: user
 
Top