Feature - Rejected Don't craft potions unless you are a sauceror

In aftercore, if I have reagents in my inventory, and decide to
> acquire tomato juice
without having any juice, mafia will purchase tomatos and craft the potions, even if I am not a sauceror.
This uses up a reagent (1k) and a fruit (negligible) to get a potion (400 meat).
Saucerors get three potions, and can sell potions for far less than the price of the ingredients. Therefore mafia should instead just buy the completed potions from the mall.
 
Last edited:

roippi

Developer
I would bet that there were some cheap reagents in the mall when mafia looked, maybe from an AR. If the sum of the components are cheaper than the product, it buys the components; else, it buys the product.
 

roippi

Developer
acquire tomato juice just acquires a potion for me, since the ingredients cost more than the potion.

Does buyScript properly assume that you will make one potion from the ingredients if !sauceror, and three if sauceror? If so, I don't see this feature being necessary.
 
I have just confirmed this again right now. I am a Pastamancer, and have saucecrafting permed. Reagents are 970 in the mall. Tomato juice is 325 in the mall. "acquire tomato juice" again purchased a tomato and crafted me a tomato juice.

To clarify, this is what I had before the command:
12 reagent
0 tomato
0 tomato juice

After the command:
11 reagent
0 tomato
1 tomato juice

Is it possible that mafia only worries about the prices of the the components that I don't already possess? When I got rid of my reagents and tried again, mafia directly purchased a juice.
 

Raijinili

Member
Does Mafia really check prices?

I remember being rather irritated that it kept buying up scrumdiddlyuptious solutions for 2.3k instead of just getting delectable catalysts and using my inventory reagents (worth about 950 at the time) to make them. Yes, as a sauceror. This was two runs ago, so April-May.
 

Veracity

Developer
Staff member
I remember being rather irritated that it kept buying up scrumdiddlyuptious solutions for 2.3k instead of just getting delectable catalysts and using my inventory reagents (worth about 950 at the time) to make them. Yes, as a sauceror. This was two runs ago, so April-May.
Being a sauceror or not is irrelevant to scrumdiddlyuptious solutions, since you do not get triple yield on them.

Did you have a chef-in-the-box? If not, it takes a turn to cook, and if (1000 + 950 + valueOfAdventure) > 2.3k, it really WAS cheaper to buy them in the mall. valueOfAdventure defaults to 500, unless you've changed it.
 

slyz

Developer
With no tomatoes and 4 reagents on hand, and autoSatisfyWithNPCs set to true, I get:
Code:
> ash creatable_amount( $item[ tomato juice of powerful power ] );

Returned: 4
It looks like retrieveItem() never gets to the part where it checks the mall prices of ingredients, since it thinks you have enough ingredients on-hand to make the potion.

Now, if I set debugBuy to true and either closet my reagents or turn off NPC buying (and make Mafia refresh its concoction list), I get:
Code:
> ash retrieve_item( 1, $item[ tomato juice of powerful power ] );

☯ scrumptious reagent onhand=970
☯ tomato mall=70 make=2147483647
☯ tomato juice of powerful power mall=300 make=1065
Searching for "tomato juice of powerful power"...
Search complete.
Purchasing tomato juice of powerful power (1 @ 300)...
You acquire an item: tomato juice of powerful power

This looks conform to the retrieval order. What might surprise people is that any NPC store item is considered as if it was already on-hand, if you have enough meat and if NPC purchases are allowed.
 
Last edited:

Raijinili

Member
This is what I had on May 16th, after "make 1200 cologne of contempt".

Code:
Use 38 delectable catalyst + 38 scrumptious reagent
You acquire scrumdiddlyumptious solution (38)

buy 362 scrumdiddlyumptious solution for 2300 each from 529827 on 20110516
You acquire scrumdiddlyumptious solution (362)

Cook 400 scrumdiddlyumptious solution + 400 dill
You acquire cologne of contempt (219)
<...>
Your chef blew up

Mafia used the delectable catalysts in inventory, but decided to buy the rest of the scrumdiddlies from the mall. I later bought reagents (when I ran out) for 975-980, RIGHT AFTER Mafia bought solutions for 2300 again when I tried to make more potions. NPC buying is on, and I don't remember changing it for years.
 

slyz

Developer
make doesn't call retrieveItem(), it makes.

EDIT: oh, but it buys the ingredients instead of making them. Hum.
 

Veracity

Developer
Staff member
I look forward to you looking at retrieveItem() and ConcoctionDatabase and CreateItemRequest and (etc.) and figuring out how to make it recursively look all the way down to discover the cheapest combination of making and buying intermediate ingredients, and then doing exactly that. Seriously. How Hard Can It Be? :) :)
 

Raijinili

Member
If "acquire" is supposed to evaluate cost, then perhaps the item creation should just use "acquire" (or the in-source equivalent).

My question is, when does Mafia evaluate costs?
 
crafting reagent potions over buying them in the mall

While autoadventuring with a mood including gr8tness and superhuman sarcasm, rather than buying the relevant potions, mafia is buying the ingredients and crafting them, taking turns for the cooking and much more meat than they're worth (I'm not a sauceror). Refreshing the session doesn't help.

Edit: buy from mall is turned on, obviously. Build 9733.
 
Last edited:

Theraze

Active member
Use a buyScript such as Bale's potionBuy, linked higher in the (merged) thread to do this. The feature already exists, so this request should be closed.
 

lostcalpolydude

Developer
Staff member
Actually, Veracity mentioned a possible route for implementing the feature into mafia. I could see someone marking it rejected because they don't consider it worth the effort to add the code (by one of the people that might actually change the code), but "there's a script for it" doesn't seem like enough on its own here to reject it.
 

Theraze

Active member
I believe that her post was sarcasm, not a suggestion. :) But that might just be my interpretation.
 

holatuwol

Developer
I believe that her post was sarcasm, not a suggestion. :) But that might just be my interpretation.
It's a bit of both. Sarcasm in the sense that there's no interest from the current developers to do it, and a suggestion that it probably isn't worth your time either.
 
Top