using "acquire" - problem/bug?

tebee

Member
I seem to hit a a problem sometimes when using acquire/retrieve item. It works as I would expect it ( creates or buys) if I ask for "x" of an item and I have none of them and does what I would expect (nothing) if I already have "x" or more of them.
However if I have "y" of the item, where "y" is a number between 0 and "x" if it cannot create the item the script stops with the message " you need (x-y) item to continue". I seem to get the same error if I have less that the required number of components when it is trying create the items and it needs to buy something.

Is this a bug or I'm I missing something in the usage of this command ie. do I need to check how many I have on hand and acquire just the extra ones I need.

Tom
 

holatuwol

Developer
Please post...

- Version you're using
- Items you're trying to 'acquire'

Just vaguely saying 'seem' and 'component' doesn't help identify the problem.  If it's every single item you try, be sure to list these items so that people know where to start debugging.
 

tebee

Member
Sorry, I was being a bit vague as I've had this problem on several different versions of mafia trying to acquire several different things and only just got around to spading out what circumstances seem to cause it. Most of my problems have been running scripts but it also happens from the command line.

It seems to be any time acquire would need to purchase less than the number of items I have asked it to acquire.

For a specific example I've just tested -

on the latest daily build -

I have 5 bungle in the jungle in inventory.

I type in " acquire 6 bungle in the jungle" on the cli command line.

mafia says

You need 1 more bungle in the jungle to continue.

It seemed to be such an pervasive error that I was surprised no one had found it before, which I why I asked the question as to whether I was using the command wrongly.
 
In your Preferences on the general tab do you have the "Buy items from the mall when needed" option checked? I guess you would be saying that acquire never works if you didn't, but I figured I would check.
 

holatuwol

Developer
In order to protect players against KoLmafia doing something like buying a whole mass of tiny plastic swords, pumpkin buckets, etc., due to bad inventory tracking, KoLmafia doesn't ever automatically buy items which it thinks has no autosell value.

Banana items don't have an autosell value in the internal database. This has been updated for everything other than banana peels (which have no autosell value).

In the process I found a related bug where if a purchase did happen, it bought the parameter amount rather than the needed amount. That has also been fixed.
 
Top