Bug - Fixed "Using" fancy beers in Item Manager

Veracity

Developer
Staff member
You can "use" a can of Brütelbräu, for example, to get a fancy tin beer can, even though it's primary use is as booze. We can indicate that in items.txt by making its usage be "booze, usable". (I will submit that, soon.) Having done that, the item is given the ATTR_USABLE flag and if you construct a UseItemRequest for it that does not specify that you want to drink it - CONSUME_BOOZE - it goes to inv_use.php rather than inv_booze.php. And, given that, if you select it on an inventory panel and say "use item", it uses it and creates a fancy tin beer can, as expected.

Unfortunately, you are not given the opportunity to say how many you want to "use"; since the primary usage is "booze", KoLmafia calculates how many you can use as if you were going to drink it.

This is all some funny interaction between ItemManagePanel.getDesiredItemAmount and UseItemRequest.maximumUses
 

mstieler

Member
I had noticed this from clicking the "Consume" button in the Booze Item Management section.

Using 1 can of Drooling Monk...
You acquire an item: fancy tin beer can
Finished using 1 can of Drooling Monk.

Then, after clicking the "Drink" link in the Relay Browser:
You gain 8 Adventures
You gain 50 Cheek
You acquire an item: fancy tin beer can
You gain 1 Drunkenness
You lose some of an effect: Ode to Booze
 

Veracity

Developer
Staff member
Revision 12880 fixes the Food and Drink panels to force queued food and drink to be eaten or drunk, rather than "used". Which only has an effect when said items have a secondary usage accessed via "use", but, these fancy beer cans now have such a usage.
 

Lord_Kobel

Member
I just wasted a load of hops and barley in 12892. Queued up to make and drink 15 cans of beer from the beer garden in the consumption helper. Said go and now I'm still at 0 drunk but with 15 fancy tin beer cans. Looks like mafia created the drinks, then poured them out rather than drinking them...
 

Ensiferum

Member
Confirming this - beers still get poured to make cans instead of being consumed, so whatever was changed in 12880 isn't working.
 

Veracity

Developer
Staff member
I went to Purchases.
I searched for "can of".
I bought a couple of them.
I went to the Booze tab.
I cast Ode.
I queued up both beers.
I hit the "consume" button.
It drank both of them.

Here is the CLI output for all of the above.

Searching for can of...
Searching for can of (2 of 3)...
Searching for can of (3 of 3)...
Search complete.
Purchasing can of Brütalbräu (1 @ 4,500)...
Purchases complete.
Purchasing can of Impetuous Scofflaw (1 @ 4,500)...
Purchases complete.
Casting The Ode to Booze 1 times...
You acquire an effect: Ode to Booze (duration: 20 Adventures)
The Ode to Booze was successfully cast.
Drinking 1 can of Impetuous Scofflaw...
You gain 6 Adventures
You gain 53 Roguishness
You acquire an item: fancy tin beer can
You gain 1 Drunkenness
You lose some of an effect: Ode to Booze
Finished drinking 1 can of Impetuous Scofflaw.
Drinking 1 can of Brütalbräu...
You gain 7 Adventures
You gain 58 Beefiness
You acquire an item: fancy tin beer can
You gain 1 Drunkenness
You lose some of an effect: Ode to Booze
Finished drinking 1 can of Brütalbräu.
You're going to have to be very specific about what exactly you did to get a different result.
 

lopey

New member
Two major differences in what you tried versus what I'm seeing:

1. The beer is crafted, not already in can form.
2. In my case, Ode wasn't cast, but I didn't get the reminder that I was drinking without Ode.

What looks like is happening is that when hops or barley are used, you get the So Brew! screen. From there, you create beers, but mafia isn't recognizing any sort of "drink" action from there. There's a "use" but that pours it out.
 

Veracity

Developer
Staff member
What looks like is happening is that when hops or barley are used, you get the So Brew! screen. From there, you create beers, but mafia isn't recognizing any sort of "drink" action from there. There's a "use" but that pours it out.
Whoa. You get a "screen"? You are in the Relay Browser - and KoLmafia is giving you a "use" Use Link, not a "drink" Use Link? And when you click on it, it "uses" the beer rather than "drinking" it? (No surprise, right? I mean, if you look at the beers in the Inventory, you see a "drink" link and a "use" link, both provided by KoL itself. If KoLmafia is giving you only one - and it says "use" - then you'd expect it to behave the same as KoL's "use" link, wouldn't you?)

Again, please be very specific about what you did.
 

Winterbay

Active member
I think what is being said is:
1) Buy hops and barley
2) Queue up the drinks in the consumption manager
3) Have mafia make the drinks and then pour them out instead of drinking them

At least that's how I interpreted it :) (I may be wrong, I often am...)
 

Veracity

Developer
Staff member
Searching for "cluster of hops"...
Search complete.
Purchasing cluster of hops (1 @ 2,490)...
Purchases complete.
Searching for "handful of barley"...
Search complete.
Purchasing handful of barley (1 @ 2,399)...
Purchases complete.
Casting The Ode to Booze 1 times...
You acquire an effect: Ode to Booze (duration: 20 Adventures)
The Ode to Booze was successfully cast.
Searching for "can of Impetuous Scofflaw"...
Search complete.
Verifying ingredients for can of Impetuous Scofflaw (1)...
Creating 1 can of Impetuous Scofflaw...
You acquire an item: can of Impetuous Scofflaw
Successfully created can of Impetuous Scofflaw (1)
Using 1 can of Impetuous Scofflaw...
You acquire an item: fancy tin beer can
Finished using 1 can of Impetuous Scofflaw.
OK, fine. How odd. I'll look into it.
 

Veracity

Developer
Staff member
Revision 12895 should fix this; when "consuming" booze, it will actually drink all of them, even the ones that it has to make from ingredients.
 
Top