Feature - Rejected mafia pinky ring auto use when you do not have one

taltamir

Member
The preference "autoPinkyRing" does not account for the possibility that it is true and that you do not have a pinky ring.

specifically if you do not have it, it should:
1. do not include it in adv gain calculation
2. do not try to equip it before drinking

as it is, it just results in an error and then not drinking if the setting is enabled on an account that does not have a pinky ring.
 
Last edited:

lostcalpolydude

Developer
Staff member
All of the code I'm seeing appears to check for a ring being available before trying to equip it. So you'll need to be more specific about how you tried to drink. Maybe KoLmafia saw it in your clan stash (so it was available) but you didn't have the karma to remove it?

And I've just tested that adventure gains are only adjusted if you have a ring available (by closeting and uncloseting, with my closet not allowed for retrieval).

So the problem seems to be that KoLmafia thinks you have access to a ring when you don't, and that really has nothing to do with autoPinkyRing.
 

taltamir

Member
It actually tries and fails to mallbuy the ring. since ring costs 250k+ in the mall and I don't have enough money.
Code:
[COLOR=olive]> drink bottle of laundry sherry[/COLOR]

Searching     for "mafia pinky ring"...
Search complete.
Desired     purchase quantity not reached (wanted 1, got 0)
Searching for "mafia     pinky ring"...
Search complete.
Desired purchase quantity not     reached (wanted 1, got 0)
[COLOR=red]You need 1 more mafia pinky     ring to continue.[/COLOR]
Searching for "mafia pinky ring"...
Search     complete.
Desired purchase quantity not reached (wanted 1, got 0)
Searching     for "mafia pinky ring"...
Search complete.
Desired     purchase quantity not reached (wanted 1, got 0)
[COLOR=red]You     need 1 more mafia pinky ring to continue.[/COLOR]
[COLOR=red]Failed     to equip mafia pinky ring.[/COLOR]
[COLOR=red]Aborted drinking 1     bottle of laundry sherry.
[/COLOR]
[COLOR=olive]> set autoPinkyRing = false[/COLOR]

autoPinkyRing     => false
Preference autoPinkyRing changed from true to false

[COLOR=olive]> drink bottle of laundry sherry[/COLOR]

Drinking 1 bottle of laundry     sherry...
You gain 7 Adventures
You gain 77 Magicalness
You gain     2 Drunkenness
Finished drinking 1 bottle of laundry sherry.
Note that on the 3rd command I had a popup asking me if I am sure I want to drink without a pinky ring and I had to click yes before it drank it.

And I do not have a pinky ring on that account. as per
Code:
[COLOR=olive]> display pinky ring[/COLOR]

Updating display     case...

Requests complete.

[COLOR=olive]> inv pinky     ring[/COLOR]

giant pinky ring (19)

[COLOR=olive]> closet list pinky ring
[/COLOR]
showing there is no pinky ring in any of the suspected places

That account is also not in a clan at all
Code:
    [COLOR=olive]> clan[/COLOR]

Refreshing stash contents...
Unhandled     redirect to clan_signup.php
Could not being in a clan throw it off when it tries to check if I have a pinky ring in clan stash?
 
Last edited:

taltamir

Member
I am guessing the issue is that the mafia pinky ring check is looking and seeing I have enabled "buy items from the mall whenever needed. It thus triggers the code for "has a mafia ring" and then does a retrieve on it?
 

lostcalpolydude

Developer
Staff member
That sounds right. If you are never going to have a mafia pinky ring on that account because it is too expensive, then turning off autoPinkyRing seems like a reasonable thing to do. Especially since you have to go out of your way to turn it on in the first place.

I have never allowed KoLmafia to auto-purchase things from the mall, and never will, so I won't run into weird interactions that might result from having that enabled.
 

Crowther

Active member
The mafia pinky ring is only 40K in the mall (not 250K+). That's equivalent to less than one US penny based on current Mr. A prices. I get some people don't like to buy things from the mall, but if you drink wine occasionally, it will certainly pay for itself soon.
 

taltamir

Member
That sounds right. If you are never going to have a mafia pinky ring on that account because it is too expensive, then turning off autoPinkyRing seems like a reasonable thing to do. Especially since you have to go out of your way to turn it on in the first place.
I am definitely going to buy it on that account as soon as I have the money
The issue is with mafia aborting without drinking if it is unable to buy it. It is not looking at the automall max price nor at current meat before deciding "oh, can_interact() is true so we have the ring" and then failing to drink

also it should not be giving the popup of "are you really sure" when disabling autoPinkyRing
The mafia pinky ring is only 40K in the mall (not 250K+). That's equivalent to less than one US penny based on current Mr. A prices. I get some people don't like to buy things from the mall, but if you drink wine occasionally, it will certainly pay for itself soon.
I mixed the price with mafia thumb ring which is currently close to 300k. But its only a matter of time before the pinky ring rises in price too.

And yes I absolutely intend to buy it. I just have not gotten around to it yet on this new account.

and you cannot donate 1 penny and get a mr A. I am also not going to donate for my 4 autoscend test accounts. I am already donating on my actual main account and that is enough.
 
Last edited:

fronobulax

Developer
Staff member
I can find nowhere in the code where the check for ring availability depends upon the actual ability to buy it. There is no check I can find that determines the mall price, compares to the meat on hand and the autobuy limit and then modifies availability appropriately.

I'm not sure I would want to modify the code because it is used in a lot of places and the unitended consequences might be worse than the fix.

Is there any reason not to use the ring if it is in inventory? I can see a kludge where if the ring is not in inventory and autoPinkyRing is true then mafia resets the preference and emits a message. If it did that then the Are You Sure message would be removed.

That puts it back on the user to get the ring however they choose.

But if there is a reason to have the ring but not use it then I'm not seeing a solution that is simple enough for me to implement :)
 

lostcalpolydude

Developer
Staff member
I am definitely going to buy it on that account as soon as I have the money
The issue is with mafia aborting without drinking if it is unable to buy it. It is not looking at the automall max price nor at current meat before deciding "oh, can_interact() is true so we have the ring" and then failing to drink

Yeah, your niche case of turning on settings that assume a well-established character (both autoPinkyRing and auto-mall use) while having basically no resources (because you are trying to automate setting up lots of characters for automation testing?) is a case that doesn't seem worth supporting.

I call this combination of events player error. You may disagree, but that won't change the results on your end.
 
Top