Why doe mafia fail to buy items from the mall sometimes?

Malurth

Member
For example:

Code:
Searching for "drive-by shooting"...
Search complete.
Desired purchase quantity not reached (wanted 1, got 0)
You need 1 more drive-by shooting to continue.

???

This keeps messing up my scripts and it's a real pain in the ass. It doesn't explain anywhere why it failed...
 

xKiv

Active member
acquire/obtain (and all related automated retrieval) has a price limit above which it won't buy anything.
There are some edge cases around items that cost more than the limit, but can be created from ingredients that individually cost less than the limit.

"buy" doesn't, but it can fail if that item isn't available at all (or if you don't have enough money)
 

fronobulax

Developer
Staff member
I see. Thank you.

I think it would be really helpful if it would display that reason in the CLI, though.

I looked at that and while it is trivial to add some kind of hint about autoBuyPriceLimit in the message, there are numerous ways a purchase could fail and it might be misleading to change the message. AFAIK the message would also be generated if there were not enough of the requested item available in the mall or if there were, but you were on ignore lists. You can also run out of meat and generate that message. If the choice is between an incomplete message and a misleading one I'm inclined to leave this alone until someone does the work to determine for sure why a purchase request fails. For starters it needs to distinguish between failure because of autoBuyPriceLimit and failure due to the limit passed in with the (ash) buy command.
 

Pazleysox

Member
I looked at that and while it is trivial to add some kind of hint about autoBuyPriceLimit in the message, there are numerous ways a purchase could fail and it might be misleading to change the message. AFAIK the message would also be generated if there were not enough of the requested item available in the mall or if there were, but you were on ignore lists. You can also run out of meat and generate that message. If the choice is between an incomplete message and a misleading one I'm inclined to leave this alone until someone does the work to determine for sure why a purchase request fails. For starters it needs to distinguish between failure because of autoBuyPriceLimit and failure due to the limit passed in with the (ash) buy command.

I personally don't see a problem with this. If mafia fails to buy something like that (and it has for me also), there's usually a good reason.

There's times when I'm running the maximizer to do a one time thing and it would have cost me millions of meat to purchase something that wouldn't give me a great stat boost. It prompts me to look into why it failed, and figure out if I really need to buy that item or not.

If the script, or area requires you to have that specific item to complete a specific part of a quest, then maybe the author of the script should code into the script that you don't have enough meat, and it's aborting (I do that)
 

Malurth

Member
I looked at that and while it is trivial to add some kind of hint about autoBuyPriceLimit in the message, there are numerous ways a purchase could fail and it might be misleading to change the message. AFAIK the message would also be generated if there were not enough of the requested item available in the mall or if there were, but you were on ignore lists. You can also run out of meat and generate that message. If the choice is between an incomplete message and a misleading one I'm inclined to leave this alone until someone does the work to determine for sure why a purchase request fails. For starters it needs to distinguish between failure because of autoBuyPriceLimit and failure due to the limit passed in with the (ash) buy command.

Yeah, ideally it would display an error based on why it failed, but in the meantime perhaps you could add a hint with all of those reasons? Something like "(autoBuyPriceLimit may be too low, or you're out of meat, or that amount isn't available for you to buy in the mall)," if those are indeed all the reasons.

I mean, doesn't really matter to me since now I know, but I imagine it'd be helpful for others.
 
Top